* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* BODY */
html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background-color: #0b0f1a;
    color: white;
    overflow-x: hidden;
}

body {
    display: block;
    background: linear-gradient(160deg, #0b0f1a 0%, #090d16 30%, #0a0f1d 100%);
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh;
    background: transparent;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    height: 100vh;
    background-color: #111827;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
    color: #1f3cff;
}

.sidebar a {
    display: block;
    padding: 10px;
    margin-bottom: 10px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 5px;
}

.sidebar a:hover {
    background-color: #1f2937;
    color: white;
}

/* MAIN */
.main {
    flex: 1;
    padding: 20px;
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.status {
    color: #22c55e;
}

/* CARDS */
.cards {
    display: flex;
    gap: 20px;
}

.card {
    background-color: #1f2937;
    padding: 20px;
    border-radius: 10px;
    width: 200px;
    text-align: center;
}

.card h3 {
    margin-bottom: 10px;
    color: #94a3b8;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1f3cff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.btn:hover {
    background-color: #162dcc;
}

input {
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    border: none;
    width: 200px;
}

/* LOGIN PAGE */

.login-body {
    height: 100vh;
    background: linear-gradient(135deg, #0b0f1a, #05070d);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-box {
    background: rgba(17, 24, 39, 0.9);
    padding: 40px;
    border-radius: 15px;
    width: 320px;
    text-align: center;
    box-shadow: 0 0 40px rgba(31, 60, 255, 0.2);
}

.login-box h1 {
    color: #1f3cff;
    margin-bottom: 5px;
}

.subtitle {
    color: #94a3b8;
    font-size: 12px;
    margin-bottom: 30px;
}

/* INPUT STYLE */

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 5px;
    color: white;
    outline: none;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 10px;
    color: #64748b;
    font-size: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: 0.3s;
}

/* animation label */
.input-group input:focus + label,
.input-group input:valid + label {
    top: -8px;
    font-size: 10px;
    color: #1f3cff;
    background: #111827;
    padding: 0 5px;
}

/* bouton */

.btn {
    width: 100%;
    padding: 10px;
    background: #1f3cff;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: #162dcc;
    box-shadow: 0 0 10px #1f3cff;
}

/* ADMIN STYLES */

.admin-content {
    background-color: #1f2937;
    padding: 20px;
    border-radius: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #111827;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.admin-table th, .admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #374151;
}

.admin-table th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f1f5f9;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background-color: #374151;
    transition: background-color 0.2s ease;
}

.log-default {
    background-color: #1f2937;
    transition: background-color 0.3s ease;
}

.log-login {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    transition: background-color 0.3s ease;
}

.log-register {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transition: background-color 0.3s ease;
}

.log-update {
    background: linear-gradient(135deg, #92400e 0%, #9a3412 100%);
    transition: background-color 0.3s ease;
}

.log-report {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%);
    transition: background-color 0.3s ease;
}

.log-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #374151;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 5px;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.9em;
}

.user-level-1 {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.user-level-2 {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.user-level-3 {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.user-level-4 {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.level-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.accred-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.accred-1 {
    background-color: #7c3aed;
}

.accred-2 {
    background-color: #059669;
}

.accred-3 {
    background-color: #d97706;
}

.accred-4 {
    background-color: #dc2626;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form select, .inline-form input {
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #374151;
    background-color: #111827;
    color: white;
}

.btn-small {
    padding: 5px 10px;
    background-color: #1f3cff;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-small:hover {
    background-color: #162dcc;
}

/* warning */

.warning {
    margin-top: 20px;
    font-size: 11px;
    color: #ef4444;
}

/* LAYOUT GLOBAL */

.layout {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 240px;
    background: #0f172a;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    color: #1f3cff;
    margin-bottom: 30px;
}

.sidebar-logo {
    width: 112px;
    height: 82px;
    margin: -6px auto 22px 0;
    object-fit: contain;
    display: block;
}

.access-logo {
    position: fixed;
    top: 24px;
    left: 24px;
    width: 120px;
    height: 120px;
    margin: 0;
    object-fit: contain;
    z-index: 2;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.data-table th,
.data-table td {
    border: none;
    padding: 14px 12px;
    text-align: left;
    color: #e2e8f0;
}

.data-table th {
    background: #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: #94a3b8;
}

.data-table tbody tr {
    background: #0f172a;
    border-radius: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.data-table tbody tr:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

.data-table tbody td a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.data-table tbody td a:hover {
    text-decoration: underline;
}

.sidebar a:hover,
.sidebar .active {
    background: #1e293b;
    color: white;
}

.logout {
    margin-top: auto;
}

.logout a {
    color: #ef4444;
}

/* PAGE SECTIONS */

.report-form,
.reports-list {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.report-form h2,
.reports-list h2 {
    margin-bottom: 14px;
    color: #93c5fd;
}

.report-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.report-form input {
    max-width: 220px;
}

.report-form .btn,
.reports-list .btn {
    margin-top: 8px;
}

/* MAIN */

.main {
    flex: 1;
    padding: 25px;
    background: #020617;
}

/* TOPBAR */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.report-form,
.reports-list,
.note-content {
    background: #0f172a;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.report-form h2,
.reports-list h2 {
    margin-bottom: 12px;
    color: #1f90ff;
}

.report-form input,
.report-form textarea,
.report-form select {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    background: #111827;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
}

.report-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.report-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.report-card .meta,
.report-card .detail-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: #94a3b8;
}

.report-card .meta span,
.report-card .detail-tags span {
    font-size: 12px;
    background: #0b1120;
    border: 1px solid #263247;
    border-radius: 6px;
    padding: 4px 8px;
}

.report-card a {
    color: #1f3cff;
    text-decoration: none;
}

.report-card a:hover {
    text-decoration: underline;
}
.subtitle {
    color: #64748b;
    font-size: 12px;
}

.user-info {
    text-align: right;
}

.online {
    color: #22c55e;
    display: block;
}

/* CARDS */

.cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #0f172a;
    padding: 20px;
    border-radius: 10px;
    width: 220px;
    box-shadow: 0 0 20px rgba(31, 60, 255, 0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(31, 60, 255, 0.3);
}

.card h3 {
    color: #94a3b8;
    margin-bottom: 10px;
}

.card p {
    font-size: 28px;
    font-weight: bold;
}

.card-info {
    font-size: 12px;
    color: #64748b;
}

/* ACTIVITÉ */

.activity {
    background: #0f172a;
    padding: 20px;
    border-radius: 10px;
}

.activity h2 {
    margin-bottom: 15px;
}

.log {
    padding: 10px;
    border-bottom: 1px solid #1e293b;
    color: #cbd5f5;
}

.log span {
    color: #1f3cff;
    margin-right: 10px;
}

.login-box img {
    width: 80px;
    margin-bottom: 10px;
}

/* SERVICE PAGE */

.status-pill {
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: bold;
    border: 2px solid transparent;
    display: inline-block;
}

.status-active {
    border-color: #22c55e;
    color: #ffffff;
    background: rgba(34,197,94,0.1);
}

.status-paused {
    border-color: #f59e0b;
    color: #ffffff;
    background: rgba(245,158,11,0.12);
}

.status-inactive {
    border-color: #ef4444;
    color: #ffffff;
    background: rgba(239,68,68,0.12);
}

.service-box {
    background: #0f172a;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
}

#timer {
    font-size: 32px;
    margin: 20px 0;
}

#pauseBtn {
    background: #f59e0b;
    border: 1px solid #d97706;
    color: #fff;
}

#pauseBtn:hover {
    background: #d97706;
}

.stop {
    background: #ef4444;
}

.stop:hover {
    background: #dc2626;
}

.offline {
    color: #ef4444;
}

/* REPORT DETAILS STYLE */

.report-details-card {
    background: linear-gradient(195deg, #111827 0%, #181c2f 60%, #0d1221 100%);
    border: 1px solid #263147;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    max-width: 1100px;
    margin: 30px auto;
}

.report-details-card h1 {
    font-size: 2.05rem;
    color: #a5b4fc;
    margin-bottom: 8px;
    letter-spacing: 0.8px;
}

.report-details-card h2 {
    font-size: 1.18rem;
    color: #cbd5e1;
    margin-top: 18px;
    margin-bottom: 10px;
}

.report-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.report-details-meta span {
    background: #0f172a;
    border: 1px solid #1f2937;
    color: #94a3b8;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: .95rem;
}

.report-details-content {
    color: #e5e7eb;
    line-height: 1.78;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 10px;
    background: #111827;
    border: 1px solid #1f2937;
}

.report-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.report-details-grid .card {
    background: #0f172a;
    border: 1px solid #263147;
    border-radius: 10px;
    padding: 12px;
    color: #dbeafe;
    font-size: .94rem;
}

.report-details-grid .card strong {
    color: #f8fafc;
}

.btn-back {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 16px;
    background: #1f3cff;
    border: none;
    border-radius: 9px;
    color: white;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease;
}

.btn-back:hover {
    transform: translateY(-1px);
    background: #162dcc;
}

.citizen-delete {
    margin-top: 0;
    font: inherit;
    cursor: pointer;
    background: #b42318;
}

.citizen-delete:hover {
    background: #8f1d14;
}

.online {
    color: #22c55e;
}

/* REPORTS */

.report-form {
    background: #0f172a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    width: 400px;
}

.report-form input,
.report-form textarea,
.report-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    background: #020617;
    color: white;
}

.report-form textarea {
    height: 100px;
}

.reports-list {
    margin-top: 20px;
}

.report-card {
    background: #0f172a;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.report-card h3 {
    margin-bottom: 5px;
}

.meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

.layout {
    display: flex;
    height: 100vh;
}

/* SIDEBAR fixe */
.sidebar {
    width: 240px;
    min-width: 240px;
}

/* MAIN prend TOUT le reste */
.main {
    flex: 1; /* 🔥 TRÈS IMPORTANT */
    padding: 25px;
    background: #020617;
}

.cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* 🔥 permet d’occuper l’espace */
}

.activity {
    width: 100%;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* MESSAGES */

@keyframes message-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes message-slide {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-kicker,
.section-kicker,
.message-sidebar-label {
    margin-bottom: 6px;
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.page-kicker {
    margin-bottom: 4px;
}

.message-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
    max-width: 1440px;
}

.message-sidebar,
.message-compose,
.message-list {
    background: #0f172a;
    border: 1px solid #23304a;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

.message-sidebar {
    animation: message-slide .55s ease-out both;
}

.message-sidebar {
    padding: 14px;
}

.message-sidebar-label {
    padding: 5px 10px 8px;
    color: #64748b;
}

.message-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 10px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #cbd5e1;
    font-size: 14px;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.compose-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 11px 10px;
    border: 1px solid #3151ff;
    border-radius: 7px;
    justify-content: center;
    margin-bottom: 24px !important;
    background: #1f3cff;
    color: white !important;
    cursor: pointer;
    font-weight: 700;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.compose-link:hover {
    background: #3151ff !important;
    box-shadow: 0 8px 18px rgba(31, 60, 255, .22);
    transform: translateY(-2px);
}

.message-sidebar a:hover,
.message-sidebar a.active {
    background: #1e293b;
    border-color: #334155;
    color: white;
}

.message-sidebar a:hover {
    transform: translateX(3px);
}

.folder-arrow {
    color: #64748b;
    font-size: 20px;
    line-height: 12px;
}

.message-sidebar a.active .folder-arrow {
    color: #60a5fa;
}

.message-compose h2,
.message-list h2 {
    margin-bottom: 6px;
    color: #1f90ff;
    font-size: 21px;
}

.message-compose,
.message-list {
    grid-column: 2;
}

.message-main {
    display: grid;
    gap: 20px;
}

.message-list {
    animation: message-rise .55s .08s ease-out both;
}

.message-compose {
    animation: message-rise .55s .18s ease-out both;
}

.message-compose.is-hidden {
    display: none;
}

.message-compose.is-open {
    animation: composer-open .34s ease-out both;
}

@keyframes composer-open {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.section-intro {
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

.message-compose input,
.message-compose textarea,
.message-compose select {
    width: 100%;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #020617;
    color: white;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.message-compose input:focus,
.message-compose textarea:focus,
.message-compose select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.message-compose label {
    display: block;
    margin-bottom: 6px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

.message-compose form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
}

.message-field-wide,
.message-compose form .btn {
    grid-column: 1 / -1;
}

.message-field label {
    display: block;
    margin-bottom: 6px;
}

.message-compose textarea {
    min-height: 164px;
    resize: vertical;
}

.message-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: start;
    padding: 17px 0;
    border-bottom: 1px solid #263147;
    animation: message-rise .45s ease-out both;
    transition: padding-left .2s ease, border-color .2s ease;
}

.message-card:nth-of-type(2) { animation-delay: .08s; }
.message-card:nth-of-type(3) { animation-delay: .16s; }
.message-card:nth-of-type(4) { animation-delay: .24s; }
.message-card:nth-of-type(5) { animation-delay: .32s; }

.message-card:hover {
    padding-left: 8px;
    border-color: #3151ff;
}

.message-card:last-child {
    border-bottom: 0;
}

.message-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #f8fafc;
}

.message-card-header strong {
    font-size: 15px;
    line-height: 1.4;
}

.message-list-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
}

.message-count {
    padding: 5px 8px;
    border: 1px solid #334155;
    border-radius: 999px;
    color: #93c5fd;
    font-size: 11px;
    white-space: nowrap;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 5px;
    color: #93c5fd;
    font-size: 13px;
}

.message-date {
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.message-content {
    margin-top: 10px;
    color: #cbd5e1;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-delete {
    padding: 5px 8px;
    border: 1px solid #7f1d1d;
    border-radius: 5px;
    background: transparent;
    color: #fca5a5;
    cursor: pointer;
    opacity: .7;
    transition: background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

.message-delete:hover {
    background: rgba(127, 29, 29, .2);
    border-color: #ef4444;
    opacity: 1;
}

.message-compose .btn {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.message-compose .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 60, 255, .24);
}

@media (prefers-reduced-motion: reduce) {
    .message-sidebar,
    .message-list,
    .message-compose,
    .message-card {
        animation: none;
    }

    .message-sidebar a,
    .message-card,
    .message-compose .btn {
        transition: none;
    }
}

/* FIB MDT DESIGN SYSTEM */

body:not(.login-body) {
    background:
        linear-gradient(rgba(31, 60, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 60, 255, .025) 1px, transparent 1px),
        radial-gradient(circle at 78% 0%, #111d38 0%, #080d1a 42%, #05070d 100%);
    background-size: 54px 54px, 54px 54px, auto;
}

.layout {
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid #1e2b46;
    background: rgba(15, 23, 42, .94);
    box-shadow: 12px 0 30px rgba(0, 0, 0, .12);
    z-index: 2;
}

.sidebar-logo {
    width: 116px;
    height: 86px;
    margin: -4px auto 28px 0;
}

.sidebar a {
    border: 1px solid transparent;
    font-size: 14px;
}

.sidebar a:hover,
.sidebar a.active {
    border-color: #2b3c5d;
    background: #1e293b;
}

.main {
    min-width: 0;
    padding: 32px clamp(22px, 4vw, 58px);
    background: transparent;
}

.topbar {
    max-width: 1440px;
    margin-bottom: 32px;
}

.topbar h1 {
    color: #f8fafc;
    font-size: clamp(26px, 3vw, 34px);
}

.subtitle {
    margin-top: 6px;
    color: #7183a3;
}

.card,
.activity,
.service-box,
.report-form,
.reports-list,
.admin-content,
.report-details-card {
    border: 1px solid #26385c;
    border-radius: 12px;
    background: rgba(15, 23, 42, .88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

.card:hover {
    border-color: #3151ff;
    box-shadow: 0 18px 42px rgba(31, 60, 255, .16);
}

.card h3,
.activity h2,
.report-form h2,
.reports-list h2,
.admin-content h2,
.service-box h2 {
    color: #e2e8f0;
}

.report-form,
.reports-list,
.activity,
.admin-content,
.service-box {
    max-width: 1440px;
}

.report-form form {
    gap: 14px;
}

.report-form input,
.report-form textarea,
.report-form select,
.inline-form select,
.inline-form input {
    border: 1px solid #334155;
    background: #080f1f;
    color: #f8fafc;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.report-form input:focus,
.report-form textarea:focus,
.report-form select:focus,
.inline-form select:focus,
.inline-form input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}

.btn,
.btn-small,
.btn-back {
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:hover,
.btn-small:hover,
.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(31, 60, 255, .2);
}

.report-card,
.log,
.stat-card {
    border: 1px solid #23304a;
    background: #101a2d;
}

.report-card:hover,
.stat-card:hover {
    border-color: #3151ff;
}

.data-table,
.admin-table {
    border: 1px solid #26385c;
    border-radius: 10px;
}

.data-table th,
.admin-table th {
    background: #16233b;
    color: #93c5fd;
}

.data-table tbody tr,
.admin-table tbody tr {
    transition: background-color .18s ease;
}

.data-table tbody tr:hover,
.admin-table tbody tr:hover {
    background: #17243a;
}

/* DASHBOARD ACTIVITY */

.activity-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.activity-heading h2 {
    margin-bottom: 0;
}

.activity-caption {
    padding: 6px 9px;
    border: 1px solid #334155;
    border-radius: 999px;
    color: #93c5fd;
    font-size: 11px;
    white-space: nowrap;
}

.ranking-row {
    display: grid;
    grid-template-columns: 28px 38px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1f2937;
    animation: page-enter .45s ease-out both;
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-position {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.ranking-row:first-of-type .ranking-position {
    color: #fbbf24;
}

.ranking-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #3151ff;
    border-radius: 50%;
    background: #172554;
    color: #bfdbfe;
    font-weight: 700;
}

.ranking-agent {
    min-width: 0;
}

.ranking-agent strong {
    color: #e2e8f0;
    font-size: 14px;
}

.ranking-track {
    height: 4px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #1e293b;
}

.ranking-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f3cff, #60a5fa);
}

.ranking-duration {
    color: #93c5fd;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.recent-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 8px;
    border-bottom: 1px solid #1f2937;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color .18s ease, padding-left .18s ease;
}

.recent-item:last-child {
    border-bottom: 0;
}

.recent-item:hover {
    padding-left: 13px;
    background: #121f35;
}

.recent-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.report-icon {
    background: rgba(49, 81, 255, .18);
    color: #93c5fd;
}

.citizen-icon {
    background: rgba(34, 197, 94, .14);
    color: #86efac;
}

.recent-item-content {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.recent-item-content strong {
    color: #e2e8f0;
    font-size: 13px;
}

.recent-item-content span {
    overflow: hidden;
    color: #94a3b8;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item time,
.recent-arrow {
    color: #64748b;
    font-size: 12px;
}

.recent-arrow {
    font-size: 20px;
}

.empty-dashboard {
    padding: 24px 0 8px;
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 600px) {
    .ranking-row {
        grid-template-columns: 24px 34px minmax(0, 1fr);
    }

    .ranking-avatar {
        width: 34px;
        height: 34px;
    }

    .ranking-duration {
        grid-column: 3;
        grid-row: 2;
    }

    .recent-item time {
        display: none;
    }
}

@media (max-width: 760px) {
    .sidebar {
        width: 198px;
        min-width: 198px;
        padding: 16px 12px;
    }

    .sidebar-logo {
        width: 100px;
        height: 76px;
    }

    .main {
        padding: 24px 16px;
    }

    .topbar {
        margin-bottom: 24px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .report-form {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .layout {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-width: 0;
        padding: 12px 14px;
        border-right: 0;
        border-bottom: 1px solid #1e2b46;
    }

    .sidebar-logo {
        width: 82px;
        height: 58px;
        margin: 0 auto 8px 0;
    }

    .sidebar a {
        display: inline-block;
        margin: 2px;
        padding: 8px 9px;
        font-size: 12px;
    }

    .logout {
        margin-top: 8px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}

/* REPORTS REGISTER */

.reports-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.reports-heading h2 {
    margin-bottom: 0;
}

.reports-count {
    padding: 6px 10px;
    border: 1px solid #334155;
    border-radius: 999px;
    color: #93c5fd;
    font-size: 11px;
    white-space: nowrap;
}

.report-card {
    position: relative;
    padding: 20px 22px;
    border: 1px solid #26385c;
    border-radius: 11px;
    background: #101a2d;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
    animation: page-enter .45s ease-out both;
    transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.report-card:nth-of-type(2) { animation-delay: .06s; }
.report-card:nth-of-type(3) { animation-delay: .12s; }
.report-card:nth-of-type(4) { animation-delay: .18s; }
.report-card:nth-of-type(5) { animation-delay: .24s; }

.report-card:hover {
    border-color: #3b82f6;
    background: #121f35;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .2);
    transform: translateY(-3px);
}

.report-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.report-reference {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.report-level {
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.level-1 {
    border-color: rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .1);
    color: #86efac;
}

.level-2 {
    border-color: rgba(245, 158, 11, .35);
    background: rgba(245, 158, 11, .1);
    color: #fcd34d;
}

.level-3 {
    border-color: rgba(239, 68, 68, .35);
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
}

.report-card h3 {
    margin-bottom: 9px;
    font-size: 18px;
}

.report-card h3 a {
    color: #f8fafc;
}

.report-card h3 a:hover {
    color: #93c5fd;
    text-decoration: none;
}

.report-preview {
    display: -webkit-box;
    min-height: 42px;
    margin-bottom: 16px;
    overflow: hidden;
    color: #a8b5c9;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.report-card .meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-top: 1px solid #23304a;
    border-bottom: 1px solid #23304a;
    color: #7183a3;
    font-size: 12px;
}

.report-card .meta strong {
    color: #cbd5e1;
}

.report-card .detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.report-card .detail-tags span {
    border: 0;
    background: #17243a;
    color: #94a3b8;
    font-size: 11px;
}

.report-card .detail-tags b {
    margin-right: 4px;
    color: #60a5fa;
}

.report-field-group {
    grid-column: 1 / -1;
}

.report-dossier-fields {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    padding: 16px;
    border: 1px solid #3151ff;
    border-radius: 9px;
    background: rgba(31, 60, 255, .06);
}

.report-dossier-fields.is-visible {
    display: grid;
}

.report-dossier-fields textarea {
    min-height: 90px;
}

.group-intelligence {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 1440px;
    margin-bottom: 22px;
}

.group-intelligence div {
    display: grid;
    gap: 8px;
    min-height: 88px;
    padding: 16px;
    border: 1px solid #26385c;
    border-radius: 10px;
    background: #101a2d;
}

.group-intelligence span {
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.group-intelligence strong {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.report-group-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 6px 9px;
    border: 1px solid #334155;
    border-radius: 6px;
    background: rgba(49, 81, 255, .1);
    color: #93c5fd !important;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
}

.report-group-link span {
    font-size: 17px;
    line-height: 10px;
}

.group-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 1440px;
    margin-bottom: 22px;
}

.group-summary div {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid #26385c;
    border-radius: 10px;
    background: #101a2d;
}

.group-summary span {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.group-summary strong {
    overflow: hidden;
    color: #93c5fd;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
    gap: 20px;
    max-width: 1440px;
}

.group-report-row,
.group-citizen-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #1f2937;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color .18s ease, padding-left .18s ease;
}

.group-report-row:last-child,
.group-citizen-row:last-child {
    border-bottom: 0;
}

.group-report-row:hover,
.group-citizen-row:hover {
    padding-left: 8px;
    background: #121f35;
}

.group-report-row > span:nth-child(2),
.group-citizen-row > span:nth-child(2) {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.group-report-row strong,
.group-citizen-row strong {
    overflow: hidden;
    color: #e2e8f0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-report-row small,
.group-citizen-row small {
    overflow: hidden;
    color: #7183a3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-row-arrow {
    color: #60a5fa;
    font-size: 20px;
}

.group-index-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #1f2937;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color .18s ease, padding-left .18s ease;
}

.group-index-row:last-child {
    border-bottom: 0;
}

.group-index-row:hover {
    padding-left: 8px;
    background: #121f35;
}

.group-index-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #3151ff;
    border-radius: 8px;
    background: #172554;
    color: #93c5fd;
    font-weight: 700;
}

.group-index-row > span:nth-child(2) {
    display: grid;
    gap: 4px;
}

.group-index-row small {
    color: #7183a3;
    font-size: 11px;
}

.group-create-form {
    width: 100%;
    max-width: 1440px;
}

.group-create-form form {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 14px;
}

.group-create-form input,
.group-create-form textarea {
    width: 100%;
    margin: 0;
}

.group-create-form textarea {
    min-height: 80px;
    resize: vertical;
}

.group-create-form .btn {
    width: auto;
    align-self: end;
}

@media (max-width: 800px) {
    .group-content-grid,
    .group-summary {
        grid-template-columns: 1fr;
    }

    .group-intelligence {
        grid-template-columns: 1fr;
    }

    .group-create-form form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .report-dossier-fields {
        grid-template-columns: 1fr;
    }

    .report-card {
        padding: 17px;
    }

    .report-card .meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

/* REPORT CREATION FORM */

.report-create-form {
    width: 100%;
    max-width: 1440px;
    padding: 24px;
}

.report-form-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.report-form-heading h2 {
    margin-bottom: 0;
}

.form-badge {
    padding: 6px 9px;
    border: 1px solid #334155;
    border-radius: 5px;
    color: #93c5fd;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
}

.report-create-form form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 14px 18px;
    align-items: end;
}

.report-field {
    min-width: 0;
}

.report-field label {
    display: block;
    margin-bottom: 6px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

.report-create-form .report-field input,
.report-create-form .report-field select,
.report-create-form .report-field textarea {
    margin: 0;
}

.report-field-wide,
.report-operational-fields,
.report-create-form .report-create-submit {
    grid-column: 1 / -1;
}

.report-operational-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    padding: 16px;
    border: 1px solid #23304a;
    border-radius: 9px;
    background: rgba(8, 15, 31, .42);
}

.report-operational-fields input {
    width: 100%;
    margin: 0;
}

.report-create-form textarea {
    min-height: 120px;
    resize: vertical;
}

.report-create-form .report-create-submit {
    width: auto;
    min-width: 190px;
    justify-self: start;
}

@media (max-width: 700px) {
    .report-create-form {
        padding: 18px;
    }

    .report-create-form form {
        display: block;
    }

    .report-field,
    .report-operational-fields,
    .report-create-form .report-create-submit {
        margin-bottom: 14px;
    }

    .report-operational-fields {
        display: block;
        padding: 12px;
    }

    .report-operational-fields input {
        margin-bottom: 12px;
    }

    .report-operational-fields input:last-child {
        margin-bottom: 0;
    }

    .report-create-form .report-create-submit {
        width: 100%;
    }
}

    /* CITIZENS */

    .citizen-section-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 18px;
    }

    .citizen-section-heading h2 {
        margin-bottom: 0;
    }

    .citizen-create-form {
        width: 100%;
        max-width: 1440px;
        padding: 24px;
    }

    .citizen-create-form form {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
        gap: 12px;
        align-items: end;
    }

    .citizen-create-form form input {
        width: 100%;
        margin: 0;
    }

    .citizen-create-form form .btn {
        width: auto;
        min-width: 160px;
    }

    .citizen-switches {
        display: flex;
        align-items: center;
        gap: 18px;
        grid-column: 1 / -1;
        padding: 8px 0 2px;
    }

    .switch-field {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #cbd5e1;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
    }

    .switch-field input {
        position: absolute;
        width: 1px !important;
        height: 1px;
        opacity: 0;
    }

    .switch-control {
        position: relative;
        width: 36px;
        height: 20px;
        border: 1px solid #475569;
        border-radius: 999px;
        background: #1e293b;
        transition: background-color .2s ease, border-color .2s ease;
    }

    .switch-control::after {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #94a3b8;
        content: "";
        transition: transform .2s ease, background-color .2s ease;
    }

    .switch-field input:checked + .switch-control {
        border-color: #ef4444;
        background: rgba(239, 68, 68, .22);
    }

    .switch-field input:checked + .switch-control::after {
        background: #fca5a5;
        transform: translateX(16px);
    }

    .switch-field input:focus-visible + .switch-control {
        outline: 3px solid rgba(96, 165, 250, .25);
    }

    .citizen-identity {
        display: inline-flex;
        align-items: center;
        gap: 11px;
        color: #e2e8f0 !important;
        text-decoration: none !important;
    }

    .citizen-avatar,
    .citizen-profile-avatar {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        border: 1px solid #3151ff;
        border-radius: 50%;
        background: #172554;
        color: #bfdbfe;
        font-weight: 700;
    }

    .citizen-avatar {
        width: 34px;
        height: 34px;
        font-size: 11px;
    }

    .citizen-identity > span:last-child {
        display: grid;
        gap: 3px;
        text-align: left;
    }

    .citizen-identity small {
        color: #64748b;
        font-size: 11px;
    }

    .citizen-id {
        color: #60a5fa !important;
        font-weight: 700;
    }

    .citizen-date {
        color: #cbd5e1;
        font-variant-numeric: tabular-nums;
    }

    .table-action {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: #93c5fd !important;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none !important;
    }

    .table-action span {
        font-size: 18px;
        line-height: 12px;
        transition: transform .18s ease;
    }

    .table-action:hover span {
        transform: translateX(3px);
    }

    .citizen-profile {
        display: grid;
        grid-template-columns: minmax(260px, 1.2fr) minmax(0, 1fr) auto;
        gap: 24px;
        align-items: center;
        max-width: 1440px;
        margin-bottom: 22px;
        padding: 24px;
        border: 1px solid #26385c;
        border-radius: 12px;
        background: rgba(15, 23, 42, .88);
        box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
    }

    .citizen-profile-identity {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .citizen-profile-avatar {
        width: 70px;
        height: 70px;
        border-color: #4f6cff;
        background: #1e2b5a;
        font-size: 20px;
    }

    .citizen-profile-identity h2 {
        margin-bottom: 8px;
        color: #f8fafc;
        font-size: 22px;
    }

    .citizen-status {
        display: inline-block;
        padding: 4px 8px;
        border: 1px solid rgba(34, 197, 94, .35);
        border-radius: 999px;
        background: rgba(34, 197, 94, .1);
        color: #86efac;
        font-size: 11px;
        font-weight: 700;
    }

    .citizen-facts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .citizen-facts div {
        display: grid;
        gap: 6px;
        padding-left: 13px;
        border-left: 1px solid #334155;
    }

    .citizen-facts span {
        color: #64748b;
        font-size: 11px;
    }

    .citizen-facts strong {
        color: #cbd5e1;
        font-size: 13px;
    }

    .citizen-back {
        margin-top: 0;
        white-space: nowrap;
    }

    .citizen-profile-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        grid-column: 1 / -1;
    }

    .citizen-profile-actions .btn-back {
        margin-top: 0;
    }

    .citizen-edit-form {
        width: 100%;
        max-width: 900px;
    }

    .citizen-edit-form form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 18px;
    }

    .citizen-edit-form form input {
        width: 100%;
        margin: 0;
    }

    .citizen-edit-form .citizen-switches,
    .citizen-edit-actions {
        grid-column: 1 / -1;
    }

    .citizen-edit-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        padding-top: 8px;
    }

    .citizen-edit-actions .btn,
    .citizen-edit-actions .btn-back {
        width: auto;
        margin-top: 0;
    }

    .log-authorization {
        display: inline-block;
        padding: 4px 7px;
        border: 1px solid #334155;
        border-radius: 5px;
        font-size: 10px;
        font-weight: 700;
    }

    .log-authorization.authorized {
        border-color: rgba(34, 197, 94, .4);
        background: rgba(34, 197, 94, .1);
        color: #86efac;
    }

    .log-authorization.denied {
        border-color: rgba(239, 68, 68, .4);
        background: rgba(239, 68, 68, .1);
        color: #fca5a5;
    }

    .log-authorization.unknown {
        color: #94a3b8;
    }

    .citizen-alerts {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        grid-column: 1 / -1;
    }

    .citizen-flag {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 10px;
        border: 1px solid #334155;
        border-radius: 6px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
    }

    .citizen-flag i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #64748b;
    }

    .citizen-flag.is-active.wanted {
        border-color: rgba(239, 68, 68, .45);
        background: rgba(239, 68, 68, .1);
        color: #fca5a5;
    }

    .citizen-flag.is-active.dangerous {
        border-color: rgba(245, 158, 11, .45);
        background: rgba(245, 158, 11, .1);
        color: #fcd34d;
    }

    .citizen-flag.is-active i {
        background: currentColor;
    }

    .citizen-information-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
        max-width: 1440px;
        margin-bottom: 22px;
    }

    .citizen-info-block {
        display: grid;
        gap: 8px;
        min-height: 92px;
        padding: 16px;
        border: 1px solid #26385c;
        border-radius: 10px;
        background: #101a2d;
    }

    .citizen-info-block span {
        color: #60a5fa;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .citizen-info-block strong {
        color: #cbd5e1;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .photo-upload-field {
        flex-wrap: wrap;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        grid-column: 1 / -1;
        padding: 12px;
        border: 1px dashed #3b82f6;
        border-radius: 8px;
        background: rgba(59, 130, 246, .07);
        color: #93c5fd;
        font-size: 12px;
        font-weight: 600;
    }

    .photo-upload-field input {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    .photo-upload-field label {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 220px;
        padding: 9px 12px;
        border: 1px solid #3151ff;
        border-radius: 7px;
        background: #172554;
        color: #bfdbfe;
        cursor: pointer;
        transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
    }

    .photo-upload-field label:hover {
        border-color: #60a5fa;
        background: #1e2b5a;
        transform: translateY(-1px);
    }

    .photo-upload-field label small {
        display: block;
        margin-top: 3px;
        color: #93a4c2;
        font-size: 10px;
        font-weight: 400;
    }

    .upload-icon {
        display: grid;
        width: 24px;
        height: 24px;
        place-items: center;
        border: 1px solid #60a5fa;
        border-radius: 50%;
        color: #bfdbfe;
        font-size: 18px;
        font-weight: 400;
        line-height: 1;
    }

    .photo-file-name {
        overflow: hidden;
        color: #64748b;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .photo-file-name.has-files {
        color: #86efac;
    }

    @media (max-width: 600px) {
        .photo-upload-field label {
            width: 100%;
        }

        .photo-file-name {
            max-width: 100%;
        }
    }

    .citizen-photos-panel {
        max-width: 1440px;
        margin-bottom: 22px;
        padding: 22px;
        border: 1px solid #26385c;
        border-radius: 12px;
        background: rgba(15, 23, 42, .88);
        box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
    }

    .citizen-photo-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .citizen-photo-grid a {
        display: block;
        aspect-ratio: 4 / 3;
        overflow: hidden;
        border: 1px solid #334155;
        border-radius: 8px;
        background: #080f1f;
    }

    .citizen-photo-grid img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .25s ease, opacity .25s ease;
    }

    .citizen-photo-grid a:hover img {
        opacity: .85;
        transform: scale(1.05);
    }

    @media (max-width: 800px) {
        .citizen-create-form form {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .citizen-create-form form .btn {
            grid-column: 1 / -1;
        }

        .citizen-profile {
            grid-template-columns: 1fr;
        }

        .citizen-back {
            justify-self: start;
        }

        .citizen-edit-form form {
            grid-template-columns: 1fr;
        }

        .citizen-edit-actions {
            align-items: stretch;
            flex-direction: column;
        }

        .citizen-edit-actions .btn,
        .citizen-edit-actions .btn-back {
            width: 100%;
        }
    }

    @media (max-width: 600px) {
        .citizen-section-heading {
            flex-direction: column;
        }

        .citizen-create-form form {
            display: block;
        }

        .citizen-create-form form input,
        .citizen-create-form form .btn {
            margin-bottom: 12px;
        }

        .citizen-create-form form .btn {
            width: 100%;
        }

        .citizen-facts {
            grid-template-columns: 1fr;
        }

        .citizen-information-grid {
            grid-template-columns: 1fr 1fr;
        }
    }

    @media (max-width: 420px) {
        .citizen-switches {
            flex-direction: column;
            align-items: flex-start;
        }

        .citizen-information-grid {
            grid-template-columns: 1fr;
        }
    }

/* REPORT ACTIONS */

.report-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #26385c;
}

.report-actions form {
    margin: 0;
}

.report-actions .btn-small,
.report-actions .btn-back,
.report-edit-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.report-action-primary {
    background: #3151ff;
}

.report-action-primary:hover {
    background: #4361ff;
}

.report-action-danger {
    background: #991b1b;
}

.report-action-danger:hover {
    background: #dc2626;
}

.report-action-back,
.report-edit-back {
    background: #1e293b;
    color: #cbd5e1;
}

.report-action-back:hover,
.report-edit-back:hover {
    background: #334155;
    color: white;
}

.report-edit-back {
    margin-top: 12px;
}

.admin-field-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.inline-form select {
    min-width: 170px;
}

.inline-form select[name="accreditation"] {
    min-width: 125px;
}

@media (max-width: 600px) {
    .report-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-actions form,
    .report-actions a,
    .report-actions button {
        width: 100%;
    }
}

/* LOGIN REDESIGN */

@keyframes login-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-body {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(rgba(31, 60, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 60, 255, .035) 1px, transparent 1px),
        radial-gradient(circle at 50% 0%, #142044 0%, #080d1a 44%, #05070d 100%);
    background-size: 54px 54px, 54px 54px, auto;
}

.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    align-items: center;
}

.login-box {
    position: relative;
    width: min(430px, calc(100% - 36px));
    padding: 42px 46px 34px;
    border: 1px solid #26385c;
    border-radius: 16px;
    background: rgba(15, 23, 42, .94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .42), 0 0 0 1px rgba(96, 165, 250, .04);
    animation: login-enter .55s ease-out both;
}

.login-box::before {
    position: absolute;
    top: 0;
    right: 34px;
    left: 34px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3151ff, transparent);
    content: "";
}

.login-box .access-logo {
    position: static;
    width: 118px;
    height: 118px;
    margin: -4px auto 10px;
}

.login-heading {
    margin-bottom: 30px;
    text-align: center;
}

.login-kicker {
    margin-bottom: 8px;
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-box h1 {
    margin-bottom: 8px;
    color: #f8fafc;
    font-size: 30px;
    letter-spacing: -.5px;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 13px;
}

.login-box form {
    text-align: left;
}

.login-box .input-group {
    margin-bottom: 18px;
}

.login-box .input-group input {
    height: 50px;
    margin: 0;
    padding: 14px 15px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #080f1f;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.login-box .input-group input:focus {
    border-color: #3b82f6;
    background: #0a1327;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .13);
}

.login-box .input-group label {
    left: 15px;
}

.login-box .input-group input:focus + label,
.login-box .input-group input:valid + label {
    background: #0f172a;
}

.login-box .btn {
    height: 50px;
    margin-top: 4px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3151ff, #1f3cff);
    font-size: 14px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.login-box .btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 24px rgba(31, 60, 255, .28);
    transform: translateY(-2px);
}

.register-link {
    margin-top: 22px;
    text-align: center;
}

.register-link a {
    color: #93c5fd;
    font-size: 13px;
    text-decoration: none;
}

.register-link a:hover {
    color: white;
    text-decoration: underline;
}

.login-box .warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #1f2937;
    color: #94a3b8;
}

.login-box .warning span {
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border: 1px solid #64748b;
    border-radius: 50%;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 600px) {
    .login-box {
        padding: 34px 24px 28px;
    }

    .login-box .access-logo {
        width: 96px;
        height: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-box,
    .login-box .btn {
        animation: none;
        transition: none;
    }
}

@media (max-width: 900px) {
    .message-layout {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 18px;
    }

    .message-list {
        grid-column: 2;
    }
}

@media (max-width: 600px) {
    .main {
        padding: 18px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .message-layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .message-list {
        grid-column: 1;
    }

    .message-compose {
        grid-column: 1;
    }

    .message-compose form {
        display: block;
    }

    .message-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .message-date {
        text-align: left;
    }
}

/* MDT GLOBAL POLISH */

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main > .topbar,
.main > .cards,
.main > .activity,
.main > .service-box,
.main > .reports-list,
.main > .report-form,
.main > .report-details-card,
.main > .admin-content {
    animation: page-enter .5s ease-out both;
}

.main > .cards { animation-delay: .06s; }
.main > .activity,
.main > .service-box,
.main > .report-form { animation-delay: .12s; }
.main > .reports-list,
.main > .report-details-card,
.main > .admin-content { animation-delay: .18s; }

.topbar h1 {
    letter-spacing: -.3px;
}

.sidebar a {
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.sidebar a:hover {
    transform: translateX(3px);
}

.card,
.activity,
.service-box,
.report-form,
.reports-list,
.admin-content,
.report-details-card {
    border: 1px solid #23304a;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
}

.data-table {
    border: 1px solid #23304a;
    border-radius: 10px;
    overflow: hidden;
}

.service-box {
    width: min(100%, 620px);
    text-align: left;
}

.service-box #timer {
    color: #60a5fa;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
    .sidebar {
        width: 190px;
        min-width: 190px;
        padding: 16px;
    }

    .main {
        padding: 18px;
    }

    .service-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .service-buttons .btn {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .main > .topbar,
    .main > .cards,
    .main > .activity,
    .main > .service-box,
    .main > .reports-list,
    .main > .report-form,
    .main > .report-details-card,
    .main > .admin-content {
        animation: none;
    }
}

.message-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #3151ff;
    border-radius: 50%;
    background: #172554;
    color: #93c5fd;
    font-weight: 700;
}

.message-card-body {
    min-width: 0;
}

.message-subject {
    margin-top: 5px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
}

.message-content {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.message-list-toolbar {
    margin: 14px -22px 0;
    padding: 10px 22px;
    border-top: 1px solid #1f2937;
    border-bottom: 1px solid #1f2937;
    color: #64748b;
    font-size: 12px;
}

.empty-messages {
    padding: 34px 0 14px;
    color: #94a3b8;
    text-align: center;
}

.compose-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.compose-mark {
    padding: 5px 8px;
    border: 1px solid #334155;
    border-radius: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
}

.compose-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compose-close {
    width: 28px;
    height: 28px;
    border: 1px solid #334155;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    line-height: 20px;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.compose-close:hover {
    border-color: #60a5fa;
    background: #1e293b;
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    .message-compose.is-open {
        animation: none;
    }

    .compose-link,
    .compose-close {
        transition: none;
    }
}

@media (max-width: 600px) {
    .message-card {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .message-avatar {
        width: 34px;
        height: 34px;
    }

    .message-card > form {
        grid-column: 2;
    }

    .message-list-toolbar {
        margin-right: -18px;
        margin-left: -18px;
        padding-right: 18px;
        padding-left: 18px;
    }
}