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

:root {
    color-scheme: light;
    --ink: #172a3a;
    --muted: #71808d;
    --line: #e6ebef;
    --paper: #f5f7f9;
    --white: #fff;
    --brand: #126b57;
    --brand-dark: #0c5142;
    --accent: #e8f4ef;
    --danger: #b94141;
    font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 44px; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #62a48f; outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; min-width: 0; display: flex; flex-direction: column; padding: 28px 18px 20px; color: #dce8e4; background: #12392f; overflow: hidden; }
.brand { padding: 0 12px 32px; color: #fff; font: 800 23px Manrope, sans-serif; letter-spacing: -.8px; }
.brand span { color: #9de0c2; }
.sidebar nav { position: relative; display: grid; gap: 6px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.22) transparent; }
.sidebar .nav-icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.sidebar nav::-webkit-scrollbar { width: 8px; }
.sidebar nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,0.24); }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 12px; border-radius: 9px; color: #c4d6d0; font-size: 13px; transition: background-color .2s ease, color .2s ease, transform .2s ease; }
.sidebar nav a svg { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; opacity: .84; }
.sidebar nav a:hover { color: #fff; background: #1b493d; }
.sidebar nav a.active { color: #fff; background: linear-gradient(100deg, #28624f, #214b3f); box-shadow: inset 3px 0 #9de0c2; }
.sidebar nav a.active svg { opacity: 1; }
.sidebar nav a:focus-visible, .link-button:focus-visible { outline: 2px solid #9de0c2; outline-offset: 2px; }
.sidebar-user { display: grid; gap: 5px; margin-top: auto; padding: 16px 12px 0; border-top: 1px solid #31574e; font-size: 13px; }
.sidebar-user span { color: #b0c5be; font-size: 12px; }
.sidebar-profile-link { width: fit-content; margin: 3px 0; color: #d3ebe1; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.sidebar-profile-link:hover, .sidebar-profile-link[aria-current="page"] { color: #9de0c2; }
.link-button { width: fit-content; min-height: 34px; padding: 0; border: 0; color: #b6d6c9; background: transparent; cursor: pointer; }
.main-content { width: 100%; min-width: 0; max-width: 1500px; margin: 0 auto; padding: 35px clamp(18px, 4vw, 58px) 25px; }
.topbar, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar { margin-bottom: 26px; }
.topbar > div, .panel-heading > div { min-width: 0; }
.topbar h1, .panel-heading h2 { overflow-wrap: anywhere; }
body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .main-content > .topbar {
    align-items: center;
    min-height: 116px;
    margin-bottom: 20px;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid rgba(18, 107, 87, .18);
    border-radius: 20px;
    background: radial-gradient(circle at 88% 12%, rgba(147, 220, 188, .22), transparent 30%),
        linear-gradient(120deg, #12392f, #1a5a4e 58%, #2a876e);
    box-shadow: 0 16px 34px rgba(18, 57, 47, .14);
}
body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .topbar .eyebrow {
    margin-bottom: 8px;
    color: rgba(235, 248, 241, .76);
}
body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .topbar h1 { color: #fff; }
body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .topbar .date-chip {
    border-color: rgba(255,255,255,.22);
    color: #fff;
    background: rgba(255,255,255,.1);
}
h1, h2, p { margin-top: 0; }
h1, h2 { font-family: Manrope, "Segoe UI", sans-serif; letter-spacing: -.5px; }
h1 { margin-bottom: 0; font-size: clamp(26px, 3vw, 34px); }
h2 { margin-bottom: 0; font-size: 19px; }
.eyebrow { margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.15px; }
.date-chip, .muted { color: var(--muted); font-size: 13px; }
.date-chip { padding: 9px 13px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); }
.dashboard-hero { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 20px; padding: clamp(20px, 3vw, 26px); border: 1px solid rgba(18, 107, 87, .18); border-radius: 20px; background: linear-gradient(135deg, #12392f 0%, #1a5a4e 40%, #2a876e 100%); box-shadow: 0 18px 40px rgba(18, 57, 47, .18); }
.dashboard-hero__title { display: grid; gap: 8px; }
.dashboard-hero h1, .dashboard-hero h2 { margin: 0; color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.7px; }
.dashboard-eyebrow { margin: 0; color: rgba(255,255,255,.8); letter-spacing: 1.5px; }
.dashboard-hero__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashboard-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: 12px; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card, .panel { border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 2px 8px #172a3a08; }
.stat-card { position: relative; display: grid; gap: 10px; min-height: 130px; padding: 21px; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.stat-grid > a.stat-card { color: inherit; text-decoration: none; }
.stat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(23,42,58,.08); }
.stat-grid > a.stat-card:focus-visible { outline: 3px solid #126b57; outline-offset: 3px; }
.stat-card small span { color: var(--brand); font-size: 15px; font-weight: 700; }
.stat-card--primary::before { background: linear-gradient(90deg, #126b57, #54ba8b); }
.stat-card--warning::before { background: linear-gradient(90deg, #c46b44, #f2b853); }
.stat-card--success::before { background: linear-gradient(90deg, #1ea774, #67d4b0); }
.stat-card--accent::before { background: linear-gradient(90deg, #3d6ad8, #7aa6ff); }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { font: 700 28px Manrope, sans-serif; }
.stat-card small { color: var(--muted); font-size: 11px; }
.text-danger { color: var(--danger); }
.panel { min-width: 0; margin-bottom: 20px; padding: 22px; }
.panel-heading { margin-bottom: 19px; }
body:not([data-page="work_orders"]) .main-content > .panel:not(.work-order-list) > .panel-heading {
    padding-bottom: 14px;
    border-bottom: 1px solid #edf1ef;
}
.main-content > .panel:not(.work-order-list) { border-color: #e2eae6; box-shadow: 0 5px 18px rgba(23,42,58,.045); }
.main-content > .panel:not(.work-order-list) > .panel-heading h2 { color: #183c32; }
.button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 0 17px; border: 0; border-radius: 8px; color: #fff; background: var(--brand); font-size: 13px; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--brand-dark); }
.button.secondary { color: var(--brand); background: var(--accent); }
.button.compact { min-height: 36px; padding: 0 11px; }
.table-wrap { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.table-wrap:focus-within { outline: 2px solid #62a48f; outline-offset: 2px; }
table thead th { border-bottom: 1px solid #e6ece9; background: #f7faf8; }
table tbody tr { transition: background-color .15s ease; }
table tbody tr:hover { background: #fbfdfc; }
table tbody td { border-top-color: #edf1ef; }
.dashboard-orders-table { overflow-x: visible; }
.work-order-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.work-order-metric { position: relative; display: grid; gap: 5px; min-width: 0; padding: 17px 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 2px 8px #172a3a08; }
.work-order-metric::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #4b8c76; content: ""; }
.work-order-metric--open::before { background: #d29a35; }
.work-order-metric--overdue::before { background: #c85151; }
.work-order-metric > span, .work-order-metric > small { color: var(--muted); font-size: 11px; }
.work-order-metric > strong { color: var(--ink); font: 800 25px Manrope, sans-serif; }
.work-order-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.work-order-filters a { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 13px; border: 1px solid #e1e8e5; border-radius: 999px; color: #53636e; background: #fff; font-size: 12px; font-weight: 700; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.work-order-filters a:hover, .work-order-filters a.active { border-color: #b7d9ca; color: var(--brand-dark); background: #eaf5f0; }
.work-order-filters a:focus-visible { outline: 3px solid #62a48f; outline-offset: 2px; }
.work-order-filters a span { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; color: inherit; background: #fff; font-size: 10px; }
.work-order-create { padding: 0; overflow: hidden; }
.work-order-create > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 76px; padding: 14px 20px; cursor: pointer; list-style: none; }
.work-order-create > summary::-webkit-details-marker { display: none; }
.work-order-create > summary > span:first-child { display: grid; gap: 4px; }
.work-order-create > summary strong { color: var(--ink); font: 700 15px Manrope, sans-serif; }
.work-order-create > summary small { color: var(--muted); font-size: 11px; }
.work-order-create__toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-size: 12px; font-weight: 700; white-space: nowrap; }
.work-order-create__toggle > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--brand); background: var(--accent); font-size: 16px; }
.work-order-create[open] > summary { border-bottom: 1px solid var(--line); }
.work-order-create[open] > summary .work-order-create__toggle > span { transform: rotate(45deg); }
.work-order-create > .form-grid, .work-order-create > .notice { margin: 0; padding: 19px 20px 20px; }
.work-order-list { padding: 0; overflow: hidden; }
.work-order-list > .panel-heading { margin: 0; padding: 18px 20px; }
.work-order-list__count { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; color: #53636e; background: #f1f5f4; font-size: 11px; font-weight: 700; }
.work-orders-table { min-width: 930px; }
.work-orders-table th { padding-top: 12px; padding-bottom: 12px; background: #f8faf9; }
.work-orders-table tbody tr { transition: background-color .15s ease; }
.work-orders-table tbody tr:hover { background: #fbfdfc; }
.work-orders-table td { padding-top: 14px; padding-bottom: 14px; }
.work-order-title { display: grid; gap: 4px; }
.work-order-title strong { color: var(--brand); font-size: 11px; letter-spacing: .2px; }
.work-order-title span { color: var(--ink); font-weight: 700; line-height: 1.4; }
.work-order-title:hover span { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.work-order-priority--acil, .work-order-priority--yuksek { color: #8d3930; background: #fff0ec; }
.work-order-priority--dusuk { color: #586875; background: #edf1f4; }
.work-order-status--tamamlandi, .work-order-status--tahsil_edildi { color: #176544; background: #e8f6ee; }
.work-order-status--iptal { color: #586875; background: #edf1f4; }
.work-order-status--beklemede, .work-order-status--onaylandi, .work-order-status--talep { color: #805a14; background: #fff6df; }
.work-order-amount { white-space: nowrap; font-weight: 700; }
.work-order-list .empty-state { padding: 52px 18px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 12px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 13px 12px; border-top: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
td small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 30px; color: #255a49; background: var(--accent); font-size: 10px; font-weight: 700; white-space: nowrap; }
.empty-state { padding: 38px 10px; color: var(--muted); text-align: center; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid > *, .detail-grid > *, .chart-grid > * { min-width: 0; }
.form-grid label { display: grid; gap: 7px; color: #4c5d68; font-size: 12px; font-weight: 600; }
.form-grid label.checkbox-label { display: flex; align-items: center; gap: 9px; }
.form-grid label.checkbox-label input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.form-grid input, .form-grid select, .form-grid textarea, .inline-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #dce3e8; border-radius: 7px; outline: none; color: var(--ink); background: #fff; }
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .inline-form select:focus { border-color: #62a48f; box-shadow: 0 0 0 3px #126b5718; }
.form-grid .full, .form-grid hr { grid-column: 1 / -1; }
.form-grid hr { width: 100%; border: 0; border-top: 1px solid var(--line); }
.expense-form { gap: 16px; }
.expense-subsection { min-width: 0; margin: 0; padding: 15px; border: 1px solid #e0e9e4; border-radius: 11px; background: #fbfcfc; }
.expense-subsection-heading { display: grid; gap: 4px; margin-bottom: 12px; }
.expense-subsection-heading h3 { margin: 0; color: #23483c; font: 700 14px Manrope, "Segoe UI", sans-serif; }
.expense-subsection-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.expense-subsection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; }
.expense-subsection-grid > label:not(.checkbox-label) { display: grid; min-width: 0; gap: 7px; color: #4c5d68; font-size: 12px; font-weight: 600; }
.expense-subsection-grid input:not([type="checkbox"]), .expense-subsection-grid select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.expense-subsection-grid input:focus, .expense-subsection-grid select:focus { border-color: #62a48f; outline: none; box-shadow: 0 0 0 3px #126b5718; }
.expense-vat-option { align-self: center; min-height: 42px; }
.expense-direct-order { grid-column: 1 / -1; }
#direct-order-field[hidden], #allocation-orders[hidden] { display: none; }
.expense-allocation-orders { display: grid; grid-column: 1 / -1; gap: 4px; max-height: 320px; min-width: 0; margin: 0; padding: 10px 13px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #dfe8e3; border-radius: 9px; background: #fff; }
.expense-allocation-orders legend { padding: 0 6px; color: #23483c; font-size: 12px; font-weight: 700; }
.expense-allocation-orders .allocation-row { min-width: 0; border-bottom: 1px solid #edf1ef; }
.expense-allocation-orders .allocation-row:last-child { border-bottom: 0; }
.expense-allocation-orders .allocation-row > span { min-width: 0; overflow-wrap: anywhere; }
.expense-form-note { margin: 0; padding: 11px 13px; border-left: 3px solid #6ca88d; border-radius: 5px; background: #f5faf7; line-height: 1.55; }
.expense-submit { min-height: 42px; }
.purchase-lines-fieldset { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 14px; border: 1px solid #dce8e2; border-radius: 11px; background: #f7faf8; }
.purchase-lines-fieldset > legend { padding: 0 7px; color: #23483c; font-size: 12px; font-weight: 700; }
.purchase-line { min-width: 0; padding: 12px; border: 1px solid #e0e9e4; border-radius: 9px; background: #fff; }
.purchase-line-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #23483c; font-size: 12px; }
.purchase-line-fields { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(95px, .7fr) minmax(0, 1.2fr); gap: 10px; align-items: end; }
.purchase-line-fields > label { display: grid; min-width: 0; gap: 6px; color: #4c5d68; font-size: 11px; font-weight: 600; }
.purchase-line-fields input, .purchase-line-fields select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 9px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.purchase-line-fields input:focus, .purchase-line-fields select:focus { border-color: #62a48f; outline: none; box-shadow: 0 0 0 3px #126b5718; }
#add-purchase-line { margin-top: 2px; }
.inline-form { display: flex; min-width: 190px; gap: 7px; }
.inline-form select { min-width: 115px; padding: 6px; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.detail-grid div { display: grid; gap: 5px; }
.detail-grid span, .quote-card small, .visit-card small { color: var(--muted); font-size: 11px; }
.detail-grid strong { font-size: 13px; }
.order-description { margin: 20px 0; color: #425461; font-size: 14px; line-height: 1.65; }
.quote-card, .visit-card { margin-top: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; background: #fcfdfd; }
.quote-card .panel-heading, .visit-card .panel-heading { margin-bottom: 12px; }
.quote-card .panel-heading > div, .visit-card .panel-heading > div { display: grid; gap: 4px; }
.quote-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.quote-totals strong { color: var(--ink); }
.quote-line-form, .quote-create-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.quote-actions { margin-top: 12px; }
.route-visit-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 10px; }
.route-visit-form label { display: grid; flex: 1 1 220px; gap: 5px; color: var(--muted); font-size: 11px; }
.route-visit-form input { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
.visit-list { display: grid; gap: 10px; }
.visit-card p { margin: 10px 0 0; font-size: 13px; }
.geo-button:disabled { opacity: .6; cursor: wait; }
.allocation-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.allocation-fields legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.route-planning-intro { max-width: 760px; margin-bottom: 20px; line-height: 1.6; }
.route-plan-form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.route-provider-note { margin: 0; padding: 12px 14px; border: 1px solid #dfe8e4; border-left: 4px solid var(--brand); border-radius: 8px; background: #f7faf8; line-height: 1.6; }
.route-provider-note a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.route-form-section { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.route-form-section__heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.route-form-step { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; color: var(--brand); background: var(--accent); font: 800 12px Manrope, sans-serif; }
.route-form-section__heading h3 { margin: 1px 0 4px; font: 700 15px Manrope, sans-serif; }
.route-form-section__heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.route-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.route-advanced-settings { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfc; }
.route-advanced-settings summary { color: var(--brand); font-size: 12px; font-weight: 700; cursor: pointer; }
.route-advanced-settings[open] summary { margin-bottom: 14px; }
.route-form-section .allocation-fields { grid-template-columns: minmax(0, 1fr); gap: 10px 16px; margin: 0; padding: 18px; background: #fbfcfc; }
.route-form-section .allocation-fields legend { padding: 0 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.route-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; }
.route-form-actions .fine-print { margin: 0; }
.route-form-actions .button { min-height: 46px; }
.invoice-order-list { max-height: 360px; overflow-y: auto; }
.allocation-row { display: flex !important; align-items: center; justify-content: space-between; gap: 10px !important; padding: 6px 0; }
.allocation-row > span { display: flex; align-items: center; gap: 6px; }
.allocation-row input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--brand); }
.allocation-row .manual-amount { max-width: 130px; }
.manual-amount[hidden], [hidden] { display: none !important; }
.review-form { display: grid; min-width: 220px; gap: 6px; }
.review-form input { min-height: 34px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; }
.danger-button { background: #a53d3d; }
.danger-button:hover { background: #842e2e; }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 8px; color: #255a49; background: var(--accent); font-size: 13px; }
.notice.error { color: #8d2929; background: #fff0ef; }
.notice.success { color: #255a49; background: var(--accent); }
.app-footer { padding: 10px 0 20px; color: var(--muted); font-size: 11px; }
.install-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 20%, #e4f2ec, transparent 38%), var(--paper); }
.install-card { width: min(100%, 570px); padding: clamp(24px, 5vw, 42px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 20px 70px #17372c12; }
.install-card h1 { margin-bottom: 12px; }
.install-card > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.65; }
.fine-print { margin: 18px 0 0; font-size: 11px !important; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.chart-panel { margin-bottom: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-bar { transition: fill .2s ease; }
.chart-bar:hover { fill: var(--brand-dark); }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.chart-donut { width: 190px; max-width: 46%; flex: 0 0 auto; }
.chart-legend { flex: 1 1 160px; min-width: 140px; display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.chart-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.chart-legend-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4c5d68; }
.chart-legend-value { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chart-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.chart-caption { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.chart-caption span { display: inline-flex; align-items: center; gap: 6px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inline-label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.inline-form select { min-height: 40px; padding: 8px 11px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; color: var(--ink); }
.map-shell { position: relative; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #eef2f5; }
.map-canvas { width: 100%; height: 540px; }
.map-team-panel { position: absolute; top: 10px; right: 55px; z-index: 1000; width: min(250px, calc(100% - 72px)); max-height: 45%; overflow: auto; padding: 12px 14px; border: 1px solid rgba(20, 35, 45, .12); border-radius: 9px; background: rgba(255, 255, 255, .96); box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.map-team-panel h3 { margin: 0 0 9px; font-size: 13px; }
.map-team-item { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--ink); font-size: 12px; }
.map-team-line { width: 20px; height: 4px; flex: 0 0 20px; border-radius: 3px; }
.route-number-icon { border: 0; background: transparent; }
.route-number-marker { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid #12392f; border-radius: 50%; color: #12392f; font-size: 12px; font-weight: 800; box-shadow: 0 1px 5px rgba(0, 0, 0, .38); }
.route-number-marker.visited { background: #9de0c2; }
.route-number-marker.planned { background: #8ecff0; }
.route-number-marker.unavailable { border-color: #8f2020; color: #fff; background: #bd3434; }
.route-number-marker.cancelled { border-color: #475569; color: #fff; background: #64748b; }
.route-number-marker.refused { border-color: #753b00; color: #fff; background: #9a4d00; }
.route-stop-dialog { width: min(600px, calc(100% - 28px)); max-width: 600px; max-height: min(88vh, 760px); padding: 22px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 24px 70px rgba(13, 35, 29, .3); }
.route-stop-dialog [hidden] { display: none !important; }
.route-stop-dialog::backdrop { background: rgba(13, 35, 29, .58); backdrop-filter: blur(2px); }
.route-stop-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.route-stop-dialog__header .eyebrow { overflow-wrap: anywhere; }
.route-stop-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.route-stop-details div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.route-stop-details dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.route-stop-details dd { margin: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.route-stop-note { margin: 14px 0 0; padding: 12px; border-radius: 9px; color: #315044; background: #edf7f1; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.route-visit-form { display: grid; gap: 9px; margin-top: 18px; }
.route-visit-form label { color: #4c5d68; font-size: 12px; font-weight: 700; }
.route-visit-form textarea { width: 100%; min-height: 88px; padding: 10px 12px; border: 1px solid #dce3e8; border-radius: 8px; resize: vertical; }
.route-visit-form textarea:focus { border-color: #62a48f; outline: none; box-shadow: 0 0 0 3px #126b5718; }
.route-visit-actions, .route-stop-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.route-stop-navigation { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.route-stop-navigation a { color: var(--brand); font-size: 12px; font-weight: 700; text-decoration: underline; }
.map-fallback { margin: 0; padding: 28px 18px; color: #8d2929; background: #fff0ef; font-size: 13px; text-align: center; }
.map-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px; }
.map-search { min-width: 190px; }
.map-search input { min-height: 40px; padding: 8px 11px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.map-search input:focus { border-color: #62a48f; outline: none; box-shadow: 0 0 0 3px #126b5718; }
.store-location-tools { display: grid; gap: 10px; }
.store-geocode-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.store-geocode-controls .inline-label { flex: 1 1 300px; }
.store-geocode-controls select { width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.store-location-map { width: 100%; height: 360px; border: 1px solid var(--line); border-radius: 9px; background: #eef2f5; }
.map-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.map-summary div { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; }
.map-summary span { color: var(--muted); font-size: 11px; }
.map-summary strong { font: 700 17px Manrope, sans-serif; }
.map-nav-links { white-space: nowrap; }
.map-nav-links a { margin-right: 8px; color: var(--brand); font-weight: 600; text-decoration: underline; }
.leaflet-container { font-family: "DM Sans", "Segoe UI", sans-serif; }
.team-portal-hero { align-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 88% 18%, rgba(147, 220, 188, .24), transparent 28%), linear-gradient(120deg, #12392f, #146b57 68%, #25866a); }
.team-portal-hero .dashboard-hero__meta { display: grid; gap: 5px; }
.team-portal-hero .dashboard-hero__title > p:last-child { margin: 0; color: #fff; font-size: 13px; }
.team-plan-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.team-plan-picker label { color: var(--muted); font-size: 12px; font-weight: 700; }
.team-plan-picker select { min-width: min(100%, 260px); min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.team-route-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.profile-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.profile-panel { min-width: 0; margin-bottom: 16px; }
.profile-form, .admin-account-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 12px; }
.profile-form > label, .admin-account-form > label { display: grid; min-width: 0; gap: 6px; color: #4c5d68; font-size: 12px; font-weight: 600; }
.profile-form input, .admin-account-form input, .admin-account-form select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.profile-form input:focus, .admin-account-form input:focus, .admin-account-form select:focus { border-color: #62a48f; outline: none; box-shadow: 0 0 0 3px #126b5718; }
.profile-form > .button, .admin-account-form > .button { min-height: 42px; }
.profile-form > .muted, .admin-account-form .muted { font-size: 10px; font-weight: 400; }
.admin-account-panel > .muted { max-width: 850px; line-height: 1.6; }
.admin-account-create { margin: 14px 0 0; border: 1px solid #dce8e2; border-radius: 10px; background: #f8fbf9; }
.admin-account-create > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer; color: #23483c; }
.admin-account-create > summary small { color: var(--muted); font-weight: 400; }
.admin-account-create[open] > .admin-account-form { padding: 14px; border-top: 1px solid #e3ebe6; }
.admin-account-list { display: grid; gap: 10px; }
.admin-account-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.admin-account-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-account-card__heading > div { display: grid; min-width: 0; gap: 4px; }
.admin-account-card__heading strong { overflow-wrap: anywhere; font-size: 13px; }
.admin-account-card__heading small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.admin-account-details { margin-top: 12px; }
.admin-account-details > summary { cursor: pointer; color: var(--brand); font-size: 12px; font-weight: 700; }
.admin-account-details[open] > summary { margin-bottom: 10px; }
.admin-password-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-account-note { margin: 14px 0 0; line-height: 1.6; }
.badge-muted { color: #535f67; background: #edf0f2; }
.team-route-summary article { display: grid; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 2px 8px #172a3a08; }
.team-route-summary span, .team-stop-meta { color: var(--muted); font-size: 12px; }
.team-route-summary strong { font: 700 18px Manrope, sans-serif; }
.team-odometer-panel { border-color: #b7d9ca; background: linear-gradient(135deg, #f8fcf9, #fff); }
.team-odometer-panel > p { line-height: 1.5; }
.team-odometer-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.team-odometer-form label, .team-fuel-mileage-form label { display: grid; min-width: min(100%, 220px); gap: 5px; color: #4c5d68; font-size: 11px; font-weight: 700; }
.team-odometer-form input, .team-fuel-mileage-form input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.team-odometer-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.team-odometer-readings article { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #d5e8df; border-radius: 9px; background: #fff; }
.team-odometer-readings span, .team-odometer-readings small { color: var(--muted); font-size: 11px; }
.team-odometer-readings strong { color: #173d32; font-size: 17px; }
.team-fuel-form { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); align-items: end; gap: 10px; margin: 0 0 14px; padding: 12px; border: 1px solid #d5e8df; border-radius: 9px; background: #f3faf6; }
.team-fuel-form > div { display: grid; grid-column: 1 / -1; gap: 4px; }
.team-fuel-form > div .eyebrow { margin: 0; }
.team-fuel-form > div strong { color: #173d32; font-size: 13px; }
.team-fuel-form > div small { color: var(--muted); font-size: 11px; }
.team-fuel-form label { display: grid; gap: 5px; color: #4c5d68; font-size: 11px; font-weight: 700; }
.team-fuel-form input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.team-fuel-form__description { grid-column: span 2; }
.team-fuel-mileage-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 6px; }
.team-fuel-mileage-form label { min-width: min(100%, 190px); }
.team-stat-card > strong { color: #173d32; font-size: 26px; }
.team-stat-card > strong small { color: var(--muted); font: 600 13px "DM Sans", sans-serif; }
.team-stat-card > small { color: var(--muted); font-size: 11px; }
.team-progress-track { height: 6px; margin-top: 2px; overflow: hidden; border-radius: 20px; background: #e9f0ed; }
.team-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #126b57, #6cc89f); }
.route-start-location-control { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.route-start-location-control .fine-print { margin: 0; }
.team-expense-panel { margin-bottom: 18px; }
.team-expense-heading { align-items: flex-start; }
.team-expense-heading h2 { margin: 0; }
.team-expense-review-note { max-width: 240px; color: var(--muted); font-size: 10px; text-align: right; }
.team-expense-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.team-expense-totals article { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid #d5e8df; border-radius: 9px; background: #f3faf6; }
.team-expense-totals span { color: var(--muted); font-size: 11px; }
.team-expense-totals strong { color: #173d32; font: 800 20px Manrope, sans-serif; }
.team-expense-form { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(110px, .5fr) minmax(200px, 1.5fr) auto; align-items: end; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.team-expense-form label { display: grid; gap: 5px; color: #4c5d68; font-size: 11px; font-weight: 700; }
.team-expense-form input, .team-expense-form select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #dce3e8; border-radius: 7px; color: var(--ink); background: #fff; }
.team-expense-form .button { min-height: 40px; white-space: nowrap; }
.team-expense-list { display: grid; gap: 7px; }
.team-expense-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.team-expense-row__main, .team-expense-row__meta { display: grid; min-width: 0; gap: 4px; }
.team-expense-row__main > strong { overflow-wrap: anywhere; font-size: 12px; }
.team-expense-row__main > span, .team-expense-row__meta > small { color: var(--muted); font-size: 10px; }
.team-expense-row__meta { justify-items: end; flex: 0 0 auto; }
.team-expense-row__meta > strong { color: #173d32; font-size: 13px; }
.team-expense-row__meta .badge { font-size: 9px; }
.team-expense-empty { padding: 12px; border: 1px dashed #cbd9d3; border-radius: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.team-expense-footnote { margin: 12px 0 0; line-height: 1.5; }
.team-route-start { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -4px 0 16px; padding: 12px 14px; border: 1px solid #d5e8df; border-radius: 9px; color: #23483c; background: #edf7f1; font-size: 12px; }
.team-route-start a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.team-live-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr); align-items: stretch; gap: 16px; margin-bottom: 20px; scroll-margin-top: 18px; }
.team-live-layout .panel { margin-bottom: 0; }
.team-live-map-panel { min-width: 0; }
.team-live-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.team-live-heading h2, .team-live-side h2 { margin: 0; }
.team-live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.team-live-indicator i { width: 8px; height: 8px; border-radius: 50%; background: #9cabb2; }
.team-live-indicator.is-live i { background: #26976e; box-shadow: 0 0 0 3px #26976e20; }
.team-live-map-canvas { position: relative; z-index: 0; width: 100%; height: 440px; border: 1px solid var(--line); border-radius: 10px; background: #edf2ef; }
.team-map-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 13px; color: var(--muted); font-size: 10px; }
.team-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.team-map-legend i { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #91a39b; }
.team-map-legend .team-legend-start { background: #12392f; }
.team-map-legend .team-legend-stop { background: #8ecff0; }
.team-map-legend .team-legend-visited { background: #9de0c2; }
.team-map-legend .team-legend-unavailable { background: #bd3434; }
.team-map-legend .team-legend-cancelled { background: #64748b; }
.team-map-legend .team-legend-refused { background: #9a4d00; }
.team-map-legend .team-legend-location { background: #7354b8; }
.team-route-marker-wrap { border: 0; background: transparent; }
.team-route-marker { display: grid; width: 32px; height: 32px; place-items: center; border: 2px solid #12392f; border-radius: 50%; color: #12392f; background: #8ecff0; box-shadow: 0 2px 7px #172a3a55; font: 800 12px Manrope, sans-serif; }
.team-route-marker.is-visited { background: #9de0c2; }
.team-route-marker.is-unavailable { border-color: #8f2020; color: #fff; background: #bd3434; }
.team-route-marker.is-cancelled { border-color: #475569; color: #fff; background: #64748b; }
.team-route-marker.is-refused { border-color: #753b00; color: #fff; background: #9a4d00; }
.team-live-side { display: flex; flex-direction: column; gap: 15px; }
.team-live-side__header .eyebrow, .team-live-side__header h2 { margin-bottom: 7px; }
.team-live-side__header > p:last-child { margin: 0; line-height: 1.5; }
.team-location-consent { padding: 12px; border: 1px solid #d8e9df; border-radius: 9px; color: #275541; background: #f0f8f3; }
.team-location-consent strong { font-size: 12px; }
.team-location-consent p { margin: 6px 0 0; color: #526a5f; font-size: 11px; line-height: 1.55; }
.team-location-controls { display: grid; gap: 8px; }
.team-location-controls .button { width: 100%; min-height: 42px; }
.team-location-controls .button:disabled { opacity: .55; cursor: not-allowed; }
.team-location-start { background: #167556; }
.team-location-status { min-height: 34px; margin: -7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.team-location-list { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.team-location-list__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; font-size: 12px; }
.team-location-list__heading > span { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #315044; background: #e8f4ef; font-size: 11px; font-weight: 800; }
.team-location-members { display: grid; gap: 8px; max-height: 155px; overflow: auto; }
.team-location-members > .muted { margin: 0; font-size: 11px; line-height: 1.5; }
.team-location-member { display: flex; align-items: center; gap: 9px; min-width: 0; }
.team-location-member > i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #7354b8; }
.team-location-member > i.is-own { background: #276cbd; }
.team-location-member > span { display: grid; min-width: 0; gap: 2px; }
.team-location-member strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-location-member small { color: var(--muted); font-size: 10px; }
.store-a101-results { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.store-a101-result { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #d5e8df; border-radius: 9px; background: #fff; }
.store-a101-result > div { display: grid; min-width: 0; gap: 4px; }
.store-a101-result strong { color: #23483c; font-size: 13px; overflow-wrap: anywhere; }
.store-a101-result span { color: #53645d; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.store-a101-result small { color: var(--muted); font-size: 10px; }
.store-a101-result-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.store-a101-result-actions .button { flex: 0 0 auto; }
.store-a101-map-marker { display: grid; width: 30px !important; height: 30px !important; place-items: center; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #17684f; box-shadow: 0 1px 5px #172a3a66; font-size: 12px; font-weight: 800; }
.store-a101-map-marker.leaflet-div-icon { border: 2px solid #fff; background: #17684f; }
.team-route-list { display: grid; gap: 12px; }
.team-report-filter { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }
.team-report-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; }
.team-report-stats .stat-card { min-width: 0; }
.team-report-stats .stat-card strong { overflow-wrap: anywhere; font-size: clamp(20px, 2vw, 27px); }
.team-report-map-panel .panel-heading { align-items: flex-start; }
.team-report-map { width: 100%; height: clamp(320px, 48vh, 560px); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #eef2f5; }
.team-report-map-panel > .fine-print { margin: 10px 0 0; }
.team-report-category-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.team-report-category-list article { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; }
.team-report-category-list article span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.team-report-category-list article strong { flex: 0 0 auto; color: var(--brand); font-size: 14px; }
.team-report-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.team-report-status-grid article, .team-report-plan-statuses > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fcfdfd; }
.team-report-status-grid article span, .team-report-plan-statuses span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.team-report-status-grid article strong, .team-report-plan-statuses strong { flex: 0 0 auto; font: 800 20px Manrope, sans-serif; }
.team-report-status-grid .is-completed strong, .team-report-plan-statuses .is-completed strong { color: #167556; }
.team-report-status-grid .is-progress strong, .team-report-plan-statuses .is-progress strong { color: #276cbd; }
.team-report-status-grid .is-pending strong, .team-report-plan-statuses .is-pending strong { color: #9a6a13; }
.team-report-status-grid .is-not-visited strong, .team-report-plan-statuses .is-not-visited strong { color: #a53d3d; }
.team-report-plan-list { display: grid; gap: 16px; }
.team-report-plan { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fcfdfd; }
.team-report-plan__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.team-report-plan__header .eyebrow { margin-bottom: 6px; }
.team-report-plan__header h3 { margin: 0; font: 700 16px Manrope, sans-serif; }
.team-report-plan__header h3 span { color: var(--brand); }
.team-report-plan__header p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.team-report-progress { display: flex; width: 100%; height: 12px; margin: 18px 0 12px; overflow: hidden; border-radius: 99px; background: #edf0f2; }
.team-report-progress span { display: block; min-width: 0; height: 100%; transition: width .2s ease; }
.team-report-progress .is-completed { background: #29956f; }
.team-report-progress .is-progress { background: #4386ca; }
.team-report-progress .is-pending { background: #e4b54e; }
.team-report-progress .is-not-visited { background: #bd5a5a; }
.team-report-plan-statuses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.team-report-plan-statuses > div { padding: 10px 11px; }
.team-report-plan-statuses strong { font-size: 17px; }
.team-report-expenses { margin-top: 16px; padding: 14px; border: 1px solid #e6ece9; border-radius: 9px; background: #fff; }
.team-report-expenses__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 13px; }
.team-report-expenses__heading span { color: var(--brand); font-size: 16px; font-weight: 800; }
.team-report-expenses > p { margin: 10px 0 0; }
.team-report-expenses ul { display: grid; gap: 9px; margin: 12px 0 0; padding: 0; list-style: none; }
.team-report-expenses li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 9px; border-top: 1px solid #edf0f2; font-size: 12px; }
.team-report-expenses li > span { display: grid; min-width: 0; gap: 4px; }
.team-report-expenses li small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.team-report-expenses li > strong { flex: 0 0 auto; white-space: nowrap; }
.team-stop-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 18px; scroll-margin-top: 16px; }
.team-stop-number { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid #12392f; border-radius: 50%; color: #12392f; background: #8ecff0; font: 800 15px Manrope, sans-serif; }
.team-stop-number.visited { background: #9de0c2; }
.team-stop-number.unavailable { border-color: #8f2020; color: #fff; background: #bd3434; }
.team-stop-number.cancelled { border-color: #475569; color: #fff; background: #64748b; }
.team-stop-number.refused { border-color: #753b00; color: #fff; background: #9a4d00; }
.team-stop-content { min-width: 0; }
.team-stop-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.team-stop-heading__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.team-stop-heading .eyebrow { margin-bottom: 5px; }
.team-stop-heading h2 { overflow-wrap: anywhere; }
.team-stop-open { min-height: 34px; }
.team-stop-content > p { margin-bottom: 8px; }
.team-stop-meta { margin: 6px 0; }
.team-stop-map-link { display: inline-block; margin: 4px 0 8px; color: var(--brand); font-size: 12px; font-weight: 700; text-decoration: underline; }
.team-stop-status--visited { border: 1px solid #0e5747; color: #fff; background: #126b57; }
.team-stop-status--unavailable { border: 1px solid #8f2020; color: #fff; background: #bd3434; }
.team-stop-status--cancelled { border: 1px solid #475569; color: #fff; background: #64748b; }
.team-stop-status--refused { border: 1px solid #753b00; color: #fff; background: #9a4d00; }
.team-stop-status--planned { color: #174e67; background: #dff3fb; }
.team-stop-outcome__unavailable, .team-stop-outcome__cancelled, .team-stop-outcome__refused { min-height: 38px; padding: 8px 11px; font-size: 11px; }
.team-stop-outcome__unavailable { border-color: #8f2020; color: #fff; background: #bd3434; }
.team-stop-outcome__cancelled { border-color: #475569; color: #fff; background: #64748b; }
.team-stop-outcome__refused { border-color: #753b00; color: #fff; background: #9a4d00; }
.team-stop-dialog { overflow-y: auto; }
.team-stop-details { margin-bottom: 14px; }
.team-stop-photo-status { min-height: 18px; margin: 10px 0; color: var(--muted); font-size: 11px; }
.team-stop-photos { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.team-stop-photos__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.team-stop-photos__heading .eyebrow { margin: 0 0 3px; }
.team-stop-photos__heading h3 { margin: 0; font-size: 16px; }
.team-stop-photos__heading > span { color: var(--muted); font-size: 11px; }
.team-stop-photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; max-height: 250px; overflow-y: auto; }
.team-stop-photo-gallery > .muted { grid-column: 1 / -1; margin: 0; font-size: 11px; }
.team-stop-photo { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; }
.team-stop-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e9f0ed; }
.team-stop-photo figcaption { padding: 6px 8px; color: var(--muted); font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.team-stop-photo-form { display: grid; min-width: 0; gap: 8px; margin-top: 12px; }
.team-stop-photo-form[hidden] { display: none; }
.team-stop-photo-form > label { display: grid; min-width: 0; gap: 3px; color: #4c5d68; font-size: 11px; font-weight: 700; }
.team-stop-photo-form > label small { overflow-wrap: anywhere; }
.team-stop-photo-form > label small { color: var(--muted); font-size: 10px; font-weight: 400; }
.team-stop-photo-form__controls { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; }
.team-stop-photo-form input[type="file"] { min-width: 0; flex: 1 1 220px; font-size: 11px; }
.team-stop-dialog__actions { align-items: center; }
.team-stop-dialog__visit { margin-left: auto; }
.team-stop-form { display: grid; gap: 10px; margin-top: 12px; }
.team-stop-form label { display: grid; gap: 6px; color: #4c5d68; font-size: 12px; font-weight: 700; }
.team-stop-form textarea { width: 100%; min-height: 66px; padding: 10px 12px; border: 1px solid #dce3e8; border-radius: 8px; resize: vertical; }
.team-stop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.empty-route-panel { padding: clamp(22px, 5vw, 40px); text-align: center; }
.empty-route-panel .muted { max-width: 540px; margin: 10px auto 0; line-height: 1.6; }
.crew-member-entry { margin-top: 13px; }
.crew-vehicle-form { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin: 12px 0; padding: 10px; border: 1px solid #d5e8df; border-radius: 9px; background: #f3faf6; }
.crew-vehicle-form label { display: grid; min-width: min(100%, 240px); flex: 1 1 240px; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.crew-vehicle-form select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; }
.crew-account-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; gap: 9px; margin-top: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.crew-account-form label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.crew-account-form input, .crew-account-form select { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; }
.crew-account-form .badge { width: fit-content; }
.crew-management-details, .crew-account-details { margin-top: 12px; }
.crew-management-details > summary, .crew-account-details > summary { cursor: pointer; color: var(--primary); font-weight: 700; }
.crew-section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.crew-section-nav a { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 12px; border: 1px solid #dce8e2; border-radius: 999px; color: #23483c; background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.crew-section-nav a:hover, .crew-section-nav a:focus-visible { border-color: #9dcab5; background: #f3faf6; }
.crew-section-nav a span { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 6px; border-radius: 999px; color: #fff; background: #286b57; font-size: 10px; }
.crew-create-details { border: 1px solid #dce8e2; border-radius: 10px; background: #f8fbf9; }
.crew-create-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; cursor: pointer; color: #23483c; }
.crew-create-details > summary small { color: var(--muted); font-weight: 400; }
.crew-create-details[open] > .form-grid { padding: 14px; border-top: 1px solid #e3ebe6; }
.crew-card { display: flex; flex-direction: column; min-width: 0; }
.crew-card > .crew-member-list { margin: 4px 0 0; padding-left: 20px; }
.crew-member-list > li { padding: 7px 0 9px; border-bottom: 1px solid #edf1ef; overflow-wrap: anywhere; }
.crew-member-list > li:last-child { border-bottom: 0; }
.crew-account-details { padding-top: 7px; }
.crew-account-details > summary { display: grid; gap: 3px; overflow-wrap: anywhere; }
.crew-account-details > summary small { font-weight: 400; }
.crew-account-details[open] > summary { margin-bottom: 8px; }
.crew-password-form { border-color: #d7e8df; background: #f5faf7; }
.crew-card > .crew-archive-form { margin-top: auto; padding-top: 12px; }
.crew-card > .crew-management-details { padding-top: 5px; }
.crew-card > .crew-vehicle-form { margin-bottom: 7px; }
.crew-card .crew-member-entry .crew-account-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.crew-card .crew-member-entry .crew-password-form .muted { grid-column: 1 / -1; }
.crew-card > .muted { margin-top: 12px; }
#archived-crews .quote-card { border-color: #e7e8e4; background: #fbfbf9; }
#unassigned-accounts .quote-card { border-color: #e8dfd3; background: #fffdfa; }
.crew-edit-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; gap: 10px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.crew-edit-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.crew-edit-form > label input, .crew-edit-form > label select, .crew-edit-form > label textarea { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #dce3e8; border-radius: 7px; background: #fff; }
.crew-edit-form > .full, .crew-edit-form > fieldset { grid-column: 1 / -1; }
.crew-archive-form { margin-top: 10px; }
.a101-search-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px; border: 1px solid #d5e8df; border-radius: 10px; background: #f3faf6; }
.a101-search-panel strong { color: #23483c; font-size: 14px; }
.a101-search-panel .fine-print { margin: 5px 0 0; line-height: 1.5; }
.a101-map-wrap { display: grid; gap: 7px; }
.a101-store-map { position: relative; z-index: 0; width: 100%; height: 340px; overflow: hidden; border: 1px solid #d5e0dc; border-radius: 9px; background: #e9f0ed; }
.a101-map-center-pin { position: absolute; z-index: 500; top: 50%; left: 50%; width: 30px; height: 38px; transform: translate(-50%, -100%); pointer-events: none; }
.a101-map-center-pin::before { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: var(--brand); box-shadow: 0 1px 5px #172a3a66; content: ""; transform: rotate(-45deg); }
.a101-map-center-pin span { position: absolute; z-index: 1; top: 11px; left: 11px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.a101-map-wrap .fine-print { overflow-wrap: anywhere; }
.a101-search-results { display: grid; gap: 7px; max-height: 360px; overflow-y: auto; }
.a101-store-option > span { display: flex; align-items: flex-start; gap: 9px; }
.a101-store-option input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--brand); }
.a101-store-option small { white-space: nowrap; }
.route-store-chain-filter { max-width: 440px; }
.route-store-chain-group { display: grid; min-width: 0; gap: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.route-store-chain-group h4 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 5px; padding-bottom: 8px; border-bottom: 1px solid #edf1ef; color: var(--ink); font-size: 13px; }
.route-store-chain-group .allocation-row { min-width: 0; }
.route-store-chain-group .allocation-row > span { min-width: 0; overflow-wrap: anywhere; }
.route-store-chain-group .allocation-row small { white-space: nowrap; }
.chain-store-search { display: grid; min-width: 0; gap: 10px; padding: 14px; border: 1px solid #d5e8df; border-radius: 10px; background: #f7fbf9; }
.chain-store-search__heading strong { color: #23483c; font-size: 14px; }
.chain-store-search__heading .fine-print { margin: 5px 0 0; line-height: 1.5; }
.route-store-location-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.route-store-location-fields > label { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.route-store-location-fields select { width: 100%; }
.chain-store-results { display: grid; gap: 6px; max-height: 400px; overflow-y: auto; }
.chain-store-option { min-width: 0; align-items: flex-start; }
.chain-store-option > span { min-width: 0; overflow-wrap: anywhere; }
.chain-store-option > small { max-width: 40%; white-space: normal; text-align: right; }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; z-index: 20; height: auto; padding: 15px; overflow: visible; }
    .brand { padding: 2px 8px 14px; }
    .sidebar nav { display: flex; width: 100%; min-width: 0; max-width: 100%; flex-wrap: nowrap; flex: none; min-height: auto; overflow-x: auto; overflow-y: hidden; gap: 7px; padding: 2px 2px 9px; scroll-snap-type: x proximity; }
    .sidebar nav a { flex: 0 0 auto; min-height: 40px; padding: 9px 12px; white-space: nowrap; scroll-snap-align: start; }
    .sidebar nav a.active { box-shadow: inset 0 -3px #9de0c2; }
    .sidebar nav::-webkit-scrollbar { height: 5px; }
    .sidebar nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.25); }
    .sidebar-user { grid-template-columns: 1fr auto; margin-top: 14px; padding: 12px 8px 0; }
    .sidebar-user span { grid-column: 1; }
    .sidebar-user form { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
    .dashboard-hero { flex-direction: column; align-items: flex-start; }
    .dashboard-hero__meta { width: 100%; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-report-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .chart-grid { grid-template-columns: 1fr; }
    .profile-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .expense-subsection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .purchase-line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .map-panel-heading { align-items: flex-start; flex-direction: column; }
    .map-controls { justify-content: flex-start; }
    .map-summary { grid-template-columns: 1fr; }
    .map-canvas { height: 420px; }
    .map-team-panel { top: 8px; right: 52px; padding: 9px 10px; }
    .route-stop-dialog { padding: 17px; }
    .route-stop-details { grid-template-columns: 1fr; gap: 8px; }
    .team-stop-heading { flex-wrap: wrap; }
    .team-stop-heading__actions { width: 100%; justify-content: flex-start; }
    .team-route-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-report-status-grid, .team-report-plan-statuses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-live-layout { grid-template-columns: 1fr; }
    .work-order-overview { gap: 9px; }
    .work-order-metric { padding: 14px 12px; }
    .work-order-metric > strong { font-size: 21px; }
    .team-live-map-canvas { height: 380px; }
    .team-expense-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-expense-form__description { grid-column: 1 / -1; }
    .team-fuel-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-fuel-form__description { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .main-content { padding: 24px 14px 18px; }
    .topbar { align-items: flex-start; gap: 10px; }
    body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .main-content > .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        min-height: 0;
        margin-bottom: 16px;
        padding: 19px 17px;
        border-radius: 16px;
    }
    .topbar h1 { font-size: clamp(22px, 7vw, 30px); }
    body:not([data-page="dashboard"]):not([data-page="team_portal"]):not([data-page="team_report"]) .topbar h1 { font-size: clamp(23px, 7vw, 31px); }
    .date-chip { flex: 0 0 auto; padding: 7px 9px; font-size: 10px; }
    .route-form-section { padding: 15px; }
    .route-form-section .allocation-fields { padding: 13px; }
    .route-store-location-fields { grid-template-columns: 1fr; }
    .chain-store-option { align-items: flex-start !important; flex-direction: column; }
    .chain-store-option > small { max-width: none; text-align: left; }
    .dashboard-hero { padding: 18px 16px; }
    .dashboard-hero__meta { width: 100%; justify-content: flex-start; }
    .stat-card { min-height: 105px; padding: 16px; }
    .stat-card strong { font-size: 22px; }
    .panel { padding: 16px; }
    body:not([data-page="work_orders"]) .main-content > .panel:not(.work-order-list) > .panel-heading { padding-bottom: 12px; }
    .work-order-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .work-order-metric { gap: 4px; padding: 12px 9px 11px 12px; border-radius: 10px; }
    .work-order-metric > span { min-height: 28px; font-size: 10px; line-height: 1.35; }
    .work-order-metric > strong { font-size: 20px; }
    .work-order-metric > small { font-size: 9px; line-height: 1.35; }
    .work-order-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .work-order-filters a { justify-content: center; gap: 5px; min-height: 36px; padding: 0 6px; font-size: 10px; }
    .work-order-filters a span { min-width: 19px; height: 19px; font-size: 9px; }
    .work-order-create > summary { min-height: 70px; padding: 13px 15px; }
    .work-order-create > summary strong { font-size: 13px; }
    .work-order-create > summary small { max-width: 205px; font-size: 10px; }
    .work-order-create__toggle { gap: 5px; font-size: 10px; }
    .work-order-create > .form-grid, .work-order-create > .notice { padding: 16px; }
    .work-order-list { padding: 0; }
    .work-order-list > .panel-heading { padding: 15px; }
    .work-order-list__count { padding: 5px 8px; font-size: 10px; }
    .work-orders-table { display: block; min-width: 0; }
    .work-orders-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .work-orders-table tbody { display: grid; gap: 10px; padding: 0 12px 12px; }
    .work-orders-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
    .work-orders-table tbody tr:hover { border-color: #cbded5; background: #fbfdfc; }
    .work-orders-table tbody td { min-width: 0; padding: 0; border: 0; font-size: 12px; overflow-wrap: anywhere; }
    .work-orders-table tbody td::before { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; content: attr(data-label); }
    .work-orders-table tbody td:first-child, .work-orders-table tbody td:nth-child(2), .work-orders-table tbody td:last-child { grid-column: 1 / -1; }
    .work-orders-table tbody td:last-child:not(:nth-child(2)) { padding-top: 10px; border-top: 1px solid var(--line); }
    .work-orders-table .inline-form { min-width: 0; }
    .work-orders-table .inline-form select { flex: 1 1 150px; }
    .table-wrap--cards { overflow: visible; }
    .mobile-card-table { display: block; width: 100%; }
    .mobile-card-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .mobile-card-table tbody { display: grid; gap: 10px; }
    .mobile-card-table tbody tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px 12px;
        padding: 13px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #fff;
        box-shadow: 0 3px 12px rgba(23,42,58,.04);
    }
    .mobile-card-table tbody tr:hover { border-color: #cbded5; background: #fbfdfc; }
    .mobile-card-table tbody td {
        min-width: 0;
        padding: 0;
        border: 0;
        font-size: 12px;
        overflow-wrap: anywhere;
    }
    .mobile-card-table tbody td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .35px;
        text-transform: uppercase;
        content: attr(data-label);
    }
    .mobile-card-table tbody td[data-card-wide="true"] { grid-column: 1 / -1; }
    .mobile-card-table tbody td .inline-form { min-width: 0; }
    .panel-heading { align-items: flex-start; gap: 10px; }
    .panel-heading > .muted, .panel-heading > .badge { flex: 0 0 auto; }
    .team-report-plan { padding: 13px; }
    .team-report-plan__header { flex-direction: column; }
    .team-report-plan__header .button { width: 100%; }
    .team-report-status-grid, .team-report-plan-statuses { grid-template-columns: 1fr 1fr; }
    .team-report-status-grid article, .team-report-plan-statuses > div { align-items: flex-start; flex-direction: column-reverse; gap: 5px; padding: 10px; }
    .dashboard-orders-table table { display: block; width: 100%; }
    .dashboard-orders-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .dashboard-orders-table tbody { display: grid; gap: 10px; }
    .dashboard-orders-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
    .dashboard-orders-table tbody td { min-width: 0; padding: 0; border: 0; font-size: 12px; overflow-wrap: anywhere; }
    .dashboard-orders-table tbody td::before { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 700; content: attr(data-label); }
    .dashboard-orders-table tbody td:nth-child(1), .dashboard-orders-table tbody td:nth-child(2) { grid-column: 1 / -1; }
    .form-grid { grid-template-columns: 1fr; }
    .profile-form, .admin-account-form { grid-template-columns: minmax(0, 1fr); }
    .profile-form > .button, .admin-account-form > .button { width: 100%; }
    .admin-account-create > summary { align-items: flex-start; flex-direction: column; gap: 3px; }
    .admin-account-card__heading { align-items: flex-start; }
    .expense-subsection { padding: 12px; }
    .expense-subsection-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .expense-direct-order, .expense-allocation-orders { grid-column: auto; }
    .expense-allocation-orders { max-height: 45vh; padding: 8px 10px; }
    .expense-allocation-orders .allocation-row { align-items: flex-start !important; flex-direction: column; }
    .expense-allocation-orders .allocation-row > span { align-items: flex-start; }
    .expense-allocation-orders .allocation-row .manual-amount { max-width: none; width: 100%; }
    .expense-submit { width: 100%; }
    .purchase-lines-fieldset { padding: 11px; }
    .purchase-line { padding: 10px; }
    .purchase-line-fields { gap: 9px; }
    .purchase-line-fields > label { font-size: 10px; }
    .purchase-line-fields input, .purchase-line-fields select { padding: 7px; font-size: 11px; }
    .team-report-filter { grid-template-columns: 1fr; }
    .team-report-filter .button { width: 100%; }
    .allocation-fields { grid-template-columns: 1fr; }
    .route-form-grid { grid-template-columns: 1fr; }
    .route-form-actions { align-items: stretch; flex-direction: column; }
    .route-form-actions .button { width: 100%; }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crew-list { grid-template-columns: minmax(0, 1fr); }
    .crew-list > .quote-card { min-width: 0; }
    .crew-section-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .crew-section-nav a { justify-content: center; gap: 5px; min-width: 0; padding: 0 6px; font-size: 10px; }
    .crew-section-nav a span { min-width: 19px; height: 19px; padding: 0 4px; font-size: 9px; }
    .crew-create-details > summary { align-items: flex-start; flex-direction: column; gap: 3px; }
    .crew-card .crew-member-entry .crew-account-form { grid-template-columns: minmax(0, 1fr); }
    .crew-account-form .button { width: 100%; }
    .form-grid .full, .form-grid hr { grid-column: auto; }
    .sidebar nav a { font-size: 12px; }
    .team-route-summary { grid-template-columns: 1fr; }
    .team-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-expense-heading { flex-direction: column; }
    .team-expense-review-note { text-align: left; }
    .team-expense-totals { grid-template-columns: 1fr; }
    .team-expense-form { grid-template-columns: 1fr; }
    .team-expense-form__description { grid-column: auto; }
    .team-odometer-readings, .team-fuel-form { grid-template-columns: 1fr; }
    .team-fuel-form > div, .team-fuel-form__description { grid-column: auto; }
    .team-odometer-form > label, .team-odometer-form > .button, .team-fuel-form > .button { width: 100%; }
    .team-expense-row { align-items: flex-start; }
    .team-live-heading { align-items: flex-start; flex-direction: column; }
    .team-live-map-canvas { height: 340px; }
    .team-stop-card { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px; }
    .team-stop-number { width: 34px; height: 34px; }
    .team-stop-photo-form__controls { align-items: stretch; flex-direction: column; }
    .team-stop-photo-form input[type="file"] { width: 100%; max-width: 100%; }
    .team-stop-photo-form__controls .button { width: 100%; }
    .team-stop-dialog__visit { width: 100%; margin-left: 0; }
    .store-a101-result { align-items: stretch; flex-direction: column; }
    .store-a101-result-actions { flex-direction: column; }
    .store-a101-result-actions .button { width: 100%; }
    .team-stop-actions .button { flex: 1 1 100%; }
    .team-stop-actions .team-stop-outcome__unavailable,
    .team-stop-actions .team-stop-outcome__cancelled,
    .team-stop-actions .team-stop-outcome__refused { flex: 1 1 100%; }
    .a101-search-panel { grid-template-columns: 1fr; }
    .a101-store-map { height: min(58vh, 360px); min-height: 250px; }
}
