
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.jpeg") 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;
}

.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;
}

.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);
}

.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);
}

#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;
}

/* Header : fixe */
.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;
}
