/* ─────────────────────────────────────────────────────────────
   user.css — OMS / User Panel overrides
   Extends admin.css. Only override what differs (mostly branding +
   the profile cards which don't exist in admin).
   ───────────────────────────────────────────────────────────── */

/* Match the public-site nav height (68px). The 110px R logo overflows the
   topbar vertically — intentional, matches how the main site looks.
   Also re-declare the public-site CSS vars used by the ported order-card
   rules at the bottom of this file. */
:root {
    --topbar-h: 68px;
    --red: #c41717;
    --red-dark: #9e1010;
    --off-black: #111111;
    --gray-mid: #6e6e73;
    --gray-light: #aeaeb2;
    --off-white: #d9d6cf;
    --font-mono: "SF Mono", "Fira Code", monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
/* Let the logo bleed past the topbar without getting clipped. */
.admin-topbar {
    overflow: visible;
    z-index: 20;
}
.user-brand .admin-brand-logo {
    position: relative;
    z-index: 21;
}

/* ── Topbar left: back-to-site link + brand ── */
.user-topbar-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.user-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-soft, #d8d8d8);
    background: transparent;
    color: var(--text-strong, #0e0e10);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.user-back-link:hover {
    background: rgba(200, 30, 30, 0.08);
    border-color: #c81e1e;
    color: #c81e1e;
    transform: translateX(-2px);
}
html:not(.light) .user-back-link {
    border-color: #34343a;
    color: #f0f0f3;
}
html:not(.light) .user-back-link:hover {
    background: rgba(200, 30, 30, 0.18);
    border-color: #ff4d4d;
    color: #ff7a7a;
}

/* ── Top brand: replace "RMPAC Group · Admin" stack with [logo] OMS ── */
.user-brand {
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: inherit;
}
.user-brand .admin-brand-logo {
    height: 110px;
    width: auto;
    object-fit: contain;
}
.user-brand-oms {
    font-family: "Russo One", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 56px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #0e0e10;
    line-height: 1;
    position: relative;
    z-index: 21;
    /* Pull text flush against the R icon (logo image has internal padding) */
    margin-left: -22px;
}
/* This codebase uses html.light for light mode and no class for dark mode,
   so we target the dark default + override for light. */
html:not(.light) .user-brand-oms {
    color: #ffffff;
}

/* ── Welcome / About pane ────────────────────────────────────────────── */
.user-welcome-hero {
    margin-bottom: 28px;
    padding: 36px;
    border-radius: 16px;
    background: linear-gradient(135deg, #c81e1e 0%, #8a0c0c 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.user-welcome-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,0.12), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(0,0,0,0.25), transparent 50%);
    pointer-events: none;
}
.user-welcome-tag {
    display: inline-block;
    padding: 5px 11px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}
.user-welcome-headline {
    margin: 0 0 12px 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    max-width: 36ch;
    position: relative;
    z-index: 1;
}
.user-welcome-sub {
    margin: 0 0 22px 0;
    font-size: 15px;
    line-height: 1.55;
    max-width: 60ch;
    opacity: 0.92;
    position: relative;
    z-index: 1;
}
.user-welcome-cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.user-welcome-cta-row .admin-btn {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
}
.user-welcome-cta-row .admin-btn:not(.admin-btn--primary) {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.user-welcome-cta-row .admin-btn:not(.admin-btn--primary):hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Feature grid */
.user-welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.user-welcome-card {
    padding: 22px;
    border-radius: 12px;
    background: var(--surface-raised, #ffffff);
    border: 1px solid var(--border-soft, #e8e8e8);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.user-welcome-card:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 30, 30, 0.4);
    box-shadow: 0 8px 24px -10px rgba(200, 30, 30, 0.25);
}
html:not(.light) .user-welcome-card {
    background: #1a1a1c;
    border-color: #2a2a2d;
}
.user-welcome-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(200, 30, 30, 0.1);
    color: #c81e1e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-welcome-icon svg {
    width: 20px;
    height: 20px;
}
.user-welcome-card h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
}
.user-welcome-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted, #6a6a6a);
}

/* Stats strip */
.user-welcome-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 22px;
    border-radius: 12px;
    background: var(--surface-subtle, #fafafa);
    border: 1px solid var(--border-soft, #e8e8e8);
}
html:not(.light) .user-welcome-strip {
    background: #15151a;
    border-color: #2a2a2d;
}
.user-welcome-strip-stat {
    text-align: center;
}
.user-welcome-strip-num {
    font-family: "Geist", -apple-system, system-ui, sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #c81e1e;
    line-height: 1;
    margin-bottom: 4px;
}
.user-welcome-strip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--text-muted, #6a6a6a);
}
@media (max-width: 720px) {
    .user-welcome-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Empty state inside the quotes table mount ── */
.user-empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-muted, #6a6a6a);
    font-size: 14px;
}

/* ── "Open Quote Builder" CTA card on the Request pane ── */
.user-cta-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px;
    border-radius: 14px;
    background: var(--surface-raised, #ffffff);
    border: 1px solid var(--border-soft, #e8e8e8);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}
html:not(.light) .user-cta-card {
    background: #1a1a1c;
    border-color: #2a2a2d;
}
.user-cta-text h2 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
}
.user-cta-text p {
    margin: 0;
    color: var(--text-muted, #6a6a6a);
    font-size: 14px;
    max-width: 56ch;
    line-height: 1.5;
}
.user-cta-btn {
    flex-shrink: 0;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
}

/* ── Profile cards (stacked sections under the Profile pane) ── */
.user-card {
    padding: 28px;
    margin-bottom: 18px;
    border-radius: 14px;
    background: var(--surface-raised, #ffffff);
    border: 1px solid var(--border-soft, #e8e8e8);
}
html:not(.light) .user-card {
    background: #1a1a1c;
    border-color: #2a2a2d;
}
.user-card-head {
    margin-bottom: 18px;
}
.user-card-head h2 {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 700;
}
.user-card-head p {
    margin: 0;
    color: var(--text-muted, #6a6a6a);
    font-size: 13px;
    line-height: 1.5;
}

/* Danger card — red accent */
.user-card-danger {
    border-color: rgba(200, 30, 30, 0.25);
}
.user-card-danger .user-card-head h2 {
    color: #c81e1e;
}
html:not(.light) .user-card-danger {
    border-color: rgba(255, 80, 80, 0.35);
}
html:not(.light) .user-card-danger .user-card-head h2 {
    color: #ff7a7a;
}

/* ── Form grid (4-col, fields can span 2 with .user-field-wide) ── */
.user-form {
    display: block;
}
.user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 18px;
}
.user-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.user-field-wide {
    grid-column: 1 / -1;
}
.user-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6a6a6a);
}
.user-field input,
.user-field select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-soft, #d8d8d8);
    background: var(--input-bg, #ffffff);
    color: var(--text-strong, #0e0e10);
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.user-field input:focus,
.user-field select:focus {
    outline: none;
    border-color: #c81e1e;
    box-shadow: 0 0 0 3px rgba(200, 30, 30, 0.18);
}
html:not(.light) .user-field input,
html:not(.light) .user-field select {
    background: #232326;
    border-color: #34343a;
    color: #f6f6f7;
}
.user-hint {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted, #6a6a6a);
    line-height: 1.5;
}

/* Footer row inside each card (status text on left, action button(s) on right) */
.user-form-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft, #ececec);
}
html:not(.light) .user-form-foot {
    border-top-color: #2a2a2d;
}
.user-form-status {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted, #6a6a6a);
    min-height: 1.5em;
}
.user-form-status.is-error {
    color: #c81e1e;
    font-weight: 500;
}
.user-form-status.is-success {
    color: #1e8a4e;
    font-weight: 500;
}
html:not(.light) .user-form-status.is-error {
    color: #ff7a7a;
}
html:not(.light) .user-form-status.is-success {
    color: #6fd99a;
}

/* Confirm-email change form: tighter top spacing when revealed inline */
.user-form-confirm {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--border-soft, #ececec);
}
html:not(.light) .user-form-confirm {
    border-top-color: #2a2a2d;
}

/* ── Quotes table (custom — admin.css's .admin-table is for admin patterns) ── */
.user-quotes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.user-quotes-table thead th {
    text-align: left;
    padding: 12px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #6a6a6a);
    border-bottom: 1px solid var(--border-soft, #e8e8e8);
    background: var(--surface-subtle, #fafafa);
}
.user-quotes-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-soft, #f0f0f0);
    vertical-align: middle;
}
html:not(.light) .user-quotes-table thead th {
    background: #1f1f22;
    border-bottom-color: #2a2a2d;
}
html:not(.light) .user-quotes-table tbody td {
    border-bottom-color: #2a2a2d;
}
.user-quotes-table tbody tr:hover {
    background: rgba(200, 30, 30, 0.04);
    cursor: pointer;
}
.user-quote-num {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-weight: 600;
}
.user-quote-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #eef2ff;
    color: #3a44c2;
}
.user-quote-status[data-stage="received"]   { background: #eef2ff; color: #3a44c2; }
.user-quote-status[data-stage="reviewing"]  { background: #fff7e0; color: #9c6c08; }
.user-quote-status[data-stage="quoted"]     { background: #e6f6ee; color: #1e8a4e; }
.user-quote-status[data-stage="approved"]   { background: #e6f6ee; color: #1e8a4e; }
.user-quote-status[data-stage="shipped"]    { background: #e0f2ff; color: #1860a8; }
.user-quote-status[data-stage="closed"]     { background: #ececec; color: #6a6a6a; }
html:not(.light) .user-quote-status                { background: #2a2a32; color: #c5c8ff; }
html:not(.light) .user-quote-status[data-stage="quoted"],
html:not(.light) .user-quote-status[data-stage="approved"] { background: #1a3322; color: #6fd99a; }
html:not(.light) .user-quote-status[data-stage="reviewing"] { background: #3a2c10; color: #f0c870; }
html:not(.light) .user-quote-status[data-stage="shipped"]   { background: #1a2a3a; color: #8ec5f0; }

/* Sidebar tweak: hide admin-only section spacing when on user panel */
.admin-sidebar [data-admin-only] {
    display: none !important;
}

/* ── Quote row clickability indicator ─────────────────────────────────── */
.user-quotes-table tbody tr {
    transition: background 120ms ease, transform 120ms ease;
}
.user-quotes-table tbody tr:focus-visible {
    outline: 2px solid #c81e1e;
    outline-offset: -2px;
}
.user-quote-chevron {
    width: 32px;
    text-align: right;
    color: var(--text-muted, #999);
    transition: transform 120ms ease, color 120ms ease;
}
.user-quotes-table tbody tr:hover .user-quote-chevron {
    transform: translateX(4px);
    color: #c81e1e;
}

/* ── Quote-detail modal content (rides on .admin-modal infrastructure) ── */
.qd-head {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-soft, #ececec);
}
html:not(.light) .qd-head {
    border-bottom-color: #2a2a2d;
}
.qd-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c81e1e;
    font-weight: 700;
    margin-bottom: 4px;
}
.qd-title {
    margin: 0 0 6px 0;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.qd-sub {
    font-size: 13px;
    color: var(--text-muted, #6a6a6a);
}
.qd-section {
    margin-bottom: 24px;
}
.qd-section-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #6a6a6a);
}
.qd-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-strong, #0e0e10);
    white-space: pre-wrap;
}
html:not(.light) .qd-text {
    color: #f0f0f3;
}

/* Pipeline timeline */
.qd-pipeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    position: relative;
}
.qd-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    position: relative;
    padding-top: 6px;
}
.qd-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-soft, #e0e0e0);
    z-index: 0;
}
.qd-step.is-done:not(:last-child)::after {
    background: #1e8a4e;
}
html:not(.light) .qd-step:not(:last-child)::after {
    background: #2a2a2d;
}
html:not(.light) .qd-step.is-done:not(:last-child)::after {
    background: #1e8a4e;
}
.qd-step-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--border-soft, #e0e0e0);
    border: 2px solid var(--surface-raised, #fff);
    position: relative;
    z-index: 1;
    transition: background 120ms ease, box-shadow 120ms ease;
}
.qd-step.is-done .qd-step-dot {
    background: #1e8a4e;
}
.qd-step.is-current .qd-step-dot {
    background: #c81e1e;
    box-shadow: 0 0 0 4px rgba(200, 30, 30, 0.18);
}
html:not(.light) .qd-step-dot {
    border-color: #1a1a1c;
    background: #34343a;
}
html:not(.light) .qd-step.is-done .qd-step-dot {
    background: #1e8a4e;
}
.qd-step-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6a6a6a);
}
.qd-step.is-done .qd-step-label,
.qd-step.is-current .qd-step-label {
    color: var(--text-strong, #0e0e10);
}
html:not(.light) .qd-step.is-done .qd-step-label,
html:not(.light) .qd-step.is-current .qd-step-label {
    color: #f6f6f7;
}
.qd-step-date {
    font-size: 11px;
    color: var(--text-muted, #6a6a6a);
}

/* Items table inside detail modal */
.qd-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.qd-items-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #6a6a6a);
    border-bottom: 1px solid var(--border-soft, #e8e8e8);
}
.qd-items-table tbody td,
.qd-items-table tfoot td {
    padding: 12px;
    border-bottom: 1px solid var(--border-soft, #f0f0f0);
    vertical-align: top;
}
.qd-items-table tfoot td {
    border-bottom: none;
    border-top: 2px solid var(--border-soft, #e0e0e0);
    padding-top: 16px;
}
html:not(.light) .qd-items-table thead th,
html:not(.light) .qd-items-table tbody td,
html:not(.light) .qd-items-table tfoot td {
    border-color: #2a2a2d;
}
.qd-item-title {
    font-weight: 500;
    color: var(--text-strong, #0e0e10);
}
html:not(.light) .qd-item-title {
    color: #f0f0f3;
}
.qd-item-specs {
    font-size: 11px;
    color: var(--text-muted, #6a6a6a);
    margin-top: 4px;
}
.qd-item-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────────────────
   Order-card popup contents — ported from public site's style.css so the
   quote-detail modal renders the same way members saw it under
   "Quotes & Status". Self-contained, doesn't depend on the rest of
   style.css.
   ───────────────────────────────────────────────────────────────────── */

.order-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 0;
}
.order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}
.order-card-id {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-mid);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.order-card-title {
    color: var(--off-white);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}
.order-card-meta {
    color: var(--gray-mid);
    font-size: 12.5px;
    margin-top: 4px;
}

/* Status pill */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}
.order-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.order-status.status-requested  { background: rgba(170, 170, 170, 0.12); color: #b8b8c0; }
.order-status.status-reviewed   { background: rgba(80, 130, 200, 0.14); color: #6da0e0; }
.order-status.status-quoted     { background: rgba(80, 160, 110, 0.14); color: #6cc294; }
.order-status.status-production { background: rgba(220, 150, 60, 0.16); color: #f0b96a; }
.order-status.status-shipped    { background: rgba(200, 16, 46, 0.18); color: #ff6b7c; }

/* Timeline */
.order-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
    margin: 18px 0 4px;
}
.order-timeline::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 13px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}
.order-timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 4px;
}
.order-timeline-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--off-black);
    border: 2px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.3s var(--ease-out);
}
.order-timeline-step.is-done .order-timeline-dot {
    background: var(--red);
    border-color: var(--red);
}
.order-timeline-step.is-done .order-timeline-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}
.order-timeline-step::before {
    content: "";
    position: absolute;
    left: -50%;
    right: 50%;
    top: 13px;
    height: 2px;
    background: transparent;
    z-index: -1;
    transition: background 0.3s var(--ease-out);
}
.order-timeline-step.is-done::before {
    background: var(--red);
}
.order-timeline-step:first-child::before { display: none; }
.order-timeline-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gray-light);
    letter-spacing: 0.02em;
    line-height: 1.3;
    margin-bottom: 4px;
    min-height: 30px;
}
.order-timeline-step.is-done .order-timeline-label {
    color: var(--off-white);
}
.order-timeline-date {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--gray-mid);
    letter-spacing: 0.02em;
}
.order-timeline-step.is-done .order-timeline-date {
    color: var(--gray-light);
}

/* Ship readout */
.order-ship-readout {
    margin-top: 18px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--red);
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    color: var(--gray-light);
}
.order-ship-readout strong {
    color: var(--off-white);
    font-variant-numeric: tabular-nums;
}
.order-ship-readout.is-shipped {
    border-left-color: #6cc294;
}
.order-ship-readout.is-shipped strong {
    color: #aef0c8;
}

/* Items table inside order card */
.order-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-top: 8px;
}
.order-items-table th {
    text-align: left;
    color: var(--gray-mid);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.order-items-table td {
    color: var(--gray-light);
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.order-items-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.order-items-table tr:last-child td {
    border-bottom: none;
}
.order-notes {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-light);
    line-height: 1.5;
}
.order-notes-label {
    color: var(--gray-mid);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Attachments */
.order-att-section { margin-top: 14px; }
.order-att-list:empty { display: none; }
.order-att-loading,
.order-att-error {
    color: var(--gray-mid);
    font-size: 12.5px;
    padding: 8px 0;
}
.order-att-error { color: var(--red); }
.order-att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 8px;
}
.order-att-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--gray-light);
}
.order-att-kind {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    background: rgba(200, 16, 46, 0.16);
    color: #ff6b7c;
    border-radius: 999px;
    flex-shrink: 0;
}
.order-att-name {
    color: var(--off-white);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-att-size {
    color: var(--gray-mid);
    font-size: 12px;
    flex-shrink: 0;
}
.order-att-download {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--off-white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    flex-shrink: 0;
}
.order-att-download:hover {
    border-color: var(--red);
    color: #fff;
    background: rgba(200, 16, 46, 0.1);
}

/* Signed-PO upload */
.order-po-upload {
    margin-top: 10px;
    padding: 22px 18px;
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.015);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.order-po-upload:hover,
.order-po-upload.is-dragover {
    border-color: var(--red);
    background: rgba(200, 16, 46, 0.06);
}
.order-po-upload-icon {
    color: var(--gray-light);
    margin-bottom: 8px;
}
.order-po-upload:hover .order-po-upload-icon,
.order-po-upload.is-dragover .order-po-upload-icon { color: var(--red); }
.order-po-upload-text strong {
    display: block;
    color: var(--off-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}
.order-po-upload-text span {
    color: var(--gray-mid);
    font-size: 12px;
}
.order-po-upload-status {
    margin-top: 10px;
    font-size: 12.5px;
}
.order-po-upload-status.is-busy { color: var(--gray-light); }
.order-po-upload-status.is-ok   { color: #6cc294; }
.order-po-upload-status.is-err  { color: var(--red); }

/* Light-theme overrides for order-card subtree */
html.light .order-card                    { background: #fff; border-color: rgba(0, 0, 0, 0.08); }
html.light .order-card-title              { color: #0a0a0a; }
html.light .order-timeline-label          { color: #6e6e73; }
html.light .order-timeline-step.is-done .order-timeline-label { color: #0a0a0a; }
html.light .order-timeline-dot            { background: #fff; border-color: rgba(0, 0, 0, 0.18); }
html.light .order-ship-readout            { background: rgba(0, 0, 0, 0.03); color: #4a4a4a; }
html.light .order-ship-readout strong     { color: #0a0a0a; }
html.light .order-items-table th          { color: #6e6e73; border-bottom-color: rgba(0, 0, 0, 0.08); }
html.light .order-items-table td          { color: #1a1a1a; border-bottom-color: rgba(0, 0, 0, 0.04); }
html.light .order-att-row                 { background: #fafafa; border-color: rgba(0, 0, 0, 0.08); }
html.light .order-att-name                { color: #0a0a0a; }
html.light .order-att-download            { color: #0a0a0a; border-color: rgba(0, 0, 0, 0.18); }
html.light .order-po-upload               { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.16); }
html.light .order-po-upload-text strong   { color: #0a0a0a; }
