/* =========================================================
   ZTrack — App Stylesheet
   Design tokens are carried over from the Steex kit's palette
   (see project spec, Section 8) so the look stays consistent
   with the original mockups even though this build is plain
   HTML/CSS/JS rather than the Vue/Vuetify source.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    /* Brand / accent */
    --ztk-blue:    #3762ea;
    --ztk-purple:  #8561f9;
    --ztk-pink:    #f7649f;
    --ztk-red:     #ff6c6c;
    --ztk-orange:  #f1963b;
    --ztk-yellow:  #f6b749;
    --ztk-green:   #2dcb73;
    --ztk-teal:    #4ab0c1;
    --ztk-cyan:    #438eff;

    /* Fleet status colors (shared with Live Tracking markers / dashboard cards) */
    --ztk-status-moving:  #20B964;
    --ztk-status-idle:    #F49A20;
    --ztk-status-stopped: #F23F4D;
    --ztk-status-nr:      #8095A8;
    --ztk-status-deleted: #8A49D6;

    /* Neutrals */
    --ztk-gray-100: #f3f6f9;
    --ztk-gray-200: #eef0f7;
    --ztk-gray-300: #e9ebec;
    --ztk-gray-400: #ced4da;
    --ztk-gray-500: #adb5bd;
    --ztk-gray-600: #878a99;
    --ztk-gray-700: #2b313e;
    --ztk-gray-800: #1f242e;
    --ztk-gray-900: #0f1114;

    --ztk-font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --ztk-font-heading: 'Manrope', 'Inter', system-ui, sans-serif;

    --ztk-radius-sm: 8px;
    --ztk-radius-md: 12px;
    --ztk-radius-lg: 16px;
    --ztk-sidebar-w: 264px;
    --ztk-topbar-h: 68px;
    --ztk-transition: 180ms ease;
}

/* ---------- Light theme (default) ---------- */
:root,
html[data-theme="light"] {
    --ztk-bg: #f5f7fb;
    --ztk-surface: #ffffff;
    --ztk-surface-alt: var(--ztk-gray-100);
    --ztk-border: var(--ztk-gray-300);
    --ztk-text: var(--ztk-gray-800);
    --ztk-text-muted: var(--ztk-gray-600);
    --ztk-text-inverse: #ffffff;
    --ztk-sidebar-bg: #ffffff;
    --ztk-shadow: 0 2px 10px rgba(15, 17, 20, 0.05);
}

/* ---------- Dark theme ---------- */
html[data-theme="dark"] {
    --ztk-bg: #0f1114;
    --ztk-surface: #171a1f;
    --ztk-surface-alt: #1c1f26;
    --ztk-border: #2c2e30;
    --ztk-text: #eef0f7;
    --ztk-text-muted: #9aa0ac;
    --ztk-text-inverse: #0f1114;
    --ztk-sidebar-bg: #14161b;
    --ztk-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

/* The [hidden] attribute and a class selector have equal CSS specificity, so
   any element with both "hidden" and a class that sets display (.ztk-btn,
   .ztk-modal, etc.) would stay visible — and worse, still intercept clicks —
   because the class rule loads after the browser's default [hidden] rule.
   This restores the expected behavior everywhere, once. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body.ztk-body {
    margin: 0;
    font-family: var(--ztk-font-body);
    background: var(--ztk-bg);
    color: var(--ztk-text);
    -webkit-font-smoothing: antialiased;
    transition: background var(--ztk-transition), color var(--ztk-transition);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible {
    outline: 2px solid var(--ztk-blue);
    outline-offset: 2px;
}

/* ---------- App shell ---------- */
.ztk-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ztk-brand { display: flex; align-items: center; }
.ztk-brand__logo { height: 38px; width: auto; display: block; }

.ztk-icon { width: 18px; height: 18px; flex-shrink: 0; }
.ztk-icon--sm { width: 15px; height: 15px; }

.ztk-badge {
    margin-inline-start: auto;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--ztk-gray-200);
    color: var(--ztk-text-muted);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
html[data-theme="dark"] .ztk-badge { background: #23262d; }

/* ---------- Top navigation bar (logo + horizontal nav + utility icons, one row) ---------- */
.ztk-topnav {
    height: var(--ztk-topbar-h);
    background: var(--ztk-surface);
    border-bottom: 1px solid var(--ztk-border);
    display: flex;
    align-items: center;
    gap: 18px;
    padding-inline: 18px;
    position: sticky;
    top: 0;
    z-index: 30;
}

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

.ztk-topnav__links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ztk-topnav__link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: var(--ztk-radius-sm);
    color: var(--ztk-text-muted);
    font-size: 0.86rem;
    font-weight: 500;
    white-space: nowrap;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--ztk-transition), color var(--ztk-transition);
}
a.ztk-topnav__link:hover { background: var(--ztk-surface-alt); color: var(--ztk-text); }
.ztk-topnav__link.is-active {
    background: color-mix(in srgb, var(--ztk-blue) 12%, transparent);
    color: var(--ztk-blue);
    font-weight: 600;
}
.ztk-topnav__link--disabled { cursor: not-allowed; opacity: 0.55; }
.ztk-topnav__link--dropdown .ztk-icon:last-child { transition: transform var(--ztk-transition); }
.ztk-topnav__dropdown.is-open .ztk-topnav__link--dropdown .ztk-icon:last-child { transform: rotate(180deg); }

.ztk-topnav__menu {
    top: calc(100% + 6px);
    inset-inline-start: 0;
    inset-inline-end: auto;
    min-width: 220px;
}
.ztk-dropdown__item--disabled {
    cursor: not-allowed;
    opacity: 0.55;
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 8px 10px; border-radius: var(--ztk-radius-sm); font-size: 0.86rem;
}
.ztk-dropdown__item.is-active { color: var(--ztk-blue); font-weight: 600; background: color-mix(in srgb, var(--ztk-blue) 10%, transparent); }

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

.ztk-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--ztk-radius-sm);
    color: var(--ztk-text-muted);
    transition: background var(--ztk-transition), color var(--ztk-transition);
}
.ztk-icon-btn:hover { background: var(--ztk-surface-alt); color: var(--ztk-text); }

.ztk-profile-btn__text { display: flex; flex-direction: column; line-height: 1.2; text-align: start; }
.ztk-profile-btn__name { font-size: 0.82rem; font-weight: 600; color: var(--ztk-text); }
.ztk-profile-btn__role { font-size: 0.7rem; color: var(--ztk-text-muted); }

/* theme toggle icon swap */
#ztkThemeToggle .ztk-icon--moon { display: none; }
html[data-theme="dark"] #ztkThemeToggle .ztk-icon--sun { display: none; }
html[data-theme="dark"] #ztkThemeToggle .ztk-icon--moon { display: inline-flex; }

/* fullscreen icon swap */
#ztkFullscreenToggle .ztk-icon--compress { display: none; }
.ztk-app.is-fullscreen #ztkFullscreenToggle .ztk-icon--expand { display: none; }
.ztk-app.is-fullscreen #ztkFullscreenToggle .ztk-icon--compress { display: inline-flex; }

/* ---------- Dropdowns ---------- */
.ztk-dropdown { position: relative; }

.ztk-dropdown__menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-md);
    box-shadow: var(--ztk-shadow);
    padding: 6px;
    display: none;
    z-index: 30;
}
.ztk-dropdown__menu--wide { min-width: 260px; }
.ztk-dropdown__menu--lang { min-width: 170px; }
.ztk-dropdown.is-open .ztk-dropdown__menu { display: block; }

.ztk-dropdown__header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ztk-text-muted);
    padding: 8px 10px 4px;
}

.ztk-dropdown__item, .ztk-lang-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: start;
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: var(--ztk-radius-sm);
    font-size: 0.86rem;
    color: var(--ztk-text);
}
.ztk-dropdown__item:hover, .ztk-lang-option:hover { background: var(--ztk-surface-alt); }
.ztk-dropdown__item--danger { color: var(--ztk-red); }
.ztk-lang-option.is-active { color: var(--ztk-blue); font-weight: 600; }
.ztk-dropdown__menu form { margin: 0; }

.ztk-empty-mini {
    padding: 18px 10px;
    text-align: center;
    color: var(--ztk-text-muted);
    font-size: 0.82rem;
}

.ztk-profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px 6px;
    border-radius: var(--ztk-radius-sm);
    color: var(--ztk-text);
}
.ztk-profile-btn:hover { background: var(--ztk-surface-alt); }

.ztk-avatar--img { object-fit: cover; }
.ztk-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ztk-blue), var(--ztk-cyan));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ---------- Content area ---------- */
.ztk-content {
    flex: 1;
    padding: 24px;
}

.ztk-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--ztk-border);
    color: var(--ztk-text-muted);
    font-size: 0.8rem;
}
.ztk-footer p { margin: 0; }

/* ---------- Page header + placeholder card (used by the 4 module shells) ---------- */
.ztk-page-header { margin-bottom: 20px; }
.ztk-page-header h1 {
    font-family: var(--ztk-font-heading);
    font-size: 1.5rem;
    margin: 0 0 4px;
}
.ztk-page-header p { margin: 0; color: var(--ztk-text-muted); font-size: 0.9rem; }

.ztk-placeholder {
    background: var(--ztk-surface);
    border: 1px dashed var(--ztk-border);
    border-radius: var(--ztk-radius-lg);
    padding: 48px 24px;
    text-align: center;
    color: var(--ztk-text-muted);
}
.ztk-placeholder__icon {
    width: 46px; height: 46px;
    margin: 0 auto 14px;
    color: var(--ztk-blue);
}
.ztk-placeholder h2 {
    font-family: var(--ztk-font-heading);
    color: var(--ztk-text);
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.ztk-placeholder p { max-width: 460px; margin: 0 auto; font-size: 0.88rem; line-height: 1.5; }

/* ---------- Buttons / forms (used by login) ---------- */
.ztk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--ztk-radius-sm);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    transition: filter var(--ztk-transition);
}
.ztk-btn--primary { background: var(--ztk-blue); color: #fff; }
.ztk-btn--primary:hover { filter: brightness(1.07); }
.ztk-btn--block { width: 100%; }

.ztk-form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }

.ztk-field { display: flex; flex-direction: column; gap: 6px; }
.ztk-field__label { font-size: 0.82rem; font-weight: 600; color: var(--ztk-text-muted); }
.ztk-field__control {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-sm);
    padding: 10px 12px;
    background: var(--ztk-surface-alt);
}
.ztk-field__control:focus-within { border-color: var(--ztk-blue); }
.ztk-field__control input {
    border: none; background: transparent; outline: none;
    width: 100%; color: var(--ztk-text); font-size: 0.92rem;
}
.ztk-field__control .ztk-icon { color: var(--ztk-text-muted); }
.ztk-field__toggle { background: none; border: none; padding: 2px; color: var(--ztk-text-muted); }

.ztk-checkbox { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ztk-text-muted); }

.ztk-alert {
    padding: 10px 14px;
    border-radius: var(--ztk-radius-sm);
    font-size: 0.85rem;
    margin-top: 18px;
}
.ztk-alert--danger {
    background: color-mix(in srgb, var(--ztk-red) 12%, transparent);
    color: var(--ztk-red);
    border: 1px solid color-mix(in srgb, var(--ztk-red) 30%, transparent);
}
.ztk-alert--warning {
    background: color-mix(in srgb, var(--ztk-status-idle) 12%, transparent);
    color: color-mix(in srgb, var(--ztk-status-idle) 80%, black);
    border: 1px solid color-mix(in srgb, var(--ztk-status-idle) 30%, transparent);
}

/* ---------- Auth page ---------- */
.ztk-body--auth {
    min-height: 100vh;
}
.ztk-auth-lang {
    position: fixed; top: 18px; inset-inline-end: 18px;
    display: flex; gap: 6px; z-index: 40;
}
.ztk-auth-lang .ztk-icon-btn { color: #fff; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(6px); }
.ztk-auth-lang .ztk-icon-btn:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }

.ztk-auth-page {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: #07101f;
}
.ztk-auth-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    background: var(--ztk-login-bg, url('../img/auth-bg.webp')) center center / cover no-repeat;
}
.ztk-auth-page__overlay {
    position: absolute; inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, rgba(7, 19, 41, 0.55) 0%, rgba(16, 46, 86, 0.28) 45%, rgba(7, 16, 31, 0.4) 100%);
}

/* ---- Single curved white panel holding branding + the login form ---- */
.ztk-auth-shape {
    position: relative;
    z-index: 2;
    flex: none;
    width: 660px;
    max-width: 92vw;
    height: 100vh;
}
.ztk-auth-shape__svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    filter: drop-shadow(18px 0 40px rgba(3, 10, 26, 0.35));
}
.ztk-auth-shape__content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 40px 190px 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    overflow-y: auto;
}

.ztk-auth-brand { margin-bottom: 4px; text-align: center; }
.ztk-brand__logo--auth { height: 64px; margin: 0 auto; }
.ztk-auth-hero__title {
    font-family: var(--ztk-font-heading);
    font-size: 1.68rem;
    font-weight: 800;
    line-height: 1.18;
    color: #0f172a;
    margin: 0 0 8px;
}
.ztk-auth-hero__subtitle {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0;
}

.ztk-auth-form-block {
    padding-top: 20px;
    border-top: 1px solid #eef1f6;
}
.ztk-auth__icon-badge {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ztk-blue) 12%, transparent);
    color: var(--ztk-blue);
    display: flex; align-items: center; justify-content: center;
    margin: 0 0 14px;
}
.ztk-auth__icon-badge .ztk-icon { width: 22px; height: 22px; }
/* The panel is always a solid light surface, even in dark mode, so its form
   controls stay fixed-light rather than following the theme tokens used by
   var(--ztk-surface-alt)/var(--ztk-text). */
.ztk-auth-form-block .ztk-field__label { color: #64748b; }
.ztk-auth-form-block .ztk-field__control {
    background: #f8fafc;
    border-color: #dbe3ee;
}
.ztk-auth-form-block .ztk-field__control input { color: #111827; }
.ztk-auth-form-block .ztk-field__control .ztk-icon,
.ztk-auth-form-block .ztk-field__toggle { color: #64748b; }
.ztk-auth-form-block .ztk-checkbox { color: #475569; }
.ztk-auth-form-block .ztk-badge { background: #eef2f7; color: #64748b; }
.ztk-auth__title {
    font-family: var(--ztk-font-heading);
    font-size: 1.3rem; margin: 0 0 4px;
    color: #0f172a;
}
.ztk-auth__subtitle { margin: 0 0 6px; color: var(--ztk-text-muted); font-size: 0.85rem; }
.ztk-auth-form-block .ztk-form { margin-top: 16px; gap: 14px; }
.ztk-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ztk-auth__forgot {
    font-size: 0.8rem; font-weight: 600; color: #64748b;
    display: inline-flex; align-items: center; gap: 6px;
    cursor: default;
}
.ztk-auth__security-note {
    display: flex; align-items: center; gap: 8px;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.4;
}
.ztk-auth__security-note .ztk-icon { flex: none; color: var(--ztk-green); }

@media (max-width: 1080px) {
    .ztk-auth-page {
        align-items: center; justify-content: center; padding: 32px 20px;
        height: auto; min-height: 100vh; overflow-y: auto;
    }
    .ztk-auth-shape { width: 100%; max-width: 440px; height: auto; }
    .ztk-auth-shape__svg { display: none; }
    .ztk-auth-shape {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 26px;
        box-shadow: 0 24px 60px rgba(3, 10, 26, 0.4);
    }
    .ztk-auth-shape__content { max-height: none; padding: 34px 28px; }
    .ztk-auth-brand-block { display: none; }
    .ztk-auth-form-block { border-top: none; padding-top: 0; }
}
@media (max-width: 480px) {
    .ztk-auth-shape__content { padding: 28px 22px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
    .ztk-profile-btn__text { display: none; }
}
@media (max-width: 960px) {
    /* Mobile nav: links stack and scroll (no burger — the toggle was removed
       as desktop-dead; the bar wraps naturally instead of collapsing). */
    .ztk-topnav {
        height: auto;
        min-height: var(--ztk-topbar-h);
        flex-wrap: wrap;
        padding-block: 4px;
    }
    .ztk-topnav__links {
        position: static;
        inset-inline: auto;
        display: flex;
        flex-wrap: wrap;
        overflow: visible;
        max-height: none;
        gap: 2px;
        box-shadow: none;
        border-bottom: 1px solid var(--ztk-border);
        padding: 6px 8px;
    }
    .ztk-topnav__link { width: auto; }
    .ztk-topnav__dropdown { width: auto; }
}
@media (max-width: 640px) {
    .ztk-brand__logo { height: 30px; }
}

/* ========================================================
   Vehicles module — list, form, detail view
   ======================================================== */

.ztk-page-header--row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ztk-breadcrumb-link { font-size: 0.85rem; color: var(--ztk-text-muted); }
.ztk-breadcrumb-link:hover { color: var(--ztk-blue); }

.ztk-btn--ghost {
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    color: var(--ztk-text);
}
.ztk-btn--ghost:hover { background: var(--ztk-surface-alt); }
.ztk-btn.is-disabled { pointer-events: none; opacity: 0.4; }

/* Toolbar */
.ztk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.ztk-search--toolbar { width: 280px; background: var(--ztk-surface); border: 1px solid var(--ztk-border); }
.ztk-select {
    border: 1px solid var(--ztk-border);
    background: var(--ztk-surface);
    color: var(--ztk-text);
    border-radius: var(--ztk-radius-sm);
    padding: 8px 10px;
    font-size: 0.85rem;
}

/* Table */
.ztk-table-wrap {
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg);
    overflow-x: auto;
}
.ztk-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.ztk-table th {
    text-align: start;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ztk-text-muted);
    padding: 12px 16px;
    border-bottom: 1px solid var(--ztk-border);
    white-space: nowrap;
}
.ztk-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--ztk-border);
    vertical-align: middle;
}
.ztk-table tbody tr:last-child td { border-bottom: none; }
.ztk-table tbody tr:hover { background: var(--ztk-surface-alt); }
.ztk-table__actions-col { text-align: end; white-space: nowrap; }

.ztk-vehicle-cell { display: flex; align-items: center; gap: 10px; }
.ztk-vehicle-thumb {
    width: 40px; height: 40px; border-radius: var(--ztk-radius-sm);
    object-fit: cover; flex-shrink: 0; background: var(--ztk-surface-alt);
}
.ztk-vehicle-thumb--placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ztk-text-muted);
}
.ztk-vehicle-plate { font-weight: 600; color: var(--ztk-text); }
.ztk-vehicle-plate:hover { color: var(--ztk-blue); }
.ztk-vehicle-sub { font-size: 0.78rem; color: var(--ztk-text-muted); }

.ztk-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.75rem; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
}
.ztk-chip--ok { background: color-mix(in srgb, var(--ztk-status-moving) 15%, transparent); color: var(--ztk-status-moving); }
.ztk-chip--muted { background: var(--ztk-surface-alt); color: var(--ztk-text-muted); }
.ztk-chip--warn { background: color-mix(in srgb, var(--ztk-status-idle) 18%, transparent); color: var(--ztk-status-idle); }

.ztk-type-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: var(--ztk-text-muted);
}

.ztk-status-badge {
    display: inline-block; font-size: 0.75rem; font-weight: 700;
    padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em;
}
.ztk-status-badge--active { background: color-mix(in srgb, var(--ztk-status-moving) 15%, transparent); color: var(--ztk-status-moving); }
.ztk-status-badge--inactive { background: color-mix(in srgb, var(--ztk-status-nr) 20%, transparent); color: var(--ztk-status-nr); }

.ztk-row-actions { display: inline-flex; gap: 4px; }
.ztk-inline-form { display: inline; }
.ztk-icon-btn--danger:hover { color: var(--ztk-red); background: color-mix(in srgb, var(--ztk-red) 10%, transparent); }

.ztk-pagination {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; flex-wrap: wrap; gap: 10px;
}
.ztk-pagination__info { font-size: 0.82rem; color: var(--ztk-text-muted); }
.ztk-pagination__controls { display: flex; align-items: center; gap: 10px; }
.ztk-pagination__page { font-size: 0.85rem; color: var(--ztk-text-muted); }

/* Form layout */
.ztk-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
}
.ztk-form-card--span2 { grid-column: 1 / -1; }

.ztk-form-card {
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg);
    padding: 20px;
}
.ztk-form-card h2 {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--ztk-font-heading);
    font-size: 1rem; margin: 0 0 16px;
}
.ztk-form-card .ztk-field { margin-bottom: 14px; }
.ztk-form-card .ztk-field:last-child { margin-bottom: 0; }

.ztk-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ztk-vehicle-form input[type="text"],
.ztk-vehicle-form input[type="number"],
.ztk-vehicle-form input[type="date"],
.ztk-vehicle-form select {
    width: 100%;
    border: 1px solid var(--ztk-border);
    background: var(--ztk-surface-alt);
    border-radius: var(--ztk-radius-sm);
    padding: 9px 11px;
    font-size: 0.88rem;
    color: var(--ztk-text);
}
.ztk-vehicle-form input:focus, .ztk-vehicle-form select:focus { outline: none; border-color: var(--ztk-blue); }
.ztk-field.has-error input, .ztk-field.has-error select { border-color: var(--ztk-red); }
.ztk-field__error { display: block; font-size: 0.76rem; color: var(--ztk-red); margin-top: 4px; }
.ztk-field__hint { display: block; font-size: 0.76rem; color: var(--ztk-text-muted); margin-top: 4px; }

.ztk-type-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.ztk-type-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.ztk-type-option span {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--ztk-text-muted);
}
.ztk-type-option input:checked + span {
    border-color: var(--ztk-blue);
    color: var(--ztk-blue);
    background: color-mix(in srgb, var(--ztk-blue) 8%, transparent);
}

.ztk-upload { display: flex; align-items: center; gap: 14px; }
.ztk-upload__preview {
    width: 64px; height: 64px; border-radius: var(--ztk-radius-sm);
    object-fit: cover; background: var(--ztk-surface-alt);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ztk-text-muted);
}
.ztk-upload__btn { cursor: pointer; }

.ztk-device-picker { position: relative; }
.ztk-device-picker input {
    width: 100%; border: 1px solid var(--ztk-border);
    background: var(--ztk-surface-alt); border-radius: var(--ztk-radius-sm);
    padding: 9px 11px; font-size: 0.88rem; color: var(--ztk-text);
}
.ztk-device-picker__panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    max-height: 220px; overflow-y: auto;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-sm); box-shadow: var(--ztk-shadow);
    z-index: 20;
}
.ztk-device-picker__item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; text-align: start; background: none; border: none;
    padding: 9px 12px; font-size: 0.84rem; color: var(--ztk-text);
    border-bottom: 1px solid var(--ztk-border);
}
.ztk-device-picker__item:last-child { border-bottom: none; }
.ztk-device-picker__item:hover { background: var(--ztk-surface-alt); }
.ztk-device-picker__item small { color: var(--ztk-text-muted); }
.ztk-device-picker__empty { padding: 14px; text-align: center; font-size: 0.82rem; color: var(--ztk-text-muted); }

.ztk-form-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    margin-top: 20px;
}

/* Detail (show) view */
.ztk-detail-hero { display: flex; align-items: center; gap: 18px; }
.ztk-detail-hero__img {
    width: 96px; height: 96px; border-radius: var(--ztk-radius-lg);
    object-fit: cover; background: var(--ztk-surface-alt);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ztk-text-muted); flex-shrink: 0;
}
.ztk-detail-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.ztk-detail-list dt { font-size: 0.78rem; color: var(--ztk-text-muted); }
.ztk-detail-list dd { margin: 0; font-size: 0.88rem; color: var(--ztk-text); text-align: end; }

@media (max-width: 700px) {
    .ztk-field-row { grid-template-columns: 1fr; }
    .ztk-detail-list { grid-template-columns: 1fr; }
    .ztk-detail-list dd { text-align: start; }
}

/* ========================================================
   Live Tracking module
   ======================================================== */

.ztk-content:has(#ztkTrackingLayout) { padding: 0; }

.ztk-tracking-layout {
    display: flex;
    height: calc(100vh - var(--ztk-topbar-h) - 49px); /* minus footer */
    min-height: 500px;
}

.ztk-tracking-panel {
    width: 15%;
    min-width: 260px;
    max-width: 380px;
    border-inline-end: 1px solid var(--ztk-border);
    background: var(--ztk-surface);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 14px;
}

.ztk-search--panel { width: 100%; margin-bottom: 12px; background: var(--ztk-surface-alt); border: 1px solid var(--ztk-border); }

.ztk-tracking-empty { text-align: center; padding: 30px 10px; color: var(--ztk-text-muted); }
.ztk-tracking-empty h2 { font-size: 0.95rem; color: var(--ztk-text); margin: 10px 0 6px; }
.ztk-tracking-empty p { font-size: 0.82rem; margin: 0 0 14px; }
.ztk-tracking-empty .ztk-placeholder__icon { width: 36px; height: 36px; margin: 0 auto 6px; color: var(--ztk-blue); }

.ztk-tracking-list { list-style: none; margin: 0; padding: 0; }
.ztk-tracking-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 8px; border-radius: var(--ztk-radius-sm);
    cursor: pointer; font-size: 0.85rem;
}
.ztk-tracking-item:hover { background: var(--ztk-surface-alt); }
.ztk-tracking-item__body { display: flex; flex-direction: column; min-width: 0; }
.ztk-tracking-item__plate { font-weight: 600; color: var(--ztk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ztk-tracking-item__sub { font-size: 0.74rem; color: var(--ztk-text-muted); }

.ztk-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.ztk-status-dot--moving { background: var(--ztk-status-moving); }
.ztk-status-dot--idle { background: var(--ztk-status-idle); }
.ztk-status-dot--stopped { background: var(--ztk-status-stopped); }
.ztk-status-dot--nr { background: var(--ztk-status-nr); }

.ztk-tracking-back { background: none; border: none; padding: 0; margin-bottom: 8px; cursor: pointer; font-size: 0.82rem; }
.ztk-tracking-detail-title { font-family: var(--ztk-font-heading); font-size: 1.1rem; margin: 0 0 12px; }

.ztk-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--ztk-border); margin-bottom: 12px; padding-bottom: 8px; }
.ztk-tab {
    background: none; border: none; padding: 6px 9px; font-size: 0.76rem; font-weight: 600;
    color: var(--ztk-text-muted); border-radius: var(--ztk-radius-sm); cursor: pointer;
}
.ztk-tab:hover { background: var(--ztk-surface-alt); }
.ztk-tab.is-active { background: color-mix(in srgb, var(--ztk-blue) 12%, transparent); color: var(--ztk-blue); }

.ztk-tab-panel { display: none; }
.ztk-tab-panel.is-active { display: block; }

.ztk-history-subtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.ztk-chip-tab {
    background: var(--ztk-surface-alt); border: 1px solid var(--ztk-border);
    border-radius: 999px; padding: 4px 11px; font-size: 0.76rem; cursor: pointer; color: var(--ztk-text-muted);
}
.ztk-chip-tab.is-active { background: var(--ztk-blue); color: #fff; border-color: var(--ztk-blue); }

.ztk-history-controls { display: flex; align-items: end; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.ztk-history-controls label { display: flex; flex-direction: column; font-size: 0.72rem; color: var(--ztk-text-muted); gap: 3px; }
.ztk-history-controls input[type="date"] {
    border: 1px solid var(--ztk-border); background: var(--ztk-surface-alt);
    border-radius: var(--ztk-radius-sm); padding: 5px 6px; font-size: 0.78rem; color: var(--ztk-text);
}
.ztk-btn--sm { padding: 6px 10px; font-size: 0.78rem; }

.ztk-history-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm); }
.ztk-history-row {
    display: flex; justify-content: space-between; gap: 8px;
    padding: 6px 9px; font-size: 0.76rem; border-bottom: 1px solid var(--ztk-border); color: var(--ztk-text-muted);
}
.ztk-history-row:last-child { border-bottom: none; }

/* Map */
/* z-index:0 here (paired with position:relative) deliberately creates a new
   stacking context. Leaflet's own internal elements (map panes, controls,
   attribution) use z-index values up to 1000 - without this, those values
   compare against the PAGE's stacking context and can visually escape above
   sibling UI like the top nav, context menu, or modals, even though they
   come later in paint order. Containing them here fixes that at the root
   rather than needing to out-escalate 1000 everywhere else in the app. */
.ztk-tracking-map-wrap { position: relative; z-index: 0; flex: 1; }
.ztk-map { width: 100%; height: 100%; background: var(--ztk-surface-alt); }

.ztk-map-controls {
    position: absolute; top: 14px; z-index: 400;
    display: flex; flex-direction: column; gap: 6px;
}
.ztk-map-controls--left { left: 14px; }
.ztk-map-controls--right { right: 14px; }

.ztk-map-btn {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    color: var(--ztk-text); box-shadow: var(--ztk-shadow); cursor: pointer;
}
.ztk-map-btn:hover { background: var(--ztk-surface-alt); }
.ztk-map-btn.is-active { background: var(--ztk-blue); color: #fff; border-color: var(--ztk-blue); }

.ztk-map-marker {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.ztk-map-marker svg { width: 16px; height: 16px; }

.ztk-map-label {
    background: var(--ztk-surface) !important; color: var(--ztk-text) !important;
    border: 1px solid var(--ztk-border) !important; font-size: 0.72rem !important;
    padding: 1px 6px !important; box-shadow: none !important;
}

/* Context menu */
.ztk-context-menu {
    position: fixed; z-index: 900; min-width: 220px;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-md); box-shadow: var(--ztk-shadow);
    padding: 6px; max-height: 80vh; overflow-y: auto;
}
.ztk-context-menu button {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: start;
    background: none; border: none; padding: 8px 10px; border-radius: var(--ztk-radius-sm);
    font-size: 0.83rem; color: var(--ztk-text); cursor: pointer;
}
.ztk-context-menu button:hover { background: var(--ztk-surface-alt); }
.ztk-context-menu button.is-disabled { color: var(--ztk-text-muted); cursor: not-allowed; }
.ztk-context-menu button.is-disabled:hover { background: none; }
.ztk-context-menu button .ztk-badge { margin-inline-start: auto; }
.ztk-context-menu button.ztk-ctx-danger:not(.is-disabled) { color: var(--ztk-red); }

/* Modal */
.ztk-modal {
    position: fixed; inset: 0; z-index: 950;
    background: rgba(15,17,20,0.45);
    display: flex; align-items: center; justify-content: center;
}
.ztk-modal__card {
    background: var(--ztk-surface); border-radius: var(--ztk-radius-lg);
    padding: 22px; width: 100%; max-width: 380px; box-shadow: var(--ztk-shadow);
}
.ztk-modal__card h3 { margin: 0 0 16px; font-family: var(--ztk-font-heading); }

@media (max-width: 900px) {
    .ztk-tracking-layout { flex-direction: column; height: auto; }
    .ztk-tracking-panel { width: 100%; max-width: none; max-height: 320px; }
    .ztk-tracking-map-wrap { height: 480px; }
}

/* ========================================================
   Real Time popup
   ======================================================== */

.ztk-modal--rt { padding: 20px; }
.ztk-modal__card--rt {
    max-width: 1100px; width: 100%; height: 88vh;
    padding: 0; display: flex; flex-direction: column; overflow: hidden;
}

.ztk-rt-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--ztk-border);
    background: var(--ztk-gray-900); color: #fff;
}
.ztk-rt-header .ztk-icon { color: #fff; }
.ztk-rt-header__title { font-family: var(--ztk-font-heading); font-weight: 700; flex: 1; }
.ztk-rt-close { color: #fff; }
.ztk-rt-close:hover { background: rgba(255,255,255,0.12); }

.ztk-rt-body { flex: 1; display: flex; min-height: 0; }

.ztk-rt-panel {
    width: 300px; flex-shrink: 0; overflow-y: auto;
    padding: 18px; border-inline-end: 1px solid var(--ztk-border);
}

.ztk-gauge { position: relative; width: 200px; height: 200px; margin: 0 auto 14px; }
.ztk-gauge svg { width: 100%; height: 100%; }
.ztk-gauge__value {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; margin-top: 30px;
}
.ztk-gauge__value span { font-size: 2rem; font-weight: 800; font-family: var(--ztk-font-heading); color: var(--ztk-text); line-height: 1; }
.ztk-gauge__value small { color: var(--ztk-text-muted); font-size: 0.75rem; }

.ztk-rt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.ztk-rt-stat {
    background: var(--ztk-surface-alt); border-radius: var(--ztk-radius-sm);
    padding: 8px 10px; text-align: center;
}
.ztk-rt-stat span { display: block; font-size: 0.68rem; color: var(--ztk-text-muted); margin-bottom: 2px; }
.ztk-rt-stat strong { font-size: 0.85rem; color: var(--ztk-text); }
.ztk-rt-stat strong small { display: block; font-weight: 400; color: var(--ztk-text-muted); font-size: 0.68rem; margin-top: 2px; }

.ztk-rt-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.ztk-rt-autocenter { margin: 10px 0 16px; justify-content: center; }

.ztk-rt-block { margin-bottom: 14px; }
.ztk-rt-block__label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--ztk-text-muted); background: var(--ztk-surface-alt);
    padding: 6px 9px; border-radius: var(--ztk-radius-sm) var(--ztk-radius-sm) 0 0;
}
.ztk-rt-block__body {
    font-size: 0.8rem; color: var(--ztk-text); border: 1px solid var(--ztk-border); border-top: none;
    padding: 8px 9px; border-radius: 0 0 var(--ztk-radius-sm) var(--ztk-radius-sm);
}
.ztk-rt-block__body small { color: var(--ztk-text-muted); }
.ztk-rt-block .ztk-field { margin-top: 8px; margin-bottom: 0; }
.ztk-rt-block .ztk-btn { margin-top: 10px; }

.ztk-rt-map-wrap { flex: 1; position: relative; }
.ztk-rt-map-wrap .ztk-map { border-radius: 0; }

.ztk-traccar-banner {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 500; background: var(--ztk-status-idle); color: #fff;
    padding: 8px 16px; border-radius: var(--ztk-radius-sm); font-size: 0.82rem;
    box-shadow: var(--ztk-shadow); max-width: 80%; text-align: center;
}

@media (max-width: 800px) {
    .ztk-rt-body { flex-direction: column; }
    .ztk-rt-panel { width: 100%; border-inline-end: none; border-bottom: 1px solid var(--ztk-border); max-height: 45vh; }
}

/* ========================================================
   Live Tracking v2 — checkboxes, image markers, bottom info box, filter
   ======================================================== */

.ztk-tracking-panel__header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; padding: 0 2px;
}
.ztk-tracking-panel__header .ztk-checkbox { font-size: 0.8rem; font-weight: 600; }

.ztk-tracking-item__check {
    width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--ztk-blue); cursor: pointer;
}

/* Image-based markers (car/bike PNGs) */
.ztk-map-marker--img {
    width: 34px; height: 34px; border-radius: 50%;
    background: #fff; border: 3px solid; position: relative;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.35);
}
.ztk-map-marker--img img { width: 22px; height: 22px; object-fit: contain; }
.ztk-map-marker__dot {
    position: absolute; bottom: -2px; right: -2px;
    width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff;
}

/* Bottom info box */
.ztk-info-box {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 450;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg); box-shadow: var(--ztk-shadow);
    max-height: 46%; display: flex; flex-direction: column; overflow: hidden;
}
.ztk-info-box__header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--ztk-border);
    font-family: var(--ztk-font-heading); font-weight: 700;
}
.ztk-info-box__header span:first-of-type { flex: 1; }
.ztk-info-box__tabs {
    display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--ztk-border);
    overflow-x: auto; flex-shrink: 0;
}
.ztk-info-box__body {
    padding: 4px 18px 16px; overflow-y: auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px;
    align-content: start;
}

.ztk-ib-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 0; border-bottom: 1px solid var(--ztk-border); font-size: 0.82rem;
}
.ztk-ib-row__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ztk-blue); opacity: 0.55; }
.ztk-ib-row__label { color: var(--ztk-text-muted); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ztk-ib-row__value { color: var(--ztk-text); font-weight: 700; text-align: end; flex: none; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztk-ib-empty { color: var(--ztk-text-muted); font-weight: 400; }
.ztk-ib-group { grid-column: 1 / -1; margin-top: 2px; }
.ztk-ib-group__title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--ztk-text-muted); margin: 8px 0 2px;
}

/* Filter popup */
.ztk-modal__card--filter { max-width: 640px; padding: 0; }
.ztk-rt-header--light { background: var(--ztk-surface-alt); color: var(--ztk-text); }
.ztk-rt-header--light .ztk-icon { color: var(--ztk-text); }
.ztk-filter-body { padding: 18px; }
.ztk-filter-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 16px;
}
.ztk-filter-grid select {
    width: 100%; border: 1px solid var(--ztk-border); background: var(--ztk-surface-alt);
    border-radius: var(--ztk-radius-sm); padding: 8px 9px; font-size: 0.85rem; color: var(--ztk-text);
}
.ztk-filter-grid select:disabled { opacity: 0.6; cursor: not-allowed; }
.ztk-filter-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ztk-border); flex-wrap: wrap; gap: 10px;
}
.ztk-filter-status { display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--ztk-text-muted); }
.ztk-filter-status .ztk-checkbox { font-size: 0.85rem; }
.ztk-form-actions--between { justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--ztk-border); margin-top: 0; }

/* History popup date presets */
.ztk-hp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ztk-preset-btn {
    background: var(--ztk-surface-alt); border: 1px solid var(--ztk-border);
    border-radius: 999px; padding: 5px 12px; font-size: 0.76rem; cursor: pointer; color: var(--ztk-text-muted);
}
.ztk-preset-btn.is-active { background: var(--ztk-blue); color: #fff; border-color: var(--ztk-blue); }

/* Trace Data modal — widened for the table + map layout */
.ztk-modal__card--trace { max-width: 1360px; }
.ztk-rt-panel--trace { width: 62%; display: flex; flex-direction: column; }
.ztk-hp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ztk-hp-toolbar .ztk-hp-presets { margin-bottom: 0; }

.ztk-trace-table-wrap { flex: 1; overflow: auto; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm); }
.ztk-trace-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.ztk-trace-table thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--ztk-gray-900); color: #fff;
    text-align: start; padding: 9px 10px; font-weight: 700; font-size: 0.76rem;
    text-transform: uppercase; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap;
    user-select: none;
}
.ztk-trace-table thead th:first-child { cursor: default; width: 34px; }
.ztk-trace-table thead .ztk-trace-search-row th { background: var(--ztk-surface-alt); padding: 6px 8px; cursor: default; }
.ztk-trace-table thead .ztk-trace-search-row input {
    width: 100%; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 5px 8px; font-size: 0.76rem; background: var(--ztk-surface); color: var(--ztk-text);
}
.ztk-sort-ico { display: inline-block; width: 8px; }
.ztk-trace-table thead th.is-sorted-asc .ztk-sort-ico::after { content: '▲'; font-size: 0.6rem; }
.ztk-trace-table thead th.is-sorted-desc .ztk-sort-ico::after { content: '▼'; font-size: 0.6rem; }

.ztk-trace-table tbody td { padding: 7px 10px; border-bottom: 1px solid var(--ztk-border); }
.ztk-trace-row { cursor: pointer; }
.ztk-trace-row:hover { background: var(--ztk-surface-alt); }
.ztk-trace-row.is-selected { background: color-mix(in srgb, var(--ztk-blue) 12%, transparent); }
.ztk-trace-row--off { background: color-mix(in srgb, var(--ztk-red) 12%, transparent); color: var(--ztk-red); font-weight: 700; }
.ztk-trace-row--off:hover { background: color-mix(in srgb, var(--ztk-red) 20%, transparent); }
.ztk-trace-row--on { background: color-mix(in srgb, var(--ztk-green) 12%, transparent); color: #17995c; font-weight: 700; }
.ztk-trace-row--on:hover { background: color-mix(in srgb, var(--ztk-green) 20%, transparent); }

.ztk-trace-ignition { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.ztk-trace-ignition--on { background: var(--ztk-status-moving); }
.ztk-trace-ignition--off { background: var(--ztk-status-stopped); }

.ztk-trace-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-wrap: wrap; margin-top: 10px; font-size: 0.8rem; color: var(--ztk-text-muted);
}
.ztk-trace-perpage { display: flex; align-items: center; gap: 6px; }
.ztk-trace-perpage select {
    border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 4px 6px; background: var(--ztk-surface); color: var(--ztk-text); font-size: 0.8rem;
}
.ztk-trace-pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ztk-page-btn {
    border: 1px solid var(--ztk-border); background: var(--ztk-surface); color: var(--ztk-text);
    border-radius: var(--ztk-radius-sm); padding: 4px 10px; font-size: 0.8rem; cursor: pointer;
}
.ztk-page-btn:hover:not(:disabled) { background: var(--ztk-surface-alt); }
.ztk-page-btn.is-active { background: var(--ztk-blue); color: #fff; border-color: var(--ztk-blue); }
.ztk-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ztk-page-ellipsis { padding: 0 4px; color: var(--ztk-text-muted); }

.ztk-trace-refresh {
    position: absolute; top: 14px; right: 14px; z-index: 460;
    background: var(--ztk-green); border-color: var(--ztk-green);
}
.ztk-trace-refresh:hover { filter: brightness(0.95); }

@media (max-width: 1100px) {
    .ztk-rt-panel--trace { width: 100%; }
}

@media (max-width: 1300px) {
    .ztk-info-box__body { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .ztk-info-box { left: 8px; right: 8px; bottom: 8px; max-height: 60%; }
    .ztk-info-box__body { grid-template-columns: 1fr; }
    .ztk-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .ztk-filter-grid { grid-template-columns: 1fr; }
}

/* ========================================================
   Dashboard
   ======================================================== */
.ztk-dash-eyebrow { margin: 0; font-size: 0.85rem; color: var(--ztk-text-muted); }
.ztk-page-header--row h1 { margin: 2px 0 4px; }

.ztk-dash-header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ztk-dash-daterange {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-sm); padding: 10px 14px;
    font-size: 0.85rem; color: var(--ztk-text-muted); cursor: default;
}

/* Generic card surface, shared by every dashboard panel */
.ztk-card {
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg);
    padding: 20px;
}
.ztk-dash-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.ztk-dash-card-head h2 { margin: 0; font-family: var(--ztk-font-heading); font-size: 1rem; }
.ztk-dash-link { font-size: 0.83rem; font-weight: 600; color: var(--ztk-blue); }
.ztk-dash-link:hover { text-decoration: underline; }
.ztk-dash-link.is-disabled { color: var(--ztk-text-muted); pointer-events: none; }

/* KPI cards */
.ztk-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin: 20px 0;
}
.ztk-kpi-card {
    background: var(--ztk-surface);
    border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg);
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}
.ztk-kpi-card__icon { flex: none; width: 52px; height: 52px; }
.ztk-kpi-card__body { flex: 1 1 auto; min-width: 0; }
.ztk-kpi-card__label { margin: 0; font-size: 0.82rem; color: var(--ztk-text-muted); white-space: nowrap; }
.ztk-kpi-card__value { margin: 2px 0; font-family: var(--ztk-font-heading); font-size: 1.5rem; font-weight: 800; color: var(--ztk-text); }
.ztk-kpi-card__foot { margin: 0; font-size: 0.78rem; color: var(--ztk-text-muted); }
.ztk-kpi-card__bar {
    width: 100%; height: 5px; border-radius: 999px;
    background: var(--ztk-gray-200);
    overflow: hidden;
}
html[data-theme="dark"] .ztk-kpi-card__bar { background: var(--ztk-surface-alt); }
.ztk-kpi-card__bar-fill { display: block; height: 100%; border-radius: 999px; }
.ztk-kpi-card__bar-fill--blue    { background: var(--ztk-blue); }
.ztk-kpi-card__bar-fill--moving  { background: var(--ztk-status-moving); }
.ztk-kpi-card__bar-fill--idle    { background: var(--ztk-status-idle); }
.ztk-kpi-card__bar-fill--stopped { background: var(--ztk-status-stopped); }
.ztk-kpi-card__bar-fill--nr      { background: var(--ztk-status-nr); }
.ztk-kpi-card__bar-fill--deleted { background: var(--ztk-status-deleted); }

/* Row layouts */
.ztk-dash-row { display: grid; gap: 16px; margin-bottom: 16px; }
.ztk-dash-row--2 { grid-template-columns: 2fr 1fr; }
.ztk-dash-row--3 { grid-template-columns: 1fr 1.3fr 1fr; }

/* Installations chart */
.ztk-seg-toggle {
    display: inline-flex; background: var(--ztk-surface-alt); border-radius: 999px; padding: 3px;
}
.ztk-seg-toggle__btn {
    border: none; background: transparent; padding: 6px 16px; border-radius: 999px;
    font-size: 0.82rem; font-weight: 600; color: var(--ztk-text-muted); cursor: pointer;
    transition: background var(--ztk-transition), color var(--ztk-transition);
}
.ztk-seg-toggle__btn.is-active { background: var(--ztk-blue); color: #fff; }

.ztk-installs-chart { width: 100%; height: 260px; }
.ztk-installs-chart svg { width: 100%; height: 100%; overflow: visible; }
.ztk-installs-chart .ztk-chart-grid-line { stroke: var(--ztk-border); stroke-width: 1; }
.ztk-installs-chart .ztk-chart-axis-label { fill: var(--ztk-text-muted); font-size: 10px; font-family: var(--ztk-font-body); }
.ztk-installs-chart .ztk-chart-line { fill: none; stroke: var(--ztk-blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ztk-installs-chart .ztk-chart-area { fill: url(#ztkChartGradient); opacity: 0.9; }
.ztk-installs-chart .ztk-chart-dot { fill: var(--ztk-blue); stroke: var(--ztk-surface); stroke-width: 2; }
.ztk-installs-chart .ztk-chart-bubble-bg { fill: var(--ztk-surface); stroke: var(--ztk-border); stroke-width: 1; }
.ztk-installs-chart .ztk-chart-bubble-text { fill: var(--ztk-blue); font-size: 11px; font-weight: 700; font-family: var(--ztk-font-body); text-anchor: middle; }
.ztk-installs-chart .ztk-chart-empty { fill: var(--ztk-text-muted); font-size: 12px; text-anchor: middle; font-family: var(--ztk-font-body); }

/* Recent alerts / generic empty states */
.ztk-empty-mini--icon { padding: 32px 10px; }
.ztk-empty-mini--icon img { display: block; margin: 0 auto 10px; opacity: 0.9; }
.ztk-empty-mini--icon p { margin: 0; }

/* Dashboard Recent Alerts mini-list */
.ztk-alerts-mini { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 4px; }
.ztk-alerts-mini__item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px; border: 1px solid transparent;
}
.ztk-alerts-mini__item:hover { background: #F6F9FE; }
.ztk-alerts-mini__item.is-open { background: #FFF8E8; border-color: #F3E3B3; }
.ztk-alerts-mini__dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--ztk-gray-400, #94A3B8); }
.ztk-alerts-mini__item.is-open .ztk-alerts-mini__dot { background: var(--ztk-yellow, #F5B800); box-shadow: 0 0 0 3px rgba(245, 184, 0, .18); }
.ztk-alerts-mini__body { display: grid; gap: 1px; min-width: 0; flex: 1; }
.ztk-alerts-mini__type { font-size: 13px; font-weight: 600; color: var(--ztk-gray-900, #0F172A); }
.ztk-alerts-mini__meta { font-size: 11.5px; color: var(--ztk-gray-500, #64748B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztk-alerts-mini__state { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ztk-gray-500, #64748B); }
.ztk-alerts-mini__item.is-open .ztk-alerts-mini__state { color: #B45309; }

/* Vehicles by status donut */
.ztk-donut-wrap { position: relative; width: 160px; height: 160px; margin: 6px auto 18px; }
.ztk-donut { width: 100%; height: 100%; }
.ztk-donut circle { transition: stroke-dasharray var(--ztk-transition); }
.ztk-donut__center {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.ztk-donut__center strong { font-family: var(--ztk-font-heading); font-size: 1.4rem; color: var(--ztk-text); }
.ztk-donut__center span { font-size: 0.78rem; color: var(--ztk-text-muted); }
.ztk-donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ztk-donut-legend li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ztk-text-muted); }
.ztk-donut-legend li b { margin-inline-start: auto; color: var(--ztk-text); font-weight: 700; }

/* Top 5 active vehicles */
.ztk-top-active-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ztk-top-active-list li { display: flex; align-items: center; gap: 10px; }
.ztk-top-active-list__rank {
    flex: none; width: 20px; height: 20px; border-radius: 50%;
    background: var(--ztk-surface-alt); color: var(--ztk-text-muted);
    font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.ztk-top-active-list__icon { flex: none; color: var(--ztk-blue); }
.ztk-top-active-list__plate { flex: none; width: 108px; font-size: 0.83rem; font-weight: 600; color: var(--ztk-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ztk-top-active-list__bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--ztk-gray-200); overflow: hidden; }
html[data-theme="dark"] .ztk-top-active-list__bar { background: var(--ztk-surface-alt); }
.ztk-top-active-list__bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--ztk-status-moving); }
.ztk-top-active-list__km { flex: none; font-size: 0.8rem; color: var(--ztk-text-muted); width: 62px; text-align: end; }

/* Quick actions */
.ztk-qa-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.ztk-qa-btn {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 16px 10px;
    background: var(--ztk-surface-alt); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-md);
    font-size: 0.78rem; font-weight: 600; color: var(--ztk-text); text-align: center;
    transition: background var(--ztk-transition);
}
.ztk-qa-btn:hover { background: var(--ztk-gray-200); }
html[data-theme="dark"] .ztk-qa-btn:hover { background: var(--ztk-border); }
.ztk-qa-btn img { width: 30px; height: 30px; }
.ztk-qa-btn--disabled { opacity: 0.55; cursor: default; pointer-events: none; }
.ztk-qa-btn__badge {
    position: absolute; top: 6px; inset-inline-end: 6px;
    font-size: 0.55rem; padding: 1px 5px;
}

@media (max-width: 1200px) {
    .ztk-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .ztk-dash-row--2 { grid-template-columns: 1fr; }
    .ztk-dash-row--3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .ztk-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .ztk-qa-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================================================
   Alerts page
   ======================================================== */
.ztk-vip-banner {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: color-mix(in srgb, var(--ztk-purple) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--ztk-purple) 30%, transparent);
    color: var(--ztk-purple);
    border-radius: var(--ztk-radius-md);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.ztk-vip-banner strong { font-weight: 700; }
.ztk-vip-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--ztk-surface); border: 1px solid color-mix(in srgb, var(--ztk-purple) 30%, transparent);
    border-radius: 999px; padding: 3px 10px 3px 8px; font-weight: 600; color: var(--ztk-text);
    margin-inline-end: 6px;
}
.ztk-vip-tag {
    display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em;
    background: color-mix(in srgb, var(--ztk-purple) 16%, transparent); color: var(--ztk-purple);
    border-radius: 4px; padding: 1px 5px; margin-inline-start: 6px; vertical-align: middle;
}

.ztk-alerts-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    height: calc(100vh - 260px); min-height: 560px;
}
.ztk-alerts-list-card, .ztk-alerts-map-card { display: flex; flex-direction: column; min-height: 0; }
.ztk-alerts-list-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-bottom: 14px;
}
.ztk-alerts-list-head h2 { margin: 0; font-family: var(--ztk-font-heading); font-size: 1rem; }
.ztk-alerts-toolbar { display: flex; align-items: center; gap: 8px; }
.ztk-search-box {
    display: flex; align-items: center; gap: 6px;
    border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 6px 10px; background: var(--ztk-surface-alt); min-width: 220px;
}
.ztk-search-box .ztk-icon { color: var(--ztk-text-muted); }
.ztk-search-box input { border: none; background: transparent; outline: none; font-size: 0.85rem; color: var(--ztk-text); width: 100%; }

.ztk-alerts-table-wrap { flex: 1; min-height: 0; }
.ztk-alerts-actions { display: flex; gap: 4px; }
.ztk-alerts-actions .ztk-icon-btn { width: 30px; height: 30px; }

.ztk-map-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.ztk-map-tab {
    border: 1px solid var(--ztk-border); background: var(--ztk-surface); color: var(--ztk-text-muted);
    border-radius: var(--ztk-radius-sm); padding: 6px 16px; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.ztk-map-tab.is-active { background: var(--ztk-blue); color: #fff; border-color: var(--ztk-blue); }
/* z-index:0 traps Leaflet's internal z-indexes (up to 1000) inside a new
   stacking context, same containment as .ztk-tracking-map-wrap above and
   .zt-map-shell in live-tracking-v2.css — otherwise the map paints over the
   topnav, its dropdowns, and modals. */
.ztk-alerts-map-wrap { position: relative; z-index: 0; flex: 1; min-height: 0; border-radius: var(--ztk-radius-md); overflow: hidden; }
.ztk-alerts-map-wrap .ztk-map { height: 100%; }
.ztk-map-controls--right { position: absolute; top: 12px; right: 12px; z-index: 460; display: flex; flex-direction: column; gap: 6px; }

.ztk-map-marker {
    width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    border: 2px solid #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.ztk-map-marker svg { width: 15px; height: 15px; transform: rotate(45deg); }

/* Alerts page reuses the Live Tracking info box, floating over its own map */
.ztk-alerts-map-wrap .ztk-info-box { position: absolute; left: 12px; right: 12px; bottom: 12px; max-height: 55%; z-index: 470; }

/* Filter modal */
.ztk-modal__card--filter { max-width: 480px; padding: 0; max-height: 88vh; display: flex; flex-direction: column; }
.ztk-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--ztk-border);
}
.ztk-modal__header h3 { margin: 0; font-family: var(--ztk-font-heading); font-size: 1.05rem; }
.ztk-afilter-form { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.ztk-afilter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ztk-afilter-row > span:first-child { flex: none; width: 130px; font-size: 0.84rem; font-weight: 600; color: var(--ztk-text); }
.ztk-afilter-row input, .ztk-afilter-row select {
    flex: 1 1 auto; min-width: 0; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 8px 10px; font-size: 0.84rem; background: var(--ztk-surface); color: var(--ztk-text);
}
.ztk-afilter-row--disabled > span:first-child { color: var(--ztk-text-muted); }
.ztk-afilter-disabled-input {
    flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 8px 10px; font-size: 0.84rem; color: var(--ztk-text-muted); background: var(--ztk-surface-alt);
}
.ztk-afilter-checks { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; border-top: 1px solid var(--ztk-border); }
.ztk-checkbox--disabled { opacity: 0.6; }
.ztk-checkbox--disabled .ztk-badge { margin-inline-start: auto; }
.ztk-modal__footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 20px; border-top: 1px solid var(--ztk-border);
}
.ztk-modal__footer-right { display: flex; gap: 10px; }

@media (max-width: 1200px) {
    .ztk-alerts-layout { grid-template-columns: 1fr; height: auto; }
    .ztk-alerts-list-card { height: 560px; }
    .ztk-alerts-map-card { height: 480px; }
}

/* ========================================================
   Geo Boundaries page
   ======================================================== */
.ztk-geo-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.ztk-radio-inline {
    display: inline-flex; align-items: center; gap: 5px; font-size: 0.84rem; color: var(--ztk-text);
    margin-inline-end: 14px; cursor: pointer;
}
.ztk-radio-inline input { margin: 0; }
/* Geo Boundaries' own recenter button — bottom-right, since Leaflet.Draw's
   toolbar takes the top-left corner here (freed up by disabling zoomControl). */
.ztk-alerts-map-wrap .ztk-map-controls--geo-recenter { top: auto; bottom: 12px; right: 12px; }
#ztkGeoColor { padding: 2px; height: 34px; cursor: pointer; }

/* Floating "Add/Update" panel over the Geo Boundaries map — deliberately NOT
   a .ztk-modal: it has no full-page backdrop, so the map underneath (and
   Leaflet.Draw's own toolbar) stays clickable while this is open. */
.ztk-geo-panel {
    position: absolute; top: 14px; left: 14px; z-index: 480;
    width: 360px; max-width: calc(100% - 28px); max-height: calc(100% - 28px);
    background: var(--ztk-surface); border: 1px solid var(--ztk-border);
    border-radius: var(--ztk-radius-lg); box-shadow: var(--ztk-shadow);
    display: flex; flex-direction: column; overflow: hidden;
}
.ztk-geo-panel__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--ztk-border); flex: none;
}
.ztk-geo-panel__header h3 { margin: 0; font-family: var(--ztk-font-heading); font-size: 1rem; }
.ztk-geo-panel .ztk-afilter-form { overflow-y: auto; flex: 1 1 auto; }
.ztk-geo-panel .ztk-modal__footer { flex: none; }

/* ========================================================
   Reports page
   ======================================================== */
.ztk-req { color: var(--ztk-red); }
.ztk-btn--danger-ghost {
    background: var(--ztk-surface); border: 1px solid color-mix(in srgb, var(--ztk-red) 40%, transparent);
    color: var(--ztk-red);
}
.ztk-btn--danger-ghost:hover { background: color-mix(in srgb, var(--ztk-red) 8%, transparent); }

.ztk-report-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; padding: 4px 0 20px; }
.ztk-report-col { display: flex; flex-direction: column; gap: 16px; }
.ztk-report-row > span:first-child { width: 140px; }
.ztk-report-period { display: flex; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; }
.ztk-report-daterange { display: flex; gap: 8px; flex: 1 1 auto; }
.ztk-report-daterange input { flex: 1 1 0; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm); padding: 8px 10px; font-size: 0.84rem; background: var(--ztk-surface); color: var(--ztk-text); }

.ztk-report-schedule {
    margin-top: 6px; padding: 16px; background: var(--ztk-surface-alt);
    border-radius: var(--ztk-radius-md); display: flex; flex-direction: column; gap: 12px;
}
.ztk-report-schedule h3 { margin: 0; font-family: var(--ztk-font-heading); font-size: 0.92rem; }
.ztk-report-schedule .ztk-field__hint { margin: -6px 0 2px; }
.ztk-report-row-disabled { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ztk-report-row-disabled > span:first-child { width: 100px; font-size: 0.84rem; font-weight: 600; color: var(--ztk-text-muted); }
.ztk-report-row-disabled input[type="text"] {
    flex: 1 1 auto; min-width: 160px; border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 8px 10px; font-size: 0.84rem; background: var(--ztk-surface-alt); color: var(--ztk-text-muted);
}

.ztk-report-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 16px; border-top: 1px solid var(--ztk-border);
}

/* Vehicle picker (checkbox-list-in-dropdown) */
.ztk-vehicle-picker { position: relative; flex: 1 1 auto; }
.ztk-vehicle-picker__btn {
    width: 100%; display: flex; align-items: center; gap: 8px;
    border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-sm);
    padding: 8px 10px; background: var(--ztk-surface); color: var(--ztk-text); font-size: 0.84rem; cursor: pointer;
}
.ztk-vehicle-picker__btn span { flex: 1 1 auto; text-align: start; color: var(--ztk-text-muted); }
.ztk-vehicle-picker__panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: var(--ztk-surface); border: 1px solid var(--ztk-border); border-radius: var(--ztk-radius-md);
    box-shadow: var(--ztk-shadow); padding: 10px; max-height: 280px; display: flex; flex-direction: column; gap: 8px;
}
.ztk-vehicle-picker__actions { display: flex; gap: 14px; }
.ztk-vehicle-picker__actions button { background: none; border: none; color: var(--ztk-blue); font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0; }
.ztk-vehicle-picker__list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.ztk-vehicle-picker__item { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 0.84rem; color: var(--ztk-text); border-radius: var(--ztk-radius-sm); cursor: pointer; }
.ztk-vehicle-picker__item:hover { background: var(--ztk-surface-alt); }

.ztk-report-results { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ztk-border); }
.ztk-report-results .ztk-alert--warning { margin: 0 0 12px; }

@media (max-width: 1000px) {
    .ztk-report-form { grid-template-columns: 1fr; }
}
