  .parking-field input,
  .parking-field select {
    width:100%;
    border:1px solid rgba(14,116,144,0.20);
    border-radius:8px;
    padding:11px 12px;
    background:#fff;
    color:var(--text);
    font:inherit;
    outline:none;
  }
  .parking-field input:focus,
  .parking-field select:focus {
    border-color:#0891b2;
    box-shadow:0 0 0 3px rgba(8,145,178,0.10);
  }
  .parking-field-hint {
    margin-top:5px;
    font-size:11px;
    color:var(--text-faint);
  }
  .parking-delivery-block {
    margin-top:10px;
    padding:10px 12px;
    border:1px solid rgba(14,116,144,0.14);
    border-radius:8px;
    background:rgba(236,254,255,0.58);
    font-size:12px;
  }
  .parking-delivery-block strong {
    display:block;
    color:#0e7490;
    text-transform:uppercase;
    letter-spacing:0.05em;
    font-size:10px;
    margin-bottom:4px;
  }
  .parking-delivery-sheet {
    background:linear-gradient(180deg, #f8fbff 0%, #ffffff 24%);
    border-left-color:rgba(37,99,235,0.16);
  }
  .parking-delivery-sheet .issue-sheet-header {
    border-bottom-color:rgba(37,99,235,0.14);
  }
  .parking-delivery-sheet .issue-sheet-eyebrow {
    background:rgba(37,99,235,0.09);
    color:#1d4ed8;
  }
  .parking-handoff-card {
    display:grid;
    gap:12px;
    border:1px solid rgba(37,99,235,0.14);
    border-radius:8px;
    padding:14px;
    background:rgba(248,251,255,0.88);
  }
  .parking-handoff-card h3 {
    margin:0;
    font-size:16px;
  }
  .parking-handoff-copy-all {
    width:100%;
    justify-content:center;
  }
  .parking-handoff-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border:1px solid rgba(37,99,235,0.12);
    border-radius:8px;
    padding:10px 11px;
    background:#fff;
  }
  .parking-handoff-row > div:first-child {
    min-width:0;
  }
  .parking-handoff-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .parking-handoff-row strong {
    display:block;
    font-size:11px;
    color:#64748b;
    text-transform:uppercase;
    letter-spacing:0.05em;
    margin-bottom:3px;
  }
  .parking-handoff-row span {
    display:block;
    font-weight:700;
    color:var(--text);
    word-break:break-word;
  }
  .parking-handoff-empty {
    border:1px dashed rgba(37,99,235,0.22);
    border-radius:8px;
    padding:14px;
    color:var(--text-muted);
    background:rgba(255,255,255,0.7);
    font-size:13px;
  }
  .parking-handoff-cancelled {
    border:1px solid #fecaca;
    border-radius:8px;
    padding:12px 14px;
    margin-bottom:10px;
    color:var(--red);
    background:var(--red-bg);
    font-size:13px;
    font-weight:700;
  }

  .accounts-view {
    display:grid;
    gap:20px;
    padding:20px 24px 32px;
    max-width:1120px;
    margin:0 auto;
  }
  .accounts-hero {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
  }
  .accounts-hero h2 {
    margin:0;
    font-size:26px;
    line-height:1.08;
  }
  .accounts-hero p {
    margin:6px 0 0;
    color:var(--text-muted);
    font-size:13px;
  }
  .accounts-kpis {
    display:grid;
    grid-template-columns:repeat(4, minmax(0,1fr));
    gap:10px;
  }
  .accounts-kpi {
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--surface);
    padding:14px 16px;
  }
  .accounts-kpi strong {
    display:block;
    font-size:24px;
    line-height:1;
    font-weight:700;
  }
  .accounts-kpi span {
    display:block;
    margin-top:6px;
    font-size:11px;
    font-weight:600;
    color:var(--text-faint);
    text-transform:uppercase;
    letter-spacing:0.05em;
  }
  .accounts-controls {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
  }
  .accounts-controls select,
  .accounts-controls input {
    border:1px solid var(--border);
    border-radius:6px;
    padding:8px 10px;
    font:13px var(--font);
    background:var(--surface);
  }
  .accounts-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(280px,1fr));
    gap:12px;
  }
  .account-card {
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--surface);
    padding:16px;
    display:grid;
    gap:12px;
    box-shadow:var(--shadow);
    transition:box-shadow 0.15s ease;
  }
  .account-card:hover { box-shadow:var(--shadow-lg); }
  .account-card.archived { opacity:0.55; }
  .account-card.archived:hover { opacity:0.75; }
  .account-card-top {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
  }
  .account-title { min-width:0; }
  .account-title strong {
    display:block;
    font-size:14px;
    font-weight:600;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .account-title .account-provider-label {
    display:inline-block;
    margin-top:4px;
    font-size:11px;
    font-weight:600;
    color:var(--text-faint);
    text-transform:uppercase;
    letter-spacing:0.04em;
  }
  .account-badges { display:flex; gap:5px; flex-wrap:wrap; flex-shrink:0; align-content:flex-start; }
  .account-badge {
    padding:3px 8px;
    border-radius:999px;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.04em;
  }
  .account-badge.default { background:var(--green-bg); color:var(--green); border:1px solid var(--green-border); }
  .account-badge.archived { background:var(--surface-2); color:var(--text-muted); border:1px solid var(--border); }
  .account-meta {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px 12px;
    padding:10px 12px;
    background:var(--bg);
    border-radius:8px;
    color:var(--text-muted);
    font-size:12px;
  }
  .account-meta strong {
    display:block;
    color:var(--text-faint);
    font-size:10px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.04em;
    margin-bottom:1px;
  }
  .account-actions {
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    padding-top:2px;
    border-top:1px solid var(--border);
  }
  .account-actions .account-readonly-note {
    align-self:center;
    font-size:11px;
    font-weight:600;
    color:var(--text-faint);
    text-transform:uppercase;
    letter-spacing:0.04em;
  }
  .account-empty {
    grid-column:1 / -1;
    border:1px dashed var(--border);
    border-radius:10px;
    padding:32px;
    text-align:center;
    color:var(--text-muted);
    background:var(--surface);
  }
  .parking-account-preview {
    border:1px solid rgba(37,99,235,0.14);
    border-radius:8px;
    padding:10px 12px;
    background:#f8fbff;
    font-size:12px;
    color:var(--text-muted);
  }
  .parking-account-preview strong { color:var(--text); }
  .parking-account-credentials {
    display:grid;
    gap:6px;
    border-color:rgba(22,163,74,0.22);
    background:#f7fdf9;
  }
  .parking-account-credentials div {
    display:flex;
    align-items:center;
    gap:10px;
  }
  .parking-account-credentials span {
    flex:1;
    color:var(--text);
    font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    overflow-wrap:anywhere;
    text-align:right;
  }
  .credential-copy-btn {
    flex-shrink:0;
    padding:2px 8px;
    font-size:11px;
    border:1px solid #cbd5e1;
    border-radius:5px;
    background:var(--surface-2);
    color:#374151;
    cursor:pointer;
    white-space:nowrap;
  }
  .credential-copy-btn:hover { background:var(--surface); color:var(--text); }
  .credential-copy-btn.copied { background:var(--green-bg); color:var(--green); border-color:var(--green-border); }

  /* Mailbox */
  .mailbox-view { max-width:860px; }
  .mailbox-hero-actions {
    display:flex;
    align-items:center;
    gap:12px;
    flex-shrink:0;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .mailbox-updated {
    font-size:12px;
    color:var(--text-faint);
    white-space:nowrap;
  }
  .mailbox-auto {
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    font-weight:600;
    color:var(--text-muted);
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
  }
  .mailbox-auto input { accent-color:var(--accent); margin:0; }
  .mailbox-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
  }
  .mailbox-segment {
    display:inline-flex;
    padding:3px;
    gap:2px;
    background:var(--surface-2);
    border:1px solid var(--border);
    border-radius:10px;
  }
  .mailbox-segment-btn {
    display:inline-flex;
    align-items:center;
    gap:7px;
    border:0;
    background:transparent;
    border-radius:8px;
    padding:7px 14px;
    font:600 13px var(--font);
    color:var(--text-muted);
    cursor:pointer;
    transition:background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
  .mailbox-segment-btn:hover { color:var(--text); }
  .mailbox-segment-btn.active {
    background:var(--surface);
    color:var(--text);
    box-shadow:0 1px 3px rgba(15,23,42,0.12);
  }
  .mailbox-segment-count {
    font-size:11px;
    font-weight:700;
    line-height:1;
    padding:3px 7px;
    border-radius:999px;
    background:rgba(100,116,139,0.14);
    color:var(--text-muted);
  }
  .mailbox-segment-btn.active .mailbox-segment-count {
    background:rgba(37,99,235,0.12);
    color:var(--accent);
  }
  .mailbox-toolbar select {
    border:1px solid var(--border);
    border-radius:8px;
    padding:8px 10px;
    font:600 13px var(--font);
    color:var(--text);
    background:var(--surface);
    cursor:pointer;
  }
  .mailbox-chips {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }
  .mailbox-chips:empty { display:none; }
  .mailbox-chip {
    display:inline-flex;
    align-items:center;
    gap:7px;
    max-width:100%;
    border:1px solid var(--border);
    border-radius:999px;
    padding:6px 12px;
    background:var(--surface);
    font:600 12px var(--font);
    color:var(--text-muted);
    cursor:pointer;
    transition:border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  }
  .mailbox-chip:hover { border-color:rgba(37,99,235,0.4); color:var(--text); }
  .mailbox-chip.active {
    border-color:var(--accent);
    background:rgba(37,99,235,0.08);
    color:#1e40af;
  }
  .mailbox-chip-dot {
    width:8px;
    height:8px;
    border-radius:50%;
    flex-shrink:0;
    background:hsl(var(--acct-hue, 211) 72% 46%);
  }
  .mailbox-chip-label {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:220px;
  }
  .mailbox-chip-count {
    font-size:10px;
    font-weight:700;
    line-height:1;
    padding:3px 6px;
    border-radius:999px;
    background:rgba(100,116,139,0.14);
  }
  .mailbox-chip.active .mailbox-chip-count {
    background:rgba(37,99,235,0.14);
    color:var(--accent);
  }
  .mailbox-list {
    display:grid;
    gap:10px;
  }
  .mailbox-card {
    position:relative;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface);
    padding:14px 16px;
    display:grid;
    gap:6px;
    box-shadow:var(--shadow);
    transition:box-shadow 0.15s ease;
    overflow:hidden;
  }
  .mailbox-card:hover { box-shadow:var(--shadow-lg); }
  .mailbox-card.has-codes { border-color:rgba(37,99,235,0.28); }
  .mailbox-card.has-codes::before {
    content:"";
    position:absolute;
    left:0; top:0; bottom:0;
    width:3px;
    background:var(--accent);
  }
  .mailbox-card-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }
  .mailbox-account-badge {
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-width:0;
    padding:3px 10px 3px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
    background:hsl(var(--acct-hue, 211) 75% 96%);
    color:hsl(var(--acct-hue, 211) 62% 32%);
    border:1px solid hsl(var(--acct-hue, 211) 60% 84%);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .mailbox-card-time {
    font-size:12px;
    color:var(--text-faint);
    white-space:nowrap;
    flex-shrink:0;
  }
  .mailbox-card-sender {
    font-size:12px;
    font-weight:600;
    color:var(--text-muted);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .mailbox-card-subject {
    font-size:14px;
    font-weight:600;
    color:var(--text);
    overflow-wrap:anywhere;
  }
  .mailbox-card-preview {
    font-size:13px;
    color:var(--text-muted);
    line-height:1.45;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
  }
  .mailbox-codes {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:4px;
  }
  .mailbox-code {
    display:inline-flex;
    align-items:center;
    gap:10px;
    border:1px solid rgba(37,99,235,0.3);
    border-radius:10px;
    padding:8px 12px;
    background:rgba(37,99,235,0.06);
    cursor:pointer;
    font:inherit;
    transition:background 0.15s ease, border-color 0.15s ease;
  }
  .mailbox-code:hover { background:rgba(37,99,235,0.11); border-color:var(--accent); }
  .mailbox-code-value {
    font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size:20px;
    font-weight:700;
    letter-spacing:0.12em;
    color:#1e40af;
  }
  .mailbox-code-copy {
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:0.05em;
    padding:3px 8px;
    border-radius:999px;
    background:var(--surface);
    border:1px solid rgba(37,99,235,0.25);
    color:var(--accent);
  }
  .mailbox-code.copied { background:var(--green-bg); border-color:var(--green-border); }
  .mailbox-code.copied .mailbox-code-value { color:var(--green); }
  .mailbox-code.copied .mailbox-code-copy {
    background:var(--surface);
    border-color:var(--green-border);
    color:var(--green);
  }
  .mailbox-empty {
    border:1px dashed var(--border);
    border-radius:12px;
    padding:40px 24px;
    text-align:center;
    color:var(--text-muted);
    background:var(--surface);
    display:grid;
    justify-items:center;
    gap:6px;
  }
  .mailbox-empty svg { width:40px; height:40px; color:var(--text-faint); margin-bottom:4px; }
  .mailbox-empty h3 { margin:0; font-size:15px; color:var(--text); }
  .mailbox-empty p { margin:0; font-size:13px; max-width:420px; }
  .mailbox-empty .btn { margin-top:8px; }
  .mailbox-error { border-color:rgba(220,38,38,0.3); background:#fef7f7; }
  .mailbox-skeleton { pointer-events:none; }
  .mailbox-skeleton-bar {
    height:12px;
    border-radius:6px;
    background:linear-gradient(90deg, var(--surface-2) 25%, #e8edf4 50%, var(--surface-2) 75%);
    background-size:200% 100%;
    animation:mailbox-shimmer 1.4s ease-in-out infinite;
  }
  @keyframes mailbox-shimmer {
    0% { background-position:200% 0; }
    100% { background-position:-200% 0; }
  }

  /* SMS inbox admin numbers strip */
  .sms-admin-strip {
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface);
    padding:12px 14px;
    margin-bottom:14px;
    display:grid;
    gap:10px;
  }
  .sms-admin-head {
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }
  .sms-admin-head strong { font-size:14px; color:var(--text); }
  .sms-admin-sub { font-size:12px; color:var(--text-muted); flex:1; min-width:200px; }
  .sms-admin-rows { display:grid; gap:6px; }
  .sms-admin-row {
    display:grid;
    grid-template-columns:130px minmax(80px, 160px) 1fr minmax(180px, 240px);
    align-items:center;
    gap:10px;
    padding:6px 8px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--surface-2);
  }
  .sms-admin-row.retired { opacity:0.55; }
  .sms-admin-phone { font-size:13px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
  .sms-admin-label {
    border:none;
    background:none;
    padding:0;
    font-size:12px;
    color:var(--accent);
    text-align:left;
    cursor:pointer;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .sms-admin-label:hover { text-decoration:underline; }
  .sms-admin-meta { font-size:12px; color:var(--text-muted); }
  .sms-admin-assign {
    font-size:12px;
    padding:5px 8px;
    border:1px solid var(--border);
    border-radius:7px;
    background:var(--surface);
    color:var(--text);
    max-width:100%;
  }
  .sms-admin-empty { font-size:12px; color:var(--text-muted); }
  .sms-vendor-note {
    font-size:12px;
    border-radius:8px;
    padding:8px 12px;
    margin-bottom:10px;
  }
  .sms-vendor-note.warn {
    background:#fff8eb;
    border:1px solid rgba(217,119,6,0.3);
    color:#92400e;
  }
  @media (max-width: 720px) {
    .sms-admin-row { grid-template-columns:1fr; gap:4px; }
  }

  /* Match Sheet */
  .match-sheet-backdrop {
    position:fixed; inset:0;
    background:rgba(15,23,42,0.42);
    backdrop-filter:blur(3px);
    opacity:0; pointer-events:none;
    transition:opacity 0.2s ease;
    z-index:90;
  }
  .match-sheet-backdrop.visible { opacity:1; pointer-events:auto; }
  .match-sheet {
    position:fixed; top:0; right:0;
    width:min(520px, 100vw); height:100dvh;
    background:linear-gradient(180deg, #eff6ff 0%, #ffffff 24%);
    border-left:1px solid rgba(37,99,235,0.14);
    box-shadow:-12px 0 40px rgba(15,23,42,0.16);
    transform:translateX(100%);
    transition:transform 0.24s ease;
    z-index:91; display:flex; flex-direction:column;
  }
  .match-sheet.open { transform:translateX(0); }
  .match-sheet-header { padding:20px 20px 14px; border-bottom:1px solid rgba(37,99,235,0.12); }
  .match-sheet-eyebrow {
    display:inline-flex; align-items:center; gap:6px;
    padding:4px 10px; border-radius:999px;
    background:rgba(37,99,235,0.09); color:#1e40af;
    font-size:11px; font-weight:700;
    letter-spacing:0.06em; text-transform:uppercase;
  }
  .match-sheet-header h2 { margin-top:12px; font-size:22px; line-height:1.1; }
  .match-sheet-body { flex:1; overflow:auto; padding:18px 20px 20px; }
  .match-summary-card {
    border:1px solid rgba(37,99,235,0.16);
    background:rgba(255,255,255,0.8);
    border-radius:18px; padding:16px;
    box-shadow:0 8px 24px rgba(37,99,235,0.08);
  }
  .match-summary-kicker {
    font-size:11px; font-weight:700; color:#1e40af;
    text-transform:uppercase; letter-spacing:0.06em;
  }
  .match-summary-card h3 { margin-top:6px; font-size:18px; line-height:1.25; }
  .match-summary-meta {
    margin-top:10px; display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:10px; font-size:12px;
  }
  .match-summary-meta strong {
    display:block; font-size:10px; text-transform:uppercase;
    letter-spacing:0.06em; color:var(--text-faint);
  }
  .match-candidates-label {
    margin-top:18px; margin-bottom:10px;
    font-size:12px; font-weight:700; color:#1e40af;
    text-transform:uppercase; letter-spacing:0.06em;
  }
  .match-candidate-card {
    border:1px solid var(--border); border-radius:14px;
    padding:14px; margin-bottom:10px; cursor:pointer;
    transition:all 0.15s ease; background:#fff;
  }
  .match-candidate-card:hover { border-color:rgba(37,99,235,0.4); }
  .match-candidate-card.selected {
    border-color:#2563eb; background:rgba(37,99,235,0.04);
    box-shadow:0 0 0 2px rgba(37,99,235,0.2);
  }
  .match-candidate-card .candidate-header {
    display:flex; justify-content:space-between; align-items:center;
  }
  .match-candidate-card .candidate-score {
    padding:2px 8px; border-radius:999px; font-size:11px; font-weight:700;
  }
  .match-candidate-card .candidate-score.high { background:#dcfce7; color:#166534; }
  .match-candidate-card .candidate-score.medium { background:#fef9c3; color:#854d0e; }
  .match-candidate-card .candidate-score.low { background:#fee2e2; color:#991b1b; }
  .match-candidate-card .candidate-details {
    margin-top:8px; display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:6px; font-size:12px;
  }
  .match-candidate-card .candidate-details strong {
    display:block; font-size:10px; text-transform:uppercase;
    letter-spacing:0.06em; color:var(--text-faint);
  }
  .match-candidate-card .candidate-reasons {
    margin-top:8px; display:flex; flex-wrap:wrap; gap:4px;
  }
  .match-candidate-card .reason-chip {
    padding:2px 6px; border-radius:4px; font-size:10px;
    background:rgba(37,99,235,0.08); color:#1e40af;
  }
  .match-sheet-footer {
    border-top:1px solid rgba(37,99,235,0.12);
    padding:14px 20px 18px; display:flex; gap:10px;
    justify-content:flex-end; align-items:center; flex-wrap:wrap;
    background:rgba(255,255,255,0.95);
    position:sticky; bottom:0;
  }
  .match-sheet-footer .match-error {
    flex:1; font-size:12px; color:var(--red);
  }
  .match-empty-state {
    text-align:center; padding:40px 20px;
    color:var(--text-muted); font-size:13px;
  }
  .match-loading { text-align:center; padding:40px 20px; }
  .match-excluded-info {
    margin-top:12px; padding:10px 14px; border-radius:10px;
    background:rgba(0,0,0,0.03); font-size:11px; color:var(--text-muted);
  }
  .match-qty-override-btn {
    display:inline-block; margin-top:8px; padding:4px 10px; border-radius:6px;
    background:#f59e0b; color:#fff; border:none; font-size:11px; font-weight:600;
    cursor:pointer;
  }
  .match-qty-override-btn:hover { background:#d97706; }
  .match-qty-override-btn.active { background:#7c3aed; }
  .qty-mismatch-badge {
    display:inline-block; padding:1px 6px; border-radius:4px;
    background:#fef3c7; color:#92400e; font-size:10px; font-weight:600; margin-left:6px;
  }
  .split-plan-badge {
    display:inline-block; padding:1px 6px; border-radius:4px;
    background:#e0f2fe; color:#075985; font-size:11px; font-weight:700; margin-left:6px;
  }
  .short-qty-badge {
    display:inline-block; padding:1px 6px; border-radius:4px;
    background:#fee2e2; color:#991b1b; font-size:11px; font-weight:700; margin-left:6px;
  }
  .match-candidate-card.disabled {
    cursor:not-allowed; opacity:0.58; background:#f9fafb;
  }
  .match-candidate-card.disabled:hover { border-color:var(--border); }
  .candidate-split-plan {
    margin-top:10px; padding:8px 10px; border-radius:8px;
    background:#f0f9ff; border:1px solid #bae6fd; color:#075985;
    font-size:12px; line-height:1.35;
  }
  .candidate-short-note {
    margin-top:10px; padding:8px 10px; border-radius:8px;
    background:#fef2f2; border:1px solid #fecaca; color:#991b1b;
    font-size:12px; line-height:1.35;
  }
  .match-selection-note {
    flex:1 0 100%; margin:0 0 4px; padding:10px 12px; border-radius:8px;
    background:#ecfdf5; border:1px solid #a7f3d0; color:#065f46;
    font-size:12px; line-height:1.4;
  }
  .status-badge.matched { background:#dcfce7; color:#166534; }
  .status-badge.match-error { background:#fee2e2; color:#991b1b; }
  .status-badge.unmatched { background:#fef3c7; color:#92400e; }
  .btn-match {
    background:#2563eb; color:#fff; border:none;
    padding:4px 10px; border-radius:6px; font-size:12px;
    font-weight:600; cursor:pointer;
  }
  .btn-match:hover { background:#1d4ed8; }
  .btn-match:disabled { opacity:0.5; cursor:not-allowed; }
  .btn-match-confirm {
    background:#059669; color:#fff; border:none;
    padding:8px 16px; border-radius:8px; font-size:13px;
    font-weight:600; cursor:pointer;
  }
  .btn-match-confirm:hover { background:#047857; }
  .btn-match-confirm:disabled { opacity:0.5; cursor:not-allowed; }

  /* Empty state */
  .empty-state {
    text-align:center; padding:60px 20px; color:var(--text-muted);
  }
  .empty-state svg { width:48px; height:48px; margin-bottom:12px; opacity:0.4; }
  .empty-state p { font-size:14px; }

  /* Parking Coming Soon Overlay */
  .parking-overlay {
    display:none; flex-direction:column; align-items:center; justify-content:center;
    padding:80px 32px; text-align:center; position:relative; overflow:hidden;
    min-height:60vh;
  }
  .parking-overlay.visible { display:flex; }
  .parking-overlay::before {
    content:''; position:absolute; inset:0;
    background:
      radial-gradient(ellipse 600px 400px at 30% 20%, rgba(37,99,235,0.06) 0%, transparent 70%),
      radial-gradient(ellipse 500px 350px at 70% 80%, rgba(124,58,237,0.06) 0%, transparent 70%);
    pointer-events:none;
  }
  .parking-icon-wrap {
    position:relative; width:120px; height:120px; margin-bottom:32px;
  }
  .parking-icon-ring {
    position:absolute; inset:0; border-radius:50%;
    border:2px dashed rgba(124,58,237,0.25);
    animation: parking-spin 20s linear infinite;
  }
  .parking-icon-ring:nth-child(2) {
    inset:8px; border-color:rgba(37,99,235,0.2);
    animation-direction:reverse; animation-duration:15s;
  }
  .parking-icon-inner {
    position:absolute; inset:18px; border-radius:50%;
    background:linear-gradient(135deg, var(--blue-bg), var(--purple-bg));
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 8px 32px rgba(124,58,237,0.12);
  }
  .parking-icon-inner svg {
    width:36px; height:36px; color:var(--purple);
  }
  @keyframes parking-spin {
    to { transform:rotate(360deg); }
  }
  .parking-overlay h2 {
    font-size:22px; font-weight:700; margin-bottom:8px;
    background:linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip:text; -webkit-text-fill-color:transparent;
    background-clip:text;
  }
  .parking-overlay .parking-sub {
    font-size:15px; color:var(--text-muted); max-width:400px;
    line-height:1.6; margin-bottom:24px;
  }
  .parking-pulse-bar {
    display:flex; align-items:center; gap:8px;
    padding:8px 16px; border-radius:20px;
    background:var(--surface); border:1px solid var(--border);
    font-size:12px; font-weight:500; color:var(--text-muted);
    box-shadow:var(--shadow);
  }
  .parking-pulse-dot {
    width:8px; height:8px; border-radius:50%;
    background:var(--purple);
    animation:parking-pulse 2s ease-in-out infinite;
  }
  @keyframes parking-pulse {
    0%, 100% { opacity:0.4; transform:scale(0.9); }
    50% { opacity:1; transform:scale(1.2); }
  }

  /* ─── Arena Leaderboard ─── */
  .lb-container { padding:16px 24px; max-width:900px; margin:0 auto; }
  .lb-section { margin-bottom:24px; }
  .lb-section-title {
    font-size:11px; font-weight:600; text-transform:uppercase;
    letter-spacing:0; color:var(--text-muted); margin-bottom:10px;
  }
  .lb-cards { display:flex; flex-direction:column; gap:8px; }
  .lb-card {
    display:flex; align-items:center; gap:14px;
    padding:14px 16px; border-radius:var(--radius);
    border:1px solid var(--border); background:var(--surface);
    transition:transform 0.25s ease, box-shadow 0.25s ease;
    position:relative; overflow:hidden;
  }
  .lb-card:hover { transform:translateY(-1px); box-shadow:var(--shadow-lg); }
  .lb-card.rank-1 { border-color:var(--amber); background:linear-gradient(135deg, #fffbeb 0%, var(--surface) 60%); }
  .lb-card.rank-2 { border-color:#94a3b8; background:linear-gradient(135deg, #f1f5f9 0%, var(--surface) 60%); }
  .lb-card.rank-3 { border-color:#d97706; background:linear-gradient(135deg, #fff7ed 0%, var(--surface) 60%); }
  .lb-rank {
    font-size:18px; font-weight:800; width:32px; text-align:center;
    color:var(--text-faint); flex-shrink:0;
  }
  .lb-card.rank-1 .lb-rank { color:#d97706; }
  .lb-card.rank-2 .lb-rank { color:#64748b; }
  .lb-card.rank-3 .lb-rank { color:#c2410c; }
  .lb-avatar {
    width:40px; height:40px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:16px; color:#fff; flex-shrink:0;
    position:relative;
  }
  .lb-avatar-ring {
    position:absolute; inset:-3px; border-radius:50%; border:2px solid transparent;
  }
  .lb-card.rank-1 .lb-avatar-ring { border-color:#d97706; }
  .lb-info { flex:1; min-width:0; }
  .lb-name { font-size:14px; font-weight:600; }
  .lb-level-line { display:flex; align-items:center; gap:6px; margin-top:2px; }
  .lb-level-badge {
    font-size:10px; font-weight:700; padding:2px 6px;
    border-radius:10px; white-space:nowrap;
  }
  .lb-xp-text { font-size:11px; color:var(--text-muted); }
  .lb-xp-bar-bg {
    width:100%; height:4px; border-radius:2px;
    background:var(--surface-2); margin-top:4px; overflow:hidden;
  }
  .lb-xp-bar-fill { height:100%; border-radius:2px; transition:width 0.6s ease; }
  .lb-stats-col { display:flex; gap:16px; flex-shrink:0; align-items:center; }
  .lb-stat { text-align:center; }
  .lb-stat-val { font-size:16px; font-weight:700; line-height:1.2; }
  .lb-stat-label { font-size:10px; color:var(--text-muted); }
  .lb-trend {
    display:flex; align-items:center; gap:2px;
    font-size:11px; font-weight:600; margin-left:4px;
  }
  .lb-trend.up { color:var(--green); }
  .lb-trend.down { color:var(--red); }
  .lb-trend.same { color:var(--text-faint); }
  .lb-badges { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
  .lb-badge {
    display:inline-flex; align-items:center; gap:4px;
    padding:3px 8px; border-radius:12px;
    font-size:10px; font-weight:600;
    background:var(--surface-2); color:var(--text-muted);
    border:1px solid var(--border);
  }
  .lb-badge.earned { background:var(--purple-bg); color:var(--purple); border-color:var(--purple-border); }
  .lb-badge.gold { background:#fffbeb; color:#92400e; border-color:#fde68a; }
  .lb-race {
    padding:16px; border-radius:var(--radius);
    border:1px solid var(--border); background:var(--surface);
  }
  .lb-race-header {
    display:flex; justify-content:space-between; align-items:center;
    margin-bottom:12px;
  }
  .lb-race-title { font-size:14px; font-weight:600; }
  .lb-race-countdown {
    font-size:11px; color:var(--text-muted);
    display:flex; align-items:center; gap:4px;
  }
  .lb-race-bars { display:flex; flex-direction:column; gap:8px; }
  .lb-race-row { display:flex; align-items:center; gap:10px; }
  .lb-race-name { width:50px; font-size:12px; font-weight:500; text-align:right; flex-shrink:0; }
  .lb-race-track {
    flex:1; height:28px; border-radius:6px;
    background:var(--surface-2); overflow:hidden; position:relative;
  }
  .lb-race-fill {
    height:100%; border-radius:6px;
    display:flex; align-items:center; justify-content:flex-end;
    padding-right:8px; font-size:11px; font-weight:700; color:#fff;
    transition:width 0.8s cubic-bezier(0.16,1,0.3,1);
    min-width:28px;
  }
  .lb-race-count {
    font-size:12px; font-weight:600; width:24px; text-align:center; flex-shrink:0;
  }
  .lb-h2h {
    padding:14px 16px; border-radius:var(--radius);
    border:1px solid var(--border); background:var(--surface);
    margin-bottom:8px;
  }
  .lb-h2h-matchup {
    display:flex; align-items:center; justify-content:center; gap:12px;
  }
  .lb-h2h-player {
    display:flex; flex-direction:column; align-items:center; gap:4px; flex:1;
  }
  .lb-h2h-avatar {
    width:36px; height:36px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    font-weight:700; font-size:14px; color:#fff;
  }
  .lb-h2h-name { font-size:12px; font-weight:600; }
  .lb-h2h-score { font-size:20px; font-weight:800; }
  .lb-h2h-vs {
    font-size:11px; font-weight:700; color:var(--text-faint);
    text-transform:uppercase; letter-spacing:0;
  }
  .lb-h2h-winner .lb-h2h-score { color:var(--green); }
  .lb-h2h-label {
    font-size:10px; color:var(--text-muted); text-align:center; margin-top:6px;
  }
  .lb-crown {
    position:absolute; top:-8px; right:-4px; font-size:14px;
  }

  /* ─── Stats Progress Room ─── */
  .stats-container {
    padding:18px 24px 28px;
    max-width:1240px;
    margin:0 auto;
  }
  .arena-shell { display:grid; gap:14px; }
  .arena-hero {
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:18px;
    align-items:start;
    padding:18px 20px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:#fbfaf7;
    box-shadow:var(--shadow);
  }
  .arena-eyebrow {
    color:var(--accent);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:0;
    margin-bottom:6px;
  }
  .arena-hero h2 {
    margin:0;
    font-size:26px;
    line-height:1.15;
  }
  .arena-hero p {
    margin:7px 0 0;
    color:var(--text-muted);
    max-width:640px;
    font-size:13px;
  }
  .arena-cycle {
    min-width:190px;
    padding:12px 14px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    text-align:right;
  }
  .arena-cycle strong {
    display:block;
    font-size:20px;
    line-height:1.1;
  }
  .arena-cycle span {
    display:block;
    margin-top:4px;
    color:var(--text-muted);
    font-size:11px;
  }
  .arena-user-select {
    display:flex;
    gap:8px;
    overflow-x:auto;
    padding-bottom:2px;
  }
  .arena-user-chip {
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:38px;
    padding:7px 10px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    color:var(--text-muted);
    font:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    white-space:nowrap;
  }
  .arena-user-chip.active {
    color:#1e3a8a;
    background:var(--blue-bg);
    border-color:var(--blue-border);
  }
  .arena-avatar {
    width:30px;
    height:30px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-weight:800;
    flex:0 0 auto;
  }
  .arena-grid {
    display:grid;
    grid-template-columns:minmax(0, 1fr) 340px;
    gap:14px;
    align-items:start;
  }
  .arena-main,
  .arena-side {
    display:grid;
    gap:12px;
  }
  .arena-metrics {
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
  }
  .arena-metric {
    min-height:88px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    display:grid;
    align-content:space-between;
    gap:10px;
  }
  .arena-metric label {
    color:var(--text-muted);
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:0;
  }
  .arena-metric strong {
    font-size:26px;
    line-height:1;
  }
  .arena-metric small {
    color:var(--text-muted);
    font-size:11px;
  }
  .arena-metric small.good { color:var(--green); }
  .arena-chart-grid {
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    gap:12px;
  }
  .arena-card {
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    box-shadow:var(--shadow);
    overflow:hidden;
  }
  .arena-card-pad {
    padding:14px;
    display:grid;
    gap:12px;
  }
  .arena-card-head {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:13px 14px 0;
  }
  .arena-card-head strong {
    font-size:13px;
  }
  .arena-card-head span {
    color:var(--text-muted);
    font-size:12px;
    text-align:right;
  }
  .arena-bars {
    height:184px;
    display:grid;
    grid-template-columns:repeat(7, minmax(18px, 1fr));
    align-items:end;
    gap:8px;
    padding:14px 14px 10px;
  }
  .arena-bar {
    min-height:18px;
    border-radius:6px 6px 2px 2px;
    display:grid;
    align-content:end;
    justify-items:center;
    color:#fff;
    font-size:10px;
    font-weight:800;
    padding-bottom:5px;
    background:var(--green);
  }
  .arena-bar.zero {
    color:var(--text-faint);
    background:var(--surface-2);
  }
  .arena-bar-labels {
    display:grid;
    grid-template-columns:repeat(7, minmax(18px, 1fr));
    gap:8px;
    padding:0 14px 13px;
    color:var(--text-muted);
    font-size:11px;
    text-align:center;
  }
  .arena-line-chart {
    width:100%;
    height:184px;
    display:block;
  }
  .arena-heatmap {
    display:grid;
    grid-template-columns:72px repeat(7, minmax(0, 1fr));
    gap:7px;
    padding:14px;
    align-items:center;
  }
  .arena-heat-label,
  .arena-heat-day {
    color:var(--text-muted);
    font-size:11px;
    font-weight:700;
  }
  .arena-heat-day {
    text-align:center;
  }
  .arena-heat-cell {
    min-height:34px;
    border-radius:6px;
    display:grid;
    place-items:center;
    color:#134e4a;
    background:#ccfbf1;
    font-size:10px;
    font-weight:800;
  }
  .arena-heat-cell.hot {
    color:#fff;
    background:#0f766e;
  }
  .arena-heat-cell.warm {
    background:#5eead4;
  }
  .arena-progress-track {
    width:100%;
    height:7px;
    border-radius:7px;
    background:var(--surface-2);
    overflow:hidden;
  }
  .arena-progress-fill {
    height:100%;
    border-radius:7px;
  }
  .arena-profile {
    display:grid;
    gap:13px;
  }
  .arena-profile-row {
    display:flex;
    align-items:center;
    gap:10px;
  }
  .arena-profile-row strong,
  .arena-profile-row span {
    display:block;
  }
  .arena-profile-row span {
    color:var(--text-muted);
    font-size:12px;
  }
  .arena-insights {
    display:grid;
    gap:8px;
  }
  .arena-insight {
    display:grid;
    grid-template-columns:34px minmax(0, 1fr) auto;
    gap:10px;
    align-items:center;
    padding:9px 0;
    border-top:1px solid var(--border);
  }
  .arena-insight:first-child {
    border-top:none;
    padding-top:0;
  }
  .arena-insight-icon {
    width:34px;
    height:34px;
    border-radius:var(--radius);
    display:grid;
    place-items:center;
    color:#fff;
  }
  .arena-insight strong,
  .arena-insight span {
    display:block;
  }
  .arena-insight strong {
    font-size:12px;
  }
  .arena-insight span,
  .arena-insight time {
    color:var(--text-muted);
    font-size:11px;
  }
  .arena-pill {
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:4px 8px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface-2);
    color:var(--text-muted);
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
  }
  .arena-team-list {
    display:grid;
    gap:8px;
  }
  .arena-team-row {
    width:100%;
    display:grid;
    grid-template-columns:auto minmax(0, 1fr) auto;
    gap:10px;
    align-items:center;
    padding:10px;
    border:1px solid var(--border);
    border-radius:var(--radius);
    background:var(--surface);
    color:var(--text);
    font:inherit;
    text-align:left;
    cursor:pointer;
  }
  .arena-team-row.active {
    border-color:var(--blue-border);
    background:var(--blue-bg);
  }
  .arena-team-copy strong,
  .arena-team-copy span {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .arena-team-copy strong {
    font-size:13px;
  }
  .arena-team-copy span {
    color:var(--text-muted);
    font-size:11px;
  }
  .arena-team-score {
    text-align:right;
    font-size:12px;
    font-weight:800;
    color:var(--text);
  }
  .arena-team-score span {
    display:block;
    color:var(--text-muted);
    font-size:10px;
    font-weight:700;
  }
  .arena-badges {
    display:flex;
    flex-wrap:wrap;
    gap:6px;
  }
  .arena-badge {
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:4px 8px;
    border:1px solid var(--purple-border);
    border-radius:var(--radius);
    background:var(--purple-bg);
    color:var(--purple);
    font-size:11px;
    font-weight:800;
  }
  @media (max-width:1080px) {
    .arena-grid {
      grid-template-columns:1fr;
    }
    .arena-side {
      grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
      align-items:start;
    }
  }
  @media (max-width:768px) {
    .lb-container,
    .stats-container {
      padding:12px;
    }
    .arena-hero {
      grid-template-columns:1fr;
      padding:14px;
    }
    .arena-cycle {
      min-width:0;
      text-align:left;
    }
    .arena-metrics,
    .arena-chart-grid,
    .arena-side {
      grid-template-columns:1fr;
    }
    .arena-bars {
      height:150px;
      gap:5px;
      padding-left:10px;
      padding-right:10px;
    }
    .arena-bar-labels {
      gap:5px;
      padding-left:10px;
      padding-right:10px;
    }
    .arena-heatmap {
      grid-template-columns:54px repeat(7, minmax(24px, 1fr));
      gap:5px;
      padding:10px;
      overflow-x:auto;
    }
    .arena-heat-cell {
      min-height:28px;
    }
  }

  /* ─── Competition ─── */
  .competition-container { padding:18px 24px 28px; max-width:980px; margin:0 auto; }
  .competition-hero {
    display:flex; justify-content:space-between; align-items:flex-start; gap:16px;
    padding:18px 20px; border:1px solid var(--border); border-radius:var(--radius);
    background:linear-gradient(135deg, #eff6ff 0%, var(--surface) 60%);
    box-shadow:var(--shadow); margin-bottom:16px;
  }
  .competition-eyebrow {
    font-size:11px; font-weight:700; color:var(--accent);
    text-transform:uppercase; letter-spacing:0.08em; margin-bottom:6px;
  }
  .competition-hero h2 { margin:0; font-size:24px; letter-spacing:-0.02em; }
  .competition-subtitle { margin-top:6px; color:var(--text-muted); font-size:13px; }
  .competition-metric {
    min-width:180px; padding:12px 14px; border-radius:12px;
    background:var(--surface); border:1px solid var(--border); text-align:right;
  }
  .competition-metric strong { display:block; font-size:24px; line-height:1; }
  .competition-metric span { display:block; margin-top:4px; font-size:11px; color:var(--text-muted); }
  .competition-card {
    border:1px solid var(--border); border-radius:var(--radius);
    background:var(--surface); box-shadow:var(--shadow); overflow:hidden;
  }
  .competition-table { width:100%; border-collapse:collapse; }
  .competition-table th {
    padding:10px 12px; font-size:10px; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:0.06em; background:var(--surface-2);
    border-bottom:1px solid var(--border); text-align:left;
  }
  .competition-table td { padding:12px; border-bottom:1px solid var(--border); font-size:13px; }
  .competition-table tr:last-child td { border-bottom:none; }
  .competition-rank {
    width:34px; height:34px; border-radius:50%; display:inline-flex;
    align-items:center; justify-content:center; font-weight:800;
    color:var(--text-muted); background:var(--surface-2);
  }
  .competition-rank.rank-1 { color:#92400e; background:#fffbeb; border:1px solid #fde68a; }
  .competition-rank.rank-2 { color:#475569; background:#f1f5f9; border:1px solid #cbd5e1; }
  .competition-rank.rank-3 { color:#c2410c; background:#fff7ed; border:1px solid #fed7aa; }
  .competition-person { font-weight:700; }
  .competition-count { font-weight:800; font-size:18px; }
  .competition-points-unit {
    margin-left:2px; font-size:11px; font-weight:700; color:var(--text-muted);
    text-transform:uppercase; letter-spacing:0.04em;
  }
  .competition-metric .competition-metric-sub { margin-top:2px; color:var(--text-faint); }
  .competition-scoring-chips {
    display:inline-flex; align-items:center; gap:6px; margin-top:10px;
  }
  .competition-weight-chip {
    display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px;
    font-size:11px; font-weight:700; line-height:1.4; letter-spacing:0.02em;
    color:var(--text-muted); background:var(--surface-2); border:1px solid var(--border);
  }
  .competition-weight-chip.is-boost {
    color:#92400e; border:1px solid #fde68a;
    background:linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  }
  .competition-table th .competition-weight-chip {
    margin-left:4px; padding:1px 6px; font-size:10px; text-transform:none;
  }
  .competition-muted { color:var(--text-muted); font-size:12px; }
  .competition-error {
    padding:18px; border:1px solid #fca5a5; border-radius:var(--radius);
    background:var(--red-bg); color:var(--red); font-size:13px;
  }
  .competition-hero-main { min-width:0; }
  .competition-hero h2 {
    display:inline-flex; align-items:center; gap:10px; flex-wrap:wrap;
  }
  .competition-pill {
    display:inline-flex; align-items:center; gap:6px;
    padding:3px 10px; border-radius:999px; font-size:11px; font-weight:700;
    text-transform:uppercase; letter-spacing:0.06em; line-height:1;
  }
  .competition-pill.is-live {
    color:var(--green); background:var(--green-bg); border:1px solid var(--green-border);
  }
  .competition-pill.is-live::before {
    content:""; width:7px; height:7px; border-radius:50%;
    background:var(--green); box-shadow:0 0 0 0 var(--green);
    animation:competition-pulse 1.8s ease-out infinite;
  }
  .competition-pill.is-final {
    color:var(--text-muted); background:var(--surface-2); border:1px solid var(--border);
  }
  @keyframes competition-pulse {
    0% { box-shadow:0 0 0 0 rgba(5,150,105,0.45); }
    70% { box-shadow:0 0 0 6px rgba(5,150,105,0); }
    100% { box-shadow:0 0 0 0 rgba(5,150,105,0); }
  }
  .competition-switcher {
    display:inline-flex; align-items:center; gap:6px; margin-top:12px;
  }
  .competition-nav-btn {
    width:30px; height:30px; flex:0 0 auto; border-radius:8px;
    border:1px solid var(--border); background:var(--surface); cursor:pointer;
    font-size:17px; line-height:1; color:var(--text); display:inline-flex;
    align-items:center; justify-content:center; transition:background 0.12s, border-color 0.12s;
  }
  .competition-nav-btn:hover:not(:disabled) { background:var(--surface-2); border-color:var(--accent); }
  .competition-nav-btn:disabled { opacity:0.4; cursor:default; }
  .competition-month-select {
    appearance:none; -webkit-appearance:none;
    padding:6px 30px 6px 12px; border-radius:8px; border:1px solid var(--border);
    background:var(--surface)
      url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
      no-repeat right 10px center;
    font-size:13px; font-weight:600; color:var(--text); cursor:pointer; min-width:150px;
  }
  .competition-month-select:hover { border-color:var(--accent); }
  .competition-month-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,0.15); }

  /* Responsive */
  @media (max-width:768px) {
    html, body {
      height:auto;
      min-height:100%;
      overflow:auto;
    }
    .app {
      height:auto;
      min-height:100dvh;
    }
    .main {
      flex:none;
      overflow:visible;
    }
    .header { padding:10px 16px; }
    .toolbar {
      padding:10px 12px;
      flex-direction:column;
      align-items:stretch;
      gap:8px;
    }
    .toolbar-left,
    .toolbar-right {
      width:100%;
      min-width:0;
      display:grid;
      grid-template-columns:1fr;
      align-items:stretch;
      gap:8px;
    }
    .filter-tabs {
      width:100%;
      display:grid;
      grid-template-columns:repeat(3, minmax(0, 1fr));
      gap:5px;
      background:transparent;
      padding:0;
    }
    .global-nav {
      width:100%;
      display:grid;
      grid-template-columns:repeat(3, minmax(0, 1fr));
      gap:5px;
      background:transparent;
      padding:0;
    }
    .global-nav-btn {
      width:100%;
      border:1px solid var(--border);
      background:var(--surface-2);
      padding:8px 5px;
      font-size:11px;
      line-height:1.15;
    }
    .filter-tab {
      min-width:0;
      width:100%;
      padding:8px 5px;
      border:1px solid var(--border);
      border-radius:6px;
      background:var(--surface-2);
      font-size:11px;
      line-height:1.15;
      text-align:center;
    }
    .filter-tab.active {
      background:var(--surface);
      border-color:var(--accent);
    }
    .tab-badge {
      min-width:16px;
      height:16px;
      padding:0 4px;
      margin-left:2px;
      font-size:9px;
    }
    .mode-toggle {
      width:100%;
      margin-left:0;
      display:grid;
      grid-template-columns:repeat(3, minmax(0, 1fr));
      gap:5px;
      background:transparent;
      padding:0;
    }
    .mode-btn {
      width:100%;
      border:1px solid var(--border);
      background:var(--surface-2);
      padding:9px 6px;
      font-size:12px;
    }
    .stat-chip {
      justify-content:center;
      width:100%;
    }
    .toolbar-right .btn,
    .toolbar-right .toolbar-toggle {
      width:100%;
      justify-content:center;
    }
    .delivery-controls {
      padding:10px 12px;
    }
    .delivery-controls-inner {
      grid-template-columns:repeat(2, minmax(0, 1fr));
      gap:8px;
      align-items:stretch;
    }
    .delivery-controls-title,
    .delivery-search {
      grid-column:1 / -1;
    }
    .delivery-clear-btn {
      width:100%;
      justify-content:center;
      grid-column:1 / -1;
    }
    .table-wrap { padding:0 8px 16px; overflow-x:auto; }
    /* Only the orders table scrolls wide; bare `table` would also blow up
       tooltip/popover tables that must fit their fixed-width container. */
    .table-wrap table { min-width:1200px; }
    .activity-feed { padding:12px 8px; }
    .issue-sheet { width:100vw; }
    .issue-summary-meta { grid-template-columns:1fr; }
    .accounts-view { padding:14px 12px 22px; }
    .accounts-hero { display:grid; }
    .accounts-kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .accounts-controls { display:grid; grid-template-columns:1fr; }
    .accounts-controls .btn,
    .accounts-controls select,
    .accounts-controls input { width:100%; justify-content:center; }
    .mailbox-hero-actions { justify-content:flex-start; }
    .mailbox-toolbar { align-items:stretch; flex-direction:column; }
    .mailbox-segment { width:100%; }
    .mailbox-segment-btn { flex:1; justify-content:center; }
    .mailbox-toolbar select { width:100%; }
    .mailbox-chip-label { max-width:140px; }
    .mailbox-card { padding:12px 14px; }
    .mailbox-code { flex:1; justify-content:space-between; }
  }
  @media (max-width:420px) {
    .filter-tabs {
      grid-template-columns:repeat(2, minmax(0, 1fr));
    }
    .delivery-controls-inner {
      grid-template-columns:1fr;
    }
    .delivery-controls-title,
    .delivery-search,
    .delivery-clear-btn {
      grid-column:auto;
    }
  }
  /* ═══ Celebration Animations ═══ */
  .particle-layer {
    position: fixed; inset: 0; z-index: 9001;
    pointer-events: none; overflow: hidden;
  }
  @keyframes shake-hard {
    0%, 100% { transform: translate(0,0) rotate(0); }
    10% { transform: translate(-8px, 4px) rotate(-1deg); }
    20% { transform: translate(6px, -6px) rotate(1.5deg); }
    30% { transform: translate(-4px, 8px) rotate(-0.5deg); }
    40% { transform: translate(8px, -2px) rotate(1deg); }
    50% { transform: translate(-6px, 6px) rotate(-1.5deg); }
    60% { transform: translate(4px, -8px) rotate(0.5deg); }
    70% { transform: translate(-8px, 2px) rotate(-1deg); }
    80% { transform: translate(6px, 4px) rotate(1.5deg); }
    90% { transform: translate(-2px, -6px) rotate(-0.5deg); }
  }
  @keyframes rain-down {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(540deg); opacity: 0.3; }
  }
  @keyframes slam-in {
    0% { transform: translate(-50%,-50%) scale(4) rotate(-10deg); opacity: 0; }
    45% { transform: translate(-50%,-50%) scale(0.92) rotate(-2deg); opacity: 1; }
    60% { transform: translate(-50%,-50%) scale(1.06) rotate(1deg); }
    100% { transform: translate(-50%,-50%) scale(1) rotate(0); opacity: 1; }
  }

/* ─── Shared SeatHeroes 2FA Inbox dock ─── */
.x2fa-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  z-index: 95;
  background: var(--surface, #ffffff);
  color: var(--text, #111827);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, .18));
  font-size: 14px;
  overflow: hidden;
}
.x2fa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border, #eef0f2);
  background: var(--surface-2, rgba(0, 0, 0, .03));
}
.x2fa-title { font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.x2fa-head-actions { display: inline-flex; align-items: center; gap: 8px; }
.x2fa-count { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent, #2563eb); }
.x2fa-min-btn {
  appearance: none;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted, #6b7280);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.x2fa-min-btn:hover { background: var(--surface-2, rgba(0, 0, 0, .06)); color: var(--text, #111827); }
/* Collapsed pill — header only, shrunk to its contents so it never covers the
   match-sheet action button. */
.x2fa-dock.x2fa-min { width: auto; max-width: calc(100vw - 40px); }
.x2fa-dock.x2fa-min .x2fa-head { border-bottom: none; }
/* While any slide-over sheet is open, dock to the bottom-left so it stays clear
   of the sheet's right-aligned footer buttons (e.g. Match Selected, Attach
   Account). Covers both slide-over families: .match-sheet and .issue-sheet. */
body:has(.match-sheet.open, .issue-sheet.open) .x2fa-dock { left: 20px; right: auto; }
.x2fa-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.x2fa-meta { margin: 0; font-size: 12px; color: var(--muted, #6b7280); }
.x2fa-hint { margin: 0; color: var(--muted, #6b7280); }
.x2fa-err { margin: 0; color: var(--danger, #dc2626); font-size: 13px; }
.x2fa-btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border, #d1d5db);
  background: var(--surface, #fff);
  color: var(--text, #111827);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}
.x2fa-btn:hover { filter: brightness(.97); }
.x2fa-primary { background: var(--accent, #2563eb); border-color: var(--accent, #2563eb); color: #fff; }
.x2fa-code-row { display: flex; align-items: center; gap: 10px; }
.x2fa-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .12em;
  flex: 1;
  user-select: all;
}
.x2fa-copy { white-space: nowrap; }
.x2fa-preview { margin: 0; font-size: 12px; color: var(--muted, #6b7280); word-break: break-word; }
.x2fa-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border, #d1d5db);
  padding-top: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.x2fa-list-label { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }
.x2fa-row { display: flex; align-items: center; gap: 8px; border-radius: 6px; }
.x2fa-row-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  user-select: all;
}
.x2fa-row-copy { padding: 2px 8px; font-size: 11px; }
.x2fa-row-preview {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--muted, #6b7280);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.x2fa-new { animation: x2faFlash 1.2s ease-out; }
@keyframes x2faFlash {
  from { background: color-mix(in srgb, var(--accent, #2563eb) 18%, transparent); }
  to { background: transparent; }
}

/* ─── New-version (auto-reload) banner ─── */
.app-update-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 24px);
  padding: 8px 10px 8px 16px;
  background: var(--text, #111827);
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(0, 0, 0, .22));
  font-size: 13px;
  font-weight: 600;
}
.app-update-text { white-space: nowrap; }
.app-update-btn {
  appearance: none;
  cursor: pointer;
  border: none;
  background: var(--accent, #2563eb);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}
.app-update-btn:hover { filter: brightness(1.08); }
  .accounts-section {
    display:grid;
    gap:16px;
  }
  .accounts-section + .accounts-section {
    padding-top:16px;
    border-top:1px solid var(--border);
  }
  .tm-accounts-section {
    border:1px solid rgba(37,99,235,0.12);
    border-radius:12px;
    padding:18px;
    background:linear-gradient(180deg, rgba(239,246,255,0.72), rgba(255,255,255,0.92));
  }
  .account-badge.pending { background:var(--amber-bg); color:var(--amber); border:1px solid var(--amber-border); }
  .account-badge.active { background:var(--blue-bg); color:var(--blue); border:1px solid var(--blue-border); }
  .account-badge.stale { background:var(--red-bg); color:var(--red); border:1px solid rgba(220,38,38,0.18); }
  .tm-gmail-dock { right:360px; }
  @media (max-width: 980px) {
    .tm-gmail-dock { right:16px; bottom:92px; }
  }

  /* ─── Addresses tab ─── */
  .addresses-form {
    border:1px solid var(--border);
    border-radius:12px;
    padding:14px 16px;
    background:var(--surface);
  }
  .addresses-form-row {
    display:flex;
    align-items:flex-end;
    gap:12px;
    flex-wrap:wrap;
  }
  .addresses-form-row .parking-field { flex:0 1 150px; }
  .addresses-form-row .parking-field:nth-child(3) { flex:1 1 180px; }
  .addresses-or {
    padding-bottom:12px;
    font-size:12px;
    color:var(--text-faint);
    text-transform:uppercase;
    letter-spacing:0.04em;
  }
  .addresses-form-row .btn { margin-bottom:1px; }
  .addresses-summary { margin:2px 0 10px; }
  .addresses-unit { font-weight:400; color:var(--text-muted); }
  .addresses-note { font-size:11px; color:var(--text-faint); }
  .addresses-card-actions {
    margin-top:10px;
    display:flex;
    justify-content:flex-end;
  }
  @media (max-width: 768px) {
    .addresses-form-row { align-items:stretch; flex-direction:column; }
    .addresses-form-row .parking-field { flex:1 1 auto; }
    .addresses-or { padding-bottom:0; }
  }

  /* Multi-pass delivery entry (fulfillment-multipass-delivery.js): per-pass
     coverage UI shared by the Delivery handoff and Mark as Delivered sheets. */
  .mpd-container { margin:12px 0; }
  .mpd-progress {
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; margin-bottom:8px;
  }
  .mpd-progress-text { font-size:12.5px; font-weight:600; color:var(--text-muted); }
  .mpd-progress-text.mpd-done { color:var(--green); }
  .mpd-progress-track { display:flex; gap:4px; }
  .mpd-seg {
    width:22px; height:6px; border-radius:3px;
    background:var(--surface-2); border:1px solid var(--border);
  }
  .mpd-seg-filled { background:var(--green); border-color:var(--green); }
  .mpd-hint {
    font-size:12px; color:#1e40af; background:var(--blue-bg);
    border:1px solid var(--blue-border); border-radius:var(--radius);
    padding:8px 11px; margin-bottom:10px;
  }
  .mpd-asset {
    display:flex; align-items:center; gap:8px;
    background:var(--green-bg); border:1px solid var(--green-border);
    border-radius:6px; padding:6px 10px; margin-bottom:6px; font-size:12.5px;
  }
  .mpd-asset-slot { font-weight:700; white-space:nowrap; }
  .mpd-asset-kind { color:var(--text-faint); white-space:nowrap; }
  .mpd-asset-name {
    flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
    color:var(--text-muted);
  }
  .mpd-remove {
    border:0; background:transparent; color:var(--text-faint);
    font-size:15px; line-height:1; cursor:pointer; padding:2px 5px; border-radius:4px;
  }
  .mpd-remove:hover { color:var(--red); background:var(--red-bg); }
  .mpd-slot {
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--radius); box-shadow:var(--shadow);
    padding:10px 12px; margin-bottom:8px;
  }
  .mpd-slot-head { font-size:13px; font-weight:700; margin-bottom:8px; }
  .mpd-slot-remaining { font-weight:500; font-size:11.5px; color:var(--text-faint); }
  .mpd-slot-row { display:flex; align-items:center; gap:8px; margin-bottom:7px; }
  .mpd-slot-row:last-child { margin-bottom:0; }
  .mpd-slot-row input[type="url"] {
    flex:1; font-size:13px; padding:7px 9px;
    border:1px solid var(--border); border-radius:6px; background:var(--surface);
    color:var(--text);
  }
  .mpd-slot-row input[type="url"]:focus {
    outline:none; border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(37,99,235,0.12);
  }
  .mpd-slot-row select {
    font-size:12px; padding:6px 6px; border:1px solid var(--border);
    border-radius:6px; background:var(--surface); color:var(--text-muted);
  }
  .mpd-file-label { display:inline-flex; }
  .mpd-file-btn { cursor:pointer; }
  .mpd-file-hint { font-size:11.5px; color:var(--text-faint); }
  .mpd-error { font-size:12.5px; color:var(--red); min-height:0; }
  .mpd-error:not(:empty) {
    background:var(--red-bg); border-radius:6px; padding:6px 10px; margin-top:4px;
  }
  .mpd-order-numbers-field textarea {
    width:100%; font-family:var(--font); font-size:13px; padding:8px 10px;
    border:1px solid var(--border); border-radius:6px; background:var(--surface);
    color:var(--text); resize:vertical;
  }
  .mpd-order-numbers-field textarea:focus {
    outline:none; border-color:var(--accent);
    box-shadow:0 0 0 3px rgba(37,99,235,0.12);
  }
