:root {
    --ink: #0b1b20;
    --muted: #65747a;
    --line: #dfe7e9;
    --surface: #ffffff;
    --canvas: #f3f7f7;
    --nav: #09181d;
    --nav-soft: #12272d;
    --teal: #0d918d;
    --teal-dark: #08726f;
    --aqua: #dff4f2;
    --lime: #b7dd46;
    --amber: #f3a638;
    --red: #dd4b4b;
    --purple: #7163e8;
    --shadow: 0 14px 34px rgba(13, 42, 49, .08);
    --radius: 18px;
    --sidebar: 276px;
    --topbar: 82px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
.text-brand { color: var(--teal) !important; }
.eyebrow { display: inline-block; color: #8aa0a5; font-size: .7rem; font-weight: 800; letter-spacing: .14em; }

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-name { font-size: 1.22rem; font-weight: 860; letter-spacing: .09em; }
.brand-symbol { position: relative; display: inline-block; width: 29px; height: 29px; transform: rotate(45deg); }
.brand-symbol i { position: absolute; display: block; border-radius: 3px 9px 3px 9px; }
.brand-symbol i:nth-child(1) { width: 17px; height: 17px; left: 0; top: 0; background: var(--teal); }
.brand-symbol i:nth-child(2) { width: 13px; height: 13px; right: 0; top: 0; background: var(--lime); }
.brand-symbol i:nth-child(3) { width: 13px; height: 13px; left: 0; bottom: 0; background: #4fd0c8; }
.brand-lockup-light { color: white; }

/* Login */
.login-body { background: #fff; overflow: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, 1.05fr) minmax(470px, .95fr); }
.login-brand-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100vh; padding: 54px 7vw 48px; overflow: hidden; color: white; background: radial-gradient(circle at 15% 95%, rgba(183,221,70,.23), transparent 27%), linear-gradient(145deg, #06191d 0%, #092c31 55%, #0c5857 100%); }
.login-brand-panel::before { position: absolute; z-index: -1; inset: 0; content: ""; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 72%); }
.login-message { margin: auto 0; max-width: 660px; }
.login-message .eyebrow { color: var(--lime); margin-bottom: 24px; }
.login-message h1 { margin: 0 0 26px; font-size: clamp(3.2rem, 5.2vw, 6.4rem); font-weight: 720; line-height: .95; letter-spacing: -.06em; }
.login-message h1 em { color: #65d5cd; font-style: normal; }
.login-message p { max-width: 530px; color: #b9cbce; font-size: 1.15rem; line-height: 1.7; }
.login-proof { display: flex; flex-wrap: wrap; gap: 18px 32px; color: #c8d6d8; font-size: .83rem; font-weight: 650; }
.login-proof i { margin-right: 8px; color: var(--lime); }
.login-orbit { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; right: -270px; top: 15%; }
.orbit-two { width: 300px; height: 300px; right: -130px; top: 31%; border-color: rgba(183,221,70,.18); }
.login-form-panel { display: grid; place-items: center; padding: 48px; background: #fbfdfd; }
.login-card { width: min(100%, 450px); }
.login-card h2 { margin: 10px 0 8px; font-size: 2.25rem; font-weight: 780; letter-spacing: -.04em; }
.login-card .form-control { min-height: 62px; border-color: #d8e2e3; border-radius: 12px; background: white; }
.login-card .form-control:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,145,141,.11); }
.btn-brand { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border: 0; border-radius: 12px; color: white; background: var(--teal); font-weight: 760; }
.btn-brand:hover, .btn-brand:focus { color: white; background: var(--teal-dark); transform: translateY(-1px); }
.password-toggle { position: absolute; z-index: 5; right: 13px; top: 18px; border: 0; color: var(--muted); background: transparent; }
.demo-access { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border: 1px dashed #ccd9db; border-radius: 12px; color: var(--muted); font-size: .78rem; }
.demo-access button { border: 0; color: var(--teal); background: none; font-weight: 800; }
.login-legal { margin-top: 28px; color: #92a0a4; font-size: .73rem; text-align: center; }
.mobile-brand { display: none; }

/* Shell */
.app-body { overflow: hidden; background: var(--canvas); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: relative; z-index: 1040; flex: 0 0 var(--sidebar); display: flex; flex-direction: column; width: var(--sidebar); height: 100vh; color: #b9c8cb; background: var(--nav); transition: width .25s ease, transform .25s ease; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; min-height: var(--topbar); padding: 0 23px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand .brand-lockup { color: white; }
.sidebar-brand .brand-symbol { width: 25px; height: 25px; transform: rotate(45deg) scale(.86); }
.sidebar-collapse { width: 36px; height: 36px; border: 0; border-radius: 9px; color: #789096; background: rgba(255,255,255,.04); }
.sidebar-collapse:hover { color: white; background: rgba(255,255,255,.09); }
.sidebar-nav { flex: 1; padding: 21px 13px; overflow-y: auto; scrollbar-width: thin; }
.sidebar-nav .nav-section { display: block; margin: 20px 14px 8px; color: #5f767c; font-size: .65rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-nav .nav-section:first-child { margin-top: 0; }
.sidebar-nav a { position: relative; display: flex; align-items: center; gap: 13px; min-height: 43px; padding: 8px 12px; border-radius: 10px; color: #a9bbbe; font-size: .86rem; font-weight: 620; text-decoration: none; transition: .16s ease; }
.sidebar-nav a i { width: 23px; color: #789399; font-size: 1.05rem; text-align: center; }
.sidebar-nav a:hover { color: white; background: rgba(255,255,255,.045); }
.sidebar-nav a.active { color: white; background: linear-gradient(90deg, rgba(13,145,141,.26), rgba(13,145,141,.08)); }
.sidebar-nav a.active::before { position: absolute; left: -13px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; content: ""; background: #4fd0c8; }
.sidebar-nav a.active i { color: #62d7cf; }
.sidebar-nav a b { margin-left: auto; min-width: 21px; padding: 2px 6px; border-radius: 20px; color: #ffb9b9; background: rgba(221,75,75,.15); font-size: .65rem; text-align: center; }
.sidebar-system { display: flex; align-items: center; gap: 11px; margin: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.025); }
.sidebar-system strong, .sidebar-system small { display: block; }
.sidebar-system strong { color: #c7d3d5; font-size: .73rem; }
.sidebar-system small { margin-top: 2px; color: #6f888e; font-size: .65rem; }
.system-pulse { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(183,221,70,.1); }
.system-pulse span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(183,221,70,.12); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(183,221,70,0); } }

.main-column { flex: 1; min-width: 0; height: 100vh; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: var(--topbar); padding: 0 28px 0 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); backdrop-filter: blur(16px); }
.page-identity span { display: block; color: #8a9a9e; font-size: .63rem; font-weight: 800; letter-spacing: .15em; }
.page-identity h1 { margin: 2px 0 0; font-size: 1.34rem; font-weight: 790; letter-spacing: -.025em; }
.topbar-tools { display: flex; align-items: center; gap: 9px; }
.global-search { display: flex; align-items: center; gap: 10px; width: 340px; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; color: #8a9a9e; background: #f7fafa; }
.global-search input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .82rem; }
.global-search kbd { padding: 3px 6px; border: 1px solid #dae4e5; border-radius: 5px; color: #8a999c; background: white; box-shadow: none; font-size: .62rem; }
.icon-button, .language-button, .user-button, .mobile-menu { display: grid; place-items: center; height: 42px; border: 1px solid var(--line); border-radius: 10px; color: #52666b; background: white; }
.icon-button { position: relative; width: 42px; }
.icon-button:hover, .language-button:hover { color: var(--teal); border-color: #abd9d6; background: #f4fbfa; }
.notification-button span { position: absolute; right: 8px; top: 8px; width: 6px; height: 6px; border: 1px solid white; border-radius: 50%; background: var(--red); }
.language-button { width: 42px; font-size: .7rem; font-weight: 850; }
.user-button { display: flex; gap: 8px; padding: 0 8px; border: 0; background: transparent; }
.user-button span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: white; background: linear-gradient(135deg, var(--teal), #0a626a); font-size: .78rem; font-weight: 800; }
.user-button i { color: #8b9a9e; font-size: .68rem; }
.mobile-menu { display: none; width: 42px; }
.view-container { height: calc(100vh - var(--topbar)); padding: 26px 30px 60px; overflow: auto; scroll-behavior: smooth; }
.view-loading { display: grid; place-items: center; min-height: 55vh; color: var(--muted); }
.loader-mark { display: flex; gap: 5px; align-items: end; height: 36px; }
.loader-mark i { display: block; width: 9px; border-radius: 4px; background: var(--teal); animation: loader 1s infinite ease-in-out; }
.loader-mark i:nth-child(1) { height: 20px; }.loader-mark i:nth-child(2) { height: 34px; animation-delay: .12s; background: var(--lime); }.loader-mark i:nth-child(3) { height: 26px; animation-delay: .24s; background: #4fd0c8; }
@keyframes loader { 50% { transform: translateY(-7px); } }
.view-loading p { margin-top: 15px; font-size: .8rem; }

/* Reusable UI */
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-head h2 { margin: 0 0 5px; font-size: 1.55rem; font-weight: 790; letter-spacing: -.035em; }
.view-head p { margin: 0; color: var(--muted); font-size: .84rem; }
.head-actions { display: flex; gap: 9px; }
.btn-soft, .btn-accent, .filter-chip { border: 1px solid var(--line); border-radius: 10px; background: white; font-size: .78rem; font-weight: 720; }
.btn-soft, .btn-accent { padding: 10px 15px; }
.btn-soft:hover { border-color: #b4cecf; background: #f8fbfb; }
.btn-accent { border-color: var(--teal); color: white; background: var(--teal); }
.btn-accent:hover { color: white; background: var(--teal-dark); }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 132px; padding: 20px; border: 1px solid rgba(213,225,227,.9); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 8px 22px rgba(13,42,49,.04); }
.metric-card::after { position: absolute; right: -18px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; content: ""; background: var(--metric-soft, #eef6f5); }
.metric-label { color: var(--muted); font-size: .72rem; font-weight: 700; }
.metric-value { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; font-size: 2rem; font-weight: 820; letter-spacing: -.055em; }
.metric-value small { color: var(--muted); font-size: .66rem; font-weight: 650; letter-spacing: 0; }
.metric-icon { position: absolute; z-index: 1; right: 18px; top: 18px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--metric-color, var(--teal)); background: var(--metric-soft, var(--aqua)); }
.metric-trend { margin-top: 9px; color: #7d8e92; font-size: .65rem; }
.metric-trend strong { color: var(--metric-color, var(--teal)); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 18px; }
.panel { border: 1px solid rgba(213,225,227,.9); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 20px; border-bottom: 1px solid #e7eeee; }
.panel-head h3 { margin: 0; font-size: .95rem; font-weight: 780; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: .68rem; }
.panel-body { padding: 20px; }
.map-panel { overflow: hidden; }
.map-panel .panel-body { padding: 0; }
#fleetMap, #liveMap, #eventMap, #tripMap { height: 430px; background: #dfe9e9; }
.leaflet-control-attribution { font-size: 9px !important; }
.asset-marker { display: grid; place-items: center; width: 36px !important; height: 36px !important; margin: -18px 0 0 -18px !important; border: 3px solid white; border-radius: 12px 12px 12px 3px; color: white; background: var(--teal); box-shadow: 0 8px 18px rgba(8,50,54,.25); transform: rotate(-45deg); }
.asset-marker i { transform: rotate(45deg); font-size: 14px; }
.asset-marker.offline { background: #829196; }.asset-marker.alert { background: var(--red); }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 12px 28px rgba(9,31,36,.18); }
.leaflet-popup-content { margin: 14px; font-family: inherit; }
.map-popup strong { display: block; font-size: .85rem; }.map-popup small { display: block; margin-top: 4px; color: var(--muted); }
.map-popup button { margin-top: 10px; padding: 6px 9px; border: 0; border-radius: 7px; color: white; background: var(--teal); font-size: .68rem; font-weight: 700; }
.asset-list { max-height: 430px; overflow: auto; }
.asset-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 13px 3px; border-bottom: 1px solid #edf1f2; cursor: pointer; }
.asset-row:last-child { border-bottom: 0; }
.asset-row:hover { padding-left: 8px; border-radius: 9px; background: #f5f9f9; }
.asset-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--teal); background: var(--aqua); }
.asset-row.offline .asset-avatar { color: #829196; background: #edf1f2; }
.asset-row strong, .asset-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row strong { font-size: .78rem; }.asset-row small { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }.status-dot.offline { background: #a8b3b5; }
.event-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.event-mini { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.event-mini .event-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--red); background: #ffeded; }
.event-mini strong, .event-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-mini strong { font-size: .72rem; }.event-mini small { margin-top: 4px; color: var(--muted); font-size: .62rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.filter-bar .form-control, .filter-bar .form-select { min-height: 39px; border-color: var(--line); font-size: .75rem; }
.filter-chip { padding: 8px 12px; color: var(--muted); }.filter-chip.active { color: var(--teal-dark); border-color: #9fd4d1; background: var(--aqua); }
.event-grid, .media-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 16px; }
.event-card, .media-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 20px rgba(13,42,49,.045); }
.event-visual, .media-visual { position: relative; display: grid; place-items: center; height: 185px; overflow: hidden; color: #b7c4c7; background: linear-gradient(135deg, #17282d, #0b171b); }
.event-visual img, .media-visual img { width: 100%; height: 100%; object-fit: cover; }
.event-visual::after, .media-visual::after { position: absolute; inset: 0; content: ""; background: linear-gradient(to top, rgba(0,0,0,.48), transparent 54%); pointer-events: none; }
.event-visual > i, .media-visual > i { font-size: 2rem; opacity: .5; }
.play-button { position: absolute; z-index: 1; display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; color: white; background: rgba(0,0,0,.28); backdrop-filter: blur(5px); }
.event-tag { position: absolute; z-index: 1; left: 12px; top: 12px; padding: 5px 8px; border-radius: 7px; color: white; background: rgba(221,75,75,.86); font-size: .6rem; font-weight: 800; text-transform: uppercase; }
.channel-tag { position: absolute; z-index: 1; right: 12px; top: 12px; padding: 5px 8px; border-radius: 7px; color: white; background: rgba(8,24,29,.75); font-size: .6rem; font-weight: 700; }
.event-info, .media-info { padding: 15px; }
.event-info h3, .media-info h3 { margin: 0 0 5px; font-size: .84rem; font-weight: 780; }
.event-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .65rem; }
.event-actions { display: flex; gap: 7px; margin-top: 13px; }
.event-actions button { flex: 1; padding: 7px; border: 1px solid var(--line); border-radius: 8px; color: #566a6f; background: #fafcfc; font-size: .64rem; font-weight: 730; }
.event-actions button:hover { color: var(--teal); border-color: #a8d7d4; }
.empty-state { display: grid; place-items: center; min-height: 300px; padding: 40px; color: var(--muted); text-align: center; }
.empty-state i { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 16px; border-radius: 22px; color: var(--teal); background: var(--aqua); font-size: 1.7rem; }
.empty-state h3 { color: var(--ink); font-size: 1rem; }.empty-state p { max-width: 400px; font-size: .78rem; }

.live-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 16px; }
.live-assets { height: calc(100vh - 180px); overflow: hidden; }.live-assets .panel-body { height: calc(100% - 66px); overflow: auto; }
.live-stage { min-height: 620px; padding: 16px; border-radius: var(--radius); background: #071317; box-shadow: var(--shadow); }
.live-stage-head { display: flex; align-items: center; justify-content: space-between; padding: 5px 4px 16px; color: white; }
.live-stage-head h3 { margin: 0; font-size: .95rem; }.live-stage-head small { color: #789095; }
.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.camera-feed { position: relative; display: grid; place-items: center; min-height: 235px; border: 1px solid #1c353b; border-radius: 13px; overflow: hidden; color: #667e83; background: radial-gradient(circle, #142a30 0, #09181d 70%); }
.camera-feed::before { position: absolute; inset: 0; content: ""; opacity: .11; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 34px 34px; }
.camera-feed i { font-size: 2.2rem; }.camera-feed span { position: absolute; left: 13px; top: 12px; color: #b4c7ca; font-size: .65rem; font-weight: 750; }.camera-feed b { position: absolute; right: 13px; top: 12px; display: flex; align-items: center; gap: 5px; color: #70888d; font-size: .58rem; }.camera-feed b::before { width: 6px; height: 6px; border-radius: 50%; content: ""; background: #70888d; }
.camera-feed.streaming b { color: #b7dd46; }.camera-feed.streaming b::before { background: #b7dd46; box-shadow: 0 0 0 5px rgba(183,221,70,.1); }
.camera-feed iframe { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; border: 0; background: #050b0d; }
.camera-feed.streaming span, .camera-feed.streaming b { z-index: 2; padding: 4px 7px; border-radius: 6px; background: rgba(3,13,16,.72); backdrop-filter: blur(4px); }
.live-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: #0c2227; }
.live-controls button { padding: 8px 12px; border: 1px solid #274148; border-radius: 8px; color: #afc2c5; background: #122c32; font-size: .68rem; font-weight: 700; }.live-controls button.primary { color: #07191c; border-color: var(--lime); background: var(--lime); }

.data-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
.data-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.data-table th { padding: 13px 15px; color: #718287; background: #f7fafa; font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 15px; border-top: 1px solid #e9eeee; font-size: .73rem; vertical-align: middle; }
.data-table tbody tr:hover { background: #fbfdfd; }
.table-asset { display: flex; align-items: center; gap: 10px; }.table-asset i { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--teal); background: var(--aqua); }.table-asset strong, .table-asset small { display: block; }.table-asset small { color: var(--muted); font-size: .6rem; }
.badge-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: .61rem; font-weight: 760; }.badge-status::before { width: 6px; height: 6px; border-radius: 50%; content: ""; background: currentColor; }.badge-status.online, .badge-status.uploaded, .badge-status.synced { color: #21846b; background: #e3f6ef; }.badge-status.offline, .badge-status.expired { color: #718084; background: #eef2f2; }.badge-status.uploading, .badge-status.queued, .badge-status.pending { color: #98701f; background: #fff4dc; }.badge-status.failed, .badge-status.critical { color: #bc3c3c; background: #ffebeb; }
.progress-slim { width: 100px; height: 5px; border-radius: 10px; overflow: hidden; background: #e6ecec; }.progress-slim i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.table-actions { display: flex; gap: 6px; }.table-actions button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: #65787d; background: white; }.table-actions button:hover { color: var(--teal); border-color: #acd8d5; }
.driver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.driver-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.driver-head { display: flex; gap: 12px; align-items: center; }.driver-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: white; background: linear-gradient(135deg, var(--teal), #4fc7bf); font-weight: 800; }.driver-head h3 { margin: 0; font-size: .88rem; }.driver-head p { margin: 3px 0 0; color: var(--muted); font-size: .65rem; }
.score-ring { margin-left: auto; display: grid; place-items: center; width: 47px; height: 47px; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--score) * 1%), #e7eeee 0); }.score-ring span { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: white; font-size: .7rem; font-weight: 800; }
.driver-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 17px; }.driver-stats div { padding: 9px; border-radius: 9px; text-align: center; background: #f5f8f8; }.driver-stats strong, .driver-stats small { display: block; }.driver-stats strong { font-size: .77rem; }.driver-stats small { margin-top: 2px; color: var(--muted); font-size: .56rem; }
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }.report-card { position: relative; min-height: 190px; padding: 22px; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: white; }.report-card > i { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 22px; border-radius: 12px; color: var(--report-color, var(--teal)); background: var(--report-soft, var(--aqua)); font-size: 1.1rem; }.report-card h3 { font-size: .9rem; }.report-card p { min-height: 38px; color: var(--muted); font-size: .7rem; line-height: 1.55; }.report-card button { padding: 7px 0; border: 0; color: var(--teal); background: none; font-size: .68rem; font-weight: 800; }.report-card::after { position: absolute; right: -35px; bottom: -42px; width: 110px; height: 110px; border-radius: 50%; content: ""; background: var(--report-soft, var(--aqua)); opacity: .55; }

/* Superadministrator updates */
.update-layout { align-items: start; }.version-pill { padding: 7px 10px; border-radius: 9px; color: var(--teal-dark); background: var(--aqua); font-size: .7rem; font-weight: 800; }
.update-drop { display: grid; place-items: center; min-height: 190px; padding: 25px; border: 1.5px dashed #9bc9c6; border-radius: 15px; color: var(--teal-dark); background: #f5fbfa; text-align: center; cursor: pointer; transition: .2s ease; }
.update-drop:hover { border-color: var(--teal); background: #ecf8f7; }.update-drop > i { margin-bottom: 10px; font-size: 2rem; }.update-drop strong { font-size: .82rem; }.update-drop small { margin-top: 7px; color: var(--muted); font-size: .66rem; }.update-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.update-checks { display: grid; gap: 2px; }.update-checks > div:not(.update-policy) { display: flex; align-items: flex-start; gap: 11px; padding: 12px 3px; border-bottom: 1px solid var(--line); }.update-checks > div > i { margin-top: 2px; }.update-checks span strong, .update-checks span small { display: block; }.update-checks span strong { font-size: .75rem; }.update-checks span small { max-width: 340px; margin-top: 3px; color: var(--muted); font-size: .63rem; overflow-wrap: anywhere; }
.update-policy { display: flex; gap: 11px; margin-top: 14px; padding: 13px; border-radius: 12px; color: #795c1d; background: #fff7e4; }.update-policy > i { font-size: 1.15rem; }.update-policy p { margin: 0; font-size: .66rem; line-height: 1.5; }.update-policy strong { display: block; margin-bottom: 2px; font-size: .72rem; }.update-policy code { color: inherit; }
.update-ready { border-color: #a6d9c8; box-shadow: 0 10px 28px rgba(33,132,107,.09); }.update-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }.update-summary div { padding: 12px; border-radius: 11px; background: #f2f8f7; text-align: center; }.update-summary strong, .update-summary small { display: block; }.update-summary strong { font-size: 1rem; }.update-summary small { margin-top: 4px; color: var(--muted); font-size: .54rem; font-weight: 800; }

/* Modal and drawer */
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(8,28,34,.25); }
.modal-header, .modal-footer { border-color: var(--line); }.modal-header { padding: 19px 22px; }.modal-body { padding: 22px; }.modal-title { font-size: 1rem; font-weight: 800; }
.modal-label { margin-bottom: 6px; color: #63767b; font-size: .67rem; font-weight: 760; }.modal .form-control, .modal .form-select { border-color: var(--line); border-radius: 10px; font-size: .78rem; }.modal .form-control:focus, .modal .form-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,145,141,.1); }
.video-modal-content { overflow: hidden; background: #061216; color: white; }.video-player { width: 100%; max-height: 72vh; background: black; }.video-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; }.video-modal-head button { border: 0; color: white; background: none; }.video-placeholder { display: grid; place-items: center; min-height: 500px; color: #789095; background: radial-gradient(circle, #13282e, #061216 65%); }.video-placeholder i { font-size: 3rem; }.video-placeholder p { font-size: .8rem; }
.notification-drawer { position: fixed; z-index: 1090; right: 0; top: 0; width: min(430px, 95vw); height: 100vh; padding: 22px; transform: translateX(102%); color: var(--ink); background: white; box-shadow: -20px 0 50px rgba(7,31,36,.16); transition: transform .25s ease; }.notification-drawer.open { transform: translateX(0); }.notification-drawer header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 17px; border-bottom: 1px solid var(--line); }.notification-drawer h2 { margin: 3px 0 0; font-size: 1.25rem; }.notification-drawer header button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f2f6f6; }.notification-item { display: grid; grid-template-columns: 38px 1fr; gap: 11px; padding: 17px 3px; border-bottom: 1px solid #edf1f2; }.notification-item > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--red); background: #ffeded; }.notification-item strong { display: block; font-size: .76rem; }.notification-item p { margin: 4px 0; color: var(--muted); font-size: .67rem; line-height: 1.45; }.notification-item time { color: #91a0a3; font-size: .59rem; }
.toast { border: 0; border-radius: 12px; box-shadow: 0 15px 35px rgba(8,31,36,.16); }.toast .toast-body { display: flex; align-items: center; gap: 10px; font-size: .75rem; }.toast .toast-body i { color: var(--teal); font-size: 1rem; }
.sidebar-backdrop { display: none; }

/* Collapsed desktop sidebar */
.app-shell.sidebar-mini { --sidebar: 78px; }.app-shell.sidebar-mini .sidebar-brand { justify-content: center; padding: 0; }.app-shell.sidebar-mini .sidebar-brand .brand-name, .app-shell.sidebar-mini .sidebar-collapse, .app-shell.sidebar-mini .sidebar-nav span, .app-shell.sidebar-mini .sidebar-nav b, .app-shell.sidebar-mini .sidebar-system div:not(.system-pulse) { display: none; }.app-shell.sidebar-mini .sidebar-nav { padding-inline: 10px; }.app-shell.sidebar-mini .sidebar-nav a { justify-content: center; padding: 9px; }.app-shell.sidebar-mini .sidebar-nav a i { width: auto; font-size: 1.16rem; }.app-shell.sidebar-mini .sidebar-system { justify-content: center; padding: 10px; }

@media (max-width: 1250px) {
    .metric-grid { grid-template-columns: repeat(3, 1fr); }
    .event-grid, .media-grid { grid-template-columns: repeat(2, 1fr); }
    .event-strip { grid-template-columns: repeat(2, 1fr); }
    .driver-grid, .report-grid { grid-template-columns: repeat(2, 1fr); }
    .global-search { width: 260px; }
}
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }.login-brand-panel { display: none; }.login-form-panel { min-height: 100vh; padding: 32px; }.mobile-brand { display: inline-flex; }
    .sidebar { position: fixed; transform: translateX(-102%); }.sidebar.mobile-open { transform: translateX(0); }.mobile-menu { display: grid; }.sidebar-collapse { display: none; }.sidebar-backdrop { position: fixed; z-index: 1030; inset: 0; background: rgba(4,18,22,.48); backdrop-filter: blur(2px); }.sidebar-backdrop.open { display: block; }
    .topbar { padding: 0 16px; }.page-identity { margin-right: auto; margin-left: 12px; }.global-search { display: none; }.view-container { padding: 20px 16px 50px; }.content-grid, .live-layout { grid-template-columns: 1fr; }.live-assets { height: auto; }.metric-grid { grid-template-columns: repeat(2, 1fr); }.live-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    :root { --topbar: 70px; }.page-identity span, .topbar-tools > .icon-button:first-of-type { display: none; }.page-identity h1 { font-size: 1rem; }.topbar-tools { gap: 4px; }.icon-button, .language-button { width: 36px; height: 36px; }.user-button i { display: none; }.view-head { align-items: flex-start; flex-direction: column; }.head-actions { width: 100%; }.head-actions button { flex: 1; }.metric-grid, .event-grid, .media-grid, .event-strip, .driver-grid, .report-grid { grid-template-columns: 1fr; }.metric-card { min-height: 115px; }.filter-bar > * { flex: 1 1 140px; }.login-form-panel { padding: 24px; }.login-card h2 { font-size: 1.85rem; }
}
