:root {
    --navy: #3d7aad;
    --navy-2: #eaf2f8;
    --navy-3: #c5d8e8;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f5f7fa;
    --card: #ffffff;
    --mint: #3d7aad;
    --mint-ink: #ffffff;
    --blue: #3d7aad;
    --blue-ink: #336891;
    --red: #dc2626;
    --orange: #d97706;
    --sky: #4b84b3;
    --shadow: 0 10px 24px rgba(61, 122, 173, 0.12);
    --radius: 16px;
    --sidebar: 268px;
    --sidebar-collapsed: 84px;
    --sidebar-bg: #3d7aad;
    --sidebar-text: #ffffff;
    --table-head: #eaf2f8;
    --table-head-text: #3d7aad;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-weight: 700;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin: 0; }

.app-body {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
    transition: grid-template-columns .25s ease;
    position: relative;
}

.sidebar-wrap {
    position: relative;
    height: 100vh;
    min-height: 0;
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: auto;
    border-left: 0;
    box-shadow: -8px 0 24px rgba(61, 122, 173, 0.22);
}

.sidebar-toggle {
    position: absolute;
    top: 86px;
    left: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--navy-3);
    border-right: 0;
    background: var(--navy-2);
    color: var(--blue);
    border-radius: 10px 0 0 10px;
    box-shadow: -3px 4px 12px rgba(61, 122, 173, 0.16);
    cursor: pointer;
    transform: translateX(-50%);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sidebar-toggle:hover {
    background: #fff;
    border-color: var(--blue);
    color: var(--blue-ink);
}
.toggle-chevron { transition: transform .25s ease; }
.toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
html.sidebar-collapsed .toggle-chevron { transform: rotate(180deg); }
html.sidebar-collapsed .app-body { grid-template-columns: var(--sidebar-collapsed) 1fr; }
html.sidebar-collapsed .sidebar { padding: 18px 12px; align-items: center; }
html.sidebar-collapsed .brand { margin-bottom: 12px; }
html.sidebar-collapsed .brand div,
html.sidebar-collapsed .side-link span { display: none; }
html.sidebar-collapsed .side-link { justify-content: center; padding: 11px; }

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}
.brand-mark img { width: 36px; height: 36px; display: block; }

.new-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.new-request-btn:hover { background: var(--blue-ink); color: #fff; }
.btn-plus {
    font-size: 18px;
    line-height: 1;
    font-weight: 700;
}

.side-nav { display: grid; gap: 6px; }
.nav-group { display: grid; }
.nav-parent {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
}
.nav-caret {
    margin-right: auto;
    color: #fff;
    transition: transform .2s ease;
}
.nav-group.is-open .nav-caret { transform: rotate(180deg); }
.side-sub {
    display: none;
    gap: 2px;
    padding: 2px 8px 8px 8px;
    margin-right: 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.22);
}
.nav-group.is-open .side-sub { display: grid; }
.side-sublink {
    color: var(--sidebar-text);
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.side-sublink svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #fff;
}
.side-sublink:hover,
.side-sublink.is-active { background: rgba(255, 255, 255, 0.14); color: #fff; }
.side-sublink:hover svg,
.side-sublink.is-active svg { color: #fff; }
html.sidebar-collapsed .side-sub,
html.sidebar-collapsed .nav-caret { display: none; }
html.sidebar-collapsed .nav-parent { justify-content: center; }
.setup-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    margin-bottom: 18px;
    background: #eaf2f8;
    border: 1px solid #c5d8e8;
    border-radius: 14px;
}
.setup-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.setup-tab:hover {
    background: #fff;
    color: #3d7aad;
}
.setup-tab.is-on {
    background: #3d7aad;
    color: #fff;
    box-shadow: 0 6px 14px rgba(61, 122, 173, .28);
}
.setup-tab.is-on:hover { background: #336891; color: #fff; }
.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-weight: 700;
}
.side-link svg { color: #fff; flex-shrink: 0; }
.side-link.is-active,
.side-link:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.side-link.is-active svg,
.side-link:hover svg { color: #fff; }
.nav-parent.is-active { background: rgba(255, 255, 255, 0.14); }
.side-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.side-role {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 0 12px 10px;
}
.staff-legend {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.staff-legend li {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
}
.staff-legend small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    margin-top: 8px;
}
.staff-card { padding: 0; overflow: hidden; }
.staff-table { width: 100%; border-collapse: collapse; }
.staff-table th, .staff-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.staff-table thead th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.staff-table tbody tr:last-child td { border-bottom: 0; }
.staff-table tbody tr:hover { background: #f8fbff; }
.staff-table tr.is-you { background: #f3f8fc; }
.staff-person { display: flex; align-items: center; gap: 12px; }
.staff-ava {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--navy-2);
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.staff-person strong { display: block; }
.staff-person small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.role-pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #eef2f6;
    color: #475569;
}
.role-pill.is-super_admin { background: #122033; color: #fff; }
.role-pill.is-purchasing_manager { background: #eaf2f8; color: #336891; }
.role-pill.is-purchasing_staff { background: #eaf2f8; color: #3d7aad; }
.role-pill.is-warehouse_staff { background: #ecfdf5; color: #047857; }
.dir-rank-col { width: 64px; }
.dir-rank {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    letter-spacing: .04em;
}
.dir-code {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--navy-2);
    color: var(--blue);
    font-family: inherit;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.shell {
    min-width: 0;
    min-height: 0;
    height: 100vh;
    overflow: auto;
    position: relative;
}
.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
}
.topbar-title { font-weight: 700; color: #334155; }
.search {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    height: 44px;
    padding: 4px 4px 4px 4px;
    background: var(--navy-2);
    border: 1px solid var(--navy-3);
    border-radius: 12px;
}
.search-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--blue);
    flex-shrink: 0;
}
.search-icon svg { width: 18px; height: 18px; }
.search input {
    flex: 1;
    min-width: 0;
    height: 36px;
    border: 0;
    background: transparent;
    padding: 0 4px;
    color: var(--ink);
    outline: none;
}
.search input::placeholder { color: #93a4bd; font-weight: 600; }
.search input::-webkit-search-decoration,
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-results-button { display: none; }
.search-btn {
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.search-btn:hover { background: var(--blue-ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 38px;
    height: 38px;
    border: 0;
    background: var(--navy-2);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    color: var(--blue);
}
.icon-btn:hover { background: var(--navy-3); }
.icon-btn .dot {
    position: absolute;
    top: 8px;
    left: 9px;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
}
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--navy-2);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 700;
}
.logout-form { margin: 0; }
.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    font-weight: 700;
    cursor: pointer;
}
.logout-btn:hover { background: #fee2e2; }

.page { padding: 28px; }
.page-head, .detail-head, .hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}
.page-head h1, .hero-head h1, .page-title, .detail-head h1 { font-size: 28px; }
.hero-head p { color: var(--muted); margin-top: 6px; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumbs span { margin: 0 6px; }
.actions { display: flex; gap: 10px; align-items: center; }
.date-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--navy-2);
    border: 1px solid var(--navy-3);
    border-radius: 14px;
    padding: 8px 14px 8px 12px;
    color: var(--blue);
    box-shadow: var(--shadow);
}
.date-chip-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.date-chip-icon svg { width: 18px; height: 18px; }
.date-chip small {
    display: block;
    font-size: 11px;
    color: var(--blue);
}
.date-chip strong {
    display: block;
    font-size: 14px;
    color: var(--navy);
}

.card {
    background: var(--card);
    border: 1px solid #edf1f5;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.card-head h2, .unscheduled h2, .settings-form h2 { font-size: 16px; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid transparent;
    box-shadow: var(--shadow);
}
.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.kpi-icon svg { width: 24px; height: 24px; }
.kpi-body { min-width: 0; }
.kpi-card span { font-size: 13px; }
.kpi-card strong { display: block; font-size: 30px; margin: 6px 0 4px; }
.kpi-card em { font-style: normal; font-size: 13px; font-weight: 700; }
.kpi-blue {
    background: #eaf2f8;
    border-color: #c5d8e8;
    color: #3d7aad;
}
.kpi-blue .kpi-icon { background: #3d7aad; color: #fff; }
.kpi-blue span { color: #4b84b3; }
.kpi-teal {
    background: #eaf2fb;
    border-color: #c5d8e8;
    color: #336891;
}
.kpi-teal .kpi-icon { background: #4b84b3; color: #fff; }
.kpi-teal span { color: #3d7aad; }
.kpi-amber {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.kpi-amber .kpi-icon { background: #f59e0b; color: #fff; }
.kpi-amber span { color: #d97706; }
.kpi-violet {
    background: #eaf2f8;
    border-color: #c5d8e8;
    color: #336891;
}
.kpi-violet .kpi-icon { background: #336891; color: #fff; }
.kpi-violet span { color: #3d7aad; }
.up { color: #059669; }
.down { color: #dc2626; }
.flat { color: #64748b; }

.dash-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 14px;
    margin-bottom: 18px;
}
.donut-wrap {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 22px;
    min-height: 220px;
}
.donut-chart {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}
.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.donut-track, .donut-seg {
    fill: none;
    stroke-width: 3.4;
}
.donut-track { stroke: #e2e8f0; }
.donut-seg {
    stroke-linecap: butt;
    transition: stroke .2s ease;
}
.donut-seg.is-hot { stroke-width: 3.8; }
.donut-center {
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.donut-center strong {
    font-size: 32px;
    line-height: 1;
    color: var(--navy);
}
.donut-center small { color: var(--muted); margin-top: 4px; }
.donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.donut-legend li {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ink);
}
.donut-legend i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}
.donut-legend b { color: var(--navy); font-variant-numeric: tabular-nums; }
.donut-legend li.is-hot b { color: var(--blue); }

@media (max-width: 720px) {
    .donut-wrap { grid-template-columns: 1fr; }
}

.alerts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alert-item {
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: inherit;
}
.alert-item div { display: grid; gap: 4px; min-width: 0; }
.alert-item span { color: var(--muted); font-size: 13px; }
.alert-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.alert-icon svg { width: 18px; height: 18px; }
.alert-critical { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-critical .alert-icon { background: #dc2626; color: #fff; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-success .alert-icon { background: #059669; color: #fff; }
.alert-info { background: #eaf2f8; border: 1px solid #c5d8e8; color: #3d7aad; }
    .alert-info .alert-icon { background: var(--navy); color: #fff; }
a.alert-item:hover { filter: brightness(0.98); }

.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    text-align: right;
    padding: 13px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-weight: 700;
}
.data-table th { color: var(--table-head-text); font-size: 13px; background: var(--table-head); }
.data-table small { display: block; color: var(--muted); }
.excel-card { margin-bottom: 14px; }
.excel-wrap { max-height: 70vh; border: 1px solid #c7d7f0; border-radius: 10px; }
.excel-table { min-width: 100%; width: 100%; border-collapse: collapse; }
.excel-table th, .excel-table td {
    border: 1px solid #c7d7f0;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}
.excel-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--table-head);
    color: var(--table-head-text);
    font-weight: 700;
}
.excel-table tbody tr:nth-child(even) { background: #f8fbff; }
.excel-table tbody tr:hover { background: #eef5ff; }
.excel-table .row-num { color: #64748b; text-align: center; width: 44px; }
.excel-table-dash { min-width: 860px; }
.excel-table-fit { min-width: 100%; }
.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.act-form { display: inline; margin: 0; }
.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.act-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.act-edit { background: #eaf2f8; color: var(--blue); }
.act-edit:hover { background: #c5d8e8; }
.act-delete { background: #fef2f2; color: #dc2626; }
.act-delete:hover { background: #fee2e2; }
.act-view { background: #eaf2f8; color: #3d7aad; }
.act-view:hover { background: #c5d8e8; }
.act-issue { background: #fff7ed; color: #c2410c; }
.act-issue:hover { background: #ffedd5; }
.act-receive { background: var(--blue); color: #fff; }
.act-receive:hover { background: var(--blue-ink); }
.act-download { background: var(--navy-2); color: var(--blue); }
.act-download:hover { background: #d5e4f0; color: var(--blue-ink); }
.actions .act-btn { height: 40px; padding: 0 14px; font-size: 13px; }
.link-danger {
    border: 0;
    background: none;
    color: #dc2626;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.table-foot {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    color: var(--muted);
    font-size: 13px;
}
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 14px;
}
.pager-num, .pager-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    font-size: 13px;
}
.pager-num.is-on {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}
.pager-num:hover, .pager-btn:hover { background: var(--navy-2); color: var(--blue); }
.pager-num.is-on:hover { background: var(--blue); color: #fff; }
.pager-btn.is-disabled { opacity: .4; pointer-events: none; }
.pager-gap { color: var(--muted); padding: 0 4px; font-weight: 700; }
.pager-meta { color: var(--muted); font-size: 12px; margin-right: 8px; }

.badge, .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}
.priority-high { background: #fee2e2; color: #b91c1c; }
.priority-medium { background: #ffedd5; color: #c2410c; }
.priority-low { background: #eaf2f8; color: #3d7aad; }
.status-approved, .status-received { background: #dcfce7; color: #166534; }
.status-pending { background: #e0f2fe; color: #0369a1; }
.status-sent, .status-preparing { background: #ede9fe; color: #6d28d9; }
.status-in_transit { background: #eaf2f8; color: #3d7aad; }
.status-delayed { background: #fee2e2; color: #b91c1c; }
.danger-text { color: #dc2626; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.strong { font-weight: 700; }

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.filters label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); min-width: 180px; }
.filters .pick { min-width: 240px; }
.pick { position: relative; }
.pick-list {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 40;
    max-height: 240px;
    overflow: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #c7d7f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}
.pick-list li {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}
.pick-list li b { color: #3d7aad; margin-left: 6px; }
.pick-list li.is-on,
.pick-list li:hover { background: #eaf2f8; }
.pick-list .is-empty { color: #64748b; cursor: default; font-weight: 600; }
.field-input {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    padding: 10px 12px;
}
textarea.field-input { min-height: 110px; resize: vertical; }
.file-input {
    padding: 10px;
    background: #f8fafc;
    cursor: pointer;
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 10px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.btn-navy { background: var(--blue); color: #fff; }
.btn-navy:hover { background: var(--blue-ink); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #336891; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: #334155; }
.btn-ghost:hover { background: var(--navy-2); color: var(--blue); }
.btn-block { width: 100%; justify-content: center; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 14px; }
.flash { padding: 10px 12px; border-radius: 10px; }
.flash-success { background: #ecfdf5; color: #065f46; }
.flash-warning, .flash-error { background: #fef2f2; color: #991b1b; }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .4);
    display: none;
    place-items: center;
    z-index: 20;
}
.modal.is-open { display: grid; }
.modal-card {
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    overflow: visible;
}
.modal-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-intro { margin-bottom: 16px; font-size: 13px; }
.route-flow {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.route-node {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    min-width: 180px;
}
.route-node strong, .route-node small, .route-node em { display: block; }
.route-node small { color: var(--muted); margin: 4px 0; }
.route-node em { font-style: normal; font-size: 12px; color: #64748b; }
.route-node.is-sent { background: #ecfdf5; border-color: #a7f3d0; }
.route-arrow { font-size: 22px; color: #94a3b8; }
.route-split { display: grid; gap: 10px; }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.file-list li { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 13px; color: #475569; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.about-card p { color: #475569; line-height: 1.8; margin-bottom: 16px; }
.about-dev {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
}
.about-dev strong { color: var(--blue); }
.about-dev span { color: #0f172a; font-weight: 600; }
.about-dev a { font-weight: 700; font-size: 18px; }

.timeline {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    position: relative;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 8%;
    left: 8%;
    height: 3px;
    background: #e2e8f0;
}
.timeline li {
    text-align: center;
    position: relative;
    padding-top: 28px;
}
.timeline li::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cbd5e1;
    position: absolute;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
}
.timeline li.is-done::after { background: #16a34a; }
.timeline li.is-current { outline: 2px solid #86efac; border-radius: 12px; padding: 28px 8px 8px; }
.timeline li.is-current::after { background: #15803d; }
.timeline small { display: block; color: var(--muted); margin-top: 4px; }

.ops-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.ops-kicker {
    color: var(--blue);
    font-size: 12px;
    letter-spacing: .04em;
    margin-bottom: 6px;
}
.ops-hero h1 { font-size: 30px; line-height: 1.2; }
.ops-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ops-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.track-map {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
}
.track-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 12px;
}
.track-head p { color: var(--blue); font-size: 12px; margin-bottom: 4px; }
.track-head strong { display: block; font-size: 20px; }
.track-head small { display: block; color: var(--muted); margin-top: 4px; }
.track-live {
    background: #ecfdf5;
    color: #047857;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.track-map.is-delayed .track-live { background: #fff7ed; color: #c2410c; }
.track-canvas {
    position: relative;
    height: 230px;
    margin: 0 14px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #e8eef4;
    background-image:
        radial-gradient(circle at 18% 24%, rgba(61, 122, 173, .12), transparent 26%),
        radial-gradient(circle at 82% 78%, rgba(51, 104, 145, .14), transparent 28%),
        repeating-linear-gradient(0deg, transparent, transparent 17px, rgba(61, 122, 173, .06) 18px),
        repeating-linear-gradient(90deg, transparent, transparent 17px, rgba(61, 122, 173, .06) 18px);
}
.track-end {
    position: absolute;
    z-index: 3;
    background: #fff;
    color: var(--blue);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .08);
}
.track-end.is-from { top: 10px; right: 10px; }
.track-end.is-to { bottom: 10px; left: 10px; }
.track-road { position: absolute; inset: 0; width: 100%; height: 100%; }
.track-road-base {
    fill: none;
    stroke: #c5d8e8;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-dasharray: 2.4 1.8;
}
.track-road-progress {
    fill: none;
    stroke: #3d7aad;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-dashoffset: 0;
}
.track-pin {
    position: absolute;
    z-index: 4;
    transform: translate(-50%, -118%);
    display: grid;
    justify-items: center;
    gap: 4px;
    pointer-events: none;
}
.track-pin b {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #64748b;
    border: 2px solid #c5d8e8;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
}
.track-pin b svg { width: 16px; height: 16px; }
.track-pin em { font-style: normal; font-size: 11px; color: #334155; font-weight: 700; }
.track-pin.is-done b { background: #16a34a; color: #fff; border-color: #16a34a; }
.track-pin.is-now b { background: var(--blue); color: #fff; border-color: #fff; box-shadow: 0 0 0 5px rgba(61, 122, 173, .18); }
.track-pin.is-wait { opacity: .7; }
.track-vehicle {
    position: absolute;
    z-index: 5;
    transform: translate(-50%, 8%);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #fff;
    color: var(--blue);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(61, 122, 173, .28);
    animation: track-bob 1.4s ease-in-out infinite;
}
.track-vehicle svg { width: 22px; height: 22px; }
@keyframes track-bob {
    0%, 100% { transform: translate(-50%, 8%); }
    50% { transform: translate(-50%, -4%); }
}
.track-steps {
    list-style: none;
    margin: 0;
    padding: 14px 18px 16px;
    display: grid;
    gap: 0;
}
.track-steps li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    position: relative;
    padding: 8px 0 14px;
}
.track-steps li:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 28px;
    right: 13px;
    width: 2px;
    bottom: 0;
    background: #e2e8f0;
}
.track-steps li.is-done:not(:last-child)::before { background: #86efac; }
.track-steps li.is-now:not(:last-child)::before { background: var(--navy-3); }
.track-steps i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-style: normal;
    font-size: 12px;
    background: #e2e8f0;
    color: #64748b;
    z-index: 1;
}
.track-steps i svg { width: 14px; height: 14px; }
.track-steps li.is-done i { background: #16a34a; color: #fff; }
.track-steps li.is-now i { background: var(--blue); color: #fff; }
.track-steps strong { display: block; font-size: 14px; }
.track-steps small { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.track-steps small:first-of-type { color: var(--blue); font-weight: 700; }
.card.ops-stats { margin-bottom: 14px; overflow: hidden; padding: 0; }
.ops-table {
    width: 100%;
    border-collapse: collapse;
}
.ops-table th, .ops-table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.ops-table thead th {
    background: var(--table-head);
    color: var(--table-head-text);
    font-size: 13px;
}
.ops-table tbody th {
    width: 38%;
    color: var(--muted);
    font-weight: 700;
    background: #f8fafc;
}
.ops-table tbody td { color: var(--ink); font-weight: 700; }
.ops-table tbody tr:last-child th,
.ops-table tbody tr:last-child td { border-bottom: 0; }
.ops-issues { margin-top: 14px; }
.ops-issue-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ops-issue-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff7f7;
}
.ops-issue-list p { margin: 0 0 4px; }
.ops-issue-list small { color: var(--muted); }
.issue-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.issue-bars li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    position: relative;
    padding-bottom: 10px;
}
.issue-bars span { font-size: 13px; }
.issue-bars b { color: var(--blue); }
.issue-bars i {
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 99px;
    background: var(--blue);
    display: block;
}
.detail-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
    margin-top: 14px;
}
.stack { display: grid; gap: 14px; }
.supplier-box { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.supplier-logo, .profile-photo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--navy-2);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 800;
}
.meta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #334155; }
.meta-list li { display: flex; align-items: center; gap: 8px; }
.path-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.path-chips span { background: #eaf2f8; color: #3d7aad; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.path-chips span:first-child { background: var(--navy-3); color: var(--blue); }

.schedule-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.unscheduled-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.unscheduled-head b {
    min-width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eaf2f8;
    color: #3d7aad;
    display: grid;
    place-items: center;
    font-size: 14px;
}
.ship-list { display: grid; gap: 8px; margin-top: 12px; }
.ship-card {
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
    cursor: grab;
}
.ship-card strong, .ship-card span, .ship-card small { display: block; }
.ship-card span { margin: 4px 0; }
.schedule-main { min-width: 0; }
.schedule-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.schedule-title h1 { font-size: 20px; }
.schedule-tools { display: grid; gap: 8px; justify-items: end; }
.seg { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 4px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: #475569; }
.seg a.is-on { background: #fff; color: var(--blue); font-weight: 700; }
.date-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-jump {
    position: relative;
    min-width: 180px;
    height: 36px;
    display: grid;
    place-items: center;
}
.date-label { font-weight: 700; pointer-events: none; }
.date-jump input[type="date"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.sched-kpis {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.sched-kpis li {
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    padding: 8px 10px;
    background: #f8fbff;
}
.sched-kpis span { display: block; color: #64748b; font-size: 12px; }
.sched-kpis strong { font-size: 18px; }
.sched-kpis .is-hot { background: #fef2f2; border-color: #fecaca; }
.sched-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
.sched-legend span::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: -1px;
}
.lg-now::before { background: #dbeafe; border: 1px solid #3d7aad; }
.lg-untimed::before { background: #fff7ed; border: 1px solid #fdba74; }
.lg-busy::before { background: #ffedd5; border: 1px solid #f97316; }
.sched-board { overflow: auto; max-height: calc(100vh - 220px); border: 1px solid #dbe3ee; border-radius: 12px; }
.sched-grid {
    min-width: max(100%, calc(88px + var(--wh-count, 3) * 170px));
}
.sched-head, .sched-row {
    display: grid;
    grid-template-columns: 88px repeat(var(--wh-count, 3), minmax(160px, 1fr));
    gap: 6px;
    padding: 6px;
}
.sched-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
    border-bottom: 1px solid #dbe3ee;
}
.sched-wh, .sched-hour, .sched-corner { color: #475569; }
.sched-corner { display: grid; align-items: end; font-size: 12px; font-weight: 700; }
.sched-wh { padding: 4px 2px 6px; }
.sched-wh strong { display: block; }
.sched-wh small { display: block; margin-top: 2px; font-size: 11px; }
.sched-wh.is-warn .cap i { background: #d97706; }
.sched-wh.is-hot .cap i { background: #dc2626; }
.cap { height: 6px; background: #e2e8f0; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.cap i { display: block; height: 100%; background: var(--blue); }
.sched-hour {
    position: sticky;
    right: 0;
    z-index: 1;
    background: #fff;
    border-radius: 8px;
    padding: 6px 8px;
    display: grid;
    align-content: center;
    font-size: 13px;
}
.sched-hour em { color: #3d7aad; font-style: normal; font-size: 11px; font-weight: 800; }
.sched-row.is-now .sched-hour { background: #eaf2f8; color: #1d4ed8; }
.sched-row.is-today .sched-hour { box-shadow: inset 0 0 0 1px #93c5fd; }
.sched-grid.is-compact .sched-row.is-empty:not(.is-now):not(.is-untimed) { display: none; }
.sched-cell {
    min-height: 44px;
    border: 1px dashed #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sched-cell.has-items { min-height: 64px; background: #fff; border-style: solid; }
.sched-cell.is-over { background: #ecfdf5; border-color: #34d399; }
.sched-cell.is-untimed { background: #fff7ed; border-color: #fdba74; }
.sched-cell.is-busy { background: #fff7ed; border-color: #f97316; }
.sched-row.is-now .sched-cell { box-shadow: inset 0 0 0 1px #93c5fd; }
.slot-count {
    font-size: 11px;
    font-weight: 700;
    color: #3d7aad;
    background: #eaf2f8;
    border-radius: 999px;
    padding: 2px 8px;
    align-self: flex-start;
    pointer-events: none;
}
.slot {
    border-radius: 10px;
    padding: 8px;
    display: grid;
    gap: 3px;
    font-size: 13px;
    color: inherit;
    cursor: grab;
    flex: 0 0 auto;
    user-select: none;
    -webkit-user-drag: element;
}
.slot strong,
.slot span,
.slot em {
    pointer-events: none;
}
.slot-confirmed { background: #eaf2f8; }
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.month-head { text-align: center; color: #64748b; font-size: 13px; }
.month-day {
    min-height: 72px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    background: #f8fafc;
    color: inherit;
    display: grid;
    align-content: start;
    gap: 4px;
}
.month-day.is-today { border-color: var(--blue); background: #eaf2f8; }
.month-day.is-selected { box-shadow: inset 0 0 0 2px #3d7aad; }
.month-day.has-orders small { color: #3d7aad; font-weight: 800; }
.month-day.is-delayed { background: #fef2f2; border-color: #f87171; }
.month-day.is-empty { background: transparent; border-color: transparent; }
.slot-pending { background: #e0f2fe; }
.slot-conflict { background: #fee2e2; }
.slot em { font-style: normal; font-size: 11px; font-weight: 700; }

.settings-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    margin-top: 16px;
}
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 10px 8px; color: #64748b; }
.tabs a.is-on { color: var(--blue); font-weight: 700; border-bottom: 2px solid var(--blue); }
.profile-card { text-align: center; }
.profile-photo { width: 84px; height: 84px; border-radius: 18px; margin: 8px auto 12px; font-size: 24px; }
.profile-card h2 { margin-bottom: 8px; }
.profile-card .meta-list { text-align: right; margin: 18px 0; }
.notify-box { display: grid; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; color: #334155; }
.check-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}
.check-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.check-list input { accent-color: var(--blue); }
.text-link { color: var(--blue); font-weight: 600; }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #3d7aad;
    position: relative;
    overflow: hidden;
}
.iso-bg {
    position: absolute;
    inset: 0;
    background-color: #3d7aad;
    background-image:
        radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, .16), transparent 46%),
        radial-gradient(ellipse at 88% 92%, rgba(13, 40, 74, .35), transparent 42%),
        url("../img/login-pattern.svg");
    background-size: auto, auto, 420px 360px;
    background-repeat: no-repeat, no-repeat, repeat;
    opacity: 1;
}
.login-card {
    position: relative;
    width: min(440px, 92vw);
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
    text-align: center;
    border-top: 5px solid #3d7aad;
}
.login-mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: transparent;
    color: var(--blue);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.login-mark img { width: 56px; height: 56px; display: block; }
.login-brand h1 { font-size: 28px; color: var(--navy); }
.login-brand p { color: var(--muted); margin: 6px 0 22px; }
.login-form { text-align: right; }
.field-wrap { position: relative; }
.field-wrap i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue);
    opacity: .7;
}
.field-wrap .field-input { padding-right: 40px; }
.login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 16px;
}
.login-help { color: var(--muted); margin-top: 14px; font-size: 13px; }
.login-help-btn {
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.login-help-btn:hover { color: var(--blue); }

.reply-card {
    width: min(520px, 94vw);
    text-align: right;
}
.reply-card .login-brand { text-align: center; }
.reply-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: grid;
    gap: 10px;
}
.reply-summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}
.reply-summary strong { color: #0f172a; }
.reply-card .field { display: grid; gap: 6px; margin-bottom: 14px; }
.reply-card .field span { font-weight: 600; color: #334155; }
.danger-text { color: #b91c1c; font-size: 12px; }

.wa-page { display: grid; gap: 16px; max-width: 980px; }
.wa-connect-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: center;
    padding: 20px 22px;
    text-align: right;
}
.wa-connect-info h2 { font-size: 18px; margin: 8px 0 6px; }
.wa-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wa-instance {
    color: #64748b;
    font-size: 13px;
}
.wa-qr-box {
    width: 200px;
    height: 200px;
    border: 1px dashed #bfdbfe;
    border-radius: 16px;
    background: #f8fbff;
    display: grid;
    place-items: center;
    margin: 0 auto;
}
.wa-qr-box img { width: 180px; height: 180px; border-radius: 12px; background: #fff; }
.wa-qr-empty, .wa-connected-msg { color: #64748b; font-weight: 700; }
.wa-connected-msg { color: #047857; display: grid; gap: 6px; justify-items: center; }
.wa-pairing { font-size: 15px; margin-top: 8px; }
.wa-connect-actions { margin-top: 14px; display: flex; }
.wa-form { display: grid; gap: 16px; }
.wa-block { padding: 20px 22px 8px; }
.wa-block-head { margin-bottom: 16px; }
.wa-block-head h2 { font-size: 17px; margin-bottom: 4px; color: var(--navy); }
.wa-grid { display: grid; gap: 14px; margin-bottom: 8px; }
.wa-grid-2 { grid-template-columns: 1fr 1fr; }
.wa-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.wa-key-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}
.wa-phone {
    background: #f8fbff;
    border: 1px solid #e8f1ff;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}
.wa-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
}
.wa-toggle span { display: grid; gap: 2px; }
.wa-toggle strong { font-size: 14px; }
.wa-toggle small { color: #64748b; font-size: 12px; }
.wa-toggle-light { background: #fff; }
.wa-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 4px 0 8px;
}
#wa-show-server { margin: 4px 0 12px; }
.wa-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}
.wa-badge.is-ok { background: #ecfdf5; color: #047857; }
.wa-badge.is-wait { background: #eaf2f8; color: #3d7aad; }
.wa-badge.is-bad { background: #fef2f2; color: #b91c1c; }
.check-input { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; }

@media (max-width: 1100px) {
    .kpi-grid, .dash-grid, .detail-grid, .settings-layout, .staff-legend { grid-template-columns: 1fr 1fr; }
    .schedule-layout { grid-template-columns: 1fr; }
    .sched-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-tools { justify-items: start; }
    .track-canvas { height: 200px; }
    .wa-connect-card, .wa-grid-2, .wa-grid-3 { grid-template-columns: 1fr; }
    .topbar { grid-template-columns: 1fr auto; }
    .topbar-title { display: none; }
}
@media (max-width: 720px) {
    .staff-legend { grid-template-columns: 1fr; }
}
