/* COREIDON.AI — Sports Equipment Order Management (SEOM) demo.
   Design tokens derived from andusports.ro (Porto theme): charcoal #383F48,
   coral #E36159, slate #71849C, teal #2BAAB1; Oswald condensed uppercase
   headings over Poppins body; boxy cards, small radii, subtle shadows.
   Chart series colors are NOT brand colors — see CHART SERIES block below. */

:root {
    --bg-canvas: #FFFFFF;
    --bg-section: #F4F5F7;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-subtle: #F4F5F7;

    --text-primary: #222529;
    --text-secondary: #3F4750;
    --text-muted: #777777;

    --accent-primary: #383F48;
    --accent-hover: #222529;

    --accent-coral: #E36159;
    --accent-coral-hover: #C94A43;
    --accent-coral-soft: rgba(227, 97, 89, 0.12);

    --accent-slate: #71849C;
    --accent-teal: #2BAAB1;

    --success: #16A34A;
    --warning: #D97706;
    --danger:  #DC2626;

    /* chart series — a validated data hue (light), not a brand hue */
    --series-primary: #2a78d6;
    --chart-grid: #e1e0d9;
    --chart-axis: #c3c2b7;

    --divider: #E4E6EA;
    --border-subtle: 1px solid #E4E6EA;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.10);

    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --transition: 0.15s ease;
    --focus-ring: 0 0 0 3px rgba(227, 97, 89, 0.28);
    --modal-backdrop-color: rgba(34, 37, 41, 0.55);
    --sidebar-w: 240px;
}

[data-theme='dark'] {
    --bg-canvas:   #14171B;
    --bg-section:  #0F1216;
    --bg-card:     #191D22;
    --bg-elevated: #232830;
    --bg-subtle:   #21262E;

    --text-primary:   #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted:     rgba(255, 255, 255, 0.50);

    --accent-primary: #E36159;
    --accent-hover:   #F0796F;

    --accent-coral: #F0796F;
    --accent-coral-hover: #F79288;
    --accent-coral-soft: rgba(240, 121, 111, 0.16);

    --accent-slate: #9AACC4;
    --accent-teal: #4FD0D7;

    --success: #34D399;
    --warning: #FBBF24;
    --danger:  #FB7185;

    --series-primary: #3987e5;
    --chart-grid: #2c2c2a;
    --chart-axis: #383835;

    --divider: #2A3038;
    --border-subtle: 1px solid #2A3038;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);

    --focus-ring: 0 0 0 3px rgba(240, 121, 111, 0.32);
    --modal-backdrop-color: rgba(0, 0, 0, 0.65);
}

html:not([data-theme]) { visibility: hidden; }

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg-section);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    font-family: 'Oswald', 'Poppins', sans-serif;
    margin: 0; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase;
}
button { font-family: inherit; cursor: pointer; }
canvas { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }

/* Garment SVGs carry a viewBox but no intrinsic size — they fill whatever box
   they are given. Without this they would render at the 300px default. */
.svg-box { display: block; flex-shrink: 0; }
.svg-box svg { width: 100%; height: 100%; display: block; }

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--bg-card); border-right: var(--border-subtle);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: var(--border-subtle); }
.brand-mark {
    width: 38px; height: 38px; border-radius: var(--radius-md);
    display: grid; place-items: center; font-size: 17px; color: #fff;
    background: var(--accent-coral); box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 17px; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-sub { font-size: 10.5px; color: var(--text-muted); }

.role-switch { padding: 12px 12px 4px; }
.role-switch label { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; display: block; margin-bottom: 5px; }
.role-switch select { width: 100%; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; flex: 1; overflow-y: auto; }
.nav-group { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 600; padding: 12px 12px 6px; }
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border: none; border-radius: var(--radius-md);
    background: transparent; color: var(--text-secondary);
    font-size: 13px; font-weight: 500; text-align: left; width: 100%;
    transition: background var(--transition), color var(--transition);
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; color: var(--text-muted); }
.nav-item:hover { background: var(--bg-subtle); }
.nav-item.active { background: var(--accent-coral-soft); color: var(--accent-coral); font-weight: 600; }
.nav-item.active i { color: var(--accent-coral); }

.nav-badge {
    margin-left: auto; background: var(--danger); color: #fff;
    font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
.nav-badge.soft { background: var(--bg-subtle); color: var(--text-muted); }

.sidebar-foot { padding: 12px; border-top: var(--border-subtle); }
.demo-badge {
    font-size: 10.5px; color: var(--text-muted); background: var(--bg-subtle);
    border: var(--border-subtle); padding: 7px 10px; border-radius: var(--radius-md);
    text-align: center; line-height: 1.5;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 24px; background: var(--bg-card);
    border-bottom: var(--border-subtle); position: sticky; top: 0; z-index: 20;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.company { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.who { font-size: 11.5px; color: var(--text-muted); border-left: var(--border-subtle); padding-left: 12px; }
.who b { color: var(--text-secondary); font-weight: 600; display: block; font-size: 12px; }
.clock { font-size: 11.5px; color: var(--text-muted); }

.icon-btn {
    width: 34px; height: 34px; border-radius: var(--radius-md);
    border: var(--border-subtle); background: var(--bg-card); color: var(--text-secondary);
    display: grid; place-items: center; font-size: 13px; font-weight: 600;
    transition: background var(--transition);
}
.icon-btn:hover { background: var(--bg-subtle); }
.only-mobile { display: none; }

.view { padding: 22px 24px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }
.view.wide { max-width: 1560px; }

/* ---------- Common ---------- */
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 21px; }
.page-head p { margin: 6px 0 0; color: var(--text-muted); font-size: 13px; max-width: 760px; line-height: 1.6; }

.card { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: var(--border-subtle); }
.card-head h3 { font-size: 13.5px; }
.card-head .sub { font-size: 11.5px; color: var(--text-muted); text-transform: none; }

.grid { display: grid; gap: 14px; }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stat { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat .label { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat .value { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 28px; margin-top: 6px; line-height: 1; }
.stat .value small { font-size: 12px; font-weight: 400; color: var(--text-muted); font-family: 'Poppins', sans-serif; }
.stat .trend { font-size: 11px; margin-top: 5px; color: var(--text-muted); }
.stat.tone-warn { border-color: rgba(217, 119, 6, .45); background: rgba(217, 119, 6, .05); }
.stat.tone-warn .label, .stat.tone-warn .value { color: var(--warning); }

/* badges */
.badge { font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.badge.st-submitted   { background: rgba(119,119,119,.14); color: #5A6069; }
.badge.st-pending     { background: rgba(113,132,156,.18); color: #4E5F76; }
.badge.st-rejected    { background: rgba(220,38,38,.12); color: var(--danger); }
.badge.st-received    { background: rgba(42,120,214,.13); color: #2a78d6; }
.badge.st-paid        { background: rgba(22,163,74,.13); color: var(--success); }
.badge.st-completed   { background: rgba(217,119,6,.14); color: var(--warning); }
.badge.st-delivered   { background: rgba(43,170,177,.16); color: #1B8288; }
.badge.b-neutral { background: var(--bg-subtle); color: var(--text-muted); }
[data-theme='dark'] .badge.st-submitted { color: #A9AEB6; }
[data-theme='dark'] .badge.st-pending { color: #9AACC4; }
[data-theme='dark'] .badge.st-received { color: #6FA8EC; }
[data-theme='dark'] .badge.st-delivered { color: #4FD0D7; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: var(--radius-md); font-size: 12.5px; font-weight: 600;
    border: var(--border-subtle); background: var(--bg-card); color: var(--text-secondary);
    transition: background var(--transition), border-color var(--transition);
}
.btn:hover { background: var(--bg-subtle); }
.btn-primary { background: var(--accent-coral); border-color: var(--accent-coral); color: #fff; }
.btn-primary:hover { background: var(--accent-coral-hover); border-color: var(--accent-coral-hover); }
.btn-dark { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff; }
.btn-dark:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
[data-theme='dark'] .btn-dark { background: var(--bg-elevated); border-color: var(--divider); color: var(--text-primary); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.93); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.93); }
.btn-sm { padding: 6px 10px; font-size: 11.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--bg-card); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.linkbtn { background: none; border: none; color: var(--accent-coral); font-size: 12.5px; font-weight: 600; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: var(--border-subtle); white-space: nowrap; }
table.tbl td { padding: 10px 12px; border-bottom: var(--border-subtle); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr.clickable { cursor: pointer; }
table.tbl tr.clickable:hover td { background: var(--bg-subtle); }
table.tbl td.right, table.tbl th.right { text-align: right; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group.full { grid-column: 1 / -1; }
label.lbl { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
label.lbl .hint { font-weight: 400; color: var(--text-muted); }
input.inp, select.inp, textarea.inp, select, input, textarea {
    padding: 8px 10px; border-radius: var(--radius-md); border: var(--border-subtle);
    background: var(--bg-card); color: var(--text-primary); font-size: 12.5px;
    font-family: inherit; width: 100%;
}
select { cursor: pointer; }
textarea.inp { resize: vertical; min-height: 68px; line-height: 1.5; }
.inp-sm { padding: 6px 8px; font-size: 12px; }
.help { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.help b { color: var(--text-secondary); font-weight: 600; }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .fl { display: inline-flex; align-items: center; gap: 7px; }
.filters .fl label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.filters select { width: auto; min-width: 128px; }

/* section tabs (Catalogs & prices: catalog / production sheets) */
.tabs { display: flex; gap: 4px; border-bottom: var(--border-subtle); margin-bottom: 16px; flex-wrap: wrap; }
.tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px; border: none; background: none; color: var(--text-muted);
    font-size: 12.5px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent-coral); border-bottom-color: var(--accent-coral); }
.tab .tab-n { background: var(--bg-subtle); color: var(--text-muted); font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.tab.active .tab-n { background: var(--accent-coral-soft); color: var(--accent-coral); }

.section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.mb-14 { margin-bottom: 14px; }
.mb-22 { margin-bottom: 22px; }
.mt-14 { margin-top: 14px; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.empty { background: var(--bg-card); border: 1px dashed var(--divider); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.empty i { font-size: 26px; display: block; margin-bottom: 10px; opacity: .5; }
.empty .btn { margin-top: 14px; }

/* ---------- Club identity chips ---------- */
.club-chip { display: inline-flex; align-items: center; gap: 7px; }
.club-crest {
    width: 24px; height: 24px; border-radius: 999px; color: #fff;
    font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Oswald', sans-serif; letter-spacing: .02em; flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,.35);
}
.club-chip .cn { font-size: 12.5px; font-weight: 600; }

/* ---------- Catalog (shop-like, per andusports.ro) ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.prod {
    background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-md);
    overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}
.prod:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.prod-img { position: relative; aspect-ratio: 1; background: var(--bg-subtle); display: grid; place-items: center; padding: 14px; }
.prod-img svg { width: 78%; height: 78%; }
.prod-tag {
    position: absolute; top: 8px; left: 8px; background: var(--accent-coral); color: #fff;
    font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius-sm);
    text-transform: uppercase; letter-spacing: .05em;
}
.prod-tag.cat { background: var(--accent-primary); }
[data-theme='dark'] .prod-tag.cat { background: var(--accent-slate); color: #14171B; }
.prod-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod-cat { font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); font-weight: 600; }
.prod-name { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 14px; line-height: 1.3; text-transform: uppercase; }
.prod-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.prod-price { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 18px; color: var(--accent-coral); }
.prod-price small { font-size: 10px; color: var(--text-muted); font-weight: 400; font-family: 'Poppins', sans-serif; }

/* ---------- Product detail (club portal) ---------- */
.prod-img[role='button'] { cursor: pointer; }
.prod-img[role='button']:hover svg { transform: scale(1.04); transition: transform var(--transition); }
.prod-name.linkish { background: none; border: none; padding: 0; text-align: left; color: inherit; font: inherit; font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 14px; line-height: 1.3; text-transform: uppercase; }
.prod-name.linkish:hover { color: var(--accent-coral); }

.pdp { display: flex; gap: 24px; align-items: flex-start; margin-bottom: 22px; flex-wrap: wrap; }
.pdp-media { width: 300px; flex-shrink: 0; }
.pdp-img {
    width: 300px; height: 300px; padding: 26px;
    background: var(--bg-subtle); border: var(--border-subtle); border-radius: var(--radius-lg);
}
.pdp-cap { margin-top: 8px; text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.pdp-info { flex: 1; min-width: 260px; }
.pdp-info h1 { font-size: 24px; margin: 6px 0 0; }
.pdp-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin: 10px 0 0; max-width: 620px; }
.pdp-price { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 30px; color: var(--accent-coral); margin-top: 14px; }
.pdp-price small { font-size: 12px; color: var(--text-muted); font-weight: 400; font-family: 'Poppins', sans-serif; }
.pdp-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: var(--border-subtle); }

/* ---------- Order builder ---------- */
.cart-line { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 12px; }
.cart-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cart-name { flex: 1; font-weight: 600; font-size: 13.5px; min-width: 140px; }
.spec-head, .spec-row { display: grid; grid-template-columns: 118px 68px 1fr 74px 30px; gap: 8px; align-items: center; }
.spec-head { font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 5px; }
.spec-row { margin-bottom: 6px; }
.spec-row .x { background: none; border: none; color: var(--text-muted); font-size: 15px; line-height: 1; padding: 4px; border-radius: var(--radius-sm); }
.spec-row .x:hover { color: var(--danger); background: rgba(220,38,38,.1); }
.cart-summary {
    background: var(--accent-primary); border-radius: var(--radius-lg); padding: 14px 18px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: #fff;
}
[data-theme='dark'] .cart-summary { background: var(--bg-elevated); border: var(--border-subtle); }
.cart-summary .cs-meta { font-size: 12px; color: rgba(255,255,255,.72); }
[data-theme='dark'] .cart-summary .cs-meta { color: var(--text-muted); }
.cart-summary .cs-total { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 24px; flex: 1; }
[data-theme='dark'] .cart-summary .cs-total { color: var(--text-primary); }

/* ---------- Order cards ---------- */
.order-card { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.order-card.at-risk { border-left: 3px solid var(--warning); }
.order-card.rejected { border-left: 3px solid var(--danger); }
.order-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-id { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .02em; }
.order-meta { font-size: 11.5px; color: var(--text-muted); }
.order-deadline { font-size: 12px; font-weight: 600; }
.order-deadline.warn { color: var(--warning); }
.order-detail { margin-top: 12px; border-top: var(--border-subtle); padding-top: 12px; }
.reject-note { margin-top: 10px; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.22); border-radius: var(--radius-md); padding: 9px 12px; font-size: 12px; color: var(--danger); line-height: 1.5; }
/* product artwork — a thumbnail on the card header, the full drawing in the
   production details. The garments are vector, so the large panel is the design
   at whatever resolution the screen (or the print) can render. */
.order-thumb {
    background: var(--bg-subtle); border: var(--border-subtle); border-radius: var(--radius-md);
    padding: 3px; flex-shrink: 0;
}
.line-block { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.line-block:last-child { margin-bottom: 0; }
.line-main { flex: 1; min-width: 0; }
.line-figure { width: 168px; flex-shrink: 0; }
.line-img {
    width: 168px; height: 168px; background: var(--bg-subtle);
    border: var(--border-subtle); border-radius: var(--radius-md); padding: 14px;
}
.line-cap { display: block; margin-top: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; text-align: center; }
.spec-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.spec-pill { background: var(--bg-subtle); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 10.5px; color: var(--text-secondary); }
.spec-pill b { color: var(--text-muted); font-weight: 600; }

/* status timeline */
.flow { display: flex; align-items: flex-start; margin-top: 14px; flex-wrap: wrap; }
.flow-step { display: flex; align-items: center; }
.flow-dot-wrap { display: flex; flex-direction: column; align-items: center; width: 84px; }
.flow-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--divider); border: 3px solid transparent; box-sizing: content-box; }
.flow-dot.done { background: var(--accent-slate); }
.flow-dot.now { background: var(--accent-coral); border-color: var(--accent-coral-soft); }
.flow-label { font-size: 9.5px; margin-top: 5px; color: var(--text-muted); text-align: center; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; }
.flow-label.on { color: var(--text-primary); font-weight: 600; }
.flow-bar { width: 20px; height: 2px; background: var(--divider); margin: 8px 0 0; }
.flow-bar.done { background: var(--accent-slate); }

/* ---------- Bar list (volume per club) ---------- */
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-row .bl { width: 168px; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.bar-row .bt { flex: 1; background: var(--bg-subtle); border-radius: var(--radius-sm); height: 16px; overflow: hidden; }
/* display:block is load-bearing — the fill is a <span>, and an inline box ignores height. */
.bar-row .bf { display: block; height: 100%; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--series-primary); }
.bar-row .bv { width: 62px; text-align: right; font-size: 12px; font-weight: 600; }

.chart-box { position: relative; height: 260px; }
.legend-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-secondary); }
.legend-inline .li { display: flex; align-items: center; gap: 6px; }
.legend-inline .dot { width: 10px; height: 10px; border-radius: 2px; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 12px; padding: 13px 16px; border-bottom: var(--border-subtle); }
.notif:last-child { border-bottom: none; }
.notif.unread { background: var(--accent-coral-soft); }
.notif-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent-coral); margin-top: 6px; flex-shrink: 0; }
.notif.read .notif-dot { background: transparent; }
.notif-ico { width: 32px; height: 32px; border-radius: var(--radius-md); display: grid; place-items: center; font-size: 13px; background: var(--bg-subtle); color: var(--text-muted); flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; }
.notif-text { font-size: 12px; color: var(--text-secondary); margin-top: 2px; line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.notif-chan { font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border: var(--border-subtle); border-radius: var(--radius-sm); padding: 1px 5px; }

/* ---------- Sheets ---------- */
.sheet { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 12px; }
.sheet.editing { border-color: var(--accent-coral); }
.sheet-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sheet-id { font-family: 'Oswald', sans-serif; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.sheet-name { font-weight: 600; font-size: 13.5px; }
.sheet-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 16px; font-size: 12.5px; }
.sheet-fields .f-full { grid-column: 1 / -1; }
.sheet-fields .k { color: var(--text-muted); font-weight: 600; }

/* ---------- Timeline / audit ---------- */
.audit { list-style: none; padding: 0; margin: 0; }
.audit li { display: flex; gap: 12px; padding: 8px 0; font-size: 12px; border-bottom: var(--border-subtle); }
.audit li:last-child { border-bottom: none; }
.audit .a-ts { width: 116px; color: var(--text-muted); flex-shrink: 0; }
.audit .a-who { color: var(--text-muted); }

/* ---------- Dialog ---------- */
.dialog-backdrop { position: fixed; inset: 0; background: var(--modal-backdrop-color); display: grid; place-items: center; z-index: 200; padding: 20px; animation: dlgFade var(--transition); }
.dialog-backdrop[hidden] { display: none; }
.dialog { background: var(--bg-card); border: var(--border-subtle); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; overflow: hidden; animation: dlgPop .18s cubic-bezier(.2,.9,.3,1.2); }
@keyframes dlgFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes dlgPop { from { opacity: 0; transform: translateY(8px) scale(.97) } to { opacity: 1; transform: none } }
.dialog-body { display: flex; gap: 14px; padding: 20px 22px 6px; }
.dialog-body h3 { font-size: 15px; margin-bottom: 6px; }
.dialog-body p { margin: 0; font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; }
.dialog-ico { width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0; display: grid; place-items: center; font-size: 16px; }
.dialog-ico.tone-danger { background: rgba(220,38,38,.13); color: var(--danger); }
.dialog-ico.tone-warning { background: rgba(217,119,6,.14); color: var(--warning); }
.dialog-ico.tone-success { background: rgba(22,163,74,.13); color: var(--success); }
.dialog-ico.tone-primary { background: var(--accent-coral-soft); color: var(--accent-coral); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; }
.dialog-input { padding: 0 22px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--modal-backdrop-color); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: var(--border-subtle); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: var(--border-subtle); }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px; background: var(--bg-card);
    border: var(--border-subtle); border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 11px 15px; font-size: 12.5px; color: var(--text-primary);
    min-width: 270px; max-width: 400px; line-height: 1.45;
    opacity: 0; transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease; pointer-events: auto;
}
.toast.show { opacity: 1; transform: none; }
.toast.tone-success { border-left-color: var(--success); } .toast.tone-success i { color: var(--success); }
.toast.tone-warning { border-left-color: var(--warning); } .toast.tone-warning i { color: var(--warning); }
.toast.tone-danger { border-left-color: var(--danger); } .toast.tone-danger i { color: var(--danger); }
.toast.tone-primary { border-left-color: var(--accent-coral); } .toast.tone-primary i { color: var(--accent-coral); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .cols-5 { grid-template-columns: repeat(3, 1fr); } .cols-4 { grid-template-columns: repeat(2, 1fr); } .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
    .sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform var(--transition); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); }
    .only-mobile { display: grid; }
    .who, .clock { display: none; }
    .view { padding: 16px 16px 50px; }
}
@media (max-width: 640px) {
    .cols-5, .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr; }
    /* the artwork stays full-width rather than shrinking to a stamp */
    .line-block { flex-direction: column; gap: 10px; }
    .line-figure, .line-img { width: 100%; }
    .line-img { height: auto; aspect-ratio: 1; max-width: 240px; }
    .form-grid { grid-template-columns: 1fr; }
    .spec-head { display: none; }
    .spec-row { grid-template-columns: 1fr 1fr; }
    .pdp-media, .pdp-img { width: 100%; }
    .pdp-img { height: auto; aspect-ratio: 1; }
    .bar-row .bl { width: 108px; }
    .toast-stack { left: 16px; right: 16px; }
    .toast { min-width: 0; max-width: none; }
}
