/* extra.css - components for the pages added on 17 October 2026 (delivery plan, settings,
   store order page, home dashboard, admin menu). assets/app.css is a fixed Tailwind build,
   so new layout lives here. Plain CSS, no build step. */

:root {
    --x-ink: #0f172a; --x-ink2: #334155; --x-mute: #64748b; --x-line: #e2e8f0; --x-soft: #f1f5f9; --x-card: #fff;
    --x-green: #15803d; --x-green-bg: #dcfce7; --x-amber: #92400e; --x-amber-bg: #fef3c7; --x-red: #b91c1c; --x-red-bg: #fee2e2;
    --x-blue: #1d4ed8; --x-blue-bg: #dbeafe;
}

/* ---------- admin menu ---------- */
.x-nav { display: flex; align-items: center; gap: 2px; font-size: 14px; flex-wrap: wrap; margin: 0 -8px; }
.x-nav a, .x-nav button { white-space: nowrap; padding: 8px; border-radius: 6px; color: #cbd5e1; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.x-nav a:hover, .x-nav button:hover { color: #fff; }
.x-nav a.on, .x-nav button.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.x-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: #f59e0b; color: #111827; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.x-nav form { display: inline; margin: 0; }
.x-more { position: relative; }
.x-more-btn::after { content: " \25BE"; font-size: 11px; }
.x-more.open > .x-more-list { display: flex; }
.x-more-list { display: none; flex-direction: column; position: absolute; z-index: 50; top: 100%; left: 0; min-width: 200px; margin-top: 4px; padding: 6px; background: #0f172a; border: 1px solid #334155; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.x-more-list a { padding: 9px 10px; }
.x-menu-btn { display: none; }
@media (max-width: 767px) {
    .x-menu-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 8px 12px; border-radius: 8px; border: 1px solid #334155; background: #1e293b; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
    .x-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 6px 0 4px; padding-top: 6px; border-top: 1px solid #1e293b; }
    .x-nav.open { display: flex; }
    .x-nav a, .x-nav button { padding: 11px 10px; font-size: 15px; text-align: left; }
    .x-more-list { position: static; display: flex; border: 0; box-shadow: none; padding: 0; margin: 0; background: none; min-width: 0; }
    .x-more-btn { display: none; }
}

/* ---------- building blocks ---------- */
.x-page { max-width: 72rem; margin: 0 auto; padding: 20px 12px 48px; color: var(--x-ink); }
@media (min-width: 640px) { .x-page { padding: 20px 16px 48px; } }
.x-page.narrow { max-width: 60rem; }
.x-h1 { font-size: 20px; font-weight: 600; margin: 0; color: var(--x-ink); }
.x-h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--x-ink); }
.x-sub { font-size: 13px; color: var(--x-mute); margin: 2px 0 12px; }
.x-mute { color: var(--x-mute); }
.x-small { font-size: 12.5px; }
.x-card { background: var(--x-card); border: 1px solid var(--x-line); border-radius: 10px; padding: 16px; min-width: 0; }
.x-card + .x-card, .x-stack > * + * { margin-top: 14px; }
.x-grid > .x-card, .x-row > .x-card { margin-top: 0; }
.x-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.x-row.between { justify-content: space-between; }
.x-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.x-grid.wide { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.x-stat .n { font-size: 26px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.x-stat .l { font-size: 13px; color: var(--x-ink2); }
.x-stat .s { font-size: 12.5px; color: var(--x-mute); margin-top: 4px; }
a.x-stat { display: block; color: inherit; text-decoration: none; }
a.x-stat:hover { border-color: #94a3b8; }

.x-badge { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 99px; padding: 1px 8px; white-space: nowrap; background: var(--x-soft); color: var(--x-mute); border: 1px solid transparent; }
.x-badge.green { background: var(--x-green-bg); color: var(--x-green); }
.x-badge.amber { background: var(--x-amber-bg); color: var(--x-amber); }
.x-badge.red { background: var(--x-red-bg); color: var(--x-red); }
.x-badge.blue { background: var(--x-blue-bg); color: var(--x-blue); }

.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 600; border: 1px solid #0f172a; background: #0f172a; color: #fff; cursor: pointer; text-decoration: none; line-height: 1.2; }
.x-btn:hover { background: #1e293b; }
.x-btn.green { background: #16a34a; border-color: #16a34a; }
.x-btn.green:hover { background: #15803d; }
.x-btn.ghost { background: #fff; color: var(--x-ink); border-color: #cbd5e1; }
.x-btn.ghost:hover { background: var(--x-soft); }
.x-btn.danger { background: #fff; color: var(--x-red); border-color: #fca5a5; }
.x-btn.sm { padding: 6px 10px; font-size: 13px; }
.x-btn[disabled] { opacity: .6; cursor: default; }
.x-link { color: var(--x-ink); font-weight: 600; text-decoration: none; }
.x-link:hover { text-decoration: underline; }
.x-a { color: #1d4ed8; }

.x-field label, label.x-label { display: block; font-size: 12.5px; color: var(--x-ink2); margin-bottom: 3px; font-weight: 500; }
.x-input { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font-size: 14px; background: #fff; color: var(--x-ink); max-width: 100%; }
textarea.x-input { width: 100%; min-height: 60px; font-family: inherit; }
.x-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.x-check input { width: 16px; height: 16px; }

.x-note { border-radius: 8px; padding: 10px 12px; font-size: 14px; border: 1px solid #fcd34d; background: #fffbeb; color: #78350f; }
.x-note.blue { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.x-note.red { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.x-note.green { border-color: #bbf7d0; background: #f0fdf4; color: #14532d; }
.x-note b, .x-note strong { font-weight: 600; }

.x-tw { overflow-x: auto; }
.x-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.x-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--x-mute); font-weight: 500; text-align: left; padding: 8px; border-bottom: 1px solid var(--x-line); white-space: nowrap; }
.x-table td { padding: 8px; border-bottom: 1px solid var(--x-soft); vertical-align: top; }
.x-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.x-table tr.muted td { color: var(--x-mute); }
.x-table tfoot td { font-weight: 600; border-top: 1px solid var(--x-line); border-bottom: 0; }

.x-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.x-tabs a { flex: 0 0 auto; display: block; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--x-line); background: #fff; color: var(--x-ink); text-decoration: none; font-size: 13.5px; line-height: 1.25; text-align: center; }
.x-tabs a small { display: block; color: var(--x-mute); font-size: 11.5px; }
.x-tabs a.on { background: #0f172a; border-color: #0f172a; color: #fff; }
.x-tabs a.on small { color: #cbd5e1; }

.x-list { list-style: none; margin: 0; padding: 0; }
.x-list > li { padding: 10px 0; border-bottom: 1px solid var(--x-soft); }
.x-list > li:last-child { border-bottom: 0; }

.x-search { width: 100%; max-width: 320px; }
@media (max-width: 560px) { .x-hide-sm { display: none; } }
@media print {
    .x-noprint, header, nav { display: none !important; }
    .x-card { border: 0; padding: 0; }
    body { background: #fff !important; }
}
