:root {
    --dream-red: #d90416;
    --dream-red-dark: #99000d;
    --dream-red-soft: #fff1f2;
    --ink: #151515;
    --charcoal: #242424;
    --steel: #777b80;
    --line: #e4e7ec;
    --panel: #ffffff;
    --soft: #f5f6f8;
    --success: #12805c;
    --warning: #b7791f;
    --danger: #b42318;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 12px 28px rgba(16, 24, 40, 0.07);
}

.icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
}

.icon-only .nav-icon {
    width: 18px;
    height: 18px;
}

.detail-dialog {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.detail-dialog::backdrop {
    background: rgba(0, 0, 0, .55);
}

.dialog-header,
.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.dialog-header strong { font-size: 18px; }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.dialog-close { width: 36px; height: 36px; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; }

.tracking-dialog-body {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
    gap: 24px;
    padding: 20px;
}

.order-summary-list h3 { margin: 0 0 12px; }
.order-summary-list > div { display: grid; grid-template-columns: 145px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.order-summary-list span { color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 700; }
.order-summary-list strong { overflow-wrap: anywhere; text-align: right; }

.shopify-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.shopify-status-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 0; }
.status-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 700; }
.status-tab span { padding: 1px 7px; border-radius: 10px; background: #eef0f3; font-size: 11px; }
.status-tab.active { border-color: #111; background: #111; color: #fff; }
.status-tab.active span { background: #fff; color: #111; }

.shopify-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(140px, 1fr)); gap: 12px; padding: 16px 18px; }
.shopify-search-field { grid-column: span 2; }
.search-control { display: flex; gap: 8px; }
.search-control input { min-width: 0; flex: 1; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #fafafa; }

.bulk-action-bar { position: sticky; z-index: 8; bottom: 16px; width: fit-content; margin: 14px auto; padding: 10px 12px 10px 18px; display: flex; align-items: center; gap: 14px; border-radius: 7px; background: #111; color: #fff; box-shadow: 0 12px 35px rgba(0, 0, 0, .22); }
.bulk-action-bar[hidden] { display: none; }
.tracking-pagination-controls { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 18px 16px; }
.tracking-pagination-controls .pagination { padding: 0; }
.pagination-all { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 44px; padding: 0 12px; border-radius: 7px; color: #667085; font-weight: 700; text-decoration: none; }
.pagination-all:hover,
.pagination-all.active { color: #111; background: #f2f4f7; }

.shopify-edit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.shopify-edit-grid .full { grid-column: 1 / -1; }

@media (max-width: 1000px) {
    .shopify-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shopify-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shopify-search-field { grid-column: 1 / -1; }
    .shopify-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .tracking-dialog-body,
    .shopify-summary-grid,
    .shopify-filter-grid,
    .shopify-edit-grid { grid-template-columns: 1fr; }
    .shopify-search-field,
    .shopify-edit-grid .full { grid-column: auto; }
    .detail-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
    .dialog-header,
    .dialog-actions,
    .tracking-dialog-body,
    .shopify-edit-grid { padding: 14px; }
    .order-summary-list > div { grid-template-columns: 1fr; gap: 3px; }
    .order-summary-list strong { text-align: left; }
    .bulk-action-bar { width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
    .tracking-pagination-controls { overflow-x: auto; justify-content: flex-start; }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(245, 246, 248, 0.96) 240px),
        var(--soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

form {
    margin: 0;
}

.auth-shell {
    height: 100vh;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
    background: #fff;
    overflow: hidden;
}

.auth-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #fff;
    background: #050505;
    overflow: hidden;
}

.auth-brand-inner {
    position: relative;
    max-width: 460px;
    z-index: 1;
}

.brand-logo-large {
    width: min(360px, 82vw);
    background: #050505;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.auth-brand h1,
.auth-card h1 {
    margin: 28px 0 10px;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: 0;
}

.auth-brand h1 {
    margin-top: 14px;
}

.auth-brand p,
.muted {
    color: #69707a;
}

.auth-brand p {
    color: #d9dde2;
    font-size: 16px;
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 24px 28px;
    overflow-y: auto;
}

.auth-card {
    width: min(520px, 100%);
}

.auth-card-logo {
    display: none;
}

.auth-card > .muted {
    margin-top: 0;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 22px 0;
}

.auth-tabs a {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 14px;
    font-weight: 700;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.auth-tabs a.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.auth-section {
    margin-bottom: 26px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
}

.app-shell main {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 16px;
    color: #f8f9fb;
    background: #050505;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
    flex: 0 0 auto;
    width: 172px;
    height: 112px;
    object-fit: contain;
    border-radius: 6px;
    background: #050505;
    transform: translateX(-12px);
}

.nav-group {
    margin-top: 14px;
}

.nav-group + .nav-group {
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-label {
    color: #8e949c;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    margin: 0 0 8px 10px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #e5e7eb;
    font-weight: 650;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: #cfd3da;
    background: rgba(255, 255, 255, 0.08);
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-link.active,
.nav-link:hover {
    background: rgba(217, 4, 22, 0.95);
    color: #fff;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.nav-link:hover {
    transform: translateX(2px);
}

.nav-link.active::before {
    content: "";
    position: absolute;
    inset: 9px auto 9px 0;
    width: 3px;
    border-radius: 999px;
    background: #fff;
}

.nav-dot {
    display: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 28px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    margin: 0;
    font-size: 23px;
    letter-spacing: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content {
    padding: 24px 28px 42px;
}

.grid {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.single-panel-grid {
    grid-template-columns: minmax(0, min(900px, 100%));
}

.panel,
.stat-card,
.table-panel {
    min-width: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.panel {
    padding: 20px;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.panel-header h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 0;
}

.panel-header p {
    margin: 4px 0 0;
    color: #6b7280;
}

.stat-card {
    position: relative;
    padding: 18px 18px 18px 20px;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--dream-red);
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    line-height: 1;
}

.table-panel {
    overflow: hidden;
}

.table-panel > table,
.panel-table-scroll table {
    min-width: 760px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.table-toolbar strong {
    font-size: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: break-word;
}

th {
    color: #667085;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
    white-space: nowrap;
}

tbody tr:hover td {
    background: #fcfcfd;
}

tr:last-child td {
    border-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field.full {
    grid-column: 1 / -1;
}

.span-full {
    grid-column: 1 / -1;
}

.table-scroll {
    overflow-x: auto;
}

.table-scroll table {
    min-width: 760px;
}

.panel-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.panel-table-scroll table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

label {
    color: #344054;
    font-weight: 750;
}

input,
select,
textarea {
    max-width: 100%;
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 1px rgba(16, 24, 40, 0.02);
    transition: border-color 160ms ease, box-shadow 160ms ease, outline-color 160ms ease;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

.nav-toggle,
.nav-backdrop,
.menu-button {
    display: none;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--dream-red);
    outline: 3px solid rgba(217, 4, 22, 0.11);
    box-shadow: 0 0 0 1px rgba(217, 4, 22, 0.1);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    place-items: center;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--ink);
    background: #f2f4f7;
    outline: none;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.password-toggle .icon-eye-off,
.password-control.is-visible .icon-eye {
    display: none;
}

.password-control.is-visible .icon-eye-off {
    display: block;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 9px 13px;
    color: #fff;
    background: var(--dream-red);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.btn:hover {
    background: var(--dream-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(153, 0, 13, 0.14);
}

.btn.secondary {
    color: var(--ink);
    background: #fff;
    border-color: #d0d5dd;
}

.btn.secondary:hover {
    background: #f3f4f6;
}

.btn.dark {
    background: var(--ink);
}

.btn:active {
    transform: translateY(0);
}

.btn.small {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    border-radius: 999px;
    padding: 4px 9px;
    color: #344054;
    background: #eef2f6;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge.success {
    color: var(--success);
    background: #e7f6ef;
}

.badge.info {
    color: #175cd3;
    background: #eaf2ff;
}

.badge.warning {
    color: var(--warning);
    background: #fff4d7;
}

.badge.danger {
    color: var(--danger);
    background: #fee4e2;
}

.status-badge {
    letter-spacing: 0;
}

.status-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.status-icon svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #1f2937;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    box-shadow: var(--shadow-sm);
}

.alert.success {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.error-list {
    margin: 0 0 16px;
    padding: 12px 18px;
    border-radius: 8px;
    color: #991b1b;
    background: #fee2e2;
}

.pagination {
    padding: 14px 16px;
}

.pagination nav > div:first-child,
.pagination nav > div:last-child > div:first-child {
    display: none !important;
}

.pagination nav > div:last-child {
    display: flex;
    justify-content: flex-end;
}

.pagination nav > div:last-child > div:last-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.pagination svg {
    width: 16px;
    height: 16px;
}

.pagination span,
.pagination a,
.pagination button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 13px;
    line-height: 1;
}

.split-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.split-actions input {
    width: min(280px, 100%);
}

.split-actions select {
    width: auto;
    min-width: 150px;
}

.inline-payment-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.inline-payment-form input {
    width: 132px;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 12px;
}

.empty {
    padding: 34px 18px;
    color: #6b7280;
    text-align: center;
}

.store-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.store-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.store-row strong {
    display: block;
    margin-bottom: 2px;
}

.inline-stat {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.inline-stat span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.inline-stat strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 20px;
    align-items: center;
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid #222;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #070707, #242424);
    box-shadow: var(--shadow-md);
}

.dashboard-hero h2 {
    margin: 6px 0 8px;
    font-size: 28px;
    line-height: 1.1;
}

.dashboard-hero p {
    max-width: 640px;
    margin: 0;
    color: #d9dde3;
    line-height: 1.55;
}

.eyebrow {
    display: inline-flex;
    color: #ffb4bd;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.quick-action-grid a {
    min-height: 44px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.quick-action-grid a:hover {
    background: var(--dream-red);
}

.operation-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.operation-card span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.operation-card strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.dashboard-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) minmax(0, 0.95fr) minmax(0, 0.7fr);
    gap: 16px;
    margin-bottom: 16px;
    min-width: 0;
}

.performance-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 18px;
    align-items: center;
}

.performance-card > div:first-child {
    min-width: 0;
}

.performance-card h2 {
    margin: 6px 0 8px;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.score-ring {
    display: grid;
    place-items: center;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #fff 0 58%, transparent 59%),
        conic-gradient(var(--dream-red) calc(var(--score) * 1%), #edf0f3 0);
}

.score-ring span {
    color: var(--ink);
    font-size: 23px;
    font-weight: 900;
}

.performance-split {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.performance-split div {
    padding: 12px;
    border-radius: 8px;
    background: #fbfcfd;
}

.performance-split span,
.breakdown-row span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.performance-split strong {
    display: block;
    margin-top: 5px;
    font-size: 20px;
}

.mini-progress {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f3;
}

.mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--dream-red);
}

.mini-progress.success span {
    background: var(--success);
}

.mini-progress.info span {
    background: #2e90fa;
}

.mini-progress.warning span {
    background: #d98a05;
}

.mini-progress.danger span {
    background: var(--danger);
}

.check-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.check-list div {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #667085;
    font-weight: 700;
}

.check-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    color: #667085;
    background: #eef2f6;
    font-size: 12px;
    font-weight: 900;
}

.check-list .done {
    color: var(--ink);
}

.check-list .done span {
    color: #fff;
    background: var(--success);
}

.order-breakdown-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.breakdown-row {
    display: grid;
    gap: 8px;
}

.breakdown-row > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.breakdown-row .status-badge,
.breakdown-row .status-badge span {
    display: inline-flex;
    align-items: center;
    color: inherit;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
}

.advice-card {
    display: grid;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.advice-card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.compact-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.manage-divider {
    margin-top: 10px;
}

.timeline {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.timeline-title {
    color: #344054;
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 10px;
}

.timeline-marker {
    width: 10px;
    height: 10px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--dream-red);
    box-shadow: 0 0 0 4px var(--dream-red-soft);
}

@media (max-width: 1320px) {
    .dashboard-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-shell {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        height: auto;
        min-height: 100vh;
        padding: 58px 14px 18px;
        background: linear-gradient(180deg, #fff 0, #f7f8fa 100%);
        overflow: visible;
    }

    .app-shell {
        display: block;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        align-items: flex-start;
        justify-content: center;
        min-height: auto;
        padding: 0;
        width: 100%;
    }

    .auth-card {
        width: min(460px, 100%);
        padding: 20px 18px 22px;
        border: 1px solid var(--line);
        border-radius: 6px;
        background: #fff;
        box-shadow: var(--shadow-md);
    }

    .auth-card-logo {
        display: block;
        width: 126px;
        margin: 0 auto 16px;
        border-radius: 6px;
        background: #050505;
    }

    .auth-card h1 {
        margin: 0 0 8px;
        text-align: center;
    }

    .auth-card > .muted {
        text-align: center;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: min(78vw, 280px);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

    .nav-toggle:checked ~ .sidebar {
        transform: translateX(0);
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        display: none;
        background: rgba(0, 0, 0, 0.38);
    }

    .nav-toggle:checked ~ .nav-backdrop {
        display: block;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
        color: var(--ink);
        font-size: 22px;
        font-weight: 800;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .table-toolbar,
    .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        gap: 12px;
        min-height: auto;
        padding: 14px 16px;
    }

    .topbar-title {
        width: 100%;
    }

    .topbar h1 {
        font-size: 19px;
        overflow-wrap: anywhere;
    }

    .topbar-actions,
    .btn-row,
    .split-actions {
        width: 100%;
    }

    .topbar-actions .btn,
    .btn-row .btn,
    .split-actions .btn,
    .split-actions input,
    .split-actions select,
    .inline-payment-form,
    .inline-payment-form input {
        width: 100%;
    }

    .payments-slips-panel .table-toolbar {
        gap: 2px;
    }

    .payments-slips-panel .table-toolbar-title {
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .payments-slips-panel .table-toolbar-actions {
        gap: 4px;
    }

    .store-row {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-hero,
    .dashboard-insight-grid,
    .quick-action-grid,
    .compact-form {
        grid-template-columns: 1fr;
    }

    .performance-card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .performance-split {
        width: 100%;
    }

    .dashboard-hero {
        padding: 18px;
    }

    .content {
        padding: 14px;
    }

    .table-panel {
        overflow: hidden;
    }

    .table-panel > table,
    .panel-table-scroll table {
        min-width: 760px;
    }

    .panel > table {
        min-width: 760px;
        table-layout: auto;
    }

    .panel > table th,
    .panel > table td {
        overflow-wrap: break-word;
    }

    .panel,
    .stat-card,
    .table-panel {
        border-radius: 8px;
    }
}

@media (max-width: 560px) {
    .auth-shell {
        padding: 48px 12px 14px;
    }

    .auth-brand h1,
    .auth-card h1 {
        font-size: 28px;
    }

    .auth-card {
        padding: 18px 14px 20px;
    }

    .auth-card-logo {
        width: 112px;
        margin-bottom: 14px;
    }

    th,
    td {
        padding: 10px;
    }

    .panel {
        padding: 14px;
    }

    .form-grid .btn,
    .form-grid button:not(.password-toggle),
    .form-grid input[type="file"] {
        width: 100%;
    }

    .stat-card strong {
        font-size: 22px;
    }
}
