
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    user-select: none;
    display: block;
}

#tabletScreen {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    border-radius: 0;
    background: url("img/ipad_wallpaper.jpg") center center / cover no-repeat;
}

.app-content::-webkit-scrollbar,
.service-table-container::-webkit-scrollbar,
.reports-table-container::-webkit-scrollbar,
.notes-list::-webkit-scrollbar,
.supervision-filters::-webkit-scrollbar,
.supervision-table-container::-webkit-scrollbar,
#reportEditorModal textarea::-webkit-scrollbar,
.report-view-document::-webkit-scrollbar,
.news-feed::-webkit-scrollbar {
    width: 6px;
}

/* DISCUSSION */
.discussion-sidebar::-webkit-scrollbar,
.discussion-messages::-webkit-scrollbar,
.discussion-members::-webkit-scrollbar {
    width: 6px;
}

.app-content::-webkit-scrollbar-track,
.service-table-container::-webkit-scrollbar-track,
.reports-table-container::-webkit-scrollbar-track,
.notes-list::-webkit-scrollbar-track,
.supervision-filters::-webkit-scrollbar-track,
.supervision-table-container::-webkit-scrollbar-track,
#reportEditorModal textarea::-webkit-scrollbar-track,
.report-view-document::-webkit-scrollbar-track,
.news-feed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* DISCUSSION */
.discussion-sidebar::-webkit-scrollbar-track,
.discussion-messages::-webkit-scrollbar-track,
.discussion-members::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.app-content::-webkit-scrollbar-thumb,
.service-table-container::-webkit-scrollbar-thumb,
.reports-table-container::-webkit-scrollbar-thumb,
.notes-list::-webkit-scrollbar-thumb,
.supervision-filters::-webkit-scrollbar-thumb,
.supervision-table-container::-webkit-scrollbar-thumb,
#reportEditorModal textarea::-webkit-scrollbar-thumb,
.report-view-document::-webkit-scrollbar-thumb,
.news-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* DISCUSSION */
.discussion-sidebar::-webkit-scrollbar-thumb,
.discussion-messages::-webkit-scrollbar-thumb,
.discussion-members::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.discussion-sidebar::-webkit-scrollbar-thumb:hover,
.discussion-messages::-webkit-scrollbar-thumb:hover,
.discussion-members::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}


.app-content::-webkit-scrollbar-thumb:hover,
#reportEditorModal textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

#tablet-screen {
    width: 100%;
    height: 100vh;
    background: #0c0c0c;
    overflow: hidden;
    position: relative;
}

#loginScreen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    background: radial-gradient(circle at top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.75));
    z-index: 100;
}

.login-card {
    width: 480px;
    max-width: 90%;
    padding: 26px 30px 24px 30px;
    border-radius: 22px;
    background: rgba(11, 15, 25, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border: 1px solid rgba(96, 165, 250, 0.8);
    color: #bfdbfe;
    margin-bottom: 10px;
}

.login-title {
    margin: 0;
    font-size: 22px;
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.8px;
    align-self: flex-start;
    color: #f9fafb;
}

.login-subtitle {
    margin: 4px 0 18px 0;
    font-size: 13px;
    color: #cbd5f5;
    opacity: 0.85;
    align-self: flex-start;
}

.login-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    align-items: center;
}

#loginScreen input {
    width: 100%;
    max-width: 340px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #f9fafb;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.login-fields input::placeholder { color: rgba(148, 163, 184, 0.9); }

.login-button {
    width: 100%;
    max-width: 340px;
    margin-top: 4px;
    padding: 10px 0;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.55);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
}
.login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.7);
}

.login-hint {
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(203, 213, 225, 0.9);
    text-align: left;
    width: 100%;
}

#homeScreen {
    position: relative;
    width: 100%;
    height: 100%;
    display: none;
    color: #ffffff;
}

.apps-grid {
    position: absolute;
    top: 70px;
    left: 7%;
    right: 7%;
    bottom: 130px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 30px;
    justify-items: center;
    align-content: flex-start;
}

.app-icon {
    position: relative;
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.14s ease-out;
}

.app-icon::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), rgba(15, 23, 42, 0.85));
    opacity: 0;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
    z-index: 0;
}

.app-icon-img {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    border-radius: 22px;
    object-fit: contain;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
}

.app-icon span {
    margin-top: 6px;
    font-size: 12px;
    color: #f9fafb;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.75);
    text-align: center;
    max-width: 90px;
}

.app-icon:hover .app-icon-img {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.7);
    filter: brightness(1.08);
}
.app-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-1px);
}

.dock {
    position: absolute;
    bottom: 45px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 32px;
    border-radius: 26px;
    background: radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.18), rgba(15, 23, 42, 0.92));
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    display: flex;
    gap: 18px;
}

.dock-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.dock-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    z-index: -1;
}
.dock-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.14s ease-out;
}
.dock-icon:hover .dock-icon-img {
    transform: translateY(-4px) scale(1.08);
    filter: brightness(1.1);
}

.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 20;
    box-sizing: border-box;
}

.status-left, .status-center, .status-right { display: flex; align-items: center; gap: 12px; }
.status-center { position: absolute; left: 50%; transform: translateX(-50%); }
#sb-time { font-size: 15px; font-weight: 600; color: white; }
.sb-title { font-size: 15px; font-family: 'Oswald'; letter-spacing: 1px; color: white; }
.sb-icon { font-size: 15px; opacity: 0.85; }

.logout-btn {
    padding: 5px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: 0.15s ease;
}
.logout-btn:hover { background: rgba(255, 255, 255, 0.32); transform: scale(1.05); }

.app-window {
    position: absolute;
    top: 6%;
    left: 5%;
    right: 5%;
    bottom: 6%;
    background: rgba(15, 20, 30, 0.75);
    border-radius: 22px;
    backdrop-filter: blur(30px) brightness(1.2);
    -webkit-backdrop-filter: blur(30px) brightness(1.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#mailApp.app-window {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
}

@keyframes appOpenAnim {
    from { opacity: 0; transform: scale(0.97) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes appCloseAnim {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.97) translateY(10px); }
}
.app-window.app-opening { animation: appOpenAnim 0.18s ease-out forwards; }
.app-window.app-closing { animation: appCloseAnim 0.18s ease-in forwards; }

.app-header {
    position: relative;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(12px) brightness(1.3);
}
.app-header h2 {
    margin: 0;
    font-family: 'Oswald';
    font-weight: 500;
    font-size: 22px;
    color: #F8FAFC;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.55);
    letter-spacing: 0.7px;
}

.app-header-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(203, 213, 225, 0.85);
}

.app-header .app-close, .modal-header .modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f8f9fa;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: 0.15s ease;
}
.app-header .app-close:hover, .modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px;
    box-sizing: border-box;
}

#servicesApp .app-content,
#rapportsApp .app-content,
#allReportsApp .app-content {
    padding: 20px 28px;
}

.agent-list-panel {
    width: 82%;
    max-width: 1150px;
    margin: 0 auto;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.09), rgba(15, 23, 42, 0.96));
    border-radius: 20px;
    padding: 14px 16px 16px 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.agent-list-header { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 10px; }
.agent-list-header h3 { margin: 0; font-size: 15px; font-weight: 500; color: #fff; }
.agent-list-header .btn-primary { width: 60%; max-width: 420px; padding: 5px 0; border-radius: 999px; font-size: 12px; }

.agent-table, .service-table, .reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #f9fafb;
    border-radius: 14px;
    overflow: hidden;
}
.agent-table thead, .service-table thead, .reports-table thead {
    background: linear-gradient(to right, rgba(15, 23, 42, 1), rgba(30, 64, 175, 0.95));
}
.service-table thead { background: rgba(30, 64, 175, 0.45); }
.reports-table thead { background: rgba(30, 64, 175, 0.7); }

.agent-table th, .agent-table td,
.service-table th, .service-table td,
.reports-table th, .reports-table td {
    padding: 8px 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.agent-table th { text-transform: uppercase; font-size: 11px; color: #e5e7eb; }
.agent-table td { background: rgba(15, 23, 42, 0.92); }
.agent-table tbody tr:nth-child(even) td,
.reports-table tbody tr:nth-child(even) td { background: rgba(17, 24, 39, 0.96); }
.agent-table tbody tr:hover td,
.service-table tbody tr:hover td,
.reports-table tbody tr:hover td { background: rgba(56, 189, 248, 0.18); }
.agent-table th:first-child, .agent-table td:first-child { text-align: left; }

.action-buttons, .reports-actions { display: flex; gap: 6px; justify-content: center; }
.action-buttons button, .reports-actions button { height: 24px; padding: 0 8px; border-radius: 6px; font-size: 11px; display: flex; align-items: center; justify-content: center; }

.form-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.form-row label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #cbd5f5; margin-bottom: 3px; }

.form-row input, .form-row select, .form-row textarea {
    font-size: 13px;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
    width: 100%;
    box-sizing: border-box;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
}

.btn-primary {
    width: 100%;
    padding: 9px 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.45);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
    background: rgba(148, 163, 184, 0.2);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.55);
    border-radius: 9px;
    padding: 7px 14px;
    cursor: pointer;
}

.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.08s ease;
}

.btn-small:hover {
    background: rgba(30,64,175,0.85);
    border-color: rgba(129,140,248,0.9);
    transform: translateY(-0.5px);
}

.btn-small:active {
    transform: translateY(0);
    background: rgba(15,23,42,0.95);
}

.btn-small.btn-danger {
    background: rgba(127,29,29,0.9);
    border-color: rgba(248,113,113,0.9);
}

.btn-small.btn-danger:hover {
    background: rgba(185,28,28,0.95);
    border-color: rgba(252,165,165,1);
}

.btn-edit { background: rgba(52, 152, 219, 0.85); color: white; }
.btn-delete { background: rgba(231, 76, 60, 0.9); color: white; }
.btn-view { background: rgba(148, 163, 184, 0.95); color: #ffffff; }

#notesApp .app-content.notes-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    padding: 18px;
}

.notes-sidebar {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.notes-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    color: #e5e7eb;
}

.notes-new-btn { width: auto !important; min-width: 110px; padding: 4px 10px !important; font-size: 11px !important; height: 22px !important; border-radius: 14px !important; }

.notes-list { list-style: none; margin: 6px 0 0 0; padding: 0; overflow-y: auto; flex: 1; }

.notes-item {
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 13px;
    color: #e5e7eb;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    transition: background 0.12s ease-out;
}
.notes-item:hover { background: rgba(51, 65, 85, 0.85); }
.notes-item.active { background: rgba(37, 99, 235, 0.85); }
.notes-empty { padding: 10px 8px; font-size: 12px; color: rgba(156, 163, 175, 0.9); }

.notes-editor {
    background: rgba(15, 23, 42, 0.97);
    border-radius: 16px;
    padding: 14px 16px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
    height: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.note-title-input, .note-content-textarea {
    font-size: 13px;
    padding: 7px 9px;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
    width: 100%;
    box-sizing: border-box;
}
.note-title-input { height: 36px; margin-bottom: 8px; }
.note-content-textarea { flex: 1; min-height: 260px; resize: none; }
.note-title-input:focus, .note-content-textarea:focus { border-color: rgba(59, 130, 246, 0.9); box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7); }

.notes-actions { margin-top: 10px; display: flex; gap: 12px; }
.notes-actions .btn-secondary { flex: 1; border-color: rgba(239, 68, 68, 0.35); color: #fca5a5; background: rgba(239, 68, 68, 0.15); }
.notes-actions .btn-secondary:hover { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.55); color: #fecaca; box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); }
.notes-actions .btn-primary { flex: 3; }

.services-layout { display: flex; flex-direction: column; height: 100%; width: 100%; }

.service-panel, .reports-panel {
    flex: 1; width: 100%; display: flex; flex-direction: column;
    background: rgba(15, 23, 42, 0.96); border-radius: 16px; padding: 16px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55); overflow: hidden; box-sizing: border-box;
}

.reports-caption {
    margin-top: 2px;
    font-size: 12px;
    color: #9ca3af;
    opacity: 0.9;
}

.service-panel h3, .reports-header h3 { margin: 0 0 12px 0; font-size: 16px; color: #fff; font-weight: 500; }
.service-table-container, .reports-table-container { flex: 1; width: 100%; overflow-y: auto; overflow-x: hidden; margin-top: 12px; padding: 0 6px; box-sizing: border-box; }

.supervision-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.supervision-filters {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow-y: auto;
}

.supervision-filters::-webkit-scrollbar { width: 5px; }
.supervision-filters::-webkit-scrollbar-track { background: transparent; }
.supervision-filters::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }

.supervision-filters h3 {
    margin: 0 0 8px 0;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.supervision-filters label {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-left: 2px;
}

.supervision-filters input, .supervision-filters select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.supervision-filters input:focus, .supervision-filters select:focus {
    background: rgba(30, 41, 59, 1);
    border-color: #3b82f6;
}

.supervision-filters input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.6; cursor: pointer; }
.supervision-filters input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.supervision-filters .btn-primary { margin-top: 12px; font-weight: 600; }

.supervision-main-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    overflow: hidden;
}

.supervision-table-panel {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;

    padding: 16px;
}

.supervision-table-panel h3 {
    margin: 0 0 12px 0;
    padding: 0;
    background: transparent;
    border-bottom: none;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    position: static;
}

.supervision-table-container {
    flex: 1;
    overflow-y: auto;
    position: relative;

    border-radius: 8px;
}

.supervision-table-container::-webkit-scrollbar { width: 6px; }
.supervision-table-container::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
.supervision-table-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; }
.supervision-table-container::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

.supervision-table-panel .service-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.supervision-table-panel .service-table th {
    position: sticky;
    top: 0;
    background: rgba(30, 64, 175, 1);
    z-index: 10;
    padding: 12px 8px;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-bottom: none;
}

.supervision-table-panel .service-table thead tr:first-child th:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.supervision-table-panel .service-table thead tr:first-child th:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

.supervision-table-panel .service-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.supervision-charts {
    height: 200px;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.supervision-charts canvas { width: 100%; height: 100%; }

.reports-new-btn { width: auto !important; min-width: 160px; padding: 6px 12px !important; border-radius: 999px; font-size: 12px; }
.reports-bottom-btn { margin-top: 12px; align-self: flex-end; width: auto; min-width: 220px; }

.modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: rgba(15, 20, 30, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #e5e7eb;
}

.modal-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}
.modal-header h3 { margin: 0; font-size: 17px; font-family: 'Oswald'; letter-spacing: .6px; }

.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }

.modal-footer {
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

#createAgentModal .modal-content, #editAgentModal .modal-content {
    width: 560px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(26px) saturate(1.2);
}

#boloModal .modal-content,
#lprModal .modal-content {
    width: 720px;
    max-width: 95%;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(26px) saturate(1.2);
}

#createAgentModal .modal-header, #editAgentModal .modal-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(30, 64, 175, 0.9));
}
#createAgentModal .btn-secondary, #editAgentModal .btn-secondary { width: auto; }
#createAgentModal .btn-primary, #editAgentModal .btn-primary { width: auto; padding-left: 20px; padding-right: 20px; }

#reportEditorModal .modal-content {
    width: 70%;
    max-width: 780px;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(26px);
}
#reportEditorModal .modal-body { padding-bottom: 10px; }
#reportEditorModal textarea { min-height: 260px; max-height: 420px; resize: vertical; }
#reportEditorModal .btn-primary, #reportEditorModal .btn-secondary {
    width: auto !important; min-width: 120px; border-radius: 999px;
}

#deleteConfirmModal .modal-content {
    width: 420px;
    background: rgba(245, 247, 255, 0.88);
    backdrop-filter: blur(25px) saturate(1.4);
    border: 1px solid rgba(180, 187, 210, 0.45);
    color: #0f172a;
}
#deleteConfirmModal .modal-header { background: rgba(255, 255, 255, 0.65); border-bottom-color: rgba(180, 187, 210, 0.45); }
#deleteConfirmModal .modal-header h3 { color: #0f172a; }
#deleteConfirmModal .modal-close { color: #0f172a; background: transparent; border: none; }
#deleteConfirmModal .modal-footer { background: rgba(255, 255, 255, 0.6); border-top-color: rgba(180, 187, 210, 0.45); }
#deleteConfirmModal .btn-secondary { background: rgba(148, 163, 184, 0.3); color: #0f172a; border: 1px solid rgba(148, 163, 184, 0.5); width: auto; }
#deleteConfirmModal .btn-danger { background: rgba(220, 53, 69, 0.9); color: #fff; border-radius: 8px; padding: 6px 14px; font-weight: 600; width: auto; }

.report-template-list { display: flex; flex-direction: column; gap: 8px; }
.report-template-btn { border-radius: 10px !important; padding: 6px 10px !important; }

#reportViewModal .report-view-modal-content {
    width: 78%; max-width: 900px; background: transparent; box-shadow: none; border: none;
}
.report-view-document {
    background: #ffffff; color: #111827; border-radius: 6px; padding: 24px 32px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65); max-height: 66vh; overflow-y: auto; font-family: "Inter", sans-serif;
}
.report-view-doc-header h2 { margin: 0; font-size: 20px; font-weight: 600; text-align: center; text-transform: uppercase; color: #111827; }
.report-view-doc-subtitle { margin: 0 0 10px 0; text-align: center; font-size: 11px; color: #6b7280; }
.report-view-separator { border: none; border-top: 1px solid #d1d5db; margin: 8px 0 14px 0; }
.report-view-doc-meta { font-size: 12px; margin-bottom: 16px; }
.report-meta-line { display: flex; justify-content: space-between; margin-bottom: 4px; }
.report-view-doc-body { font-size: 13px; line-height: 1.5; color: #111827; white-space: pre-wrap; }
.report-view-footer { margin-top: 12px; display: flex; justify-content: flex-end; }
.report-view-footer .btn-secondary { width: auto; }

#notificationContainer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 24px 0 0 0;
    box-sizing: border-box;

    background: transparent !important;
}

.notification {
    min-width: 260px;
    max-width: 380px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), rgba(15, 23, 42, 0.96));
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.65);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    color: #f9fafb;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.9;
}

.notification-text {
    opacity: 0.92;
    line-height: 1.35;
}

.notification--error {
    border-left: 3px solid #f97373;
}

.notification--success {
    border-left: 3px solid #4ade80;
}

.notification--info {
    border-left: 3px solid #38bdf8;
}

.notification.hide {
    animation: notif-out 0.2s forwards;
}

@keyframes notif-in {
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes notif-out {
    to {
        opacity: 0;
        transform: translateY(-8px) translateX(10px);
    }
}

#settingsApp .app-content.settings-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
}

.settings-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.96));
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.settings-avatar-wrapper {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(129, 140, 248, 0.9);
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9), 0 10px 18px rgba(15, 23, 42, 0.85);
    flex-shrink: 0;
}

.settings-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-profile-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.settings-profile-name {
    font-size: 17px;
    font-weight: 600;
    color: #f9fafb;
}

.settings-profile-sub {
    font-size: 12px;
    color: rgba(209, 213, 219, 0.9);
}

.settings-section {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 4px 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.9);
}

.settings-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    padding: 6px 4px;
}

.settings-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 4px;
    border-top: 1px solid rgba(31, 41, 55, 0.98);
}

.settings-cell:first-of-type {
    border-top: none;
}

.settings-cell-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-width: 60%;
}

.settings-cell-label {
    font-size: 13px;
    color: #e5e7eb;
}

.settings-cell-sub {
    font-size: 11px;
    color: rgba(156, 163, 175, 0.9);
}

.settings-input {
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    outline: none;
    min-width: 140px;
    max-width: 220px;
}

.settings-input:focus {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7);
}

.settings-cell-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-avatar-apply {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 999px;
}

.settings-actions-row {
    padding: 8px 0 10px;
    border-top: 1px solid rgba(31, 41, 55, 0.98);
    margin-top: 6px;
}

.settings-save-btn {
    width: 100%;
    border-radius: 999px;
    padding: 8px 0;
}

.settings-button-row {
    width: 100%;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
    font-size: 13px;
    padding: 8px 0;
    margin: 6px 0 10px;
    cursor: pointer;
    transition: 0.15s ease;
}

.settings-button-row:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.85);
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.6);
    cursor: pointer;
    transition: 0.2s ease;
}

.ios-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.8);
    transition: 0.2s ease;
}

.ios-switch input:checked + .ios-slider {
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.ios-switch input:checked + .ios-slider::before {
    transform: translateX(18px);
}

#newsApp .app-header {
    padding-right: 90px;
    position: relative;
}

.news-create-btn {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 6px 14px !important;
    border-radius: 999px;
    font-size: 12px;
}

#newsApp .app-content.news-layout {
    padding: 18px 22px;
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100%;
    max-height: calc(100% - 10px);
    overflow-y: auto;
    padding-right: 6px;
}

.news-post {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 4px;
}

.news-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    overflow: hidden;
    background: #020617;
    flex-shrink: 0;
}

.news-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.news-author-name {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.news-post-date {
    font-size: 11px;
    color: #9ca3af;
}

.news-post-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-delete-btn {
    border: none;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    cursor: pointer;
}

.news-delete-btn:hover {
    background: rgba(248, 113, 113, 1);
}

.news-post-image {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #020617;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.news-post-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.news-post-text {
    margin-top: 6px;
    font-size: 13px;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 0 4px;
}

#patrouillesApp .app-header {
    padding-right: 90px;
}

.patrols-layout {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    gap: 10px;
}

.patrols-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.patrols-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #f9fafb;
}

.patrols-table-container {
    flex: 1;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 4px;
}

.patrols-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #f9fafb;
    border-radius: 14px;
    overflow: hidden;
}

.patrols-table thead {
    background: rgba(30, 64, 175, 0.7);
}

.patrols-table th,
.patrols-table td {
    padding: 8px 7px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.92);
}

.patrols-table tbody tr:nth-child(even) td {
    background: rgba(17, 24, 39, 0.96);
}

.patrols-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.18);
}

.patrols-empty {
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    padding: 12px 0;
}

.patrol-end-btn {
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 999px;
}

.patrols-modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.patrol-agent-select {
    width: 100%;
}

.patrol-status-select,
.patrol-vehicle-select,
.patrol-sector-select {
    width: 100%;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    outline: none;
}

.patrol-status-select:focus {
    border-color: rgba(59, 130, 246, 0.9);
}

.patrol-status-select.status-dispatch {
    background: rgba(59, 130, 246, 0.85);
}

.patrol-status-select.status-patrouille {
    background: rgba(34, 197, 94, 0.85);
}

.patrol-status-select.status-evenement {
    background: rgba(168, 85, 247, 0.85);
}

.patrol-status-select.status-interv3,
.patrol-status-select.status-interv5,
.patrol-status-select.status-investigation {
    background: rgba(249, 115, 22, 0.9);
}

.patrol-status-select.status-pause {
    background: rgba(234, 179, 8, 0.9);
}

.patrol-status-select.status-danger {
    background: rgba(239, 68, 68, 0.95);
}

.patrol-status-select.status-admin {
    background: rgba(56, 189, 248, 0.85);
}
.patrol-status-select option {
    background: rgba(15, 23, 42, 0.98) !important;
    color: #e5e7eb !important;
}

.patrol-status-select option:hover,
.patrol-status-select option:checked {
    background: rgba(30, 64, 175, 0.9) !important;
    color: #ffffff !important;
}

.patrol-status-select {
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

#mandatEditorModal .modal-content {
    width: 640px;
    max-width: 640px;
}

#mandatEditorModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#mandatEditorModal .radio-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

#mandatEditorModal #mandatContent {
    min-height: 220px;
}

#mandatViewModal img {
    max-height: 500px;
    object-fit: contain;
    background: #00000015;
    padding: 8px;
}

#mandatViewModal .mandat-view-modal-content {
    width: 90%;
    max-width: 1100px;
}

#evidenceViewModal .mandat-view-modal-content {
    width: 90%;
    max-width: 1100px;
}

.evidence-view-section {
    margin-bottom: 18px;
}

.evidence-view-section h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #e5e7eb;
    opacity: 0.85;
}

.mandat-view-layout {
    display: flex;
    gap: 20px;
    padding: 16px 24px 10px;
    max-height: 70vh;
}

.mandat-view-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(56,189,248,0.15), transparent 55%),
                rgba(15,23,42,0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.mandat-view-sidebar h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #e5e7eb;
    opacity: 0.9;
}

.mandat-meta-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #e5e7eb;
    gap: 8px;
}

.mandat-meta-line .label {
    opacity: 0.7;
}

.mandat-view-main {
    flex: 1;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
}

#mandatViewModal img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.mdt-layout {
    height: 100%;
}

.mdt-list-panel,
.mdt-detail-panel {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mdt-detail-panel {
    display: none;
}

.mdt-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mdt-detail-header-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
}

.mdt-list-header {
    margin-bottom: 8px;
}

.mdt-table th,
.mdt-table td {
    white-space: nowrap;
}

.mdt-photo-cell {
    width: 40px;
}

.mdt-photo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(148, 163, 184, 0.4);
}

.mdt-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.mdt-status-normal {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.mdt-status-alert {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.mdt-detail-empty {
    margin: auto;
    text-align: center;
    opacity: 0.6;
    font-size: 14px;
}

.mdt-detail-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-column-gap: 16px;
    grid-row-gap: 8px;
    margin-bottom: 12px;
}

.mdt-detail-photo {
    grid-row: 1 / span 2;
    align-self: flex-start;
}

.mdt-detail-photo img {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid rgba(148, 163, 184, 0.5);
}

.mdt-detail-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mdt-detail-name {
    font-size: 18px;
    font-weight: 700;
}

.mdt-detail-sub {
    font-size: 13px;
    color: #9ca3af;
}

.mdt-detail-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.mdt-flag-pill {
    font-size: 11px;
    border-radius: 999px;
    padding: 2px 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e5e7eb;
}

.mdt-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.mdt-section {
    margin-bottom: 10px;
}

.mdt-section-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mdt-section small {
    font-weight: 400;
    opacity: 0.65;
}

.mdt-section-content {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 10px;
    padding: 6px 8px;
    max-height: 180px;
    overflow: auto;
    font-size: 12px;
}

.mdt-modal {
    max-width: 1100px;
    width: 100%;
}

.mdt-modal-body {
    max-height: 70vh;
    overflow: auto;
}

.mdt-modal-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.mdt-modal-col .form-row {
    margin-bottom: 8px;
}

.mdt-flags {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.mdt-flags-grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}

.mdt-flag-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.45);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease,
                box-shadow 0.15s ease;
    white-space: nowrap;
}

.mdt-flag-toggle input {
    width: 14px;
    height: 14px;
    accent-color: #3b82f6;
}

.mdt-flag-toggle:hover {
    border-color: rgba(96, 165, 250, 0.9);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}

.mdt-flag-toggle span {
    line-height: 1;
}

.mdt-notes-help {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.65;
}

.mdt-list-header input {
    width: 100%;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.9);
    font-size: 13px;
    box-sizing: border-box;
}

.mdt-list-header input::placeholder {
    color: rgba(156, 163, 175, 0.9);
}

.mdt-table thead {
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 1),
        rgba(30, 64, 175, 0.95)
    );
}

.mdt-table th,
.mdt-table td {
    padding: 8px 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.mdt-table th {
    text-transform: uppercase;
    font-size: 11px;
    color: #e5e7eb;
}

.mdt-table tbody tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.92);
}

.mdt-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.18);
}

.mdt-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.20);
}

.mdt-photo-thumb {
    border-radius: 50%;
    width: 38px;
    height: 38px;
    object-fit: cover;
    border: 2px solid rgba(148,163,184,0.5);
}

.btn-xs {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-secondary.btn-xs {
    background: rgba(148,163,184,0.15);
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,0.25);
    transition: 0.2s;
}

.btn-secondary.btn-xs:hover {
    background: rgba(148,163,184,0.3);
}

.btn-danger.btn-xs {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.35);
    transition: 0.2s ease;
    border-radius: 8px !important;
}

.btn-danger.btn-xs:hover {
    background: rgba(239,68,68,0.35);
    color: #fecaca;
}

.table-wrapper {
    padding: 8px;
    border-radius: 14px;
    overflow: hidden;
}

.mdt-list-panel {
    padding: 18px;
}

.mdt-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 6px !important;
    font-size: 13px;
    color: #e5e7eb;
}

.mdt-table thead th {
    background: rgba(30, 58, 138, 0.85);
    padding: 10px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #f1f5f9;
    border-bottom: none;
}

.mdt-table tbody tr {
    background: rgba(15, 23, 42, 0.92);
    border-radius: 12px;
}

.mdt-table tbody td {
    padding: 10px 8px;
    border-bottom: none;
    background: transparent !important;
}

.mdt-table tbody tr:nth-child(odd) td,
.mdt-table tbody tr:nth-child(even) td {
    background: transparent !important;
}

.mdt-table tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.mdt-table tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.mdt-table .mdt-photo-cell {
    width: 60px;
}

.mdt-table .mdt-photo-thumb {
    width: 40px;
    height: 40px;
}

#mdtApp .app-header {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

#mdtApp .app-header h2 {
    color: #e5e7eb;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#mdtApp .app-header .btn-primary {
    background: #3b82f6;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: 0.15s;
}

#mdtApp .app-header .btn-primary:hover {
    background: #60a5fa;
}

#mdtApp .app-header .app-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.15s;
}

#mdtApp .app-header .app-close:hover {
    background: rgba(255,255,255,0.25);
}

#mdtApp .app-header .btn-primary {
    width: auto !important;
    flex: 0 0 auto !important;
    white-space: nowrap;
    margin-right: 30px !important;
}

#mdtDetailPanel,
#mdtDetailPanel * {
    color: #e5e7eb !important;
}

#mdtDetailPanel .mdt-detail-sub,
#mdtDetailPanel .mdt-section small {
    color: rgba(203, 213, 225, 0.7) !important;
}

#mdtDetailPanel .mdt-section-title {
    color: #f1f5f9 !important;
}

#mdtDetailPanel .mdt-flag-pill {
    color: #e2e8f0 !important;
    border-color: rgba(226, 232, 240, 0.35) !important;
}

#mdtDetailPanel table td,
#mdtDetailPanel table th {
    color: #e5e7eb !important;
}

#mdtDetailPanel input::placeholder,
#mdtDetailPanel textarea::placeholder {
    color: rgba(203, 213, 225, 0.5) !important;
}

#mdtDetailPanel input,
#mdtDetailPanel select,
#mdtDetailPanel textarea {
    background: rgba(15,23,42,0.85) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}

#mdtCasierApp,
#mdtCasierApp * {
    color: #e5e7eb;
}

#mdtCasierContent {
    padding: 16px 20px;
}

.mdt-casier-header {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 10px 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.mdt-casier-header div:first-child {
    font-size: 18px;
    font-weight: 600;
}

.mdt-casier-header div:last-child {
    font-size: 13px;
    opacity: 0.75;
}

#mdtCasierApp .mdt-section {
    margin-top: 12px;
}

#mdtCasierApp .mdt-section-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

#mdtCasierApp .mdt-section-content {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 14px;
    padding: 10px 12px;
    max-height: 260px;
    overflow-y: auto;
}

#mdtCasierApp table.agent-table th,
#mdtCasierApp table.agent-table td {
    color: #e5e7eb;
}

#mdtCasierApp .mdt-section-content .form-row input,
#mdtCasierApp .mdt-section-content .form-row select,
#mdtCasierApp .mdt-section-content .form-row textarea {
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    border: 1px solid rgba(148, 163, 184, 0.8);
}

#mdtCasierApp .mdt-section-content .form-row input::placeholder,
#mdtCasierApp .mdt-section-content .form-row textarea::placeholder {
    color: rgba(148, 163, 184, 0.7);
}

#mdtCasierApp .mdt-section-content .form-row:last-child {
    display: flex;
    justify-content: flex-end;
}

#mdtCasierApp .mdt-section-content .form-row:last-child .btn-primary {
    width: auto;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
}

#mdtCasierApp .mdt-section-content::-webkit-scrollbar {
    width: 6px;
}

#mdtCasierApp .mdt-section-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#mdtCasierApp .mdt-section-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#mdtCasierApp .mdt-section-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

#mdtCasierApp .casier-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    color: #e5e7eb;
    font-size: 13px;
}

#mdtCasierApp .casier-table thead th {
    background: rgba(30, 58, 138, 0.85);
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #f1f5f9;
    border: none;
}

#mdtCasierApp .casier-table tbody tr {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 12px;
    overflow: hidden;
}

#mdtCasierApp .casier-table tbody td {
    padding: 10px 12px;
    border: none;
}

#mdtCasierApp .casier-table tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

#mdtCasierApp .casier-table tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

#mdtCasierApp .casier-table tbody tr:hover td {
    background: rgba(56, 189, 248, 0.20);
}

#mdtCasierApp .casier-table th,
#mdtCasierApp .casier-table td {
    text-align: center !important;
    vertical-align: middle !important;
}

#mdtCasierApp .casier-table td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.tablet-loader {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.tablet-loader.visible {
    opacity: 1;
    pointer-events: auto;
}

.tablet-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.tablet-spinner {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: #3b82f6;
    animation: tablet-spin 0.8s linear infinite;
}

.tablet-loader-text {
    font-size: 13px;
    color: #e5e7eb;
    opacity: 0.9;
}

@keyframes tablet-spin {
    to { transform: rotate(360deg); }
}

.mdt-detail-notes {
    margin-top: 18px;
    margin-bottom: 16px;
    padding: 12px 16px;
    max-width: 520px;

    background: rgba(7, 12, 20, 0.85);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.03);

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.mdt-detail-notes-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.mdt-detail-notes-body {
    font-size: 13px;
    line-height: 1.4;
    color: #d7dbea;
    white-space: pre-wrap;
}
.mdt-detail-notes-body em {
    opacity: 0.65;
}

.mdt-flag-pill {
    font-size: 11px;
    border-radius: 999px;
    padding: 2px 10px;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.mdt-flag-pill--danger {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(248, 113, 113, 0.8);
    color: #fecaca;
    box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.7);
}

.mdt-flag-pill--armed {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(251, 191, 36, 0.9);
    color: #fde68a;
    box-shadow: 0 0 0 1px rgba(120, 53, 15, 0.7);
}

.mdt-flag-pill--gang {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(196, 181, 253, 0.9);
    color: #ddd6fe;
    box-shadow: 0 0 0 1px rgba(88, 28, 135, 0.7);
}

.mdt-flag-pill--license-driver {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.9);
    color: #bfdbfe;
}

.mdt-flag-pill--license-weapon {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(52, 211, 153, 0.9);
    color: #bbf7d0;
}

.mdt-flag-pill--license-pilot {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(125, 211, 252, 0.9);
    color: #e0f2fe;
}

.reports-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.reports-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    min-width: 260px;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 12px;
    outline: none;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.5);
}

.search-input::placeholder {
    color: rgba(148, 163, 184, 0.9);
    font-size: 11px;
}

.search-input:focus {
    border-color: rgba(59, 130, 246, 0.95);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.55);
}

#trafficTicketModal .modal-content {
    width: 450px;
    max-width: 450px;
    padding: 25px 28px;
}

#trafficTicketModal .btn-primary {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

#boloApp .reports-header-right {
    width: 100%;
}

#boloApp .reports-header-right .search-input {
    flex: 1;
}

#boloApp .reports-header-right .btn-primary {
    width: auto;
    max-width: none;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.lpr-bolo-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.lpr-bolo-text-muted,
.lpr-bolo-text-main {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    opacity: 0.9;
}

.lpr-bolo-text-main {
    color: #fbbf24;
    font-weight: 600;
}

#mdtVehiclesModal .modal-content {
    width: 780px;
    max-width: 900px;
}

#mdtVehiclesModal .modal-body {
    max-height: 420px;
    overflow-y: auto;
}

.mdt-subtable-wrapper {
    width: 100%;
    overflow-x: auto;
}

.mdt-subtable {
    font-size: 12px;
}

.mdt-subtable th,
.mdt-subtable td {
    padding: 6px 8px;
}

.mdt-vehicles-empty {
    padding: 8px 4px;
    font-size: 12px;
    color: rgba(156,163,175,0.9);
}

#mdtVehiclesModal .modal-content {
    width: 780px;
    max-width: 90%;
}

#mdtVehiclesModal .modal-body {
    max-height: 420px;
    overflow-y: auto;
}

.mdt-report-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mdt-report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
}

.mdt-report-item-info {
    font-size: 13px;
}

.mdt-report-item-actions .btn-small {
    font-size: 11px;
    padding: 2px 10px;
}

.btn-ios-view {
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.35);
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(4px);
}

.btn-ios-view:hover {
    background: rgba(59, 130, 246, 0.30);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-bolo-add {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.table-actions .btn-xs {
    flex: 0 0 auto;
    min-width: auto;
    white-space: nowrap;
}

.evidence-view-layout {
    display: flex;
    gap: 20px;
    height: 100%;
}

.evidence-sidebar {
    min-width: 260px;
    max-width: 280px;
}

.evidence-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.evidence-line .label {
    font-weight: 600;
    opacity: .7;
}

.evidence-view-main {
    flex: 1;
    padding-right: 20px;
    overflow-y: auto;
}

.evidence-sidebar {
    min-width: 260px;
    max-width: 300px;
}

#cameraOverlay {
    position: absolute;
    top: 3.3%;
    left: 2.5%;
    width: 95%;
    height: 95%;
    border-radius: 23px;
    background: transparent;
    pointer-events: none;
    color: #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.camera-overlay-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.camera-overlay-top {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.6;
}

.camera-overlay-controls {
    position: absolute;
    top: 50px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.camera-overlay-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px dashed rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.8);
}

.camera-overlay-shutter {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 4px solid #f3f4f6;
    background: radial-gradient(circle at 30% 20%, #ffffff, #e5e7eb 60%);
    box-shadow:
        0 0 0 2px rgba(15, 23, 42, 0.9),
        0 0 20px rgba(15, 23, 42, 0.9);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.camera-overlay-shutter:active {
    transform: scale(0.94);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 1),
        0 0 12px rgba(15, 23, 42, 1);
}

.camera-overlay-modes {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.camera-mode-item {
    color: #9ca3af;
}

.camera-mode-item.camera-mode-active {
    color: #facc15;
}

.camera-overlay-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 16px;
    cursor: pointer;
    pointer-events: auto;
}

.camera-preview {
    height: 45vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #000 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.viewfinder {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.shutter-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.shutter-button {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 6px solid #fff;
    background: radial-gradient(circle, #fff 0%, #f0f0f0 70%);
    box-shadow: 0 10px 30px rgba(255,255,255,0.4), 0 0 0 4px rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 24px;
}

.shutter-button:active {
    transform: scale(0.92);
    box-shadow: 0 5px 15px rgba(255,255,255,0.6);
}

#cameraOverlay {
    position: absolute;
    top: 3.3%;
    left: 2.5%;
    width: 95%;
    height: 95%;
    border-radius: 23px;
    z-index: 1000;
    background: transparent;
    pointer-events: none;
    color: #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.camera-overlay-inner {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 12px 24px;
}

.camera-overlay-top {
    position: absolute;
    top: 12px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.camera-overlay-badge {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.65);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
}

.camera-overlay-shortcuts {
    display: flex;
    gap: 12px;
    opacity: 0.9;
}

.camera-overlay-shortcuts span {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 4px 9px;
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.camera-overlay-close {
    pointer-events: auto;
    margin-left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.6);
}

.camera-overlay-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    border-radius: 40px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(249, 250, 251, 0.75);
    box-shadow:
        0 0 0 1px rgba(15, 23, 42, 0.9),
        0 0 20px rgba(15, 23, 42, 0.9);
}

.camera-overlay-reticle::before,
.camera-overlay-reticle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 120%;
    height: 1px;
    background: rgba(249, 250, 251, 0.4);
    transform-origin: center;
}

.camera-overlay-reticle::before {
    transform: translate(-50%, -50%);
}

.camera-overlay-reticle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.camera-overlay-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.camera-overlay-bottom-left {
    pointer-events: auto;
}

.camera-mode-indicator {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #facc15;
}

.camera-mode-help {
    margin-top: 4px;
    font-size: 11px;
    color: #e5e7eb;
    opacity: 0.75;
}

.camera-overlay-bottom-center {
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto;
}

.camera-overlay-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 2px dashed rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.8);
}

.camera-overlay-shutter {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 4px solid #f3f4f6;
    background: radial-gradient(circle at 30% 20%, #ffffff, #e5e7eb 60%);
    box-shadow:
        0 0 0 2px rgba(15, 23, 42, 0.95),
        0 0 20px rgba(15, 23, 42, 0.95);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-overlay-shutter::before {
    content: "";
    width: 70%;
    height: 70%;
    border-radius: 999px;
    border: 2px solid rgba(209, 213, 219, 0.8);
    background: rgba(249, 250, 251, 0.95);
}

.camera-overlay-bottom-right {
    font-size: 11px;
    text-align: right;
    pointer-events: auto;
    color: #9ca3af;
    line-height: 1.3;
}

.photos-app-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 14px;
    overflow: hidden;
}

.photos-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(30, 64, 175, 0.5);
    backdrop-filter: blur(16px);
}

.photos-toolbar-left {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.photos-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.photos-count {
    font-size: 12px;
    color: #9ca3af;
}

.photos-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.photos-grid {
    flex: 1;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    grid-auto-rows: 70px;
    gap: 4px;
    overflow-y: auto;
}

.photos-grid-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.photos-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.photos-grid-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photos-empty-state {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    color: #9ca3af;
}

.photos-empty-icon {
    font-size: 34px;
    margin-bottom: 4px;
}

.photos-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.photos-empty-text {
    font-size: 13px;
    max-width: 260px;
}

.photo-viewer-modal-content {
    width: 80%;
    max-width: 900px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
}

.photo-viewer-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 6px 8px;
    font-size: 12px;
    color: #9ca3af;
}

.photo-viewer-date {
    font-weight: 600;
    color: #e5e7eb;
}

.photo-viewer-info {
    font-size: 11px;
    color: #9ca3af;
}

.photo-viewer-body {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle at top, rgba(59,130,246,0.25), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoViewerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.mdt-photo-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mdt-photo-row .form-input {
    flex: 1;
}

.mdt-photo-picker-btn {
    white-space: nowrap;
}

.mdt-photo-picker-modal {
    max-width: 720px;
}

.mdt-photo-picker-body {
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mdt-photo-picker-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    grid-auto-rows: 90px;
    gap: 6px;
    overflow-y: auto;
}

.mdt-photo-picker-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.mdt-photo-picker-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.mdt-photo-picker-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mdt-photo-picker-empty {
    padding: 12px 4px 0;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

.modal.modal-front {
    z-index: 60;
}

.photo-viewer-actions {
    display: flex;
    justify-content: flex-end;
    padding: 0 6px 8px 6px;
    gap: 10px;
}

.photo-viewer-actions {
    display: flex;
    justify-content: flex-end;
    padding: 6px 12px 10px;
}

.photo-delete-btn {
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(4px);
}

.photo-delete-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
    transform: translateY(-1px);
}

.photo-delete-btn:active {
    transform: translateY(0);
    background: rgba(239, 68, 68, 0.35);
}

.photo-viewer-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 10px 10px;
    gap: 10px;
}

.photo-viewer-date {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    flex: 1;
}

.photo-viewer-info {
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
    flex: 1;
}

.photo-delete-btn {
    padding: 6px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.photo-delete-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
    transform: translateY(-1px);
}

.evidence-photo-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.evidence-photo-row .form-input {
    flex: 1;
}

.evidence-photo-picker-btn {
    white-space: nowrap;
}

.evidence-photo-picker-modal {
    max-width: 720px;
}

.evidence-photo-picker-body {
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.evidence-photo-picker-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    grid-auto-rows: 90px;
    gap: 6px;
    overflow-y: auto;
}

.evidence-photo-picker-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.evidence-photo-picker-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.evidence-photo-picker-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.evidence-photo-picker-empty {
    padding: 12px 4px 0;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
}

.modal.modal-front {
    z-index: 60;
}

#dispatchApp .app-content {
    display: grid;
    grid-template-columns: 30% 40% 30%;
    box-sizing: border-box;
}

.dispatch-column {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dispatch-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.dispatch-column-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #e5e7eb;
}

.dispatch-create-btn {
    width: auto !important;
    min-width: 130px;
    padding: 5px 10px !important;
    border-radius: 999px;
    font-size: 11px !important;
}

.dispatch-calls-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dispatch-call-item {
    border-radius: 12px;
    padding: 7px 9px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.9);
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: background 0.12s ease-out,
                border-color 0.12s ease-out,
                transform 0.08s;
}

.dispatch-call-item:hover {
    background: rgba(30, 64, 175, 0.2);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-1px);
}

.dispatch-call-item.active {
    background: rgba(37, 99, 235, 0.85);
    border-color: rgba(191, 219, 254, 0.95);
}

.dispatch-call-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
    color: #f9fafb;
}

.dispatch-call-id {
    font-weight: 600;
}

.dispatch-call-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.dispatch-call-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: #cbd5f5;
}

.dispatch-call-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #9ca3af;
}

.dispatch-call-status {
    font-weight: 600;
}

.dispatch-call-status--new      { color: #22c55e; }
.dispatch-call-status--assigned { color: #facc15; }
.dispatch-call-status--active   { color: #60a5fa; }
.dispatch-call-status--closed   { color: #9ca3af; }

.dispatch-map-column {
    position: relative;
}

.dispatch-map-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dispatch-map-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.dispatch-map-legend {
    font-size: 11px;
    color: #9ca3af;
}

.dispatch-map {
    flex: 1;
    border-radius: 14px;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.6);
    overflow: hidden;
    position: relative;
}

.dispatch-map-inner {
    position: absolute;
    inset: 0;
    background-image: url("img/gta_map_dispatch.png");
    background-size: cover;
    background-position: center;
    transform-origin: center center;
}

.dispatch-map-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 5;
}

.dispatch-map-marker-inner {
    position: relative;
    width: 16px;
    height: 16px;
}

.dispatch-map-marker-icon {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9),
                0 0 12px rgba(0, 0, 0, 0.9);
}

.dispatch-map-marker-icon--normal {
    background: #ef4444;
}

.dispatch-map-marker-icon--priority-high {
    background: #f97316;
}

.dispatch-map-marker-icon--priority-urgent {
    background: #facc15;
}

.dispatch-map-marker-icon--panic {
    background: #dc2626;
    animation: dispatch-panic-pulse 0.8s infinite alternate;
}

.dispatch-map-marker--active .dispatch-map-marker-icon {
    box-shadow: 0 0 0 2px rgba(191, 219, 254, 0.95),
                0 0 18px rgba(59, 130, 246, 0.9);
}

.dispatch-map-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.96);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 11px;
    color: #e5e7eb;
    white-space: nowrap;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.dispatch-map-tooltip-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.dispatch-map-tooltip-meta {
    font-size: 10px;
    color: #9ca3af;
}

.dispatch-map-marker:hover .dispatch-map-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

@keyframes dispatch-panic-pulse {
    from {
        transform: scale(1);
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
    }
    to {
        transform: scale(1.3);
        box-shadow: 0 0 26px rgba(239, 68, 68, 1);
    }
}

.dispatch-units-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dispatch-unit-item {
    border-radius: 12px;
    padding: 7px 9px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.9);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dispatch-unit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dispatch-unit-header-left {
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
}

.dispatch-unit-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dispatch-unit-assign-btn {
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 10px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(37, 99, 235, 0.18);
    color: #e5e7eb;
    cursor: pointer;
    white-space: nowrap;
}

.dispatch-unit-assign-btn:hover {
    background: rgba(37, 99, 235, 0.35);
}

.dispatch-unit-callsign {
    font-size: 12px;
    font-weight: 600;
    color: #e5e7eb;
}

.dispatch-unit-status-select {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    outline: none;
    min-width: 120px;
}

.dispatch-unit-status-select option {
    background: #020617;
    color: #e5e7eb;
}

.dispatch-unit-status-select:focus {
    border-color: rgba(59, 130, 246, 0.9);
}

.dispatch-unit-info {
    font-size: 11px;
    color: #9ca3af;
}

.dispatch-unit-item--normal {
    border-color: rgba(59, 130, 246, 0.8);
}
.dispatch-unit-item--normal .dispatch-unit-status-select {
    border-color: rgba(96, 165, 250, 0.9);
}

.dispatch-unit-item--intervention {
    border-color: rgba(249, 115, 22, 0.9);
}
.dispatch-unit-item--intervention .dispatch-unit-status-select {
    border-color: rgba(251, 146, 60, 0.95);
}

.dispatch-unit-item--pause {
    border-color: rgba(234, 179, 8, 0.9);
}
.dispatch-unit-item--pause .dispatch-unit-status-select {
    border-color: rgba(250, 204, 21, 0.95);
}

.dispatch-unit-item--danger {
    border-color: rgba(239, 68, 68, 1);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.7);
}
.dispatch-unit-item--danger .dispatch-unit-status-select {
    border-color: rgba(248, 113, 113, 0.95);
}

.dispatch-unit-callsign {
    white-space: nowrap;
}

.dispatch-call-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dispatch-call-close-btn {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.96);
    color: #fecaca;
    cursor: pointer;
    white-space: nowrap;
}

.dispatch-call-close-btn:hover {
    background: rgba(248, 113, 113, 0.18);
    color: #fee2e2;
    border-color: rgba(248, 113, 113, 0.95);
}

.citizen-dispatch-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 9999;
}

.citizen-dispatch-modal {
    width: 420px;
    max-width: 92vw;
    border-radius: 24px;
    padding: 20px 22px 16px;
    background: linear-gradient(145deg, #020617, #020617, #0f172a);
    box-shadow: 0 22px 60px rgba(15,23,42,0.75);
    border: 1px solid rgba(148,163,184,0.35);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.citizen-dispatch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.citizen-dispatch-title-main {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #e5e7eb;
}

.citizen-dispatch-title-sub {
    display: block;
    font-size: 12px;
    color: #9ca3af;
}

.citizen-dispatch-close {
    border: none;
    background: rgba(15,23,42,0.9);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    border: 1px solid rgba(148,163,184,0.4);
}

.citizen-dispatch-close:hover {
    background: rgba(30,64,175,0.35);
    color: #e5e7eb;
}

.citizen-dispatch-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.citizen-dispatch-footer {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.citizen-dispatch-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 999999;
    font-family: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.citizen-dispatch-modal {
    width: 420px;
    max-width: 90vw;
    background: linear-gradient(145deg, #050818, #050a1f);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.85);
    padding: 20px 22px 18px;
    color: #fff;
}

.citizen-dispatch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.citizen-dispatch-title-main {
    font-size: 18px;
    font-weight: 600;
}

.citizen-dispatch-title-sub {
    font-size: 12px;
    opacity: .7;
}

.citizen-dispatch-close {
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #fff;
}

.citizen-dispatch-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.citizen-dispatch-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.citizen-dispatch-location {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.dispatch-call-description {
    font-size: 10px;
    color: #9ca3af;
}

.dispatch-map-unit-marker {
    position: absolute;
    transform-origin: center center;
    z-index: 3;
    pointer-events: auto;
}

.dispatch-map-unit-marker-inner {
    position: relative;
    transform-origin: center center;
}

.dispatch-map-unit-marker-icon {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(59,130,246,0.95);
    box-shadow: 0 0 6px rgba(59,130,246,0.85);
    border: 1px solid rgba(191,219,254,0.9);
}

.dispatch-map-unit-marker:hover .dispatch-map-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.dispatch-map-tooltip-unit {
    white-space: nowrap;
}

#rhApp .app-content.rh-layout {
    padding: 0;
}

.rh-iframe-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    background: #020617;
}

.rh-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #020617;
}

.mail-layout {
    display: grid;
    grid-template-columns: 230px 320px 1fr;
    gap: 0;
    height: 100%;
}

.mail-sidebar {
    background: radial-gradient(circle at 0 0, rgba(59,130,246,0.16), rgba(15,23,42,0.95));
    border-right: 1px solid rgba(148,163,184,0.35);
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mail-account-block {
    background: rgba(15,23,42,0.85);
    border-radius: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: 0 6px 16px rgba(15,23,42,0.85);
    margin-bottom: 8px;
}

.mail-account-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(148,163,184,0.95);
    margin-bottom: 4px;
}

.mail-account-email {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.mail-sidebar .btn-full {
    width: 100%;
    justify-content: center;
    margin-bottom: 6px;
}

.mail-folders h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148,163,184,0.9);
    margin: 10px 0 8px;
}

.mail-folders-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.mail-folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    color: #e5e7eb;
    transition: background 0.12s ease-out, transform 0.06s;
}

.mail-folder-item span {
    pointer-events: none;
}

.mail-folder-item .mail-folder-count {
    font-size: 11px;
    opacity: 0.8;
}

.mail-folder-item:hover {
    background: rgba(30,64,175,0.55);
    transform: translateY(-1px);
}

.mail-folder-item.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 6px 18px rgba(37,99,235,0.9);
}

.mail-folder-item.active .mail-folder-count {
    opacity: 1;
}

.mail-new-folder {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.mail-new-folder input {
    flex: 1;
    background: rgba(15,23,42,0.9);
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.4);
    padding: 4px 8px;
    color: #e5e7eb;
    font-size: 12px;
}

.mail-list-panel {
    border-right: 1px solid rgba(148,163,184,0.35);
    background: radial-gradient(circle at 0 0, rgba(255,255,255,0.05), rgba(15,23,42,0.96));
    display: flex;
    flex-direction: column;
}

.mail-list-header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148,163,184,0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mail-list-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.mail-list {
    flex: 1;
    overflow-y: auto;
}

.mail-item {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(31,41,55,0.85);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: background 0.12s ease-out;
}

.mail-item:hover {
    background: rgba(30,64,175,0.35);
}

.mail-item.unread {
    background: rgba(30,64,175,0.55);
}

.mail-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.mail-item-from {
    font-weight: 600;
    color: #e5e7eb;
}

.mail-item-date {
    font-size: 11px;
    color: rgba(148,163,184,0.9);
}

.mail-item-subject {
    font-size: 13px;
    color: #f9fafb;
    font-weight: 500;
}

.mail-item-preview {
    font-size: 12px;
    color: rgba(148,163,184,0.95);
}

.mail-view-panel {
    background: radial-gradient(circle at 0 0, rgba(59,130,246,0.12), rgba(15,23,42,0.98));
    display: flex;
    flex-direction: column;
}

.mail-view-container,
.mail-compose-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
}

.mail-view-empty {
    margin: auto;
    font-size: 13px;
    color: rgba(148,163,184,0.9);
}

.mail-view-meta {
    margin-bottom: 10px;
}

.mail-view-subject {
    font-size: 15px;
    font-weight: 700;
    color: #f9fafb;
    margin-bottom: 4px;
}

.mail-view-from,
.mail-view-to,
.mail-view-date {
    font-size: 12px;
    color: rgba(148,163,184,0.95);
}

.mail-view-actions {
    display: flex;
    gap: 8px;
    margin: 8px 0 10px;
}

.mail-view-content {
    flex: 1;
    padding: 10px;
    border-radius: 14px;
    background: rgba(15,23,42,0.95);
    border: 1px solid rgba(55,65,81,0.9);
    font-size: 13px;
    color: #e5e7eb;
    overflow-y: auto;
    white-space: pre-wrap;
}

.mail-compose-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.mail-compose-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mail-compose-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}

.mail-compose-row label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148,163,184,0.95);
}

.mail-compose-row input,
.mail-compose-row textarea {
    border-radius: 10px;
    border: 1px solid rgba(75,85,99,0.9);
    background: rgba(15,23,42,0.96);
    padding: 6px 8px;
    color: #e5e7eb;
    font-size: 12px;
    resize: none;
}

.mail-compose-body-row textarea {
    min-height: 160px;
}

.mail-compose-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.mail-setup-modal {
    max-width: 560px;
}

.mail-setup-text {
    font-size: 13px;
    color: rgba(148,163,184,0.95);
    margin-bottom: 12px;
}

.mail-header-account {
    font-size: 12px;
    color: rgba(148,163,184,0.95);
    margin-right: 10px;
}

.mail-move-modal {
    max-width: 380px;
}

.mail-move-select {
    border-radius: 10px;
    border: 1px solid rgba(75,85,99,0.9);
    background: rgba(15,23,42,0.96);
    padding: 6px 8px;
    color: #e5e7eb;
    font-size: 12px;
}

.app-badge {
    position: absolute;
    top: -3px;
    right: -3px;

    background: #ff3b30;
    color: #fff;

    font-size: 10px;
    font-weight: 700;

    min-width: 18px;
    height: 18px;
    padding: 0 4px;

    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 0 8px rgba(0,0,0,0.35);
    pointer-events: none;
    z-index: 10;

    transform: scale(0);
    transition: transform .18s cubic-bezier(.3,1.6,.4,1);
}

.app-badge.visible {
    transform: scale(1);
}

#gndApp {
    border-radius: 26px;
    overflow: hidden;
}

.gnd-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #0f172a;
}

/* ------------------------------
   APP DOCUMENTS
   ------------------------------ */

.docs-app-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    overflow-y: auto;
}

.docs-section {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.docs-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    margin: 0 0 2px;
}

.docs-section-sub {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 8px;
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-category {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(75, 85, 99, 0.6);
}

.docs-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.docs-category-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.docs-category-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.docs-category-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.docs-link-row {
    width: 100%;
    border: 0;
    outline: 0;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease;
}

.docs-link-row:hover {
    background: rgba(30, 64, 175, 0.75);
    transform: translateY(-1px);
}

.docs-link-main {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.docs-link-label {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 500;
}

.docs-link-url {
    font-size: 11px;
    color: #9ca3af;
}

.docs-link-open {
    font-size: 11px;
    color: #bfdbfe;
    margin-left: 12px;
    white-space: nowrap;
}

.docs-empty {
    font-size: 12px;
    color: #6b7280;
}

/* Modale admin docs */

.docs-admin-modal {
    max-width: 720px;
    width: 100%;
    background: #020617;
}

.docs-admin-body {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

@media (max-width: 900px) {
    .docs-admin-body {
        flex-direction: column;
    }
}

.docs-admin-block {
    flex: 1;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(51, 65, 85, 0.8);
}

.docs-admin-block h4 {
    font-size: 13px;
    color: #e5e7eb;
    margin: 0 0 8px;
}

.docs-admin-block .form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.docs-admin-block label {
    font-size: 11px;
    color: #9ca3af;
}

.docs-admin-block input,
.docs-admin-block select,
.docs-admin-block textarea {
    border-radius: 8px;
    border: 1px solid rgba(75, 85, 99, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 12px;
    padding: 6px 8px;
}

.docs-admin-hint {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

/* ==== CORRECTION FINALE DE LA GRILLE PHOTOS ==== */
.photos-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(145px, calc(100% / 5)), 1fr)) !important;  /* ← Changement clé: auto-fit + calc pour max ~5 colonnes (ajuste /5 à /4 ou /6 si besoin) */
    gap: 14px !important;
    padding: 16px 12px 80px 12px !important;  /* Augmente padding bottom pour plus d'espace en bas */
    overflow-y: auto !important;
    max-height: calc(100vh - 280px);  /* Garde ça pour scroll si beaucoup de photos */
    width: 100% !important;  /* ← Force à prendre toute la largeur du parent */
    box-sizing: border-box !important;  /* ← Évite overflow horizontal */
}

/* Media query optionnel pour écrans étroits (ex: tablette portrait) */
@media (max-width: 768px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(120px, calc(100% / 3)), 1fr)) !important;  /* 3 colonnes max sur mobile */
    }
}

.photo-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.25s ease;
    aspect-ratio: 1 / 1;  /* Garde les photos carrées */
    background: #0f172a;  /* Fond fallback si image charge pas */
}

.photo-item:hover {
    transform: scale(1.04) translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
    z-index: 10;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 16px;  /* ← Ajout pour coins arrondis sur l'image elle-même */
}

#photoViewerModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#photoViewerModal[style*="flex"] {
    display: flex !important;
}

/* Clique dehors = ferme */
.photo-viewer-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#photoViewerModal::before {
    content: '';
    position: absolute;
    inset: 0;
}
#photoViewerModal:active::before {
    pointer-events: auto;
}

/* Bouton principal standardisé (utilisé partout) */
.btn-primary {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: #ffffff !important;          /* texte blanc */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease-out;
    min-width: 160px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.55);
    filter: brightness(1.05);
}

/* Version spéciale pour le bouton "Ajouter une photo" → texte noir */
.photo-upload-section .btn-primary {
    background: #f1f5f9;                 /* fond gris très clair (style iPad) */
    color: #0f172a !important;           /* texte noir bien lisible */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.photo-upload-section .btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* Sous-titre de l'app Documents → texte noir au lieu de gris clair */
#documentsApp .app-header h2 + p,
#documentsApp .app-content > p:first-of-type,
.docs-app-body > p:first-child,
.docs-section-sub {
    color: #0f172a !important;        /* noir bien foncé */
    font-weight: 500 !important;      /* un peu plus gras pour le style tablette */
    opacity: 1 !important;
}

/* APP RH — Google Sheet propre, sans bordures et zoom parfait */
#rhApp .rh-layout {
    height: calc(100vh - 70px);
    padding: 0;
    background: #000;
    overflow: hidden;
}

#rhApp iframe#rhSheetFrame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;

    /* ZOOM PARFAIT — change juste cette valeur jusqu’à ce que ce soit nickel pour toi */
    zoom: 0.53;                    /* 0.90 = plus petit | 1.00 = taille réelle | 1.10 = un peu plus gros */
    -moz-transform: scale(0.98);
    -moz-transform-origin: 0 0;
    transform: scale(0.98);
    transform-origin: 0 0;

    /* Cache toute la barre du haut Google (menu, partage, etc.) */
    margin-top: -76px;             /* décale vers le haut */
    padding-top: 76px;             /* compense pour garder le contenu centré */
}

/* Si tu veux un zoom légèrement différent sur tablette/téléphone */
@media (max-width: 1024px) {
    #rhApp iframe#rhSheetFrame {
        zoom: 0.90;
        -moz-transform: scale(0.90);
        transform: scale(0.90);
        margin-top: -70px;
        padding-top: 70px;
    }
}

/* CORRECTION AFFICHAGE PHOTOS DANS LE SÉLECTEUR RAPPORT */
#evidencePhotoPickerGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    max-height: 60vh;
    overflow-y: auto;
}

.evidence-photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    aspect-ratio: 1;
}

.evidence-photo-item img {
    width: 100 !important;
    height: 100% !important;
    object-fit: cover !important;
}

.evidence-photo-item .checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.evidence-photo-item input[type="checkbox"]:checked + label::after {
    background: #3b82f6;
    border-color: #3b82f6;
}

#report-photos-section img {
    transition: transform 0.3s ease;
}
#report-photos-section img:hover {
    transform: scale(1.05);
}

.scrollable-photo {
    max-height: 70vh;      /* hauteur max visible */
    overflow-y: auto;      /* active la scrollbar verticale */
    overflow-x: hidden;    /* pas besoin horizontal */
}

#photoViewerImage {
    max-width: 100%;
    height: auto;
    display: block;
}

.mail-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mail-list-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: #e5e7eb;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.6);
}

.mail-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.mail-view-header {
    padding: 12px 18px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(148,163,184,0.25);
}

.mail-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.absences-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.absences-panel {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.absences-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    height: 100%;
    overflow: hidden;
}

.absences-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.absences-left .btn-primary {
    margin-top: auto;
}

.absences-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.absences-right .reports-table-container {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 0;
    padding: 0 6px;
    box-sizing: border-box;
}

.absences-layout {
    height: 100%;
    width: 100%;
}

.absences-panel-card {
    height: 100%;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-sizing: border-box;
}

.absences-grid {
    height: 100%;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
}

.absences-card {
    background: rgba(15, 23, 42, 0.92);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.absences-left .btn-primary {
    margin-top: auto;
}

.absences-right .reports-table-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

#patrolDetachmentsApp .app-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0f172a;
    border-radius: 18px;
    overflow: hidden;
}

.patrol-detachments-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(148,163,184,0.25);
    flex-shrink: 0;
}

.patrol-tab {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.patrol-tab:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #bfdbfe;
}

.patrol-tab.active {
    color: #3b82f6;
    border-bottom: 3px solid #3b82f6;
    font-weight: 600;
}

.patrol-detachments-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 16px 16px;
    background: #0f172a;
}

.detachment-section {
    margin-bottom: 32px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.detachment-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.4);
}

.detachment-table-container {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.detachment-table {
    min-width: 1200px;
    table-layout: fixed;
    width: 100%;
}

.detachment-table th {
    background: rgba(30, 41, 59, 0.9);
    padding: 12px 14px;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(148,163,184,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detachment-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148,163,184,0.15);
    vertical-align: middle;
    color: #ffffff;
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Répartition optimisée des colonnes */
.detachment-table th:nth-child(1),
.detachment-table td:nth-child(1) { width: 5%; }   /* NUMBER */

.detachment-table th:nth-child(2),
.detachment-table td:nth-child(2) { width: 10%; }   /* RANK */

.detachment-table th:nth-child(3),
.detachment-table td:nth-child(3) { width: 6%; }  /* NAME */

.detachment-table th:nth-child(4),
.detachment-table td:nth-child(4) { width: 16%; }  /* REMARQUE WC */

.detachment-table th:nth-child(5),
.detachment-table td:nth-child(5) { width: 16%; }  /* REMARQUE SUP */

.detachment-table th:nth-child(6),
.detachment-table td:nth-child(6) { width: 10%; }   /* DERNIER RDV */

.detachment-table th:nth-child(7),
.detachment-table td:nth-child(7) { width: 10%; }   /* RÉINTÉGRATION */

.detachment-table th:nth-child(8),
.detachment-table td:nth-child(8) { width: 10%; }   /* DERNIÈRE PROMO */

.detachment-table th:nth-child(9),
.detachment-table td:nth-child(9) { width: 7%; }   /* STATUS */

.detachment-table th:nth-child(10),
.detachment-table td:nth-child(10) { width: 10%; } /* ABSENCE */

.detachment-table td:nth-child(2),
.detachment-table td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detachment-table tr:hover td {
    background: rgba(59, 130, 246, 0.08);
}

.detachment-table tr:last-child td {
    border-bottom: none;
}

.detachment-table input[type="text"],
.detachment-table input[type="date"] {
    width: 100%;
 min-width: 90px;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.5);
    background: rgba(15,23,42,0.95);
    color: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.detachment-table input::placeholder {
    color: #94a3b8;
}

.detachment-table input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background: rgba(15,23,42,1);
}

.status-actif { color: #22c55e; font-weight: 700; }
.status-semi-actif { color: #eab308; font-weight: 700; }
.status-inactif { color: #ef4444; font-weight: 700; }
.status-en-absence { color: #fb923c; font-weight: 700; }

.effectifs-count {
    font-size: 72px;
    font-weight: 800;
    color: #3b82f6;
    text-align: center;
    margin: 40px 0 30px 0;
    font-family: 'Oswald', sans-serif;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
}

.detachment-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
    font-size: 15px;
    opacity: 0.8;
}

/* Coloration des lignes selon le status */
.detachment-table tr.status-inactif td {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #ffffff;
}

.detachment-table tr.status-semi-actif td {
    background: rgba(234, 179, 8, 0.25) !important;
    color: #ffffff;
}

.detachment-table tr.status-en-absence td {
    background: rgba(251, 146, 60, 0.25) !important;
    color: #ffffff;
}

.detachment-table tr.status-actif td {
    background: rgba(34, 197, 94, 0.18) !important;
    color: #ffffff;
}

/* Hover qui garde la couleur de fond du status mais l'assombrit légèrement */
.detachment-table tr.status-inactif:hover td {
    background: rgba(239, 68, 68, 0.35) !important;
}

.detachment-table tr.status-semi-actif:hover td {
    background: rgba(234, 179, 8, 0.35) !important;
}

.detachment-table tr.status-en-absence:hover td {
    background: rgba(251, 146, 60, 0.35) !important;
}

.detachment-table tr.status-actif:hover td {
    background: rgba(34, 197, 94, 0.28) !important;
}

.calc-panel {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calc-panel > div {
    width: 440px;
    display: flex;
    flex-direction: column; /* 🔑 clé */
    background: rgba(15, 23, 42, 0.9);
    border-radius: 26px;
    padding: 28px;
    box-shadow:
        0 30px 70px rgba(0,0,0,0.75),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.calc-screen {
    width: 100%;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.65),
        rgba(0,0,0,0.95)
    );
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 22px;
    box-shadow: inset 0 0 14px rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* 🔑 résultat à droite */
}

.calc-screen input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 18px;
    margin-bottom: 6px;
}

#calcFormule {
    width: 100%;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    text-align: right;
    margin-bottom: 4px;
}

#calcResult {
    font-size: 36px;
    font-weight: 600;
    color: #f8fafc;
    text-align: right;
    line-height: 1.1;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 86px);
    grid-template-rows: repeat(5, 62px);
    gap: 14px;
    justify-content: center;
}

.calc-btn {
    width: 100%;
    height: 100%;
    background: rgba(30,41,59,0.95);
    border: none;
    border-radius: 16px;
    color: #e5e7eb;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow:
        0 6px 14px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.calc-btn:hover {
    transform: translateY(-1px);
    background: rgba(51,65,85,1);
}

.calc-btn:active {
    transform: scale(0.96);
}

.calc-op {
    background: rgba(37,99,235,0.9);
}

.calc-eq {
    background: #22c55e;
    color: #052e16;
    font-weight: bold;
}

.calc-wide {
    grid-column: span 2;
}

.calc-screen {
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.55),
        rgba(0,0,0,0.85)
    );
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.8);
}

#calcResult {
    margin-top: 4px;
    font-size: 30px;
    font-weight: 600;
    color: #f8fafc;
    text-align: right;
    letter-spacing: 1px;
}

.calc-op {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #eff6ff;
}

.calc-op:hover {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.calc-eq {
    font-size: 22px;
    font-weight: 700;
}


.calc-eq:hover {
    background: linear-gradient(180deg, #4ade80, #22c55e);
}

.calc-btn.calc-wide {
    grid-column: span 2;
    font-size: 15px;
}


.calc-btn.calc-wide:hover {
    background: rgba(148,163,184,0.4);
}

/* ===== FIX CALCULATRICE (isolation CSS) ===== */

#calculatriceApp .calc-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 86px) !important;
    grid-template-rows: repeat(5, 62px) !important;
    gap: 14px;
    justify-content: center;
}

#calculatriceApp .calc-btn {
    width: auto !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#calculatriceApp .calc-btn.calc-wide {
    grid-column: span 2 !important;
}

#calculatriceApp .calc-panel > div {
    display: flex;
    flex-direction: column;
}


/* ---------- HEADER ---------- */

.agenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(30,41,59,0.9);
    flex-shrink: 0;
}

.agenda-header-center {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

/* ---------- CONTENT ---------- */

.agenda-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================= */
/* VUE MOIS */
/* ============================= */

#agendaMonthView {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#agendaMonthView .agenda-grid {
    flex: 1;
    grid-template-rows: repeat(6, 1fr);
    overflow: hidden;
}

/* Case jour */
#agendaMonthView .agenda-day {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.75);
}

/* Numéro du jour */
#agendaMonthView .agenda-day-number {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* Event dans une case */
#agendaMonthView .agenda-event {
    margin-top: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    background: #3b82f6;
    color: #fff;
    max-width: 100%;
}

/* Boutons header agenda */
.agenda-header button,
.agenda-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #f8fafc;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.agenda-header button:hover,
.agenda-back-btn:hover {
    background: rgba(255,255,255,0.22);
}


.agenda-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 6px 12px;
    font-size: 11px;
    color: #94a3b8;
}

.agenda-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 90px;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
}

/* Animation hover event */
.agenda-event {
    transition:
        transform 0.15s ease,
        filter 0.15s ease;
}

.agenda-event:hover {
    transform: scale(1.04);
    filter: brightness(1.1);
}


/* ===== FIX CHAINE DE HAUTEUR AGENDA ===== */

#agendaApp,
#agendaApp .app-content,
#agendaMonthView,
#agendaDayView {
    height: 100%;
}

#agendaApp {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.85);
}

#agendaApp .app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Animation hover jour */
.agenda-day {
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.agenda-day:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* === AGENDA – NUMEROS DES JOURS === */
.agenda-day,
.agenda-day-number {
    color: #f8fafc; /* blanc lisible */
}

/* === AGENDA – NETTOYAGE DU CADRE === */
.agenda-app,
.agenda-container,
.agenda-view {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.agenda-day {
    background: rgba(15, 23, 42, 0.75);
    border-radius: 14px;
    padding: 8px;
}

.agenda-day:hover {
    background: rgba(30, 64, 175, 0.45);
}

.agenda-day.today {
    outline: 2px solid rgba(59, 130, 246, 0.9);
}

/* Scroll maîtrisé pour les modales */
.modal-scroll {
    max-height: 65vh;          /* ajuste si besoin */
    overflow-y: auto;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
}

/* Chrome / Edge / Safari */
.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.35);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255,255,255,0.55);
}

/* ==================================================
   DISCUSSION – LAYOUT GLOBAL
================================================== */

.discussion-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(15, 20, 30, 0.55);
}

/* ==================================================
   COLONNE GAUCHE – CATEGORIES / SALONS
================================================== */

.discussion-sidebar {
    width: 260px;
    min-width: 260px;
    padding: 10px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
    border-right: 1px solid rgba(255,255,255,0.08);
}

.chat-category-title {
    margin: 10px 0 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #cbd5f5;
    opacity: 0.7;
}

.chat-channel {
    position: relative;
    padding: 6px 10px;
    margin-bottom: 2px;
    font-size: 13px;
    color: #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
}

.chat-channel:hover {
    background: rgba(59,130,246,0.25);
}

.chat-channel.active {
    background: linear-gradient(
        90deg,
        rgba(59,130,246,0.45),
        rgba(59,130,246,0.20)
    );
    color: #ffffff;
    font-weight: 600;
}

.chat-channel.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 2px;
    background: #3b82f6;
}

/* ==================================================
   COLONNE CENTRALE – MESSAGES
================================================== */

.discussion-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.discussion-channel-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.discussion-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==================================================
   INPUT MESSAGE
================================================== */

.discussion-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.discussion-input input {
    flex: 1;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.95);
    color: #f9fafb;
}

.discussion-input input::placeholder {
    color: #9ca3af;
}

.discussion-input button {
    width: 36px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
}

/* ==================================================
   COLONNE DROITE – MEMBRES
================================================== */

.discussion-members {
    width: 220px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(255,255,255,0.08);
}

.members-header {
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #cbd5f5;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.members-list {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
}

.chat-member {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #f9fafb;
    border-radius: 6px;
}

.chat-member:hover {
    background: rgba(59,130,246,0.18);
}

/* ==================================================
   RANK / STATUS
================================================== */

.member-rank {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(59,130,246,0.25);
    color: #bfdbfe;
    text-transform: uppercase;
    white-space: nowrap;
}

.member-name {
    font-weight: 500;
    color: #f9fafb;
}

.member-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.member-status.online {
    background: #22c55e;
    box-shadow: 0 0 4px rgba(34,197,94,0.8);
}

.member-status.offline {
    background: #6b7280;
}

/* RANK COLORS */

.member-rank[data-rank*="CHIEF"],
.member-rank[data-rank*="COMMANDER"] {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1f2933;
}

.member-rank[data-rank*="CAPTAIN"] {
    background: rgba(59,130,246,0.35);
}

.member-rank[data-rank*="LIEUTENANT"] {
    background: rgba(14,165,233,0.35);
}

.member-rank[data-rank*="SERGENT"] {
    background: rgba(16,185,129,0.35);
}

.member-rank[data-rank*="POLICE OFFICER"] {
    background: rgba(107,114,128,0.35);
}

/* ==================================================
   MESSAGE (CLEAN + PATCH)
================================================== */

.chat-message {
    max-width: 75%;
    background: rgba(15,23,42,0.95);
    border-radius: 14px;
    padding: 8px 10px;
    margin-bottom: 8px;
    position: relative;
    align-self: flex-start;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 22px;
    gap: 8px;
}

.chat-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.chat-author {
    font-weight: 600;
    font-size: 13px;
    color: #f9fafb;
    white-space: nowrap;
}

.chat-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.chat-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.chat-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.chat-message:hover .chat-actions {
    opacity: 1;
    pointer-events: auto;
}

.chat-actions button {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.chat-message-body {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==================================================
   MODALE EDIT MESSAGE
================================================== */

#editMessageModal textarea {
    width: 100%;
    resize: none;
    min-height: 120px;
}

.channel-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: auto;
}

.chat-channel.has-unread {
    background: rgba(59,130,246,0.25);
}

.chat-channel.has-mention {
    background: rgba(239,68,68,0.35);
}

#interventionMapApp {
    position: absolute;
    inset: 24px;
    background: rgba(15, 23, 42, 0.92);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
}

#interventionMapApp .app-header {
    height: 56px;
    flex-shrink: 0;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(
        to bottom,
        rgba(30, 41, 59, 0.95),
        rgba(15, 23, 42, 0.95)
    );
    border-bottom: 1px solid rgba(148,163,184,0.15);
}

#interventionMapApp .app-header h2 {
    font-size: 15px;
    font-weight: 500;
    color: #e5e7eb;
}

#interventionMapApp .app-close {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #e5e7eb;
    cursor: pointer;
}

#interventionMapApp .app-close:hover {
    background: rgba(239,68,68,0.8);
}

#interventionMapApp .app-content {
    flex: 1;
    display: flex;
    height: 100%;
}

.map-sidebar {
    width: 260px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.85);
    border-right: 1px solid rgba(148,163,184,0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-sidebar h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

.map-sidebar label {
    font-size: 12px;
    color: #94a3b8;
}

.map-sidebar select {
    background: rgba(30,41,59,0.9);
    border: 1px solid rgba(148,163,184,0.2);
    color: #e5e7eb;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
}

.map-sidebar button {
    margin-top: 8px;
    background: #2563eb;
    border: none;
    border-radius: 10px;
    padding: 8px;
    font-size: 12px;
    color: white;
    cursor: pointer;
}

.map-sidebar button:hover {
    background: #1d4ed8;
}

#interventionMap {
    flex: 1;
    background: #020617;
}

/* Leaflet tweaks */
.leaflet-container {
    background: #020617;
    font-family: Inter, sans-serif;
}

.leaflet-control-zoom {
    border-radius: 10px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
    border: none;
}

.leaflet-control-zoom a:hover {
    background: #2563eb;
}

.leaflet-popup-content-wrapper {
    background: rgba(15,23,42,0.95);
    color: #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.leaflet-popup-content {
    font-size: 12px;
    line-height: 1.4;
}

.leaflet-popup-tip {
    background: rgba(15,23,42,0.95);
}

.app-opening {
    animation: appOpen 0.18s ease-out forwards;
}

.app-closing {
    animation: appClose 0.18s ease-in forwards;
}

@keyframes appOpen {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes appClose {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.96);
    }
}

.intervention-modal {
    max-width: 420px;
    background: rgba(15,23,42,0.95);
    border-radius: 16px;
}

.intervention-modal .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.intervention-modal label {
    font-size: 12px;
    color: #94a3b8;
}

.intervention-modal input,
.intervention-modal select,
.intervention-modal textarea {
    background: rgba(30,41,59,0.9);
    border: 1px solid rgba(148,163,184,0.2);
    border-radius: 10px;
    padding: 8px;
    color: #e5e7eb;
    font-size: 13px;
}

.gravity-value {
    font-size: 11px;
    color: #cbd5f5;
}

/* =========================
   FORMULAIRES APP
========================= */

.formulaires-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
    height: 100%;
}

/* SIDEBAR */
.form-sidebar {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
}

.form-sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.form-sidebar-item {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    color: #e5e7eb;
    cursor: pointer;
    transition: background 0.15s ease;
}

.form-sidebar-item:hover {
    background: rgba(59, 130, 246, 0.25);
}

.form-sidebar-item.active {
    background: rgba(37, 99, 235, 0.9);
}

/* MAIN */
.form-main {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
    overflow: hidden;
}

.form-main-header h3 {
    margin: 0 0 14px 0;
    font-size: 18px;
    color: #f9fafb;
}

.form-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    overflow-y: auto;
    padding-right: 6px;
}

.form-card {
    background: rgba(30, 41, 59, 0.9);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
}

.form-card-sub {
    font-size: 12px;
    color: #9ca3af;
}

.form-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.form-empty {
    margin: auto;
    font-size: 14px;
    color: #9ca3af;
    display: none;
}

.builder-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
    height: 100%;
}

.builder-questions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

.builder-question {
    background: rgba(30,41,59,.95);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(148,163,184,.25);
}

.builder-question-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.builder-question input {
    flex: 1;
}

.builder-options {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.builder-toolbar {
    background: rgba(15,23,42,.95);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* FIX bouton créer formulaires */
#formulairesApp .app-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

#formulairesApp #formCreateBtn {
    width: auto !important;
    min-width: unset !important;
    flex: none !important;
    padding: 6px 14px;
    border-radius: 10px;
}

/* =========================
   BUILDER – INPUTS & TEXTE
========================= */

#formBuilderApp input,
#formBuilderApp textarea,
#formBuilderApp select {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

#formBuilderApp input::placeholder,
#formBuilderApp textarea::placeholder {
    color: #9ca3af;
}

#formBuilderApp label {
    color: #d1d5db;
    font-size: 12px;
}

/* =========================
   BUILDER – QUESTIONS
========================= */

.builder-question {
    background: linear-gradient(180deg, #0b1220, #020617);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.builder-question-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.builder-question-header input {
    flex: 1;
}

.builder-options input {
    background: rgba(15, 23, 42, 0.9);
}

#formBuilderApp .btn-primary {
    width: auto !important;
    min-width: unset !important;
    padding: 6px 14px;
}

.builder-toolbar button {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    padding: 8px;
    font-size: 12px;
}

.builder-toolbar button:hover {
    background: rgba(37, 99, 235, 0.8);
}

/* =========================
   BUILDER – BOUTONS OPTIONS
========================= */

/* Bouton + Option */
#formBuilderApp .builder-options button {
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

#formBuilderApp .builder-options button:hover {
    background: rgba(37, 99, 235, 0.8);
    border-color: rgba(37, 99, 235, 1);
}

/* Bouton supprimer option (❌) */
#formBuilderApp .builder-options button:not(:last-child) {
    background: rgba(127, 29, 29, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fee2e2;
    padding: 4px 8px;
}

#formBuilderApp .builder-options button:not(:last-child):hover {
    background: rgba(220, 38, 38, 0.9);
}

/* Bouton supprimer QUESTION */
#formBuilderApp .builder-question-header button {
    background: rgba(127, 29, 29, 0.75);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fee2e2;
    border-radius: 8px;
    padding: 6px 8px;
    cursor: pointer;
}

#formBuilderApp .builder-question-header button:hover {
    background: rgba(220, 38, 38, 0.9);
}

.form-question {
    margin-bottom: 16px;
}

.form-question label {
    display: block;
    margin-bottom: 6px;
    color: #e5e7eb;
}

/* =========================
   FORM PREVIEW – CLEAN & PREMIUM
========================= */

/* ISOLATION FORM PREVIEW */
#formPreviewApp {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#formPreviewApp .app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 32px 110px;
    display: block; /* ⛔ surtout PAS flex */
}

/* WRAPPER CENTRAL */
#formPreviewApp .form-preview-wrapper {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

#formPreviewApp .form-description {
    background: linear-gradient(180deg, #0f172a, #020617);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;

    color: #cbd5f5;
    font-size: 14px;
    line-height: 1.6;
}

#formPreviewApp .form-description:empty {
    display: none;
}

/* =========================
   QUESTION CARD
========================= */

#formPreviewApp .form-question {
    background: linear-gradient(180deg, #0f172a, #020617);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    overflow: hidden; /* empêche tout débordement visuel */
}

/* Label principal */
#formPreviewApp .form-question > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 10px;
}

/* Obligatoire */
#formPreviewApp .form-question span {
    color: #ef4444;
    margin-left: 4px;
}

/* =========================
   INPUTS
========================= */

#formPreviewApp input[type="text"],
#formPreviewApp textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

#formPreviewApp input[type="text"]:focus,
#formPreviewApp textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* =========================
   FORM TITLE (HEADER)
========================= */

#formPreviewApp #previewFormTitle {
    font-size: 26px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

/* Ligne de séparation sous le titre */
#formPreviewApp .form-preview-wrapper::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(
        to right,
        rgba(59, 130, 246, 0.8),
        rgba(59, 130, 246, 0.15),
        transparent
    );
    margin: 12px 0 24px;
}

/* =========================
   OPTIONS (checkbox / radio)
========================= */

#formPreviewApp .form-question label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 8px;
    cursor: pointer;
}

#formPreviewApp input[type="checkbox"],
#formPreviewApp input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* =========================
   SUBMIT
========================= */

#formPreviewApp .form-submit {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
}

#formPreviewApp .form-submit .btn-primary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 28px;

    opacity: 1 !important;
    visibility: visible !important;

    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 14px;
}

#formPreviewApp form {
    padding-bottom: 20px;
}

#formPreviewApp .btn-primary {
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 160px;
}

#formPreviewApp .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

.gnd-lobby {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gnd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.gnd-tile {
    width: 140px;
    height: 140px;
    border-radius: 26px;
    background: radial-gradient(circle at top left,
        rgba(255,255,255,0.18),
        rgba(15,23,42,0.95)
    );
    box-shadow: 0 18px 40px rgba(0,0,0,0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.gnd-tile:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 26px 60px rgba(0,0,0,0.85);
}

.gnd-tile img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.gnd-tile span {
    font-size: 13px;
    color: #f9fafb;
    text-align: center;
}

.gnd-app {
    background:
        linear-gradient(
            rgba(10, 15, 25, 0.82),
            rgba(10, 15, 25, 0.82)
        ),
        url("img/gnd_wallpaper.png") center center / cover no-repeat;
}

.gnd-lobby {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.gnd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 42px;
}

.gnd-tile {
    width: 160px;
    height: 160px;
    border-radius: 28px;

    background:
        radial-gradient(circle at top left,
            rgba(255,255,255,0.22),
            rgba(15,23,42,0.95)
        );

    border: 1px solid rgba(255,255,255,0.12);
    box-shadow:
        0 25px 55px rgba(0,0,0,0.75),
        inset 0 0 18px rgba(255,255,255,0.04);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;

    cursor: pointer;
    transition: all .18s ease;
}

.gnd-tile:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 35px 75px rgba(0,0,0,0.9),
        inset 0 0 25px rgba(255,255,255,0.08);
}

.gnd-tile img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.7));
}

.gnd-tile span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #f9fafb;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.85);
}

.gnd-procedures {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.procedures-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px;
}

.procedure-card {
    width: 260px;
    height: 220px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;

    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

.procedure-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,0.7));
}

.procedure-card span {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0,0,0,0.85);
}

.procedure-card:hover {
    transform: translateY(-8px) scale(1.05);
    filter: brightness(1.08);
}

.gnd-riot-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 40px 80px;
    color: #ffffff;
}

.riot-section {
    text-align: center;
}

.riot-section h3 {
    font-size: 28px;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.riot-section h4 {
    font-size: 22px;
    margin: 30px 0 15px;
}

.riot-intro p {
    font-size: 20px;
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto 20px;
}

.riot-outfits {
    display: flex;
    justify-content: center;
    gap: 120px;
}

.riot-outfit img {
    height: 340px;
}

.riot-outfit span {
    display: block;
    margin-top: 12px;
    font-size: 20px;
    letter-spacing: 2px;
}

.riot-image {
    max-width: 90%;
    margin: 20px auto;
    display: block;
}

.riot-explain {
    margin-top: 30px;
    font-size: 20px;
    line-height: 1.6;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.riot-breach-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 40px;
    color: #ffffff;
}

.riot-highlight-red {
    color: #ef4444;
    font-weight: 600;
}

.riot-highlight-blue {
    color: #3b82f6;
    font-weight: 600;
}

.riot-breach img {
    margin: 40px auto;
}

.riot-back-btn {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0.85;
}

.riot-back-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

.gnd-buybust-content {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding: 40px 80px;
    color: #ffffff;
}

.buybust-important {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #dc2626;
    margin-bottom: 30px;
}

.buybust-warning {
    border-top: 4px solid #dc2626;
    border-bottom: 4px solid #dc2626;
    padding: 40px 0;
}

.buybust-vehicles {
    display: flex;
    justify-content: center;
    gap: 120px;
    margin: 30px 0;
}

.buybust-vehicles img {
    width: 360px;
}

.riot-highlight-gold {
    color: #eab308;
    font-weight: 600;
}

.riot-highlight-green {
    color: #22c55e;
    font-weight: 600;
}

.gnd-tenues-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.tenues-grid {
    display: flex;
    gap: 200px;
}

.tenue-card {
    width: 260px;
    height: 260px;
    border-radius: 32px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;

    background:
        radial-gradient(circle at top left,
            rgba(255,255,255,0.22),
            rgba(15,23,42,0.95)
        );

    border: 1px solid rgba(255,255,255,0.15);
    box-shadow:
        0 30px 70px rgba(0,0,0,0.8),
        inset 0 0 18px rgba(255,255,255,0.05);

    cursor: pointer;
    transition: all .18s ease;
}

.tenue-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.tenue-card img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.7));
}

.tenue-card span {
    font-size: 26px;
    letter-spacing: 3px;
    font-weight: 500;
    color: #ffffff;
}

.tenues-detail-content {
    padding: 30px;
    overflow-y: auto;
}

.tenues-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
}

.tenue-item {
    width: 220px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.tenue-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
}

.tenue-item img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.tenue-item span {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tenue-item span {
    color: #ffffff;          /* TEXTE BLANC */
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ===============================
   TENUES – PAGES DÉTAIL
================================ */

.tenue-detail-app {
    background: linear-gradient(
        180deg,
        rgba(5, 25, 55, 0.98),
        rgba(5, 20, 40, 0.98)
    );
}

.tenue-detail-content {
    padding: 20px 40px;
    text-align: center;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- TITRES ---------- */

.tenue-detail-content h3 {
    color: #ffffff;
    font-size: 26px;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ---------- IMAGE PRINCIPALE ---------- */

.tenue-detail-img {
    width: 100%;
    max-width: 1700px;          /* 🔥 beaucoup plus gros */
    max-height: 65vh;          /* 🔥 occupe l’écran verticalement */
    
    margin: 20px auto 30px;
    display: block;

    object-fit: contain;

    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.7));
    border-radius: 20px;
}

/* ---------- BLOCS INFO (drawables) ---------- */

.tenue-info-box {
    margin: 25px auto;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 15px;
    text-align: left;
}

.tenue-info-box strong {
    color: #d4af37; /* or GND gold */
}

/* ---------- VARIANTE ---------- */

.tenue-variant-title {
    margin-top: 35px;
    font-size: 20px;
    color: #ffffff;
    letter-spacing: 0.8px;
}

/* ---------- SCROLLBAR ---------- */

.tenue-detail-content::-webkit-scrollbar {
    width: 6px;
}

.tenue-detail-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

.tenue-detail-content::-webkit-scrollbar-track {
    background: transparent;
}

/* ================= VÉHICULES ================= */

.gnd-vehicules-content {
    padding: 40px;
}

.vehicules-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    justify-items: center;
    align-items: center;
}

.vehicule-card {
    width: 320px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.vehicule-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.14);
}

.vehicule-card img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 16px;
}

.vehicule-card span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ================= VEHICLE DETAIL ================= */

.vehicle-detail-content {
    padding: 40px;
    height: 100%;
}

.vehicle-info {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    height: 100%;
}

.vehicle-text {
    color: #ffffff;
}

.vehicle-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.vehicle-text p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.vehicle-media {
    border: 4px solid #b08d2d; /* or gold */
    border-radius: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.35);
}

.vehicle-media video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
}

/* ================= PATROUILLES ================= */

.gnd-patrol-content {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 40px;
    padding: 40px;
    height: 100%;
}

/* TEXTE */
.patrol-text {
    color: #ffffff;
}

.patrol-text h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.patrol-text p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.patrol-text ul {
    margin: 15px 0 20px 20px;
}

.patrol-text li {
    margin-bottom: 8px;
}

/* MAP */
.patrol-map {
    position: relative;
    border: 4px solid #b08d2d;
    border-radius: 12px;
    overflow: hidden;
}

.patrol-map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================= GANG PINS ================= */

.gang-pin {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    background: red;
    box-shadow: 0 0 10px rgba(0,0,0,0.6);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gang-pin:hover {
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255,255,255,0.8);
}

/* POSITIONS (à ajuster selon ta map) */
.gang-ballas {
    top: 28%;
    left: 55%;
    background: #7b3fe4; /* Violet Ballas */
}

.gang-vagos {
    top: 55%;
    left: 45%;
    background: #f1c40f; /* Jaune Vagos */
}

.gang-families {
    top: 40%;
    left: 35%;
    background: #2ecc71; /* Vert Families */
}

.gang-marabunta {
    top: 65%;
    left: 60%;
    background: #3498db; /* Bleu Marabunta */
}

/* ================= GANG APPS ================= */

.gang-app {
    background: linear-gradient(180deg, #071c32, #031222);
    color: #fff;
}

.gang-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    padding: 40px;
    height: 100%;
}

.gang-left {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gang-logo {
    max-width: 260px;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.6));
}

.gang-center {
    font-size: 15px;
    line-height: 1.6;
}

.gang-center h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
}

.gang-center ul {
    margin-left: 20px;
}

.gang-center li {
    margin-bottom: 6px;
}

/* Families */
.gang-families h2,
.gang-families h3 {
    color: #2ecc71;
}

/* Ballas */
.gang-ballas h2,
.gang-ballas h3 {
    color: #9b59b6;
}

/* Vagos */
.gang-vagos h2,
.gang-vagos h3 {
    color: #f1c40f;
}

/* Marabunta */
.gang-marabunta h2,
.gang-marabunta h3 {
    color: #3498db;
}

.gnd-app,
.gnd-app p,
.gnd-app li,
.gnd-app span,
.gnd-app h1,
.gnd-app h2,
.gnd-app h3 {
    color: #ffffff;
}

/* ============================= */
/* GND – RAPPORTS D’INCIDENT */
/* ============================= */

.gnd-incident-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

.gnd-incident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gnd-incident-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #e5e7eb;
}

/* ===== TABLE ===== */

.gnd-incident-table-container {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 12px;
    overflow: auto;
}

.gnd-incident-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gnd-incident-table th {
    text-align: left;
    padding: 10px;
    color: #94a3b8;
    font-weight: 500;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.gnd-incident-table td {
    padding: 10px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.gnd-incident-table tr:hover {
    background: rgba(148, 163, 184, 0.05);
}

.gnd-incident-table td:last-child {
    white-space: nowrap;
}

/* ===== MODALE ===== */

.gnd-incident-modal {
    max-width: 720px;
    width: 95%;
}

.gnd-incident-modal .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gnd-incident-modal label {
    font-size: 13px;
    color: #cbd5f5;
}

.gnd-incident-modal input,
.gnd-incident-modal textarea {
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #e5e7eb;
}

.gnd-incident-modal input[readonly] {
    background: rgba(2, 6, 23, 0.7);
    color: #94a3b8;
}

.gnd-incident-modal textarea {
    resize: none;
}

.gnd-incident-modal input:focus,
.gnd-incident-modal textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* =============================== */
/* GND – MODALE MEMBRE DE GANG */
/* =============================== */

.gnd-gang-modal {
    max-width: 1000px;
    width: 95%;
}

.gnd-gang-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* PHOTO */
.gnd-gang-photo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gnd-gang-photo-section img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    background: #020617;
}

/* GRID INFOS */
.gnd-gang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.gnd-gang-grid .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* TAGS */
.gnd-gang-tags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    font-size: 13px;
    color: #cbd5f5;
}

.gnd-gang-tags label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* INPUTS */
.gnd-gang-modal input,
.gnd-gang-modal select,
.gnd-gang-modal textarea {
    background: #020617;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    color: #e5e7eb;
}

.gnd-gang-modal textarea {
    resize: none;
}

.gnd-gang-modal input:focus,
.gnd-gang-modal select:focus,
.gnd-gang-modal textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .gnd-gang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================= */
/* GND – VUE DÉTAILLÉE MEMBRE DE GANG */
/* ================================= */

.gnd-gang-view-modal {
    max-width: 1200px;
    width: 96%;
}

.gnd-gang-view-body {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

/* COLONNE GAUCHE */
.gnd-gang-view-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.gnd-gang-view-photo img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(148,163,184,.3);
}

/* TAGS */
.gnd-gang-view-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gnd-tag {
    background: rgba(239,68,68,.15);
    color: #fecaca;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 999px;
}

/* META */
.gnd-gang-view-meta {
    background: rgba(15,23,42,.6);
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    color: #cbd5f5;
}

/* COLONNE DROITE */
.gnd-gang-view-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gnd-gang-view-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.view-field label {
    font-size: 12px;
    color: #94a3b8;
}

.view-field div {
    background: #020617;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    color: #e5e7eb;
}

.gang-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    font-weight: 500;
    text-align: center;
}

/* SECTION TEXTE */
.view-section label {
    font-size: 13px;
    color: #94a3b8;
}

.view-textarea {
    background: #020617;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 10px;
    padding: 14px;
    min-height: 120px;
    white-space: pre-line;
}

/* RESPONSIVE */
@media (max-width: 1000px) {
    .gnd-gang-view-body {
        grid-template-columns: 1fr;
    }
    .gnd-gang-view-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================== */
/* GND – TABLE MEMBRES DE GANG */
/* =============================== */

.gnd-gang-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

/* HEADER (filtre + bouton) */
.gnd-gang-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gnd-gang-header select {
    width: 220px;
    background: #020617;
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e5e7eb;
    font-size: 13px;
}

/* CONTAINER TABLE */
.gnd-gang-table-container {
    background: rgba(15,23,42,.65);
    border-radius: 14px;
    padding: 14px;
    overflow: auto;
}

/* TABLE */
.gnd-gang-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

/* HEAD */
.gnd-gang-table thead th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 500;
    color: #94a3b8;
    border-bottom: 1px solid rgba(148,163,184,.25);
    white-space: nowrap;
}

/* BODY */
.gnd-gang-table tbody td {
    padding: 10px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(148,163,184,.08);
    vertical-align: middle;
}

/* HOVER */
.gnd-gang-table tbody tr:hover {
    background: rgba(148,163,184,.06);
}

/* PHOTO */
.gnd-gang-table img {
    width: 42px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(148,163,184,.3);
}

/* TAGS */
.gnd-gang-tag {
    display: inline-block;
    background: rgba(239,68,68,.15);
    color: #fecaca;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 999px;
    margin-right: 4px;
    margin-bottom: 2px;
}

/* ACTIONS */
.gnd-gang-table td:last-child {
    white-space: nowrap;
}

.gnd-gang-table .btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 999px;
}

/* EMPTY STATE */
.gnd-gang-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .gnd-gang-table thead {
        display: none;
    }

    .gnd-gang-table tbody tr {
        display: grid;
        grid-template-columns: 60px 1fr;
        gap: 10px;
        padding: 12px;
    }

    .gnd-gang-table tbody td {
        border-bottom: none;
        padding: 4px 0;
    }
}

/* =============================== */
/* GND – SELECT FILTRE GANG (INLINE) */
/* =============================== */

.gnd-gang-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* SELECT */
.gnd-gang-actions select {
    min-width: 220px;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background: linear-gradient(180deg, #020617, #020617);
    border: 1px solid rgba(148,163,184,.3);
    border-radius: 10px;

    padding: 10px 44px 10px 14px;
    font-size: 14px;
    color: #e5e7eb;
    cursor: pointer;

    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 16px) 50%;
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

/* HOVER */
.gnd-gang-actions select:hover {
    border-color: rgba(59,130,246,.6);
}

/* FOCUS */
.gnd-gang-actions select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

/* OPTION */
.gnd-gang-actions select option {
    background: #020617;
    color: #e5e7eb;
}

/* RESPONSIVE */
@media (max-width: 700px) {
    .gnd-gang-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .gnd-gang-actions select {
        width: 100%;
    }
}

/* =============================== */
/* PHOTO PICKER MODAL */
/* =============================== */

.photo-picker-modal {
    max-width: 900px;
    width: 95%;
}

.photo-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.photo-picker-item {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all .15s ease;
}

.photo-picker-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.photo-picker-item:hover {
    border-color: rgba(59,130,246,.6);
    transform: scale(1.02);
}

.photo-picker-item.selected {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.4);
}

.photo-picker-date {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,.6);
    color: #e5e7eb;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 6px;
}

#formPreviewApp .form-main {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 16px;
}

#formPreviewApp .form-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
}

#formPreviewApp .form-submit {
    flex-shrink: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* =========================
   SCROLLBAR UNIFIÉE – FORM PREVIEW
========================= */

/* Webkit (Chrome / Edge) */
#formPreviewApp .form-content::-webkit-scrollbar,
#formPreviewApp .app-content::-webkit-scrollbar {
    width: 6px;
}

#formPreviewApp .form-content::-webkit-scrollbar-track,
#formPreviewApp .app-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#formPreviewApp .form-content::-webkit-scrollbar-thumb,
#formPreviewApp .app-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#formPreviewApp .form-content::-webkit-scrollbar-thumb:hover,
#formPreviewApp .app-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Firefox */
#formPreviewApp .form-content,
#formPreviewApp .app-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) rgba(255,255,255,0.05);
}

/* =========================
   ESPACE BAS FORM PREVIEW
========================= */

#formPreviewApp .app-content {
    padding-bottom: 26px; /* respiration générale */
}

#formPreviewApp .form-submit {
    margin-bottom: 12px; /* espace sous le bouton */
}

#formPreviewApp .form-main::after {
    content: "";
    position: sticky;
    bottom: 0;
    display: block;
    height: 24px;
    background: linear-gradient(to top, rgba(15,23,42,0.95), transparent);
    pointer-events: none;
}

.form-answer {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    font-size: 14px;
}

/* =========================
   CORRECTION – DECISION
========================= */

#formCorrectionApp .form-question select {
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

#formCorrectionApp .form-question select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

/* =========================
   CORRECTION – COMMENTAIRE
========================= */

#formCorrectionApp textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
}

#formCorrectionApp textarea::placeholder {
    color: #9ca3af;
}

#formCorrectionApp textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
    outline: none;
}

/* =========================
   ESPACEMENT FINAL
========================= */

#formCorrectionApp .form-question {
    margin-bottom: 16px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    width: fit-content;
}

.status-pending {
    background: #facc15;
    color: #1f2937;
}

.status-accepted {
    background: #22c55e;
    color: #ffffff;
}

.status-refused {
    background: #ef4444;
    color: #ffffff;
}

.status-badge.status-rejected {
    background: rgba(255, 59, 59, 0.12);
    color: #ff3b3b;
    border: 1px solid rgba(255, 59, 59, 0.6);
    box-shadow:
        inset 0 0 0 1px rgba(255, 59, 59, 0.15),
        0 0 12px rgba(255, 59, 59, 0.4);
}

.status-corrected {
    background: #3b82f6;
    color: #ffffff;
}

.form-answer.readonly {
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    color: #d0d8ff;
    cursor: default;
}

.btn-disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
    border: none;
}

.exam-access-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exam-access-list .badge {
    background: rgba(255,255,255,0.08);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
}
.exam-access-list button {
    margin-left: 6px;
    background: none;
    border: none;
    color: #f87171;
    cursor: pointer;
}

.exam-timer {
    position: sticky;
    top: 10px;
    z-index: 20;

    margin: 12px auto 18px auto; /* 👈 CENTRAGE */
    padding: 8px 16px;

    width: fit-content;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;
    color: #fff;

    background: rgba(220, 38, 38, 0.9);
    border: 1px solid rgba(248, 113, 113, 0.9);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

/* ===============================
   INPUT AJOUT AGENT (EXAM PERMS)
=============================== */

.exam-user-input,
.form-card-sub input.input-small,
input[placeholder="Username agent"] {
    width: 100%;
    box-sizing: border-box; /* 🔑 FIX DÉBORDEMENT */

    padding: 10px 12px;
    border-radius: 10px;

    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.9),
        rgba(2, 6, 23, 0.95)
    );

    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #e5e7eb;
    font-size: 14px;

    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    margin-bottom: 8px;
}

/* Placeholder */
.exam-user-input::placeholder,
.form-card-sub input.input-small::placeholder,
input[placeholder="Username agent"]::placeholder {
    color: rgba(229, 231, 235, 0.45);
}

/* Focus */
.exam-user-input:focus,
.form-card-sub input.input-small:focus,
input[placeholder="Username agent"]:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Bouton autoriser */
.form-card-sub .btn-primary {
    width: 100%;
}

/* Espacement bloc */
.form-card-sub {
    margin-top: 6px;
}

/* ============================
   Patrol Detachments Scrollbar
   ============================ */

.patrol-detachments-content::-webkit-scrollbar {
    width: 6px;
}

.patrol-detachments-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.patrol-detachments-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.patrol-detachments-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.patrol-detachments-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.25) rgba(255,255,255,0.05);
}

/* ===================== */
/* STP APP */
/* ===================== */

#stpApp .service-panel {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ===================== */
/* TABLE DASHBOARD */
/* ===================== */

#stpApp .service-table th {
    background: rgba(30, 64, 175, 0.9);
    font-size: 12px;
    text-transform: uppercase;
}

#stpApp .service-table td {
    font-size: 13px;
}

/* ===================== */
/* OBSERVATIONS */
/* ===================== */

#stpObservations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stp-observation {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 12px;
    line-height: 1.4;
}

.stp-observation strong {
    color: #60a5fa;
    font-size: 12px;
}

.stp-observation .meta {
    margin-top: 6px;
    font-size: 11px;
    color: rgba(156, 163, 175, 0.9);
    text-align: right;
}

/* ===================== */
/* BOUTONS */
/* ===================== */

#stpApp .btn-xs {
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 999px;
}

#stpValidateBtn {
    background: linear-gradient(90deg, #16a34a, #22c55e);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.45);
}

#stpValidateBtn:hover {
    filter: brightness(1.05);
}

/* ===================== */
/* TEXTAREA OBS */
/* ===================== */

#stpObsContent {
    resize: none;
}

/* ===================== */
/* BADGES / STATUS (optionnel) */
/* ===================== */

.stp-status-valid {
    color: #22c55e;
    font-weight: 600;
}

.stp-status-warning {
    color: #facc15;
    font-weight: 600;
}

.stp-status-danger {
    color: #ef4444;
    font-weight: 600;
}

/* Statuts compétences */
.stp-status-acquis {
    border-color: rgba(34,197,94,0.7);
    background: rgba(34,197,94,0.12);
}

.stp-status-en_cours {
    border-color: rgba(234,179,8,0.7);
    background: rgba(234,179,8,0.12);
}

.stp-status-non_maitrise {
    border-color: rgba(239,68,68,0.7);
    background: rgba(239,68,68,0.12);
}

.stp-status-non_evalue {
    opacity: 0.75;
}

.stp-progress-bar {
    margin-top: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148,163,184,0.2);
    overflow: hidden;
}

#stpProgressFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #22c55e);
    transition: width 0.3s ease;
}

/* ===================== */
/* STP – KPIs */
/* ===================== */

.stp-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.stp-kpi {
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Bande colorée en haut */
.stp-kpi::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: 100%;
    opacity: 0.9;
}

/* Valeur */
.stp-kpi-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Label */
.stp-kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ===================== */
/* STP – KPI label color match */
/* ===================== */

/* STP actifs */
.stp-kpi.kpi-total .stp-kpi-label {
    color: #93c5fd;
}

/* Validables */
.stp-kpi.kpi-validable .stp-kpi-label {
    color: #4ade80;
}

/* À risque */
.stp-kpi.kpi-risk .stp-kpi-label {
    color: #f87171;
}

/* Progression */
.stp-kpi.kpi-progress .stp-kpi-label {
    color: #fde047;
}

/* ===================== */
/* Couleurs par KPI */
/* ===================== */

/* STP actifs */
.stp-kpi.kpi-total::before {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.stp-kpi.kpi-total .stp-kpi-value {
    color: #93c5fd;
}

/* Validables */
.stp-kpi.kpi-validable::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.stp-kpi.kpi-validable .stp-kpi-value {
    color: #4ade80;
}

/* À risque */
.stp-kpi.kpi-risk::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}
.stp-kpi.kpi-risk .stp-kpi-value {
    color: #f87171;
}

/* Progression moyenne */
.stp-kpi.kpi-progress::before {
    background: linear-gradient(90deg, #facc15, #fde047);
}
.stp-kpi.kpi-progress .stp-kpi-value {
    color: #fde047;
}

#stpApp .service-table thead {
    background: linear-gradient(
        90deg,
        rgba(30, 64, 175, 1),
        rgba(37, 99, 235, 1)
    );
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15),
                0 4px 12px rgba(37, 99, 235, 0.35);
}

#stpApp .service-table thead th {
    color: #e0f2fe;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.06em;
}

/* ===================== */
/* STP – Observations texte */
/* ===================== */

#stpObservations,
#stpObservations * {
    color: #e5e7eb; /* gris clair lisible */
}

/* Texte principal */
.stp-observation {
    color: #e5e7eb;
}

/* Contenu de l'observation */
.stp-observation p,
.stp-observation span,
.stp-observation div {
    color: #e5e7eb;
}

/* Meta (auteur / date) */
.stp-observation .meta {
    color: rgba(203, 213, 225, 0.85);
}

/* Compétence (ex: "L - patrouille") */
.stp-observation strong {
    color: #93c5fd;
}

.stp-observation:hover {
    background: rgba(59, 130, 246, 0.08);
    transition: background 0.15s ease;
}

/* ===================== */
/* STP – Compétences (CLEAN & FIXED) */
/* ===================== */

#stpCompetences {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Container principal */
.stp-competence-row {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* Hover */
.stp-competence-row:hover {
    background: rgba(30, 64, 175, 0.15);
    border-color: rgba(96, 165, 250, 0.5);
}

/* Ligne du haut : titre + select */
.stp-competence-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

/* Partie gauche */
.stp-competence-left {
    display: flex;
    gap: 10px;
    max-width: 75%;
}

.stp-competence-code {
    min-width: 22px;
    font-weight: 700;
    font-size: 14px;
    color: #93c5fd;
}

.stp-competence-title {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.4;
}

/* Partie droite (select) */
.stp-competence-right {
    flex-shrink: 0;
}

.stp-competence-right select {
    min-width: 150px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    white-space: nowrap;
}

/* Points à observer */
.stp-competence-points {
    margin-top: 8px;
    padding-left: 34px;
    font-size: 12px;
    color: #cbd5e1;
}

.stp-competence-points li {
    margin-bottom: 4px;
    list-style: disc;
}

/* ===================== */
/* STP – Statuts compétences */
/* ===================== */

.stp-status-acquis {
    border-color: rgba(34,197,94,0.7);
    background: rgba(34,197,94,0.12);
}

.stp-status-en_cours {
    border-color: rgba(234,179,8,0.7);
    background: rgba(234,179,8,0.12);
}

.stp-status-non_maitrise {
    border-color: rgba(239,68,68,0.7);
    background: rgba(239,68,68,0.12);
}

.stp-status-non_evalue {
    opacity: 0.75;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
    white-space: nowrap;
}

.tag-icon {
    font-size: 12px;
}

.tag-red { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.4); }
.tag-orange { background: rgba(249,115,22,.15); color: #fb923c; border: 1px solid rgba(249,115,22,.4); }
.tag-purple { background: rgba(168,85,247,.15); color: #c084fc; border: 1px solid rgba(168,85,247,.4); }
.tag-green { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.4); }
.tag-blue { background: rgba(59,130,246,.15); color: #60a5fa; border: 1px solid rgba(59,130,246,.4); }
.tag-yellow { background: rgba(234,179,8,.15); color: #facc15; border: 1px solid rgba(234,179,8,.4); }

.gang-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.gang-purple { background: rgba(168,85,247,.2); color: #c084fc; }
.gang-yellow { background: rgba(234,179,8,.2); color: #facc15; }
.gang-green { background: rgba(34,197,94,.2); color: #4ade80; }
.gang-blue { background: rgba(59,130,246,.2); color: #60a5fa; }

.pill {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.pill-green {
    background: rgba(34,197,94,.15);
    color: #4ade80;
}

.pill-red {
    background: rgba(239,68,68,.15);
    color: #f87171;
}

/* ========================= */
/* AIR SUPPORT DIVISION APP */
/* ========================= */

.air-app {
    background:
        linear-gradient(
            rgba(10, 15, 25, 0.78),
            rgba(10, 15, 25, 0.88)
        ),
        url("img/air/air_bg.png") center center / cover no-repeat;
}

.air-lobby {
    height: 100%;
    display: flex;
    justify-content: center;   /* centre horizontalement */
    align-items: center;
    padding-bottom: 60px;
    padding: 0;                /* enlève le décalage du haut */
}

.air-grid {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    place-items: center; /* centre chaque bouton dans sa cellule */
}

/* Tuile */
.air-tile {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 18px;
    padding: 20px 16px 22px;
    gap: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;

    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 28px rgba(0,0,0,0.55);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.air-tile img {
    width: 72px;     /* avant ~56px */
    height: 72px;
    object-fit: contain;

    filter:
        brightness(1.1)
        drop-shadow(0 6px 14px rgba(0,0,0,0.65));
}

.air-tile span {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    text-align: center;
    letter-spacing: .3px;
}

.air-tile:hover img {
    transform: scale(1.08);
    transition: transform 0.18s ease;
}

/* Hover */
.air-tile:hover {
    transform: translateY(-6px) scale(1.03);
    background: rgba(30, 64, 175, 0.85);
    box-shadow: 0 18px 38px rgba(37,99,235,0.55);
}

/* Active click */
.air-tile:active {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 1100px) {
    .air-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 780px) {
    .air-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.air-app {
    backdrop-filter: blur(26px) saturate(1.15);
    -webkit-backdrop-filter: blur(26px) saturate(1.15);
}

.air-tile img {
    filter:
        brightness(1.1)
        drop-shadow(0 0 6px rgba(59,130,246,0.55));
}

.absences-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.absences-tabs {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.absences-panel-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    height: 100%;
}

.absences-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 18px;
    height: 100%;
}

.absences-card {
    background: rgba(15, 23, 42, 0.92);
    border-radius: 16px;
    padding: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.absences-left {
    gap: 6px;
}

.absences-right {
    min-height: 0;
}

.absences-card h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #f8fafc;
}

#absencesSupervisionPanel h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

#absencesSupervisionPanel .reports-table-container {
    margin-top: 8px;
}

.reports-table td:last-child {
    white-space: nowrap;
}

.absence-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}

.absence-status-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.45);
}

.absence-status-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.absence-status-refused {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.absences-supervision-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.absences-supervision-actions button {
    height: 22px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 999px;
}

@media (max-width: 900px) {
    .absences-grid {
        grid-template-columns: 1fr;
    }

    .absences-tabs {
        position: static;
        transform: none;
        margin-top: 8px;
        justify-content: center;
    }
}

#absencesSupervisionApp .app-content {
    padding: 18px 22px;
}

#absencesSupervisionApp .supervision-layout {
    display: flex;
    height: 100%;
    width: 100%;
}

#absencesSupervisionApp .supervision-main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

#absencesSupervisionApp .supervision-table-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#absencesSupervisionApp .supervision-table-panel h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
}

#absencesSupervisionApp .supervision-table-container {
    flex: 1;
    overflow-y: auto;
    border-radius: 12px;
}

#absencesSupervisionApp table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #f9fafb;
}

#absencesSupervisionApp thead {
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 1),
        rgba(30, 64, 175, 0.95)
    );
}

#absencesSupervisionApp th,
#absencesSupervisionApp td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

#absencesSupervisionApp th {
    font-size: 11px;
    text-transform: uppercase;
    color: #e5e7eb;
}

#absencesSupervisionApp tbody tr:nth-child(odd) td {
    background: rgba(15, 23, 42, 0.92);
}

#absencesSupervisionApp tbody tr:nth-child(even) td {
    background: rgba(17, 24, 39, 0.96);
}

#absencesSupervisionApp tbody tr:hover td {
    background: rgba(56, 189, 248, 0.18);
}

#absencesSupervisionApp td:last-child {
    min-width: 130px;
}

#absencesSupervisionApp .action-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
}

#absencesSupervisionApp .action-buttons button {
    height: 24px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 999px;
}

#absencesSupervisionApp .absence-reason-cell {
    max-width: 320px;
    white-space: normal;
    text-align: left;
    font-size: 12px;
    opacity: 0.9;
}

.absence-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.absence-type-repos {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.45);
}

.absence-type-conge {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.absence-type-maladie {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.absence-type-formation {
    background: rgba(168, 85, 247, 0.18);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.45);
}

.absence-status-pending {
    background: rgba(234, 179, 8, 0.18);
    color: #fde68a;
    border: 1px solid rgba(234, 179, 8, 0.45);
}

.absence-status-approved {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.absence-status-refused {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.absences-layout {
    height: 100%;
}

.absences-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    height: 100%;
}

.absences-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.absences-left {
    gap: 8px;
}

.absences-right {
    min-height: 0;
}

.absences-right .reports-table-container {
    flex: 1;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .absences-grid {
        grid-template-columns: 1fr;
    }
}

.absence-days-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(148, 163, 184, 0.18);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.45);
    white-space: nowrap;
}

.absences-stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.absence-stat-card {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.98),
        rgba(17, 24, 39, 0.98)
    );
    border-radius: 16px;
    padding: 14px 18px;
    min-width: 180px;
    box-shadow: 0 12px 28px rgba(0,0,0,.55);
    border: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
}

.absence-stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(59,130,246,.18),
        transparent
    );
    opacity: .6;
    pointer-events: none;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.absence-stat-card select {
    width: 100%;
    margin-top: 6px;
    padding: 8px 36px 8px 12px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(30,64,175,.65), rgba(15,23,42,.95));
    border: 1px solid rgba(255,255,255,.18);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    appearance: none;
    outline: none;
    cursor: pointer;
}

.absence-stat-card select:hover {
    border-color: rgba(59,130,246,.6);
}

.absence-stat-card select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,.25);
}

.absence-stat-card select option {
    background: #0f172a;
    color: #ffffff;
}

.absence-stat-card select {
    background-image:
        linear-gradient(45deg, transparent 50%, #ffffff 50%),
        linear-gradient(135deg, #ffffff 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 50%,
        calc(100% - 14px) 50%;
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

.evidence-photo-picker-item {
    position: relative;
    width: 110px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.evidence-photo-picker-item img,
.evidence-photo-picker-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}

.bipper-layout {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.bipper-section h3 {
    margin-bottom: 10px;
    font-size: 15px;
    color: #e5e7eb;
}

.bipper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.bipper-btn {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e40af, #0f172a);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.bipper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,.35);
}

.air-tenues-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.air-tenues-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.6);
}

/* AERONEFS LIST */
.air-aeronefs-content {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.air-aeronefs-text {
    color: #e5e7eb;
    font-size: 15px;
    max-width: 900px;
}

.air-aeronefs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.air-aeronef-card {
    position: relative;
    cursor: pointer;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15,23,42,0.85);
    box-shadow: 0 20px 45px rgba(0,0,0,.6);
    transition: transform .2s ease, box-shadow .2s ease;
}

.air-aeronef-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.air-aeronef-card span {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 36px;
    font-weight: 600;
    color: white;
    text-shadow: 0 6px 20px rgba(0,0,0,.8);
}

.air-aeronef-card:hover {
    transform: scale(1.04);
}

/* HELICO DETAIL */
.air-helico-detail {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    align-items: center;
}

.air-helico-text {
    color: #e5e7eb;
    font-size: 16px;
    line-height: 1.6;
}

.air-helico-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,.6);
}

.evidence-photo-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    pointer-events: none;
}

.evidence-photo-item {
    position: relative;
}

.video-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 999px;
    pointer-events: none;
}
