* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
}

a {
    color: #1b5faa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    height: 56px;
    background: #1f2937;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.user-info {
    font-size: 14px;
    opacity: 0.9;
}

.app {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 230px;
    background: #ffffff;
    border-right: 1px solid #ddd;
    padding: 16px;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    color: #222;
}

.sidebar a:hover {
    background: #eef2f7;
    text-decoration: none;
}

.content {
    flex: 1;
    padding: 24px;
}

.logout-form {
    margin-top: 24px;
}

.logout-form button,
button {
    cursor: pointer;
    border: 0;
    border-radius: 6px;
    padding: 10px 14px;
    background: #1f2937;
    color: #fff;
}

button:hover {
    background: #111827;
}

.muted {
    color: #667085;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
}

.login-box {
    width: 360px;
    background: #fff;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.login-box h1 {
    margin-top: 0;
    font-size: 24px;
}

.login-box label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
}

.login-box button {
    width: 100%;
    margin-top: 18px;
}

.alert {
    padding: 10px 12px;
    border-radius: 6px;
    margin: 14px 0;
}

.alert-error {
    background: #f8d7da;
    color: #4a0f14;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #f3f4f6;
    font-weight: bold;
}

.row-inactive {
    background: #f1f3f5;
    color: #777;
}

.form {
    max-width: 720px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea,
.form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
}

.form textarea {
    resize: vertical;
}

.btn {
    display: inline-block;
    background: #1f2937;
    color: #fff;
    padding: 9px 13px;
    border-radius: 6px;
}

.btn:hover {
    background: #111827;
    text-decoration: none;
}

.inline-form {
    display: inline;
    margin-left: 8px;
}

.link-button {
    background: none;
    color: #1b5faa;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.link-button:hover {
    text-decoration: underline;
    background: none;
}

.link-button.danger {
    color: #b42318;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.department-box {
    margin-top: 18px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 14px;
}

.checkbox-label {
    display: block;
    font-weight: normal !important;
    margin: 8px 0 !important;
}

.btn-secondary {
    cursor: pointer;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    padding: 9px 13px;
    background: #ffffff;
    color: #1f2937;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.password-change-box {
    margin-top: 18px;
}
.wide-form {
    max-width: 980px;
}

.form h2 {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    font-size: 18px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #e5e7eb;
}

.card h2 {
    margin-top: 0;
    font-size: 18px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th,
.details-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.details-table th {
    width: 220px;
    text-align: left;
    background: #f8fafc;
}
.required {
    color: #b42318;
    font-weight: bold;
}
.signals-table {
    font-size: 14px;
}

.signals-table th,
.signals-table td {
    vertical-align: top;
}

.cell-address {
    max-width: 220px;
    font-size: 13px;
    line-height: 1.35;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.status-registered {
    background: #e5e7eb;
    color: #374151;
}

.status-assigned {
    background: #dbeafe;
    color: #1e3a8a;
}

.status-in-progress {
    background: #fef3c7;
    color: #78350f;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.row-warning {
    background: #fff4d6;
    color: #3a2a00;
}

.row-overdue {
    background: #f8d7da;
    color: #4a0f14;
}

.warning-text {
    color: #92400e;
    font-weight: bold;
}

.danger-text {
    color: #b42318;
    font-weight: bold;
}
.pagination {
    margin-top: 18px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    display: inline-block;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
}

.pagination a:hover {
    background: #f3f4f6;
    text-decoration: none;
}

.pagination .current {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

.filter-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
}

.filter-grid label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    padding: 8px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
}

.filter-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 1200px) {
    .filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.attachment-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #f9fafb;
}

.attachment-image {
    max-width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.attachment-video {
    max-width: 100%;
    height: 180px;
    border-radius: 6px;
    display: block;
    background: #000;
}

.attachment-meta {
    margin-top: 8px;
    font-size: 13px;
    word-break: break-word;
}

.cell-media {
    white-space: nowrap;
    text-align: center;
}

.media-icons {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    font-weight: bold;
    color: #1f2937;
}

.media-icons:hover {
    text-decoration: none;
}

.media-icons .bi {
    font-size: 18px;
}

.media-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.btn-disabled {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    color: #9ca3af;
    background: #f3f4f6;
}

.media-viewer {
    background: #111827;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
    text-align: center;
}

.media-viewer-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 6px;
}

.media-viewer-video {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 6px;
    background: #000;
}

.cell-description {
    max-width: 260px;
    font-size: 13px;
    line-height: 1.35;
    color: #4b5563;
}

.cell-description:hover {
    color: #111827;
}


.signal-media-summary {
    overflow-x: auto;
}

.media-summary-table {
    font-size: 13px;
    margin-bottom: 0;
}

.media-summary-table th,
.media-summary-table td {
    vertical-align: top;
}

.media-summary-table .cell-description {
    max-width: 260px;
    font-size: 12px;
    line-height: 1.35;
}

.media-summary-table .cell-address {
    max-width: 220px;
    font-size: 12px;
    line-height: 1.35;
}
