/* Janna LT webfonts sourced from https://github.com/mekela/arabic/tree/master/fonts */
@font-face {
    font-display: swap;
    font-family: "JannaLT";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/fonts/JannaLT-Regular.woff2") format("woff2"), url("/assets/fonts/JannaLT-Regular.woff") format("woff");
}
@font-face {
    font-display: swap;
    font-family: "JannaLT";
    font-style: normal;
    font-weight: 700;
    src: url("/assets/fonts/JannaLT-Bold.woff2") format("woff2"), url("/assets/fonts/JannaLT-Bold.woff") format("woff");
}

:root {
    --ink: #111b35;
    --muted: #64708a;
    --line: #dbe3ef;
    --line-soft: #eaf0f6;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --sidebar: #fbfcfe;
    --primary: #175cd3;
    --primary-dark: #124baa;
    --primary-soft: #edf4ff;
    --success: #079455;
    --success-soft: #ecfdf3;
    --warning: #dc6803;
    --warning-soft: #fff7ed;
    --danger: #d92d20;
    --danger-soft: #fef3f2;
    --shadow: 0 12px 34px rgba(20, 42, 75, .10);
    --sidebar-width: 248px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--surface);
    font-family: "JannaLT", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
.btn { --bs-btn-font-size: 13px; --bs-btn-font-weight: 700; --bs-btn-padding-y: .62rem; --bs-btn-padding-x: .94rem; --bs-btn-border-radius: 8px; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--surface-soft); --bs-btn-hover-border-color: #cbd5e1; }
.form-control, .form-select { border-color: #ced8e6; border-radius: 8px; color: var(--ink); font-size: 13px; min-height: 40px; box-shadow: none !important; }
.form-control[type=file] { min-height: auto; }
.form-control:focus, .form-select:focus { border-color: #84adf4; box-shadow: 0 0 0 3px rgba(23, 92, 211, .09) !important; }
.form-label { color: #34405a; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.select2-container { font-size: 13px; min-width: 0; }
.select2-container--default .select2-selection--single { background: #fff; border: 1px solid #ced8e6; border-radius: 8px; height: 40px; outline: 0; transition: border-color .15s ease, box-shadow .15s ease; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: #84adf4; box-shadow: 0 0 0 3px rgba(23, 92, 211, .09); }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ink); line-height: 38px; padding-left: 12px; padding-right: 34px; }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: #7c879b; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; right: 7px; }
.select2-container--default .select2-selection--single .select2-selection__clear { color: #7c879b; float: none; margin: 0; position: absolute; right: 28px; z-index: 2; }
.select2-container--default .select2-selection--multiple { align-items: center; background: #fff; border: 1px solid #ced8e6; border-radius: 8px; cursor: text; display: flex; min-height: 40px; padding: 3px 7px; transition: border-color .15s ease, box-shadow .15s ease; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--multiple { border-color: #84adf4; box-shadow: 0 0 0 3px rgba(23, 92, 211, .09); }
.select2-container--default .select2-selection--multiple .select2-selection__rendered { align-items: center; display: flex; flex-wrap: wrap; gap: 3px; margin: 0; padding: 0; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { align-items: center; background: var(--primary-soft); border: 1px solid #b2ccff; border-radius: 5px; color: var(--primary-dark); display: inline-flex; font-size: 10px; margin: 0; padding: 2px 7px 2px 21px; position: relative; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { border: 0; border-right: 1px solid #b2ccff; color: var(--primary); height: 100%; left: 0; padding: 0 6px; top: 0; }
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field { font-family: inherit; font-size: 11px; height: 26px; margin: 0; }
.select2-dropdown { border: 1px solid #b9c7da; border-radius: 8px; box-shadow: 0 12px 28px rgba(20, 42, 75, .14); overflow: hidden; z-index: 1070; }
.select2-container--default .select2-search--dropdown { padding: 8px; }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #ced8e6; border-radius: 6px; color: var(--ink); font-size: 12px; min-height: 34px; outline: 0; padding: 5px 9px; }
.select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: #84adf4; box-shadow: 0 0 0 3px rgba(23, 92, 211, .08); }
.select2-results__option { font-size: 12px; padding: 9px 11px; }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--primary); }
.select2-container--default .select2-results__option--selected { background: var(--primary-soft); color: var(--primary-dark); }
.select2-quick-add-option { align-items: center; color: var(--primary); display: flex; font-weight: 750; gap: 8px; }
.select2-quick-add-option i { font-size: 14px; }
.select2-container--default .select2-results__option--highlighted .select2-quick-add-option { color: #fff; }
.quick-add-modal .modal-content { box-shadow: 0 24px 70px rgba(12, 31, 61, .22); }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    overflow: hidden;
    padding: 0 16px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 1040;
}
.brand { align-items: center; color: var(--ink); display: flex; font-size: 19px; font-weight: 800; gap: 10px; height: 72px; padding: 0 6px; text-decoration: none; letter-spacing: -.4px; }
.brand-logo { display: block; flex: 0 0 30px; height: 34px; object-fit: contain; width: 30px; }
.brand .brand-logo { height: 32px; }
.main-nav { display: flex; flex: 1 1 auto; flex-direction: column; gap: 5px; margin-right: -7px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 7px 12px 0; scrollbar-color: #c3cede transparent; scrollbar-width: thin; }
.main-nav::-webkit-scrollbar { width: 5px; }
.main-nav::-webkit-scrollbar-thumb { background: #c3cede; border-radius: 20px; }
.main-nav::-webkit-scrollbar-track { background: transparent; }
.nav-item { align-items: center; border-radius: 8px; color: #44506a; display: flex; font-size: 13px; font-weight: 600; gap: 13px; min-height: 44px; padding: 0 12px; position: relative; text-decoration: none; transition: .16s ease; }
.nav-item i { color: #526079; font-size: 17px; width: 20px; }
.nav-item:hover { background: #f1f5fb; color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); }
.nav-item.active::before { background: var(--primary); border-radius: 0 4px 4px 0; content: ""; height: 26px; left: -16px; position: absolute; width: 3px; }
.nav-item.active i { color: var(--primary); }
.nav-group { flex: 0 0 auto; }
.nav-group-toggle { align-items: center; border-radius: 8px; color: #526079; cursor: pointer; display: flex; font-size: 12px; font-weight: 750; gap: 12px; list-style: none; min-height: 40px; padding: 0 11px; transition: .16s ease; user-select: none; }
.nav-group-toggle::-webkit-details-marker { display: none; }
.nav-group-toggle > i:first-child { font-size: 15px; width: 20px; }
.nav-group-toggle:hover { background: #f1f5fb; color: var(--ink); }
.nav-group.has-active > .nav-group-toggle { background: #f6f9ff; color: var(--primary); }
.nav-group-chevron { font-size: 9px; margin-left: auto; transition: transform .18s ease; width: auto; }
.nav-group[open] .nav-group-chevron { transform: rotate(180deg); }
.nav-group-items { display: grid; gap: 3px; padding: 3px 0 7px 8px; }
.nav-group-items .nav-item { font-size: 12px; gap: 10px; min-height: 37px; padding: 0 10px 0 29px; }
.nav-group-items .nav-item i { font-size: 14px; width: 17px; }
.nav-group-items .nav-item.active::before { left: -8px; }
.sidebar-user { border-top: 1px solid var(--line); flex: 0 0 auto; margin-top: 0; padding-top: 15px; }
.user-button { align-items: center; background: transparent; border: 0; border-radius: 9px; color: var(--ink); display: flex; padding: 8px; text-align: left; width: 100%; }
.user-button:hover { background: #f2f5fa; }
.avatar { align-items: center; background: #e8f0ff; border-radius: 50%; color: var(--primary); display: flex; flex: 0 0 38px; font-size: 11px; font-weight: 800; height: 38px; justify-content: center; }
.user-meta { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 0 9px; }
.user-meta strong { font-size: 12px; font-weight: 700; }
.user-meta small { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-button > i { color: var(--muted); font-size: 12px; }
.sidebar-user .dropdown-menu { border-color: var(--line); font-size: 12px; min-width: 205px; }

.main-column { margin-left: var(--sidebar-width); min-width: 0; width: calc(100% - var(--sidebar-width)); }
.topbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; height: 64px; justify-content: space-between; padding: 0 15px; }
.icon-button { align-items: center; background: transparent; border: 0; border-radius: 8px; color: #34405a; display: inline-flex; height: 38px; justify-content: center; width: 38px; }
.icon-button:hover { background: var(--surface-soft); }
.icon-button i { font-size: 18px; }
.sidebar-toggle { display: none; }
.topbar-manager { align-items: center; display: flex; gap: 20px; justify-content: space-between; min-width: 0; width: 100%; }
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 800; letter-spacing: -.45px; line-height: 1.15; margin: 0 0 3px; }
.topbar-title p { color: var(--muted); font-size: 10px; line-height: 1.25; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-manager .btn { flex: 0 0 auto; min-width: 116px; }

.content { margin: 0 auto; max-width: 1480px; padding: 0; }
body[data-view="overview"] .content { padding: 15px; }
.page-head { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.8px; line-height: 1.2; margin: 0 0 7px; }
.page-head p { color: var(--muted); font-size: 13px; margin: 0; }
.page-head .btn { min-width: 116px; }

.metric-rail { border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; min-height: 112px; overflow: hidden; }
.metric { align-items: center; display: flex; gap: 15px; min-width: 0; padding: 22px; position: relative; }
.metric + .metric::before { background: var(--line); content: ""; height: 62px; left: 0; position: absolute; top: 25px; width: 1px; }
.metric-icon { align-items: center; background: var(--primary-soft); border-radius: 10px; color: var(--primary); display: flex; flex: 0 0 46px; font-size: 20px; height: 46px; justify-content: center; }
.metric:nth-child(2) .metric-icon { background: var(--success-soft); color: var(--success); }
.metric:nth-child(3) .metric-icon { background: #f0efff; color: #6938ef; }
.metric:nth-child(4) .metric-icon { background: var(--warning-soft); color: var(--warning); }
.metric-copy { display: grid; min-width: 0; }
.metric-copy small { color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-copy strong { font-size: 21px; font-weight: 700; letter-spacing: -.5px; margin-top: 3px; white-space: nowrap; }
.metric-copy em { color: var(--success); font-size: 10px; font-style: normal; margin-top: 2px; }
.overview-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .7fr); }
.chart-panel, .activity-panel { border: 1px solid var(--line); border-radius: 11px; min-width: 0; padding: 20px; }
.panel-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 20px; }
.panel-heading h2 { font-size: 14px; font-weight: 800; margin: 0 0 3px; }
.panel-heading p { color: var(--muted); font-size: 10px; margin: 0; }
.live-indicator { color: var(--muted); font-size: 10px; }
.live-indicator i { background: var(--success); border-radius: 50%; display: inline-block; height: 6px; margin-right: 4px; width: 6px; }
.chart-wrap { height: 285px; position: relative; }
.activity-feed { display: grid; }
.activity-item { align-items: flex-start; display: grid; gap: 10px; grid-template-columns: 29px minmax(0, 1fr); padding: 11px 0; position: relative; }
.activity-item + .activity-item { border-top: 1px solid var(--line-soft); }
.activity-bullet { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: flex; font-size: 12px; height: 29px; justify-content: center; width: 29px; }
.activity-item strong { display: block; font-size: 11px; line-height: 1.4; }
.activity-item p { color: var(--muted); font-size: 10px; margin: 2px 0 0; overflow-wrap: anywhere; }
.empty-activity { color: var(--muted); font-size: 12px; padding: 50px 10px; text-align: center; }
.quick-links { border: 1px solid var(--line); border-radius: 11px; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; overflow: hidden; }
.quick-links a { align-items: center; color: var(--ink); display: grid; gap: 13px; grid-template-columns: 36px minmax(0,1fr) auto; min-height: 88px; padding: 18px 20px; text-decoration: none; }
.quick-links a + a { border-left: 1px solid var(--line); }
.quick-links a:hover { background: var(--surface-soft); }
.quick-links > a > i:first-child { align-items: center; background: var(--primary-soft); border-radius: 8px; color: var(--primary); display: flex; font-size: 16px; height: 36px; justify-content: center; }
.quick-links > a > i:last-child { color: var(--muted); }
.quick-links span { display: grid; }
.quick-links strong { font-size: 12px; }
.quick-links small { color: var(--muted); font-size: 10px; margin-top: 3px; }

/* Business intelligence dashboard */
.analytics-dashboard { display: grid; gap: 12px; min-width: 0; }
.analytics-filters {
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(165px, .85fr) repeat(3, minmax(170px, 1fr)) auto;
    padding: 11px 12px;
}
.analytics-filter { display: grid; gap: 5px; min-width: 0; }
.analytics-filter > span { color: #526079; font-size: 9px; font-weight: 700; }
.analytics-filter .select2-container--default .select2-selection--single,
.analytics-filter .form-select { font-size: 11px; height: 37px; min-height: 37px; }
.analytics-filter .select2-container--default .select2-selection--single .select2-selection__rendered { font-size: 11px; line-height: 35px; }
.analytics-filter .select2-container--default .select2-selection--single .select2-selection__arrow { height: 35px; }
.analytics-refresh { align-items: center; display: inline-flex; gap: 7px; height: 37px; justify-content: center; min-width: 94px; padding-bottom: 0; padding-top: 0; }
.analytics-refresh.is-loading i { animation: analytics-spin .8s linear infinite; }
@keyframes analytics-spin { to { transform: rotate(360deg); } }

.analytics-metric-rail {
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(6,minmax(0,1fr));
    min-height: 98px;
    overflow: hidden;
}
.analytics-loading { align-items: center; color: var(--muted); display: flex; font-size: 10px; gap: 8px; justify-content: center; min-height: 90px; padding: 18px; }
.analytics-metric { align-items: center; display: grid; gap: 10px; grid-template-columns: 34px minmax(0,1fr); min-width: 0; padding: 16px 13px; position: relative; }
.analytics-metric + .analytics-metric::before { background: var(--line); bottom: 17px; content: ''; left: 0; position: absolute; top: 17px; width: 1px; }
.analytics-metric-icon { align-items: center; color: var(--primary); display: inline-flex; font-size: 22px; height: 34px; justify-content: center; width: 34px; }
.analytics-metric-copy { display: grid; min-width: 0; }
.analytics-metric-copy small { color: #657289; font-size: 9px; font-weight: 600; line-height: 1.25; }
.analytics-metric-copy strong { color: #111b35; font-size: 17px; font-weight: 800; letter-spacing: -.35px; line-height: 1.35; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analytics-metric-copy em { align-items: center; color: var(--success); display: flex; font-size: 8px; font-style: normal; gap: 3px; line-height: 1.25; margin-top: 4px; white-space: nowrap; }
.analytics-metric-copy em.down { color: var(--danger); }
.analytics-metric-copy em.neutral { color: #738099; }
.analytics-metric-copy em span { color: #8792a5; margin-left: 3px; }

.analytics-primary-grid { display: grid; gap: 12px; grid-template-columns: minmax(0,1.65fr) minmax(340px,1fr); }
.analytics-demographic-grid { display: grid; gap: 12px; grid-template-columns: minmax(230px,.7fr) minmax(260px,.85fr) minmax(390px,1.45fr); }
.analytics-secondary-grid { display: grid; gap: 12px; grid-template-columns: minmax(260px,.82fr) minmax(430px,1.35fr) minmax(290px,.92fr); }
.analytics-panel { border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; padding: 14px; }
.analytics-panel-heading { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 10px; min-height: 34px; }
.analytics-panel-heading h2 { color: #172033; font-size: 12px; font-weight: 800; line-height: 1.2; margin: 0 0 3px; }
.analytics-panel-heading p { color: #738099; font-size: 8px; line-height: 1.3; margin: 0; }
.analytics-panel-heading a { color: var(--primary); font-size: 9px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.analytics-panel-heading a:hover { text-decoration: underline; }
.analytics-info { color: #66738a; font-size: 11px; }
.analytics-legend { align-items: center; color: #66738a; display: flex; font-size: 8px; gap: 12px; white-space: nowrap; }
.analytics-legend span { align-items: center; display: inline-flex; gap: 5px; }
.analytics-legend i { background: #175cd3; border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.analytics-legend i.orders { background: #c9dcfb; border-radius: 1px; height: 7px; width: 12px; }
.analytics-chart { min-width: 0; position: relative; }
.analytics-chart-large { height: 276px; }
.analytics-chart-medium { height: 220px; }
.analytics-chart canvas { display: block; max-height: 100%; width: 100% !important; }

.analytics-geo-panel { padding: 0; }
.analytics-geo-panel .analytics-panel-heading { margin: 0; min-height: 56px; padding: 13px 14px 9px; }
.analytics-map-wrap { height: 226px; overflow: hidden; position: relative; }
.analytics-map { height: 100%; min-height: 226px; width: 100%; }
.analytics-map-state { align-items: center; background: rgba(255,255,255,.94); color: #657289; display: flex; font-size: 9px; gap: 7px; inset: 0; justify-content: center; padding: 18px; position: absolute; text-align: center; z-index: 5; }
.analytics-map-state.is-hidden { display: none; }
.analytics-map-state.is-error { color: var(--danger); }
.analytics-map-key { align-items: center; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 7px; bottom: 10px; display: flex; font-size: 8px; gap: 10px; left: 10px; padding: 5px 7px; position: absolute; z-index: 2; }
.analytics-map-key span { align-items: center; display: inline-flex; gap: 4px; }
.analytics-map-key i { background: var(--primary); border: 1px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(23,92,211,.25); display: inline-block; height: 8px; width: 8px; }
.analytics-map-key i.end-customer { background: #60a5fa; height: 6px; width: 6px; }
.analytics-map-tooltip { display: grid; min-width: 170px; }
.analytics-map-tooltip strong { font-size: 11px; }
.analytics-map-tooltip span { color: #d1d9e6; font-size: 8px; margin-top: 2px; }
.analytics-map-tooltip b { font-size: 9px; margin-top: 6px; }

.analytics-products-panel { padding: 0; }
.analytics-products-panel .analytics-panel-heading { margin: 0; min-height: 58px; padding: 14px 14px 8px; }
.analytics-products-table-wrap { contain: inline-size; display: block; max-width: 100%; overflow-x: auto; width: 100%; }
.analytics-products-table { border-collapse: collapse; font-size: 8px; min-width: 570px; width: 100%; }
.analytics-products-table th { background: #f8fafc; border-bottom: 1px solid var(--line); color: #66738a; font-size: 7px; font-weight: 800; letter-spacing: .03em; padding: 8px 9px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.analytics-products-table td { border-bottom: 1px solid var(--line-soft); color: #526079; padding: 8px 9px; white-space: nowrap; }
.analytics-products-table tbody tr:last-child td { border-bottom: 0; }
.analytics-products-table tbody tr:hover { background: #fbfdff; }
.analytics-products-table td:nth-child(2) { max-width: 180px; white-space: normal; }
.analytics-products-table td:nth-child(n+4),.analytics-products-table th:nth-child(n+4) { text-align: right; }
.analytics-products-table a { color: #172033; display: grid; line-height: 1.25; text-decoration: none; }
.analytics-products-table a:hover strong { color: var(--primary); }
.analytics-products-table a small { color: #8792a5; font-size: 7px; margin-top: 2px; }
.analytics-empty { align-items: center; color: #8792a5; display: flex; font-size: 9px; gap: 7px; justify-content: center; min-height: 150px; }

.analytics-insights { display: grid; }
.analytics-insight { align-items: flex-start; display: grid; gap: 9px; grid-template-columns: 29px minmax(0,1fr); padding: 11px 0; }
.analytics-insight + .analytics-insight { border-top: 1px solid var(--line); }
.analytics-insight > span { align-items: center; background: var(--primary-soft); border-radius: 7px; color: var(--primary); display: inline-flex; font-size: 13px; height: 29px; justify-content: center; width: 29px; }
.analytics-insight > span.success { background: var(--success-soft); color: var(--success); }
.analytics-insight > span.warning { background: var(--warning-soft); color: var(--warning); }
.analytics-insight > span.danger { background: var(--danger-soft); color: var(--danger); }
.analytics-insight p { color: #34405a; font-size: 8px; line-height: 1.5; margin: 0; }
.analytics-insight small { color: #8792a5; display: block; font-size: 7px; margin-top: 3px; }
.analytics-error { align-items: center; color: var(--danger); display: flex; gap: 10px; grid-column: 1 / -1; justify-content: center; min-height: 96px; padding: 18px; }
.analytics-error i { font-size: 20px; }
.analytics-error div { display: grid; }
.analytics-error strong { font-size: 11px; }
.analytics-error span { color: #66738a; font-size: 9px; }
.analytics-methodology { align-items: center; border-top: 1px solid var(--line); color: #66738a; display: grid; font-size: 8px; gap: 7px; grid-template-columns: auto minmax(0,1fr) auto; min-height: 34px; padding: 7px 10px 0; }
.analytics-methodology i { color: var(--primary); font-size: 11px; }
.analytics-methodology p { line-height: 1.35; margin: 0; }
.analytics-methodology span { color: #8792a5; text-align: right; white-space: nowrap; }

.manager-panel { border: 0; border-radius: 11px; display: flex; flex-direction: column; min-height: calc(100dvh - 64px); overflow: visible; }
.manager-panel > .table-responsive { flex: 1 1 auto; }
.is-removing { opacity: 0 !important; pointer-events: none; transform: translateX(10px); transition: opacity .16s ease, transform .16s ease; }
.filter-bar { align-items: center; display: flex; gap: 12px; padding: 14px 16px; }
.search-field { align-items: center; border: 1px solid #ced8e6; border-radius: 8px; display: flex; flex: 0 1 330px; height: 40px; padding: 0 12px; }
.search-field:focus-within { border-color: #84adf4; box-shadow: 0 0 0 3px rgba(23, 92, 211, .09); }
.search-field i { color: var(--muted); font-size: 15px; }
.search-field input { background: transparent; border: 0; color: var(--ink); flex: 1; font-size: 13px; min-width: 0; outline: 0; padding: 0 9px; }
.filter-select { display: block; flex: 0 1 190px; min-width: 150px; }
.filter-reset { margin-left: auto; }
.bulk-bar { align-items: center; background: #f8fbff; border-bottom: 1px solid #bcd2f5; border-top: 1px solid #bcd2f5; display: flex; justify-content: space-between; min-height: 48px; padding: 7px 16px; }
.bulk-bar strong { font-size: 12px; }
.bulk-actions { align-items: center; display: flex; gap: 8px; }
.bulk-actions .select2-container { min-width: 165px; }
#bulkStatus + .select2-container .select2-selection--single { height: 32px; }
#bulkStatus + .select2-container .select2-selection__rendered { line-height: 30px; }
#bulkStatus + .select2-container .select2-selection__arrow { height: 30px; }
.bulk-actions .btn { font-size: 11px; padding: 6px 13px; text-wrap-mode: nowrap; white-space: nowrap; }
.table-responsive { scrollbar-color: #cbd5e1 transparent; }
.data-table { min-width: 850px; }
.data-table > :not(caption) > * > * { border-bottom-color: var(--line-soft); padding: 11px 13px; }
.data-table thead th { background: var(--surface-soft); border-bottom-color: var(--line); color: #47536a; font-size: 10px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.data-table tbody td { color: #33405a; font-size: 11px; height: 55px; white-space: nowrap; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table tbody tr.selected-row { background: #f4f8ff; }
.data-table thead th:last-child { background: var(--surface-soft); box-shadow: -8px 0 12px -12px rgba(20, 42, 75, .32); min-width: 76px; position: sticky; right: 0; text-align: right; width: 76px; z-index: 4; }
.data-table tbody td:last-child:not(.loading-cell):not(.empty-cell) { background: #fff; box-shadow: -8px 0 12px -12px rgba(20, 42, 75, .28); min-width: 76px; position: sticky; right: 0; width: 76px; z-index: 2; }
.data-table tbody tr:hover td:last-child:not(.loading-cell):not(.empty-cell) { background: #fbfdff; }
.data-table tbody tr.selected-row td:last-child:not(.loading-cell):not(.empty-cell) { background: #f4f8ff; }
.select-col { text-align: center; width: 42px; }
.form-check-input { border-color: #aab6c7; box-shadow: none !important; height: 15px; margin-top: 0; width: 15px; }
.sort-button { align-items: center; background: transparent; border: 0; color: inherit; display: inline-flex; font-size: inherit; font-weight: inherit; gap: 5px; padding: 0; text-transform: inherit; }
.sort-button i { color: #98a2b3; font-size: 11px; }
.sort-button.active i { color: var(--primary); }
.primary-cell { align-items: center; display: flex; gap: 10px; min-width: 190px; }
.primary-cell-link { color: inherit; text-decoration: none; }
.primary-cell-button { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0; text-align: left; width: 100%; }
.primary-cell-link:hover strong, .primary-cell-button:hover strong { color: var(--primary); }
.primary-cell-link:focus-visible, .primary-cell-button:focus-visible { border-radius: 7px; outline: 2px solid #84adf4; outline-offset: 3px; }
.entity-icon { align-items: center; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 7px; color: #64748b; display: inline-flex; flex: 0 0 32px; font-size: 14px; height: 32px; justify-content: center; }
.primary-cell strong { color: var(--ink); display: block; font-size: 11px; font-weight: 700; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.primary-cell small { color: var(--muted); display: block; font-size: 9px; margin-top: 2px; }
.status-badge { border: 1px solid; border-radius: 5px; display: inline-block; font-size: 9px; font-weight: 700; line-height: 20px; padding: 0 8px; text-transform: capitalize; }
.status-active, .status-delivered { background: var(--success-soft); border-color: #abefc6; color: #067647; }
.status-low_stock, .status-pending { background: var(--warning-soft); border-color: #fedf89; color: #b54708; }
.status-draft, .status-inactive, .status-cancelled { background: #f2f4f7; border-color: #d0d5dd; color: #475467; }
.status-confirmed, .status-processing, .status-shipped { background: var(--primary-soft); border-color: #b2ccff; color: #175cd3; }
.status-assigned, .status-picked_up, .status-in_transit, .status-out_for_delivery, .status-on_delivery { background: var(--primary-soft); border-color: #b2ccff; color: #175cd3; }
.status-off_duty { background: var(--warning-soft); border-color: #fedf89; color: #b54708; }
.status-failed { background: var(--danger-soft); border-color: #fecdca; color: var(--danger); }
.status-scheduled { background: #eef4ff; border-color: #c7d7fe; color: #3538cd; }
.status-paused { background: var(--warning-soft); border-color: #fedf89; color: #b54708; }
.status-expired { background: #f2f4f7; border-color: #d0d5dd; color: #667085; }
.table-stack { display: grid; gap: 2px; }
.table-stack strong { color: #26324a; font-size: 11px; }
.table-stack small { color: var(--muted); font-size: 9px; }
.vehicle-cell { align-items: center; display: flex; gap: 9px; min-width: 180px; }
.vehicle-thumb { align-items: center; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 7px; color: #64748b; display: inline-flex; flex: 0 0 42px; font-size: 15px; height: 32px; justify-content: center; overflow: hidden; }
.vehicle-thumb img { height: 100%; object-fit: contain; width: 100%; }
body[data-view="drivers"] .primary-cell .entity-icon.has-image img { object-fit: cover; }
.promotion-offer { display: grid; gap: 2px; }
.promotion-offer strong { color: #175cd3; font-size: 11px; font-weight: 800; }
.promotion-offer small { color: var(--muted); font-size: 9px; }
.promotion-target { max-width: 190px; }
.promotion-target strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-view="promotions"] .data-table { min-width: 1120px; }
body[data-view="promotions"] input[name="code"] { text-transform: uppercase; }
.row-actions { display: flex; gap: 3px; justify-content: flex-end; }
.row-action { align-items: center; background: transparent; border: 0; border-radius: 6px; color: #64748b; display: flex; height: 30px; justify-content: center; width: 30px; }
.row-action:hover { background: #eef3f8; color: var(--ink); }
.row-action.delete:hover { background: var(--danger-soft); color: var(--danger); }
.row-action.restore:hover { background: var(--success-soft); color: var(--success); }
.system-data-table { min-width: 980px; }
.system-primary-cell { align-items: center; background: transparent; border: 0; color: inherit; display: flex; gap: 10px; min-width: 230px; padding: 0; text-align: left; }
.system-primary-cell:hover strong { color: var(--primary); }
.system-primary-cell:focus-visible { border-radius: 7px; outline: 2px solid #84adf4; outline-offset: 3px; }
.system-primary-cell > span:last-child { display: grid; min-width: 0; }
.system-primary-cell strong { color: var(--ink); font-size: 11px; font-weight: 800; }
.system-primary-cell small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.system-event-icon { align-items: center; background: var(--primary-soft); border: 1px solid #c9daf9; border-radius: 8px; color: var(--primary); display: inline-flex; flex: 0 0 34px; height: 34px; justify-content: center; }
.system-event-icon.tone-danger { background: var(--danger-soft); border-color: #fecdca; color: var(--danger); }
.system-event-icon.tone-success { background: var(--success-soft); border-color: #abefc6; color: var(--success); }
.system-change-preview { color: #526078; display: block; max-width: 330px; overflow: hidden; text-overflow: ellipsis; }
.version-modal-body { padding: 22px 24px 26px; }
.version-meta-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.version-meta-grid > div { background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: 3px; min-width: 0; padding: 12px; }
.version-meta-grid span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.version-meta-grid strong { color: var(--ink); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-change-list { margin-top: 22px; }
.version-change-list h3 { font-size: 12px; font-weight: 800; margin: 0 0 9px; }
.version-change { border: 1px solid var(--line-soft); border-radius: 8px; display: grid; gap: 8px; margin-top: 7px; padding: 11px 12px; }
.version-change > span { color: #34405a; font-size: 10px; font-weight: 800; }
.version-change > div { align-items: center; display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
.version-change del, .version-change ins { border-radius: 6px; display: block; font-size: 10px; min-width: 0; overflow-wrap: anywhere; padding: 7px 9px; text-decoration: none; }
.version-change del { background: var(--danger-soft); color: #b42318; }
.version-change ins { background: var(--success-soft); color: #067647; }
.version-change i { color: var(--muted); text-align: center; }
.version-empty { color: var(--muted); font-size: 11px; padding: 14px 0; }
.trash-detail-note { align-items: flex-start; background: var(--primary-soft); border: 1px solid #c9daf9; border-radius: 8px; color: #34405a; display: flex; font-size: 11px; gap: 9px; line-height: 1.55; margin-top: 18px; padding: 12px; }
.trash-detail-note i { color: var(--primary); }
.loading-cell, .empty-cell { color: var(--muted) !important; height: 270px !important; text-align: center; }
.loading-cell { padding-top: 90px !important; }
.loading-cell .spinner-border { margin-right: 7px; }
.empty-state { display: inline-grid; gap: 7px; justify-items: center; }
.empty-state i { color: #98a2b3; font-size: 27px; }
.empty-state strong { color: #34405a; font-size: 13px; }
.table-footer { align-items: center; background: #fff; border-top: 1px solid var(--line); bottom: 0; color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; min-height: 64px; padding: 12px 16px; position: sticky; z-index: 20; }
.pagination { gap: 4px; }
.pagination .page-link { align-items: center; border-color: var(--line); border-radius: 6px !important; color: #34405a; display: flex; font-size: 10px; height: 30px; justify-content: center; min-width: 30px; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.disabled .page-link { color: #b1bac7; }

.category-panel { border: 0; border-radius: 11px; overflow: hidden; }
.category-toolbar { align-items: center; display: flex; justify-content: space-between; min-height: 76px; padding: 16px 20px; }
.category-toolbar h2 { font-size: 14px; font-weight: 800; margin: 0 0 4px; }
.category-toolbar p { color: var(--muted); font-size: 10px; margin: 0; }
.category-toolbar-actions { display: flex; gap: 8px; }
.category-columns, .category-row { display: grid; grid-template-columns: minmax(300px, 1fr) 90px 110px 132px; }
.category-columns { background: var(--surface-soft); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); color: #47536a; font-size: 10px; font-weight: 800; letter-spacing: .02em; padding: 11px 16px; text-transform: uppercase; }
.category-columns span:not(:first-child) { text-align: center; }
.category-branch { list-style: none; margin: 0; padding: 0; }
.category-children { max-height: 3000px; opacity: 1; overflow: hidden; transition: max-height .22s ease, opacity .18s ease; }
.category-children.collapsed { max-height: 0; opacity: 0; }
.category-row { align-items: center; border-bottom: 1px solid var(--line-soft); min-height: 66px; padding: 8px 16px 8px calc(16px + (var(--tree-depth) * 31px)); position: relative; }
.category-row:hover { background: #fbfdff; }
.category-row::before { background: transparent; content: ""; display: block; height: 1px; left: calc(4px + (var(--tree-depth) * 31px)); position: absolute; top: 33px; width: calc(var(--tree-depth) * 19px); }
.category-name-cell { align-items: center; display: flex; min-width: 0; }
.category-primary { align-items: center; background: transparent; border: 0; color: inherit; display: flex; min-width: 0; padding: 0; text-align: left; }
.category-primary:hover .category-title strong { color: var(--primary); }
.category-primary:focus-visible { border-radius: 7px; outline: 2px solid #84adf4; outline-offset: 3px; }
.tree-toggle, .tree-toggle-spacer { flex: 0 0 28px; height: 28px; margin-right: 3px; width: 28px; }
.tree-toggle { align-items: center; background: transparent; border: 0; border-radius: 6px; color: #64748b; display: inline-flex; justify-content: center; }
.tree-toggle:hover { background: #edf3f9; color: var(--ink); }
.tree-toggle i { font-size: 11px; }
.category-folder { align-items: center; background: var(--primary-soft); border-radius: 7px; color: var(--primary); display: inline-flex; flex: 0 0 34px; font-size: 16px; height: 34px; justify-content: center; margin-right: 11px; }
.category-folder.has-image { background: #fff; border: 1px solid var(--line-soft); overflow: hidden; }
.category-folder.has-image img { height: 100%; object-fit: contain; width: 100%; }
.category-title { display: grid; min-width: 0; }
.category-title strong { color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-title small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.category-product-count { color: #455168; font-size: 11px; font-weight: 700; text-align: center; }
.category-row > span:nth-child(3) { text-align: center; }
.category-actions { display: flex; gap: 3px; justify-content: center; }
.category-loading, .category-empty { align-items: center; color: var(--muted); display: flex; gap: 9px; justify-content: center; min-height: 250px; }
.category-empty { flex-direction: column; font-size: 11px; }
.category-empty i { color: #98a2b3; font-size: 28px; }
.category-empty strong { color: #34405a; font-size: 13px; }

.modal { --bs-modal-width: 900px; }
.entity-modal-dialog { max-width: var(--bs-modal-width); width: calc(100% - 32px); }
.confirm-modal-dialog { max-width: 380px; width: calc(100% - 32px); }
.confirm-modal-dialog .modal-content { border: 0; border-radius: 12px; box-shadow: 0 22px 55px rgba(12, 31, 61, .2); }
.modal-header { background: var(--primary); border-radius: 12px 12px 0 0; color: #fff; }
.modal-header .btn-close { filter: var(--bs-btn-close-white-filter); opacity: .9; }
.modal-header .btn-close:hover, .modal-header .btn-close:focus { opacity: 1; }
.entity-modal-header { align-items: flex-start; padding: 21px 24px 17px; }
.entity-modal-header .modal-title { font-size: 19px; font-weight: 800; letter-spacing: -.4px; }
.entity-modal-header p { display: none; }
.entity-modal-body { display: grid; gap: 19px 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px 24px; }
.entity-modal-footer { background: #f7f7f7; padding: 15px 24px; }
.entity-modal-footer .btn { min-width: 102px; }
.toast-container { z-index: 2000; }
.confirm-details { background: #fff8f8; border: 1px solid #fecaca; border-radius: 9px; max-height: 280px; overflow-y: auto; padding: 4px 13px; text-align: left; }
.confirm-link-blocker { padding: 11px 0; }
.confirm-link-blocker + .confirm-link-blocker { border-top: 1px solid #fee2e2; }
.confirm-link-blocker strong, .confirm-link-blocker span { display: block; }
.confirm-link-blocker strong { color: var(--ink); font-size: 12px; }
.confirm-link-blocker span { color: #b42318; font-size: 11px; font-weight: 700; margin-top: 2px; }
.confirm-link-blocker ul { color: var(--muted); font-size: 11px; margin: 7px 0 0; padding-left: 18px; }
.confirm-link-blocker li + li { margin-top: 3px; }
.field-group { margin: 0; min-width: 0; }
.field-span-all { grid-column: 1 / -1; }
.field-group .select2-container { max-width: 100%; }
.entity-image-control { align-items: center; border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 11px; grid-template-columns: 62px minmax(0, 1fr); min-height: 82px; padding: 9px; }
.entity-image-preview { align-items: center; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 8px; color: #94a3b8; display: flex; font-size: 21px; height: 62px; justify-content: center; overflow: hidden; width: 62px; }
.entity-image-preview img { height: 100%; object-fit: contain; width: 100%; }
.entity-image-preview.is-cover img { object-fit: cover; }
.entity-image-actions { min-width: 0; }
.entity-image-actions .form-control { font-size: 9px; }
.entity-image-actions .btn-link { font-size: 9px; padding: 4px 0 0; text-decoration: none; }
.entity-image-actions .form-text { font-size: 8px; margin-top: 2px; }
.image-lightbox-open { overflow: hidden; }
.image-lightbox { align-items: center; background: rgba(5, 11, 22, .92); display: flex; inset: 0; justify-content: center; opacity: 0; padding: 54px 28px 28px; position: fixed; transition: opacity .16s ease; z-index: 2200; }
.image-lightbox[hidden] { display: none; }
.image-lightbox.is-open { opacity: 1; }
.image-lightbox-close { align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #fff; display: flex; font-size: 17px; height: 40px; justify-content: center; position: absolute; right: 22px; top: 18px; transition: background .15s ease; width: 40px; }
.image-lightbox-close:hover,.image-lightbox-close:focus { background: rgba(255,255,255,.22); outline: 0; }
.image-lightbox-figure { display: grid; gap: 10px; justify-items: center; margin: 0; max-height: 100%; max-width: min(1180px,100%); }
.image-lightbox-figure img { background: #fff; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.38); display: block; max-height: calc(100vh - 105px); max-width: 100%; object-fit: contain; transform: scale(.97); transition: transform .16s ease; }
.image-lightbox.is-open .image-lightbox-figure img { transform: scale(1); }
.image-lightbox-figure figcaption { color: #fff; font-size: 12px; font-weight: 700; max-width: 760px; text-align: center; }
.entity-icon.has-image img,.vehicle-thumb.has-image img,.entity-image-preview img,.category-folder.has-image img,.product-image-frame img,.drivers-map-page img,[data-lightbox] { cursor: zoom-in; }
.supplier-geo-field { grid-column: 1 / -1; }
.supplier-geo-panel { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.supplier-geo-toolbar { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--line); display: flex; gap: 14px; justify-content: space-between; min-height: 68px; padding: 12px 14px; }
.supplier-geo-copy { min-width: 0; }
.supplier-geo-copy strong { color: #26324a; display: block; font-size: 12px; margin-bottom: 3px; }
.supplier-geo-status { color: var(--muted); display: block; font-size: 9px; line-height: 1.45; }
.supplier-geo-status.is-drawing { color: var(--primary); }
.supplier-geo-status.is-error { color: var(--danger); }
.supplier-geo-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.supplier-geo-actions .btn { align-items: center; display: inline-flex; font-size: 10px; gap: 5px; min-height: 32px; padding: 5px 9px; }
.supplier-geo-actions .btn.is-active { background: var(--primary-soft); border-color: #b2ccff; color: var(--primary); }
.supplier-geo-map { background: #eef2f6; height: 340px; position: relative; width: 100%; }
.supplier-geo-map::before { color: #7c879b; content: "Loading Google Maps…"; font-size: 11px; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.supplier-geo-map.is-ready::before { display: none; }
.supplier-geo-foot { align-items: center; background: #fff; border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: 9px; justify-content: space-between; min-height: 34px; padding: 7px 13px; }
.supplier-geo-foot strong { color: #455168; font-size: 9px; }
.customer-address-section { border: 1px solid var(--line); border-radius: 10px; grid-column: 1 / -1; overflow: hidden; }
.customer-address-heading { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--line); display: flex; gap: 14px; justify-content: space-between; min-height: 66px; padding: 12px 14px; }
.customer-address-heading h3 { color: #26324a; font-size: 12px; font-weight: 800; margin: 0 0 3px; }
.customer-address-heading p { color: var(--muted); font-size: 9px; margin: 0; }
.customer-address-heading .btn { align-items: center; display: inline-flex; flex: 0 0 auto; font-size: 10px; gap: 5px; min-height: 32px; padding: 5px 9px; }
.customer-address-list { background: #fff; }
.customer-address-row { align-items: center; border-bottom: 1px solid var(--line-soft); display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) 105px 34px; min-height: 70px; padding: 10px 12px; }
.customer-address-row:last-child { border-bottom: 0; }
.customer-address-primary { align-items: center; background: transparent; border: 0; color: inherit; display: flex; gap: 11px; min-width: 0; padding: 0; text-align: left; }
.customer-address-primary:hover strong { color: var(--primary); }
.customer-address-icon { align-items: center; background: var(--primary-soft); border-radius: 8px; color: var(--primary); display: inline-flex; flex: 0 0 36px; font-size: 16px; height: 36px; justify-content: center; }
.customer-address-copy { display: grid; min-width: 0; }
.customer-address-copy > span { align-items: center; display: flex; gap: 7px; min-width: 0; }
.customer-address-copy strong { color: #26324a; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-address-copy small { color: var(--muted); font-size: 9px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address-default-badge { background: var(--primary-soft); border: 1px solid #b2ccff; border-radius: 999px; color: var(--primary); flex: 0 0 auto; font-size: 8px; font-weight: 800; padding: 2px 6px; text-transform: uppercase; }
.customer-address-coordinates { color: #657188; display: grid; font-size: 9px; line-height: 1.45; }
.customer-address-edit { align-items: center; background: transparent; border: 0; border-radius: 6px; color: #64748b; display: flex; height: 30px; justify-content: center; width: 30px; }
.customer-address-edit:hover { background: var(--primary-soft); color: var(--primary); }
.customer-address-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; font-size: 10px; justify-content: center; min-height: 118px; padding: 18px; text-align: center; }
.customer-address-empty i { color: #94a3b8; font-size: 22px; margin-bottom: 7px; }
.customer-address-empty strong { color: #34405a; font-size: 11px; margin-bottom: 3px; }
.address-default-toggle { align-items: center; border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 10px; grid-column: 1 / -1; min-height: 55px; padding: 10px 12px; }
.address-default-toggle input { flex: 0 0 auto; margin: 0; }
.address-default-toggle span { display: grid; }
.address-default-toggle strong { color: #34405a; font-size: 11px; }
.address-default-toggle small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.customer-address-map-panel { border: 1px solid var(--line); border-radius: 10px; grid-column: 1 / -1; overflow: hidden; }
.customer-address-map-toolbar { align-items: center; background: var(--surface-soft); border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; min-height: 58px; padding: 10px 13px; }
.customer-address-map-toolbar > div:first-child { display: grid; min-width: 0; }
.customer-address-map-toolbar strong { color: #26324a; font-size: 11px; }
.customer-address-map-toolbar span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.customer-address-map-toolbar span.is-error { color: var(--danger); }
.customer-address-map-toolbar .btn { align-items: center; display: inline-flex; font-size: 10px; gap: 5px; min-height: 31px; padding: 5px 9px; }
.customer-address-map { background: #eef2f6; height: 300px; position: relative; width: 100%; }
.customer-address-map::before { color: #7c879b; content: "Loading Google Maps…"; font-size: 11px; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.customer-address-map.is-ready::before { display: none; }
.customer-address-map-foot { background: #fff; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; min-height: 32px; padding: 7px 12px; }
.customer-address-modal-footer { align-items: center; }
.address-delete-hint { color: var(--danger); font-size: 9px; margin-right: auto; }
.danger-icon { align-items: center; background: var(--danger-soft); border-radius: 50%; color: var(--danger); display: inline-flex; font-size: 20px; height: 48px; justify-content: center; width: 48px; }
.modal-content { border: 0; border-radius: 12px; box-shadow: var(--shadow); }
.modal-header, .modal-footer { border-color: var(--line); }
.toast { background: #fff; color: var(--ink); font-size: 12px; }
.sidebar-scrim { display: none; }

.detail-breadcrumb { align-items: center; color: var(--muted); display: inline-flex; font-size: 11px; font-weight: 700; gap: 6px; margin-bottom: 10px; text-decoration: none; }
.detail-breadcrumb:hover { color: var(--primary); }
.product-detail-head { margin-bottom: 18px; }
.product-detail-shell { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.product-detail-tabs { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 4px; min-height: 58px; padding: 0 18px; }
.product-detail-tabs button { align-items: center; align-self: stretch; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); display: inline-flex; font-size: 12px; font-weight: 700; gap: 8px; padding: 0 16px; }
.product-detail-tabs button:hover { color: var(--ink); }
.product-detail-tabs button.active { border-bottom-color: var(--primary); color: var(--primary); }
.product-detail-tabs button i { font-size: 15px; }
.tab-count { align-items: center; background: #eef2f7; border-radius: 999px; color: #4b5870; display: inline-flex; font-size: 9px; height: 20px; justify-content: center; min-width: 20px; padding: 0 6px; }
.product-detail-tabs button.active .tab-count { background: var(--primary-soft); color: var(--primary); }
.product-detail-content { min-height: 510px; }
.product-info-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 510px; }
.product-image-panel { background: var(--surface-soft); border-right: 1px solid var(--line); padding: 24px; }
.product-image-panel > small { color: var(--muted); display: block; font-size: 9px; line-height: 1.5; margin-top: 9px; text-align: center; }
.product-image-frame { align-items: center; aspect-ratio: 1 / 1; background: #fff; border: 1px dashed #b9c5d5; border-radius: 10px; color: #8b97aa; display: flex; flex-direction: column; gap: 9px; justify-content: center; margin-bottom: 14px; overflow: hidden; position: relative; }
.product-image-frame i { font-size: 31px; }
.product-image-frame span { font-size: 10px; font-weight: 600; }
.product-image-frame img { height: 100%; object-fit: contain; width: 100%; }
.product-image-frame.uploading::after { align-items: center; background: rgba(255,255,255,.84); content: "Uploading…"; display: flex; font-size: 11px; font-weight: 700; inset: 0; justify-content: center; position: absolute; }
.product-info-main { min-width: 0; padding: 24px; }
.product-section-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; margin-bottom: 20px; }
.product-section-heading h2 { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.product-section-heading p { color: var(--muted); font-size: 10px; margin: 0; }
.product-summary-rail { border: 1px solid var(--line); border-radius: 9px; display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 23px; overflow: hidden; }
.product-summary-rail > div { display: grid; gap: 4px; min-height: 75px; padding: 15px 18px; }
.product-summary-rail > div + div { border-left: 1px solid var(--line); }
.product-summary-rail span { color: var(--muted); font-size: 9px; font-weight: 600; }
.product-summary-rail strong { font-size: 18px; letter-spacing: -.3px; }
.product-info-grid { display: grid; gap: 19px 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-description-field { grid-column: 1 / -1; }
.product-description-field textarea { min-height: 138px; resize: vertical; }
.supplier-section-heading { margin: 0; min-height: 78px; padding: 16px 18px; }
.supplier-filter-bar { align-items: center; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; padding: 14px 16px; }
.supplier-data-table { min-width: 780px; }
.table-link { color: var(--primary); font-weight: 700; text-decoration: none; }
.table-link:hover { color: var(--primary-dark); text-decoration: underline; }
.row-action.view { text-decoration: none; }
.entity-icon.has-image { background: #fff; overflow: hidden; }
.entity-icon.has-image img { height: 100%; object-fit: contain; width: 100%; }

.product-modal-dialog { max-width: var(--bs-modal-width); width: calc(100% - 32px); }
.product-modal-content { border: 0; border-radius: 12px; box-shadow: 0 28px 90px rgba(13, 35, 69, .26); overflow: hidden; }
.product-modal-header { min-height: 68px; padding: 18px 26px; }
.product-modal-body { background: #fff; padding: 0; }
.product-modal-body .product-detail-shell { border: 0; border-radius: 0; }
.product-modal-footer { min-height: 66px; }

.order-modal-dialog { max-width: var(--bs-modal-width); width: calc(100% - 32px); }
.order-modal-content { border: 0; border-radius: 12px; box-shadow: 0 28px 90px rgba(13, 35, 69, .26); overflow: hidden; }
.order-modal-header { min-height: 68px; padding: 18px 26px; }
.order-tabs { background: #fff; border-bottom: 1px solid var(--line); display: flex; gap: 4px; min-height: 54px; padding: 0 24px; }
.order-tabs button { align-items: center; background: transparent; border: 0; border-bottom: 2px solid transparent; color: #61708b; display: flex; font-size: 12px; font-weight: 750; gap: 7px; margin-bottom: -1px; padding: 0 14px; }
.order-tabs button:hover { color: var(--primary); }
.order-tabs button.active { border-bottom-color: var(--primary); color: var(--primary); }
.order-tab-count { align-items: center; background: #edf2f7; border-radius: 999px; color: #526079; display: inline-flex; font-size: 10px; font-weight: 800; height: 19px; justify-content: center; min-width: 19px; padding: 0 6px; }
.order-tabs button.active .order-tab-count { background: var(--primary-soft); color: var(--primary); }
.order-modal-body { background: #fbfcfe; padding: 0; }
.order-modal-body > .tab-content { min-height: 520px; }
.order-modal-body .tab-pane { padding: 23px 26px 27px; }
.order-meta-grid { display: grid; gap: 18px; grid-template-columns: 1.2fr .8fr .8fr; }
.order-parties-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
.order-party-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 17px; }
.order-card-title { align-items: center; display: flex; gap: 11px; margin-bottom: 14px; }
.order-card-title > span { align-items: center; background: var(--primary-soft); border-radius: 8px; color: var(--primary); display: flex; flex: 0 0 34px; height: 34px; justify-content: center; }
.order-card-title > div { display: grid; gap: 1px; }
.order-card-title small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.order-card-title strong { color: var(--ink); font-size: 13px; }
.order-party-details { color: var(--muted); display: grid; font-size: 11px; gap: 4px; line-height: 1.45; min-height: 44px; padding: 12px 2px 0; }
.order-party-details strong { color: #27334c; font-size: 12px; }
.order-items-section { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 20px; overflow: hidden; }
.order-section-heading { align-items: center; display: flex; justify-content: space-between; padding: 16px 18px; }
.order-section-heading h3 { font-size: 14px; font-weight: 800; letter-spacing: -.2px; margin: 0 0 3px; }
.order-section-heading p { color: var(--muted); font-size: 10px; margin: 0; }
.order-items-wrap { border-top: 1px solid var(--line-soft); }
.order-items-table { min-width: 850px; table-layout: fixed; }
.order-items-table th { background: #f7f9fc; border-bottom-color: var(--line); color: #66738b; font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 9px 11px; text-transform: uppercase; }
.order-items-table td { border-bottom-color: var(--line-soft); padding: 10px 11px; }
.order-items-table tbody tr:last-child td { border-bottom: 0; }
.order-items-table th:nth-child(1), .order-items-table td:nth-child(1) { width: 34%; }
.order-items-table th:nth-child(2), .order-items-table td:nth-child(2) { width: 17%; }
.order-items-table th:nth-child(3), .order-items-table td:nth-child(3) { width: 11%; }
.order-items-table th:nth-child(4), .order-items-table td:nth-child(4) { width: 17%; }
.order-items-table th:nth-child(5), .order-items-table td:nth-child(5) { width: 15%; }
.order-items-table th:last-child, .order-items-table td:last-child { width: 48px; }
.order-items-table th:last-child { background: #f7f9fc; box-shadow: -8px 0 12px -12px rgba(20, 42, 75, .32); position: sticky; right: 0; z-index: 4; }
.order-items-table td:last-child { background: #fff; box-shadow: -8px 0 12px -12px rgba(20, 42, 75, .28); position: sticky; right: 0; z-index: 2; }
.order-items-table tbody tr:hover td:last-child { background: #fbfdff; }
.order-items-table .form-control, .order-items-table .select2-selection--single { min-height: 37px; }
.order-items-table .select2-container--default .select2-selection--single { height: 37px; }
.order-items-table .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 35px; }
.order-items-table .select2-container--default .select2-selection--single .select2-selection__arrow { height: 35px; }
.order-item-sku { color: #5d6b83; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.order-item-total { color: #24304a; font-size: 12px; white-space: nowrap; }
.currency-input { position: relative; }
.currency-input > span { color: #788399; font-size: 9px; font-weight: 700; pointer-events: none; position: absolute; right: 11px; top: 50%; transform: translateY(-50%); z-index: 1; }
.currency-input > .form-control { padding-right: 49px; }
.order-money-input > span { right: 8px; }
.order-money-input .form-control { padding-right: 39px; }
.order-summary-grid { align-items: start; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 340px; margin-top: 20px; }
.order-internal-notes textarea { min-height: 141px; resize: vertical; }
.order-totals-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 6px 17px; }
.order-total-row { align-items: center; border-bottom: 1px solid var(--line-soft); color: #536179; display: flex; font-size: 11px; justify-content: space-between; min-height: 43px; margin: 0; }
.order-total-row strong { color: #26324a; font-size: 12px; }
.order-total-input { width: 128px; }
.order-total-row .form-control { font-size: 11px; min-height: 31px; padding: 4px 44px 4px 8px; text-align: right; width: 100%; }
.order-grand-total { border: 0; color: var(--ink); font-size: 13px; font-weight: 800; min-height: 53px; }
.order-grand-total strong { color: var(--primary); font-size: 19px; }
.order-modal-footer { min-height: 66px; }
.order-tab-heading { border-bottom: 1px solid var(--line); margin: -23px -26px 20px; padding: 18px 26px; }
.order-note-composer { align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
.order-note-composer.is-disabled { background: #f6f8fb; opacity: .72; }
.order-note-composer textarea { min-height: 82px; resize: vertical; }
.order-note-list { display: grid; gap: 10px; margin-top: 17px; }
.order-note-card { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 12px; grid-template-columns: 32px minmax(0, 1fr); padding: 14px; }
.order-note-avatar { align-items: center; background: var(--primary-soft); border-radius: 50%; color: var(--primary); display: flex; height: 32px; justify-content: center; width: 32px; }
.order-note-meta, .order-history-meta { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.order-note-meta strong, .order-history-meta strong { color: #2b3750; font-size: 11px; }
.order-note-meta time, .order-history-meta time { color: #8994a7; font-size: 9px; white-space: nowrap; }
.order-note-card p, .order-history-item p { color: #56637b; font-size: 11px; line-height: 1.6; margin: 5px 0 0; white-space: pre-wrap; }
.order-history-list { margin-top: 2px; }
.order-history-item { display: grid; gap: 14px; grid-template-columns: 34px minmax(0, 1fr); padding: 0 0 20px; position: relative; }
.order-history-item::before { background: #dce4ef; content: ''; left: 16px; position: absolute; top: 34px; bottom: 0; width: 1px; }
.order-history-item:last-child::before { display: none; }
.order-history-icon { align-items: center; background: #fff; border: 1px solid #cfd9e7; border-radius: 50%; color: var(--primary); display: flex; height: 34px; justify-content: center; position: relative; width: 34px; z-index: 1; }
.order-history-item > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; }
.order-history-item small { color: #8a95a8; display: block; font-size: 9px; margin-top: 6px; }
.order-tab-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; justify-content: center; min-height: 300px; text-align: center; }
.order-tab-empty i { color: #9aabc1; font-size: 27px; margin-bottom: 11px; }
.order-tab-empty strong { color: #39465e; font-size: 13px; }
.order-tab-empty span { font-size: 10px; margin-top: 4px; }
.order-tab-loading { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 8px; justify-content: center; min-height: 240px; }

.shipping-modal-body #shippingInfoPane { padding-top: 20px; }
.shipping-context-rail { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 21px; overflow: hidden; }
.shipping-context-rail > div { display: grid; gap: 4px; min-height: 68px; padding: 13px 16px; }
.shipping-context-rail > div + div { border-left: 1px solid var(--line); }
.shipping-context-rail span { color: var(--muted); font-size: 9px; font-weight: 700; }
.shipping-context-rail strong { color: #26324a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipping-form-grid { display: grid; gap: 18px 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shipping-span-all { grid-column: 1 / -1; }
.shipping-form-grid textarea { min-height: 82px; resize: vertical; }
.shipping-form-grid #shippingNotes { min-height: 98px; }
.shipping-modal-body .tab-content { min-height: 500px; }

.login-page { background: #fff; min-height: 100vh; }
.login-shell { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); min-height: 100vh; }
.login-story { background: #0b1633; color: #fff; display: flex; flex-direction: column; overflow: hidden; padding: 44px 56px; position: relative; }
.login-brand { align-items: center; display: flex; font-size: 20px; font-weight: 800; gap: 10px; position: relative; z-index: 2; }
.login-story-copy { margin: auto 0; max-width: 500px; position: relative; z-index: 2; }
.login-story-copy h1 { font-size: clamp(36px, 4.4vw, 64px); font-weight: 800; letter-spacing: -2.4px; line-height: 1.05; margin: 0 0 22px; }
.login-story-copy p { color: #b9c5dc; font-size: 16px; line-height: 1.7; margin: 0; max-width: 430px; }
.login-visual { inset: 0; opacity: .75; pointer-events: none; position: absolute; }
.visual-line { border: 1px solid rgba(132, 173, 255, .15); border-radius: 50%; position: absolute; }
.line-one { height: 620px; right: -360px; top: 14%; width: 620px; }
.line-two { height: 360px; right: -175px; top: 31%; width: 360px; }
.visual-node { background: #2e90fa; border: 6px solid rgba(255,255,255,.13); border-radius: 50%; height: 26px; position: absolute; width: 26px; }
.node-one { right: 130px; top: 24%; }.node-two { bottom: 21%; right: 54px; }.node-three { bottom: 33%; right: 245px; }
.login-footnote { color: #7f8ca5; font-size: 11px; margin: 0; position: relative; z-index: 2; }
.login-form-wrap { align-items: center; display: flex; justify-content: center; padding: 42px; }
.login-form { max-width: 390px; width: 100%; }
.login-form h2 { font-size: 29px; font-weight: 800; letter-spacing: -.8px; margin: 0 0 7px; }
.login-form > p { font-size: 13px; margin-bottom: 30px; }
.login-form .form-control-lg { font-size: 14px; min-height: 49px; }
.login-form .btn-lg { font-size: 14px; min-height: 49px; }
.security-note { color: var(--muted); font-size: 10px !important; line-height: 1.5; margin: 22px auto 0 !important; max-width: 300px; text-align: center; }
.mobile-brand { align-items: center; display: none; font-size: 18px; font-weight: 800; gap: 9px; margin-bottom: 42px; }

/* Customer order heatmap */
.heatmap-page { background: #f7f9fc; min-height: calc(100vh - 64px); padding: 15px; }
.heatmap-toolbar { align-items: flex-end; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 28px; justify-content: space-between; margin-bottom: 12px; padding: 12px 14px; }
.heatmap-filter-group { display: grid; gap: 7px; }
.heatmap-period-group { justify-items: end; }
.heatmap-filter-label { color: #778298; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.heatmap-segmented { align-items: center; background: #f4f6f9; border: 1px solid #e4e9f1; border-radius: 8px; display: inline-flex; gap: 3px; padding: 3px; }
.heatmap-segmented button { align-items: center; background: transparent; border: 0; border-radius: 6px; color: #667187; display: inline-flex; font-family: inherit; font-size: 10px; font-weight: 700; gap: 6px; min-height: 31px; padding: 6px 11px; transition: background .16s ease,color .16s ease,box-shadow .16s ease; white-space: nowrap; }
.heatmap-segmented button:hover { color: var(--primary); }
.heatmap-segmented button.is-active { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.09); color: var(--primary); }
.heatmap-metrics { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 12px; overflow: hidden; }
.heatmap-metrics article { align-items: center; display: flex; gap: 12px; min-height: 88px; padding: 14px 17px; position: relative; }
.heatmap-metrics article + article { border-left: 1px solid var(--line); }
.heatmap-metrics article > div { display: grid; min-width: 0; }
.heatmap-metrics small { color: #68748a; font-size: 9px; font-weight: 700; }
.heatmap-metrics strong { color: #1d2939; font-size: 20px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatmap-metrics em { color: #8590a3; font-size: 8px; font-style: normal; }
.heatmap-metric-icon { align-items: center; border-radius: 10px; display: inline-flex; flex: 0 0 40px; font-size: 16px; height: 40px; justify-content: center; }
.heatmap-metric-icon.customers { background: #eef5ff; color: #1e63d6; }
.heatmap-metric-icon.people { background: #f3efff; color: #7252c7; }
.heatmap-metric-icon.orders { background: #edfbf4; color: #209765; }
.heatmap-metric-icon.sales { background: #fff5e9; color: #d27b18; }
.heatmap-workspace { display: grid; gap: 12px; grid-template-columns: minmax(0,1fr) 318px; }
.heatmap-map-card,.heatmap-insights { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.heatmap-map-heading { align-items: center; display: flex; justify-content: space-between; min-height: 66px; padding: 12px 16px; }
.heatmap-map-heading h2,.heatmap-insights h2 { color: #253046; font-size: 13px; font-weight: 800; margin: 0; }
.heatmap-map-heading p { color: var(--muted); font-size: 9px; margin: 2px 0 0; }
.heatmap-legend { align-items: center; color: #7c879a; display: flex; font-size: 8px; font-weight: 700; gap: 7px; }
.heatmap-legend i { background: linear-gradient(90deg,#4778e8 0%,#7a55d9 28%,#ef4e7b 56%,#ff9f36 78%,#ffe15a 100%); border-radius: 10px; display: block; height: 7px; width: 118px; }
.heatmap-map-wrap { border-top: 1px solid var(--line); min-height: 590px; position: relative; }
.heatmap-map { height: 590px; width: 100%; }
.heatmap-map-state { align-items: center; background: rgba(255,255,255,.94); color: #536078; display: flex; font-size: 10px; gap: 9px; inset: 0; justify-content: center; position: absolute; z-index: 5; }
.heatmap-map-state.is-hidden { display: none; }
.heatmap-map-state.is-error { color: var(--danger); flex-direction: column; text-align: center; }
.heatmap-map-state.is-error i { font-size: 24px; }
.heatmap-map-key { align-items: center; backdrop-filter: blur(7px); background: rgba(255,255,255,.92); border: 1px solid rgba(218,225,236,.95); border-radius: 7px; bottom: 16px; box-shadow: 0 5px 18px rgba(28,39,60,.11); color: #5c6880; display: flex; font-size: 8px; font-weight: 700; gap: 13px; left: 16px; padding: 7px 10px; position: absolute; z-index: 4; }
.heatmap-map-key span { align-items: center; display: flex; gap: 5px; }
.heatmap-map-key i { border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(34,48,73,.15); display: inline-block; height: 9px; width: 9px; }
.heatmap-map-key .customer-dot { background: #175cd3; }
.heatmap-map-key .end-customer-dot { background: #7a55d9; }
.heatmap-insights { display: flex; flex-direction: column; }
.heatmap-insights-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; min-height: 66px; padding: 12px 15px; }
.heatmap-insights-heading > div > span { color: var(--muted); display: block; font-size: 8px; font-weight: 700; margin-bottom: 2px; text-transform: uppercase; }
.heatmap-period-badge { background: #eef5ff; border-radius: 20px; color: var(--primary); font-size: 8px; font-weight: 800; padding: 5px 9px; white-space: nowrap; }
.heatmap-hotspots { flex: 1; min-height: 0; padding: 4px 0; }
.heatmap-hotspot { align-items: center; background: transparent; border: 0; border-bottom: 1px solid #edf1f6; color: inherit; display: grid; font-family: inherit; gap: 10px; grid-template-columns: 27px minmax(0,1fr) auto; min-height: 61px; padding: 9px 14px; text-align: left; width: 100%; }
.heatmap-hotspot:hover { background: #f8fbff; }
.heatmap-hotspot-rank { align-items: center; background: #f0f4fa; border-radius: 7px; color: #657289; display: flex; font-size: 9px; font-weight: 800; height: 27px; justify-content: center; }
.heatmap-hotspot:first-child .heatmap-hotspot-rank { background: #fff1d6; color: #b76b04; }
.heatmap-hotspot-copy { display: grid; min-width: 0; }
.heatmap-hotspot-copy strong { color: #273249; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatmap-hotspot-copy small { color: #8a94a6; font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatmap-hotspot-value { display: grid; justify-items: end; }
.heatmap-hotspot-value strong { color: var(--primary); font-size: 12px; line-height: 1; }
.heatmap-hotspot-value small { color: #8a94a6; font-size: 7px; margin-top: 3px; text-transform: uppercase; }
.heatmap-note { align-items: flex-start; background: #f7f9fc; border-top: 1px solid var(--line); color: #738097; display: flex; font-size: 8px; gap: 8px; line-height: 1.55; padding: 11px 14px; }
.heatmap-note i { color: var(--primary); font-size: 11px; margin-top: 1px; }
.heatmap-note p { margin: 0; }
.heatmap-empty { align-items: center; color: #8792a5; display: flex; font-size: 9px; gap: 8px; justify-content: center; min-height: 130px; padding: 20px; text-align: center; }
.heatmap-tooltip { min-width: 180px; }
.heatmap-tooltip strong { display: block; font-size: 11px; margin-bottom: 3px; }
.heatmap-tooltip span { display: block; font-size: 9px; opacity: .82; }
.heatmap-tooltip b { color: #fff; display: inline-block; font-size: 10px; margin-top: 6px; }

@media (max-width: 1180px) {
    .heatmap-workspace { grid-template-columns: minmax(0,1fr) 288px; }
    .heatmap-metrics article { padding: 13px; }
    .heatmap-metric-icon { flex-basis: 36px; height: 36px; }
}

@media (max-width: 980px) {
    .heatmap-workspace { grid-template-columns: 1fr; }
    .heatmap-insights { max-height: none; }
    .heatmap-hotspots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .heatmap-hotspot:nth-child(odd) { border-right: 1px solid #edf1f6; }
}

@media (max-width: 760px) {
    .heatmap-page { min-height: calc(100vh - 58px); padding: 10px; }
    .heatmap-toolbar { align-items: stretch; flex-direction: column; gap: 11px; }
    .heatmap-period-group { justify-items: start; }
    .heatmap-segmented { max-width: 100%; overflow-x: auto; }
    .heatmap-segmented button { padding-left: 9px; padding-right: 9px; }
    .heatmap-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .heatmap-metrics article + article { border-left: 0; }
    .heatmap-metrics article:nth-child(even) { border-left: 1px solid var(--line); }
    .heatmap-metrics article:nth-child(n+3) { border-top: 1px solid var(--line); }
    .heatmap-map-heading { align-items: flex-start; gap: 12px; }
    .heatmap-legend i { width: 72px; }
    .heatmap-map-wrap,.heatmap-map { height: 480px; min-height: 480px; }
    .heatmap-hotspots { grid-template-columns: 1fr; }
    .heatmap-hotspot:nth-child(odd) { border-right: 0; }
}

@media (max-width: 430px) {
    .heatmap-metrics { grid-template-columns: 1fr; }
    .heatmap-metrics article:nth-child(even) { border-left: 0; }
    .heatmap-metrics article + article { border-top: 1px solid var(--line); }
    .heatmap-map-heading { display: grid; }
    .heatmap-legend { justify-content: space-between; }
    .heatmap-legend i { flex: 1; }
}

@media (max-width: 1100px) {
    .metric { padding: 18px 16px; }
    .metric-icon { flex-basis: 40px; height: 40px; }
    .metric-copy strong { font-size: 18px; }
    .overview-grid { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 1380px) {
    .analytics-metric-rail { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .analytics-metric:nth-child(4)::before { display: none; }
    .analytics-metric:nth-child(n+4) { border-top: 1px solid var(--line); }
    .analytics-demographic-grid { grid-template-columns: minmax(220px,.8fr) minmax(260px,1fr); }
    .analytics-geo-panel { grid-column: 1 / -1; }
    .analytics-map-wrap,.analytics-map { height: 300px; min-height: 300px; }
    .analytics-secondary-grid { grid-template-columns: minmax(280px,.8fr) minmax(480px,1.35fr); }
    .analytics-insights-panel { grid-column: 1 / -1; }
    .analytics-insights { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .analytics-insight { padding-left: 13px; padding-right: 13px; }
    .analytics-insight + .analytics-insight { border-left: 1px solid var(--line); border-top: 0; }
}

@media (max-width: 1050px) {
    .analytics-filters { grid-template-columns: repeat(2,minmax(0,1fr)) auto; }
    .analytics-refresh { grid-column: 3; grid-row: 1 / span 2; height: 100%; min-height: 64px; }
    .analytics-primary-grid { grid-template-columns: 1fr; }
    .analytics-chart-large { height: 290px; }
    .analytics-secondary-grid { grid-template-columns: 1fr; }
    .analytics-insights-panel { grid-column: auto; }
    .analytics-insights { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 248px; }
    .sidebar { box-shadow: var(--shadow); transform: translateX(-102%); transition: transform .22s ease; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-scrim { background: rgba(15, 23, 42, .42); inset: 0; position: fixed; z-index: 1030; }
    body.sidebar-open .sidebar-scrim { display: block; }
    .main-column { margin-left: 0; width: 100%; }
    .sidebar-toggle { display: inline-flex; flex: 0 0 38px; }
    .topbar { gap: 12px; }
    .metric-rail { grid-template-columns: repeat(2, 1fr); }
    .metric:nth-child(3)::before { display: none; }
    .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
    .overview-grid { grid-template-columns: 1fr; }
    .quick-links { grid-template-columns: 1fr; }
    .quick-links a + a { border-left: 0; border-top: 1px solid var(--line); }
    .login-shell { grid-template-columns: minmax(330px, .75fr) minmax(420px, 1.25fr); }
    .login-story { padding: 36px; }
    .entity-modal-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-info-layout { grid-template-columns: 220px minmax(0, 1fr); }
    .product-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-meta-grid .field-group:first-child { grid-column: 1 / -1; }
    .order-summary-grid { grid-template-columns: minmax(0, 1fr) 300px; }
    .shipping-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .analytics-filters { grid-template-columns: repeat(4,minmax(180px,1fr)) auto; overflow-x: auto; }
    .analytics-filter { min-width: 180px; }
    .analytics-refresh { grid-column: auto; grid-row: auto; height: 37px; min-height: 37px; }
    .analytics-secondary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .topbar { height: 58px; padding: 0 15px; }
    .topbar-manager { gap: 10px; }
    .topbar-title h1 { font-size: 17px; margin-bottom: 0; }
    .topbar-title p { display: none; }
    .topbar-manager .btn { min-width: 0; padding-left: 11px; padding-right: 11px; }
    .page-head { align-items: center; }
    .page-head h1 { font-size: 23px; }
    .page-head p { font-size: 11px; }
    .page-head .btn { min-width: 0; }
    .metric-rail { grid-template-columns: 1fr; }
    .metric { min-height: 91px; }
    .metric + .metric::before { display: none; }
    .metric:nth-child(n+2) { border-top: 1px solid var(--line); }
    .chart-panel, .activity-panel { padding: 16px; }
    .chart-wrap { height: 240px; }
    .filter-bar { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
    .search-field { flex-basis: auto; grid-column: 1 / -1; max-width: none; }
    .filter-select { min-width: 0; width: 100%; }
    .filter-reset { grid-column: 1 / -1; margin: 0; }
    .system-filter-bar .filter-select { min-width: 0; }
    .bulk-bar { align-items: flex-start; gap: 8px; }
    .bulk-actions { flex-wrap: wrap; justify-content: flex-end; }
    .bulk-actions .select2-container { min-width: 142px; width: auto !important; }
    .table-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
    .category-toolbar { align-items: flex-start; gap: 14px; }
    .category-toolbar-actions { flex-direction: column; }
    .category-columns { display: none; }
    .category-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 76px; padding-left: calc(8px + (var(--tree-depth) * 18px)); padding-right: 8px; }
    .category-row::before { display: none; }
    .category-product-count, .category-row > span:nth-child(3) { display: none; }
    .category-actions { justify-content: flex-end; }
    .tree-toggle, .tree-toggle-spacer { flex-basis: 24px; width: 24px; }
    .category-folder { flex-basis: 31px; height: 31px; margin-right: 8px; }
    .entity-modal-dialog { margin: 12px; max-width: none; }
    .entity-modal-header, .entity-modal-body, .entity-modal-footer { padding-left: 18px; padding-right: 18px; }
    .entity-modal-body { grid-template-columns: 1fr; }
    .version-meta-grid { grid-template-columns: 1fr; }
    .version-change > div { grid-template-columns: 1fr; }
    .version-change i { transform: rotate(90deg); }
    .supplier-geo-toolbar { align-items: stretch; flex-direction: column; }
    .supplier-geo-actions { justify-content: flex-start; }
    .supplier-geo-map { height: 280px; }
    .supplier-geo-foot { align-items: flex-start; flex-direction: column; gap: 3px; }
    .customer-address-heading { align-items: flex-start; }
    .customer-address-row { grid-template-columns: minmax(0, 1fr) 30px; }
    .customer-address-coordinates { display: none; }
    .customer-address-copy small { white-space: normal; }
    .customer-address-map-toolbar { align-items: stretch; flex-direction: column; }
    .customer-address-map-toolbar > div:last-child { align-self: flex-start; }
    .customer-address-map { height: 260px; }
    .customer-address-modal-footer { flex-wrap: wrap; }
    .address-delete-hint { order: 4; text-align: left; width: 100%; }
    .product-detail-head { align-items: flex-end; }
    .product-detail-tabs { overflow-x: auto; padding: 0 8px; }
    .product-detail-tabs button { flex: 0 0 auto; padding: 0 12px; }
    .product-info-layout { grid-template-columns: 1fr; }
    .product-image-panel { border-bottom: 1px solid var(--line); border-right: 0; display: grid; gap: 12px; grid-template-columns: 112px minmax(0, 1fr); padding: 18px; }
    .product-image-frame { grid-row: 1 / span 2; margin: 0; }
    .product-image-panel > small { grid-column: 1 / -1; margin: 0; text-align: left; }
    .product-info-main { padding: 18px; }
    .product-section-heading { align-items: flex-start; }
    .product-section-heading .btn { flex: 0 0 auto; }
    .product-summary-rail { grid-template-columns: 1fr; }
    .product-summary-rail > div { min-height: 63px; }
    .product-summary-rail > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .product-info-grid { grid-template-columns: 1fr; }
    .supplier-section-heading { align-items: center; }
    .supplier-filter-bar { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
    .supplier-filter-bar .search-field { grid-column: 1 / -1; }
    .supplier-filter-bar .filter-reset { grid-column: auto; }
    .product-modal-dialog { height: calc(100% - 16px); margin: 8px; width: calc(100% - 16px); }
    .product-modal-content { border-radius: 10px; }
    .product-modal-header { min-height: 60px; padding: 15px 18px; }
    .product-modal-footer { min-height: 62px; padding: 12px 16px; }
    .order-modal-dialog { height: calc(100% - 16px); margin: 8px; width: calc(100% - 16px); }
    .order-modal-content { border-radius: 10px; }
    .order-modal-header { min-height: 60px; padding: 15px 18px; }
    .order-tabs { min-height: 50px; overflow-x: auto; padding: 0 8px; }
    .order-tabs button { flex: 0 0 auto; padding: 0 10px; }
    .order-modal-body .tab-pane { padding: 18px 16px 22px; }
    .order-meta-grid, .order-parties-grid, .order-summary-grid { grid-template-columns: 1fr; }
    .order-meta-grid .field-group:first-child { grid-column: auto; }
    .order-parties-grid { gap: 12px; margin-top: 14px; }
    .order-items-section { margin-left: -16px; margin-right: -16px; border-left: 0; border-radius: 0; border-right: 0; }
    .order-section-heading { align-items: flex-start; gap: 12px; padding: 14px 16px; }
    .order-summary-grid { gap: 17px; margin-top: 17px; }
    .order-totals-card { padding: 5px 14px; }
    .order-tab-heading { margin: -18px -16px 16px; padding: 15px 16px; }
    .order-note-composer { align-items: stretch; grid-template-columns: 1fr; }
    .order-note-composer .btn { justify-self: end; }
    .order-modal-footer { min-height: 62px; padding: 12px 16px; }
    .shipping-context-rail { grid-template-columns: 1fr; }
    .shipping-context-rail > div { min-height: 58px; padding: 11px 13px; }
    .shipping-context-rail > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .shipping-form-grid { grid-template-columns: 1fr; }
    .shipping-span-all { grid-column: auto; }
    .login-shell { display: block; }
    .login-story { display: none; }
    .login-form-wrap { min-height: 100vh; padding: 28px 22px; }
    .mobile-brand { display: flex; }
    body[data-view="overview"] .content { padding: 10px; }
    body[data-view="overview"] { max-width: 100vw; overflow-x: hidden; }
    body[data-view="overview"] .main-column,
    body[data-view="overview"] .content { max-width: 100vw; overflow-x: hidden; }
    .analytics-dashboard { gap: 10px; }
    .analytics-filters { border-left: 0; border-radius: 0; border-right: 0; contain: inline-size; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-left: -10px; margin-right: -10px; max-width: calc(100% + 20px); overflow-x: hidden; padding: 9px 10px; }
    .analytics-filter,.analytics-period-filter { min-width: 0; }
    .analytics-refresh { grid-column: 1 / -1; min-width: 0; padding-left: 10px; padding-right: 10px; width: 100%; }
    .analytics-refresh span { display: inline; }
    .analytics-metric-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .analytics-metric { min-height: 96px; padding: 14px 11px; }
    .analytics-metric:nth-child(4)::before { display: block; }
    .analytics-metric:nth-child(odd)::before { display: none; }
    .analytics-metric:nth-child(n+3) { border-top: 1px solid var(--line); }
    .analytics-metric-copy strong { font-size: 15px; }
    .analytics-metric-copy em span { display: none; }
    .analytics-panel { padding: 12px; }
    .analytics-chart-large { height: 260px; }
    .analytics-demographic-grid { grid-template-columns: 1fr; }
    .analytics-geo-panel { grid-column: auto; }
    .analytics-chart-medium { height: 235px; }
    .analytics-map-wrap,.analytics-map { height: 320px; min-height: 320px; }
    .analytics-insights { grid-template-columns: 1fr; }
    .analytics-insight { padding-left: 0; padding-right: 0; }
    .analytics-insight + .analytics-insight { border-left: 0; border-top: 1px solid var(--line); }
    .analytics-methodology { align-items: start; grid-template-columns: auto minmax(0,1fr); }
    .analytics-methodology span { grid-column: 2; text-align: left; white-space: normal; }
    .analytics-products-table { min-width: 0; table-layout: fixed; width: 100%; }
    .analytics-products-table th:nth-child(3),
    .analytics-products-table td:nth-child(3),
    .analytics-products-table th:nth-child(4),
    .analytics-products-table td:nth-child(4),
    .analytics-products-table th:nth-child(6),
    .analytics-products-table td:nth-child(6) { display: none; }
    .analytics-products-table th:first-child,
    .analytics-products-table td:first-child { width: 30px; }
    .analytics-products-table th:nth-child(5),
    .analytics-products-table td:nth-child(5) { width: 94px; }
}

@media (max-width: 430px) {
    .analytics-metric { gap: 7px; grid-template-columns: 27px minmax(0,1fr); }
    .analytics-metric-icon { font-size: 18px; height: 27px; width: 27px; }
    .analytics-metric-copy strong { font-size: 14px; }
    .analytics-legend { display: none; }
    .analytics-chart-large { height: 245px; }
    .analytics-panel-heading h2 { font-size: 12px; }
}

/* Drivers operations map */
body[data-view="drivers_map"] .content { padding: 0; }
.drivers-map-page { background: #f7f9fc; display: grid; gap: 12px; min-height: calc(100vh - 64px); padding: 15px; }
.drivers-map-filters { align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(150px,.85fr)) minmax(220px,1fr); padding: 11px 13px; }
.drivers-map-filter { display: grid; gap: 5px; min-width: 0; }
.drivers-map-filter > span:first-child { color: #68748a; font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.drivers-map-filter .form-control,.drivers-map-filter .form-select,.drivers-map-filter .select2-selection--single { font-size: 10px; height: 37px; min-height: 37px; }
.drivers-map-filter .select2-selection__rendered { font-size: 10px; line-height: 35px !important; }
.drivers-map-filter .select2-selection__arrow { height: 35px !important; }
.drivers-map-search-control { display: block; position: relative; }
.drivers-map-search-control input { padding-right: 34px; width: 100%; }
.drivers-map-search-control i { color: #7b879c; font-size: 12px; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

.drivers-map-metrics { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); overflow: hidden; }
.drivers-map-metrics article { align-items: center; display: grid; gap: 9px; grid-template-columns: 31px minmax(0,1fr); min-height: 77px; padding: 12px 13px; position: relative; }
.drivers-map-metrics article + article::before { background: var(--line); content: ""; inset: 13px auto 13px 0; position: absolute; width: 1px; }
.drivers-map-metric-icon { align-items: center; color: #175cd3; display: inline-flex; font-size: 20px; height: 31px; justify-content: center; width: 31px; }
.drivers-map-metric-icon.is-success { color: #2ead69; font-size: 10px; }
.drivers-map-metrics article > div { display: grid; min-width: 0; }
.drivers-map-metrics small { color: #68748a; font-size: 8px; font-weight: 700; white-space: nowrap; }
.drivers-map-metrics strong { color: #1d2939; font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drivers-map-metrics em { color: #8994a7; font-size: 7px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.drivers-map-workspace { display: grid; gap: 12px; grid-template-columns: minmax(0,1.7fr) minmax(330px,1fr); min-width: 0; }
.drivers-map-panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.drivers-map-panel-heading { align-items: center; display: flex; justify-content: space-between; min-height: 57px; padding: 10px 13px; }
.drivers-map-panel-heading h2 { color: #253046; font-size: 12px; font-weight: 800; margin: 0; }
.drivers-map-panel-heading p { color: #7b879b; font-size: 8px; line-height: 1.35; margin: 2px 0 0; }
.drivers-map-panel-heading > span { color: #778399; font-size: 8px; font-weight: 700; white-space: nowrap; }
.drivers-map-panel-heading a { color: var(--primary); font-size: 8px; font-weight: 700; text-decoration: none; }
.drivers-map-panel-heading a:hover { text-decoration: underline; }
.drivers-map-count { background: var(--primary-soft); border-radius: 20px; color: var(--primary) !important; padding: 4px 8px; }

.drivers-map-canvas-wrap { border-top: 1px solid var(--line); height: 454px; position: relative; }
.drivers-map-canvas { height: 100%; width: 100%; }
.drivers-map-state { align-items: center; background: rgba(255,255,255,.94); color: #536078; display: flex; font-size: 9px; gap: 8px; inset: 0; justify-content: center; position: absolute; z-index: 6; }
.drivers-map-state.is-hidden { display: none; }
.drivers-map-state.is-error { color: var(--danger); flex-direction: column; text-align: center; }
.drivers-map-state.is-error i { font-size: 24px; }
.drivers-map-legend,.drivers-map-fit-note { align-items: center; backdrop-filter: blur(7px); background: rgba(255,255,255,.94); border: 1px solid rgba(218,225,236,.98); border-radius: 7px; bottom: 14px; box-shadow: 0 5px 18px rgba(28,39,60,.10); color: #59667d; display: flex; font-size: 8px; font-weight: 700; gap: 11px; padding: 6px 9px; position: absolute; z-index: 4; }
.drivers-map-legend { left: 13px; }
.drivers-map-fit-note { right: 13px; }
.drivers-map-legend span { align-items: center; display: inline-flex; gap: 5px; white-space: nowrap; }
.drivers-map-legend i,.drivers-map-driver-name > i,.drivers-map-status > i { border-radius: 50%; display: inline-block; flex: 0 0 7px; height: 7px; width: 7px; }
.drivers-map-legend .available,.drivers-map-driver-name > i.is-available,.drivers-map-status > i.is-available { background: #2ead69; }
.drivers-map-legend .on-delivery,.drivers-map-driver-name > i.is-on-delivery,.drivers-map-status > i.is-on-delivery { background: #175cd3; }
.drivers-map-legend .off-duty,.drivers-map-driver-name > i.is-off-duty,.drivers-map-status > i.is-off-duty { background: #f79009; }
.drivers-map-legend .inactive,.drivers-map-driver-name > i.is-inactive,.drivers-map-status > i.is-inactive { background: #d92d20; }

.driver-map-pin { align-items: center; cursor: pointer; display: flex; filter: drop-shadow(0 4px 5px rgba(31,46,73,.24)); height: 38px; justify-content: center; position: relative; transform-origin: 50% 100%; transition: transform .15s ease; width: 34px; }
.driver-map-pin::after { border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #2ead69; bottom: -2px; content: ""; left: 12px; position: absolute; }
.driver-map-pin span { align-items: center; background: #2ead69; border: 2px solid #fff; border-radius: 50%; color: #fff; display: flex; font-size: 13px; height: 29px; justify-content: center; width: 29px; }
.driver-map-pin.is-on-delivery span { background: #175cd3; }
.driver-map-pin.is-on-delivery::after { border-top-color: #175cd3; }
.driver-map-pin.is-off-duty span { background: #f79009; }
.driver-map-pin.is-off-duty::after { border-top-color: #f79009; }
.driver-map-pin.is-inactive span { background: #d92d20; }
.driver-map-pin.is-inactive::after { border-top-color: #d92d20; }
.driver-map-pin:hover,.driver-map-pin.is-selected { transform: scale(1.18) translateY(-2px); }
.driver-map-pin.is-selected span { box-shadow: 0 0 0 3px rgba(23,92,211,.22); }
.driver-map-info { display: grid; font-family: JannaLT,Arial,sans-serif; min-width: 205px; padding: 2px; }
.driver-map-info strong { color: #172033; font-size: 12px; }
.driver-map-info span { color: #66738a; font-size: 9px; }
.driver-map-info b { color: #175cd3; font-size: 10px; margin-top: 6px; }
.driver-map-info small { color: #8792a5; font-size: 8px; }
.driver-map-info-person { align-items: center; display: grid; gap: 8px; grid-template-columns: 34px minmax(0,1fr); margin-bottom: 5px; }
.driver-map-info-person > img,.driver-map-info-person > i { align-items: center; background: #edf3fb; border-radius: 50%; display: flex; height: 34px; justify-content: center; object-fit: cover; width: 34px; }
.driver-map-info-person > span { display: grid; }

.drivers-map-roster-panel { display: flex; flex-direction: column; max-height: 512px; }
.drivers-map-roster-panel > .drivers-map-panel-heading { border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drivers-map-roster { flex: 1; min-height: 0; overflow-y: auto; }
.drivers-map-roster-head,.drivers-map-driver-row { align-items: center; display: grid; gap: 8px; grid-template-columns: minmax(125px,1.45fr) minmax(70px,.85fr) 46px 70px; }
.drivers-map-roster-head { color: #8490a4; font-size: 7px; font-weight: 800; min-height: 31px; padding: 5px 12px; text-transform: uppercase; }
.drivers-map-roster-head span:nth-child(n+3) { text-align: right; }
.drivers-map-driver-row { background: transparent; border: 0; border-top: 1px solid #edf1f6; color: #536078; font-family: inherit; font-size: 9px; min-height: 42px; padding: 7px 12px; text-align: left; width: 100%; }
.drivers-map-driver-row:hover { background: #f8fbff; }
.drivers-map-driver-row.is-selected { background: #f1f6ff; box-shadow: inset 2px 0 0 var(--primary); color: var(--primary); }
.drivers-map-driver-row > span:nth-child(n+3) { text-align: right; }
.drivers-map-driver-row > span:last-child { align-items: center; display: flex; gap: 7px; justify-content: flex-end; }
.drivers-map-driver-row > span:last-child i { display: none; }
.drivers-map-driver-name { align-items: center; display: flex; gap: 7px; min-width: 0; }
.drivers-map-driver-name > img,.drivers-map-avatar-fallback { align-items: center; background: #edf3fb; border: 1px solid #dfe7f1; border-radius: 50%; display: inline-flex; flex: 0 0 25px; height: 25px; justify-content: center; object-fit: cover; overflow: hidden; width: 25px; }
.drivers-map-avatar-fallback i { color: #708099; font-size: 10px; }
.drivers-map-driver-name strong { color: #2d3950; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drivers-map-driver-row.is-selected .drivers-map-driver-name strong { color: var(--primary); }
.drivers-map-driver-detail { background: #fbfcfe; border-top: 1px solid var(--line); flex: 0 0 auto; padding: 10px 12px 11px; }
.drivers-map-driver-media { display: grid; gap: 8px; grid-template-columns: 72px minmax(0,1fr); margin-bottom: 10px; }
.drivers-map-driver-media > span { background: #fff; border: 1px solid var(--line-soft); border-radius: 7px; display: grid; grid-template-rows: 52px auto; overflow: hidden; }
.drivers-map-driver-media img { height: 52px; object-fit: cover; width: 100%; }
.drivers-map-driver-media .is-vehicle img { object-fit: contain; }
.drivers-map-driver-media small { color: #7c879a; font-size: 7px; padding: 3px 6px; }
.drivers-map-driver-detail-grid { display: grid; gap: 9px 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.drivers-map-driver-detail-grid > span { display: grid; grid-template-columns: 16px minmax(0,1fr); }
.drivers-map-driver-detail-grid i { color: #65728a; font-size: 11px; grid-row: 1 / span 2; }
.drivers-map-driver-detail-grid b { color: #34405a; font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drivers-map-driver-detail-grid small { color: #8792a5; font-size: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drivers-map-driver-actions { display: grid; gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.drivers-map-driver-actions .btn { font-size: 8px; min-height: 31px; padding: 5px 7px; }

.drivers-map-analysis-grid { align-items: start; display: grid; gap: 12px; grid-template-columns: minmax(250px,.85fr) minmax(235px,.7fr) minmax(510px,1.55fr); }
.drivers-map-chart { height: 225px; padding: 5px 11px 12px; }
.drivers-map-chart canvas { max-height: 100%; width: 100% !important; }
.drivers-map-table-panel { min-width: 0; }
.drivers-map-table-panel .drivers-map-panel-heading { border-bottom: 1px solid var(--line); }
.drivers-map-table-wrap { max-height: 225px; max-width: 100%; overflow: auto; }
.drivers-map-table { border-collapse: collapse; font-size: 8px; min-width: 820px; width: 100%; }
.drivers-map-table th { background: #f8fafc; border-bottom: 1px solid var(--line); color: #738096; font-size: 7px; font-weight: 800; padding: 7px 8px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.drivers-map-table thead { position: sticky; top: 0; z-index: 1; }
.drivers-map-table td { border-bottom: 1px solid #edf1f6; color: #536078; padding: 7px 8px; vertical-align: middle; white-space: nowrap; }
.drivers-map-table tbody tr:last-child td { border-bottom: 0; }
.drivers-map-table tbody tr:hover,.drivers-map-table tbody tr.is-selected { background: #f5f9ff; }
.drivers-map-table td > strong,.drivers-map-table td > small { display: block; }
.drivers-map-table td > small { color: #8b96a8; font-size: 7px; }
.drivers-map-table-driver { align-items: center; background: transparent; border: 0; color: inherit; display: grid; font-family: inherit; gap: 7px; grid-template-columns: 28px minmax(0,1fr); padding: 0; text-align: left; }
.drivers-map-table-driver > img,.drivers-map-table-photo { align-items: center; background: #edf3fb; border: 1px solid #dfe7f1; border-radius: 50%; display: flex; height: 28px; justify-content: center; object-fit: cover; overflow: hidden; width: 28px; }
.drivers-map-table-photo i { color: #708099; font-size: 10px; }
.drivers-map-table-driver > span:last-child,.drivers-map-table-vehicle > span:last-child { display: grid; }
.drivers-map-table-driver strong { color: #253046; font-size: 8px; }
.drivers-map-table-driver small { color: #8b96a8; font-size: 7px; }
.drivers-map-table-driver:hover strong { color: var(--primary); }
.drivers-map-table-vehicle { align-items: center; display: grid; gap: 7px; grid-template-columns: 38px minmax(0,1fr); }
.drivers-map-table-vehicle > img,.drivers-map-table-vehicle > .drivers-map-table-photo { background: #fff; border-radius: 5px; height: 28px; object-fit: contain; width: 38px; }
.drivers-map-status { align-items: center; display: inline-flex; gap: 5px; }
.drivers-map-freshness { display: grid; }
.drivers-map-freshness strong { color: #46536b; font-size: 8px; }
.drivers-map-freshness small { color: #8b96a8; font-size: 7px; }
.drivers-map-empty { align-items: center; color: #8792a5; display: flex; font-size: 9px; gap: 7px; justify-content: center; min-height: 110px; padding: 16px; text-align: center; }

.drivers-map-methodology { align-items: center; border-top: 1px solid var(--line); color: #66738a; display: grid; font-size: 8px; gap: 7px; grid-template-columns: auto minmax(0,1fr) auto; min-height: 36px; padding: 7px 10px 0; }
.drivers-map-methodology i { color: var(--primary); font-size: 11px; }
.drivers-map-methodology p { line-height: 1.35; margin: 0; }
.drivers-map-methodology span { color: #8792a5; text-align: right; white-space: nowrap; }

@media (max-width: 1280px) {
    .drivers-map-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .drivers-map-metrics article:nth-child(4) { border-top: 1px solid var(--line); }
    .drivers-map-metrics article:nth-child(n+5) { border-top: 1px solid var(--line); }
    .drivers-map-metrics article:nth-child(4)::before { display: none; }
    .drivers-map-analysis-grid { grid-template-columns: minmax(250px,1fr) minmax(240px,.8fr); }
    .drivers-map-table-panel { grid-column: 1 / -1; }
}

@media (max-width: 1040px) {
    .drivers-map-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .drivers-map-workspace { grid-template-columns: 1fr; }
    .drivers-map-roster-panel { max-height: none; }
    .drivers-map-roster { max-height: 370px; }
}

@media (max-width: 767px) {
    body[data-view="drivers_map"] { max-width: 100vw; overflow-x: hidden; }
    body[data-view="drivers_map"] .main-column,body[data-view="drivers_map"] .content { max-width: 100vw; overflow-x: hidden; }
    .drivers-map-page { gap: 10px; min-height: calc(100vh - 58px); padding: 10px; }
    .drivers-map-filters { gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); margin-left: -10px; margin-right: -10px; padding: 10px; border-left: 0; border-radius: 0; border-right: 0; }
    .drivers-map-filter > span:first-child { font-size: 8px; }
    .drivers-map-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .drivers-map-metrics article { min-height: 70px; padding: 10px; }
    .drivers-map-metrics article:nth-child(odd)::before { display: none; }
    .drivers-map-metrics article:nth-child(even)::before { display: block; }
    .drivers-map-metrics article:nth-child(n+3) { border-top: 1px solid var(--line); }
    .drivers-map-panel-heading { min-height: 56px; }
    .drivers-map-canvas-wrap { height: 360px; }
    .drivers-map-legend { bottom: 12px; gap: 8px; left: 9px; padding: 6px 7px; }
    .drivers-map-fit-note { bottom: 48px; right: 9px; }
    .drivers-map-roster-head,.drivers-map-driver-row { gap: 5px; grid-template-columns: minmax(118px,1.4fr) minmax(64px,.8fr) 42px 70px; }
    .drivers-map-driver-row { padding-left: 9px; padding-right: 9px; }
    .drivers-map-driver-row > span:last-child i { display: inline-block; }
    .drivers-map-analysis-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .drivers-map-chart { height: 230px; padding-left: 6px; padding-right: 6px; }
    .drivers-map-table-panel { grid-column: 1 / -1; }
    .drivers-map-table-wrap { max-height: 760px; overflow-x: hidden; overflow-y: auto; }
    .drivers-map-table { display: block; min-width: 0; width: 100%; }
    .drivers-map-table thead { display: none; }
    .drivers-map-table tbody { display: grid; gap: 8px; padding: 9px; }
    .drivers-map-table tr { border: 1px solid var(--line-soft); border-radius: 8px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; }
    .drivers-map-table td { align-items: end; display: grid; min-height: 49px; padding: 8px 10px; white-space: normal; }
    .drivers-map-table td::before { color: #8792a5; content: attr(data-label); display: block; font-size: 7px; font-weight: 800; text-transform: uppercase; }
    .drivers-map-table td:first-child { background: #f8fafc; grid-column: 1 / -1; }
    .drivers-map-table td:nth-child(even) { border-right: 1px solid var(--line-soft); }
    .drivers-map-methodology { align-items: start; grid-template-columns: auto minmax(0,1fr); }
    .drivers-map-methodology span { grid-column: 2; text-align: left; white-space: normal; }
}

@media (max-width: 430px) {
    .drivers-map-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .drivers-map-search { grid-column: 1 / -1; }
    .drivers-map-metrics article { gap: 6px; grid-template-columns: 25px minmax(0,1fr); }
    .drivers-map-metric-icon { font-size: 17px; height: 25px; width: 25px; }
    .drivers-map-metrics strong { font-size: 14px; }
    .drivers-map-canvas-wrap { height: 330px; }
    .drivers-map-legend { max-width: calc(100% - 18px); overflow-x: auto; }
    .drivers-map-fit-note { display: none; }
    .drivers-map-roster-head,.drivers-map-driver-row { grid-template-columns: minmax(105px,1.35fr) minmax(58px,.75fr) 38px 63px; }
    .drivers-map-roster-head,.drivers-map-driver-row { font-size: 8px; }
    .drivers-map-driver-name strong { font-size: 8px; }
    .drivers-map-driver-detail-grid { grid-template-columns: 1fr; }
    .drivers-map-analysis-grid { grid-template-columns: 1fr; }
    .drivers-map-table-panel { grid-column: auto; }
    .drivers-map-chart { height: 245px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
