/* MDT System - Sleek Police/HUD Terminal Design */
/* No backdrop shadows */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Share+Tech+Mono&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050810;
    --bg-secondary: #080c16;
    --bg-tertiary: #0c1220;
    --bg-card: #0f1729;
    --bg-hover: #142038;
    --border-color: #1a2a44;
    --border-light: #24405f;
    --text-primary: #eaf3ff;
    --text-secondary: #8ba3c7;
    --text-muted: #56708f;
    --accent-primary: #22d3ee;
    --accent-secondary: #0ea5e9;
    --accent-hover: #06b6d4;
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.15);
    --info: #22d3ee;
    --info-bg: rgba(34, 211, 238, 0.15);
    --glow-primary: rgba(34, 211, 238, 0.35);
    --grid-line: rgba(34, 211, 238, 0.05);
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', 'Inter', monospace;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: var(--text-primary);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    line-height: 1.5;
}

/* Main Container */
#mdt-container {
    width: 1600px;
    height: 900px;
    max-width: 95vw;
    max-height: 95vh;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 60px rgba(34, 211, 238, 0.08), inset 0 0 120px rgba(34, 211, 238, 0.03);
}

#mdt-container::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        repeating-linear-gradient(0deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 32px),
        repeating-linear-gradient(90deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 32px);
    opacity: 0.6;
}

/* Header */
.mdt-header {
    height: 64px;
    padding: 0 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-icon img.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1.5px;
    text-shadow: 0 0 12px var(--glow-primary);
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.75;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar .profile-placeholder {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-role::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
    animation: hudPulse 1.8s ease-in-out infinite;
}

@keyframes hudPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
}

.header-time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.header-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-close:hover {
    background: rgba(239, 68, 68, 0.25);
}

.header-close svg {
    width: 18px;
    height: 18px;
}

/* Main Layout */
.mdt-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.mdt-sidebar {
    width: 200px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px 12px;
    flex-shrink: 0;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-bottom {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-primary);
    border-color: rgba(34, 211, 238, 0.25);
    border-left: 2px solid var(--accent-primary);
    box-shadow: inset 0 0 16px rgba(34, 211, 238, 0.08);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Content Area */
.mdt-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.page-title h1 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 1px;
    padding-left: 14px;
    border-left: 3px solid var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--glow-primary));
}

.page-desc {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent-primary);
    color: #04141a;
    font-family: var(--font-display);
    letter-spacing: 0.5px;
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 16px var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-section {
    margin-top: 20px;
}

.dashboard-points-section .dashboard-card-full {
    width: 100%;
}

.dashboard-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.dashboard-card::before,
.dashboard-card::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent-primary);
    opacity: 0.5;
    pointer-events: none;
}

.dashboard-card::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.dashboard-card::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.card-content {
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.dashboard-card-full .card-content {
    max-height: 220px;
}

.officer-points-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    transition: all 0.2s;
}

.officer-points-item:last-child {
    margin-bottom: 0;
}

.officer-points-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.officer-points-photo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.officer-points-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.officer-points-rank-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.2;
}

.officer-points-info {
    flex: 1;
    min-width: 0;
}

.officer-points-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.officer-points-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.officer-points-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Officer Roster */
#officer-roster-content.officer-roster-content {
    max-height: none;
    overflow-y: visible;
}

.officer-roster-group {
    margin-bottom: 20px;
}

.officer-roster-group:last-child {
    margin-bottom: 0;
}

.officer-roster-group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.officer-roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.officer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 14px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.officer-card:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.officer-card-photo-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
}

.officer-card.is-online .officer-card-photo-wrap {
    border-color: var(--success);
}

.officer-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.officer-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.officer-card-grade {
    font-size: 11px;
    color: var(--text-muted);
}

.officer-card-points {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
}

.officer-card-photo-wrap {
    transition: box-shadow 0.2s;
}

.officer-card.is-online .officer-card-photo-wrap {
    box-shadow: 0 0 10px var(--success);
    animation: hudPulse 2.4s ease-in-out infinite;
}

/* Officer Detail Modal */
.officer-detail-header {
    align-items: center;
}

.officer-detail-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.officer-detail-photo-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}

.officer-detail-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.officer-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 13px;
}

.officer-detail-grade {
    color: var(--text-secondary);
}

.officer-detail-points {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-weight: 700;
}

.officer-detail-cases-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

#officer-detail-cases-list .case-item {
    margin-bottom: 8px;
}

/* Dashboard Access Restricted */
.dashboard-restricted-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 24px;
    font-size: 13px;
}

/* List Items */
.duty-employee-item,
.bodycam-item,
.dispatch-call-item {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg-tertiary);
    transition: all 0.2s;
}

.duty-employee-item:last-child,
.bodycam-item:last-child,
.dispatch-call-item:last-child {
    margin-bottom: 0;
}

.duty-employee-item:hover,
.bodycam-item:hover,
.dispatch-call-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.employee-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.employee-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.employee-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bodycam-type {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.bodycam-details {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.bodycam-item {
    cursor: pointer;
}

.dispatch-call-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.dispatch-call-info {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.call-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.call-status.active {
    background: var(--success-bg);
    color: var(--success);
}

.call-status.pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.mark-location-btn {
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--info-bg);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--info);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-location-btn:hover {
    background: rgba(6, 182, 212, 0.25);
}

/* Search Box */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    flex: 1;
    padding: 12px 16px 12px 46px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.result-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.result-info {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Player Profile */
.player-profile {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.profile-header {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.profile-header .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 14px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-phone-numbers,
.stat-licenses {
    grid-column: 1 / -1;
}

.stat-phone-numbers .stat-value,
.stat-licenses .stat-value {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.phone-number-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.weapon-item {
    margin-bottom: 12px;
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab-btn.active {
    color: var(--accent-primary);
    background: rgba(34, 211, 238, 0.15);
}

.tab-panels {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.profile-actions {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Vehicle Items */
.vehicle-item {
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

.vehicle-item:last-child {
    margin-bottom: 0;
}

.vehicle-plate {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 4px;
}

.vehicle-model {
    font-size: 13px;
    color: var(--text-secondary);
}

.vehicle-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Case Section */
.case-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-search,
.case-history {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.case-item {
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.case-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.case-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.case-id {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary);
    text-shadow: 0 0 6px var(--glow-primary);
}

.case-date {
    font-size: 12px;
    color: var(--text-muted);
}

.case-player,
.case-officer-info,
.case-violations-list,
.case-notes {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-player svg,
.case-officer-info svg,
.case-violations-list svg,
.case-notes svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Case Form */
.case-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.form-header {
    margin-bottom: 20px;
}

.form-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Create Case Full Page */
.create-case-full-wrapper {
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.create-case-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.create-case-save-btn {
    width: 100%;
    justify-content: center;
}

.create-case-dept {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.create-case-dept-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.create-case-dept-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1665f9 0%, #1a2332 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.create-case-dept-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.create-case-dept-logo-text {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.create-case-dept-placeholder {
    font-size: 12px;
    color: var(--text-muted);
}

.create-case-type-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.create-case-type-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.create-case-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.create-case-type-select {
    padding: 10px 12px;
}

.create-case-type-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.create-case-back-btn {
    width: 100%;
    margin-top: auto;
}

.create-case-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.create-case-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.create-case-general {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.create-case-editor-wrap {
    margin-bottom: 8px;
}

.description-editor-wrap {
    position: relative;
}

.description-image-resize-toolbar {
    position: absolute;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    flex-wrap: wrap;
}

.description-resize-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 4px;
}

.description-resize-btn {
    padding: 4px 10px;
    font-size: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.description-resize-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.description-resize-btn.description-resize-remove {
    margin-left: 4px;
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--danger);
}

.description-resize-btn.description-resize-remove:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: #fff;
}

.create-case-description-editor {
    min-height: 140px;
    resize: vertical;
}

.description-rich-editor {
    overflow-y: auto;
    resize: vertical;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.description-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}

.description-rich-editor:focus {
    outline: none;
}

.description-rich-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 8px 0;
    display: block;
    cursor: default;
}

.description-rich-editor img[style*="float"] {
    display: inline-block;
    margin: 4px 12px 4px 0;
}

.create-case-editor-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.create-case-section-labels {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}

.create-case-meta {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.create-case-meta-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.create-case-table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.create-case-show-select {
    width: auto;
    min-width: 100px;
}

.create-case-search-input {
    width: 180px;
}

.create-case-criminals-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.create-case-criminals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.create-case-criminals-table th,
.create-case-criminals-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.create-case-criminals-table th {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
}

.create-case-criminals-table tbody tr:hover {
    background: var(--bg-hover);
}

.create-case-criminals-table .remove-criminal-btn {
    padding: 4px 10px;
    font-size: 12px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
}

.create-case-criminals-table .remove-criminal-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-edit-violations {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-secondary);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit-violations:hover {
    background: var(--accent-hover);
}

.criminal-effective-fine,
.criminal-effective-jail {
    display: inline-block;
    min-width: 60px;
    font-weight: 600;
    color: var(--text-primary);
}

.add-criminal-results {
    max-height: 280px;
    overflow-y: auto;
}

.add-criminal-results .search-result-item {
    margin-bottom: 8px;
}

.add-criminal-violations-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.add-criminal-violations-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.add-criminal-violations-list .category-section {
    margin-bottom: 12px;
}

.add-criminal-violations-summary {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.add-criminal-violations-summary strong {
    color: var(--text-primary);
}

.add-criminal-violations-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Violations Summary */
.violations-summary {
    display: flex;
    gap: 24px;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-item strong {
    color: var(--text-primary);
}

/* Violations List */
.violations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.licenses-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.license-item {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.license-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.license-name {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.license-created {
    font-size: 11px;
    color: #9ca3af;
}

.license-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
}

.license-label {
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
}

.license-value {
    color: #e5e7eb;
}

.license-expire.expired {
    color: #f87171;
}

.license-expire.active {
    color: #34d399;
}

.category-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.category-title {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: var(--accent-primary);
}

.violations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    padding: 14px;
}

.violation-item {
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.violation-item:hover {
    background: var(--bg-hover);
}

.violation-item.selected {
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.3);
    border-left-color: var(--accent-primary);
}

.violation-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.violation-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.violation-fine {
    font-size: 13px;
    font-weight: 700;
    color: var(--warning);
    white-space: nowrap;
}

/* Impounds Grid */
.impounds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.impound-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
}

.impound-item:hover {
    border-color: var(--border-light);
}

.impound-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.impound-plate {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
}

.impound-plate svg {
    width: 18px;
    height: 18px;
}

.impound-fine {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--warning);
}

.impound-fine svg {
    width: 16px;
    height: 16px;
}

.impound-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.impound-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.impound-info-row svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.impound-label {
    color: var(--text-muted);
    min-width: 100px;
}

.impound-value {
    color: var(--text-primary);
}

.impound-item-actions {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.release-impound-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--success-bg);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.release-impound-btn:hover {
    background: rgba(34, 197, 94, 0.25);
}

.release-impound-btn svg {
    width: 16px;
    height: 16px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.settings-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-card-header svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.settings-card-content {
    padding: 16px;
}

.locale-options {
    display: flex;
    gap: 10px;
}

.locale-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.locale-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.locale-btn.selected {
    background: rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.3);
    color: var(--accent-primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 16, 0.96);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    animation: modalIn 0.25s ease;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.12);
}

.modal-container::before,
.modal-container::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent-primary);
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
}

.modal-container::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.modal-container::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.modal-large {
    max-width: 640px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Case Detail Modal - Case File Layout */
.modal-case-detail .modal-header.case-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 2px solid var(--accent-primary);
    background: var(--bg-tertiary);
}

.case-detail-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.case-detail-badge {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--accent-primary);
    background: rgba(34, 211, 238, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(34, 211, 238, 0.4);
}

.case-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.case-detail-title span {
    color: var(--accent-primary);
}

.modal-case-detail .modal-body.case-detail-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.case-file-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.case-file-section:last-child {
    margin-bottom: 0;
}

.case-file-section-head {
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
}

.case-file-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.case-file-section-body {
    padding: 16px;
}

.case-overview-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.case-overview-photo {
    width: 140px;
    flex-shrink: 0;
    text-align: center;
}

.case-overview-photo img {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-light);
    background: var(--bg-tertiary);
}

.case-overview-photo-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.case-overview-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
    min-width: 110px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-section .case-file-section-head {
    border-left-color: var(--accent-primary);
}

.violations-detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-violation-item {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.detail-violation-item > div:first-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notes-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.detail-case-description-html {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-case-description-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 8px 0;
    display: block;
}

/* ===== Web login screen ===== */

.mdt-login-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(5, 8, 16, 0.55) 0%, rgba(5, 8, 16, 0.75) 100%),
        url('images/login-bg.png') center center / cover no-repeat;
}

.mdt-login-card {
    display: flex;
    flex-direction: column;
    width: 340px;
    background: rgba(15, 23, 41, 0.92);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.mdt-login-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 28px 24px 20px;
    background: rgba(8, 12, 22, 0.6);
    border-bottom: 1px solid var(--border-color);
}

.mdt-login-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin-bottom: 4px;
}

.mdt-login-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mdt-login-card h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
    color: var(--text-primary);
    text-align: center;
}

.mdt-login-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

.mdt-login-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px 26px;
}

.mdt-login-card label {
    font-size: 12px;
    color: var(--accent-primary);
}

.mdt-login-card input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    text-align: right;
}

.mdt-login-card input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.mdt-login-card button {
    margin-top: 10px;
    padding: 11px 12px;
    background: var(--accent-secondary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.mdt-login-card button:hover {
    background: var(--accent-hover);
}

.mdt-login-error {
    min-height: 16px;
    font-size: 12px;
    color: var(--danger);
    text-align: right;
}

/* ===== In-page toasts (replaces the FiveM native notification) ===== */

#mdt-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mdt-toast {
    min-width: 220px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mdt-toast-hide {
    opacity: 0;
    transform: translateX(20px);
}

.mdt-toast-success { border-color: var(--success); }
.mdt-toast-error { border-color: var(--danger); }
.mdt-toast-info { border-color: var(--accent-primary); }

.detail-criminals-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.detail-criminals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.detail-criminals-table th,
.detail-criminals-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.detail-criminals-table th {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-criminals-table tbody tr:hover {
    background: var(--bg-hover);
}

.detail-criminals-table .detail-crim-violations {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Warrants */
.warrants-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.warrant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    border-radius: 8px;
}

.warrant-item.status-served {
    border-left-color: var(--success);
    opacity: 0.7;
}

.warrant-item.status-cancelled {
    border-left-color: var(--text-muted);
    opacity: 0.5;
}

.warrant-item-main {
    flex: 1;
    min-width: 0;
}

.warrant-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.warrant-item-reason {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.warrant-item-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.warrant-status-badge {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    flex-shrink: 0;
}

.warrant-status-badge.active {
    background: var(--info-bg);
    color: var(--accent-primary);
}

.warrant-status-badge.served {
    background: var(--success-bg);
    color: var(--success);
}

.warrant-status-badge.cancelled {
    background: rgba(86, 112, 143, 0.15);
    color: var(--text-muted);
}

.warrant-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Flags Page */
.flags-section {
    margin-bottom: 28px;
}

.flags-section-header {
    margin-bottom: 12px;
}

.flags-section-header h3 {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.flags-checkbox-row {
    display: flex;
    gap: 20px;
}

.flags-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.property-flags-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.property-flag-item {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--warning);
    border-radius: 8px;
}

.property-flag-address {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.property-flag-reason {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.property-flag-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.vehicle-flag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 8px;
}

.vehicle-flag-badge.stolen {
    background: var(--danger-bg);
    color: var(--danger);
}

.vehicle-flag-badge.code5 {
    background: var(--warning-bg);
    color: var(--warning);
}

/* Officer Activity Stats */
.officer-activity-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.officer-activity-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.officer-activity-stat-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-primary);
    text-shadow: 0 0 8px var(--glow-primary);
}

.officer-activity-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Case Backup Request */
.case-detail-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.backup-toggle-btn {
    font-size: 12px;
    padding: 8px 14px;
}

.backup-toggle-btn.active {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.4);
}

.case-backup-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--danger);
    background: var(--danger-bg);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Case Internal Notes */
.case-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.case-comment-item {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.case-comment-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.case-comment-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.case-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* RTL Support */
[dir="rtl"] .mdt-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 16px;
}

[dir="rtl"] .search-input {
    padding-left: 16px;
    padding-right: 46px;
}

[dir="rtl"] .nav-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .profile-header .close-btn {
    right: auto;
    left: 16px;
}

/* Responsive */
@media (max-width: 1400px) {
    #mdt-container {
        width: 95vw;
        height: 95vh;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .mdt-sidebar {
        width: 180px;
    }
}
