/* Portal shell — palette matched to the marketing site. */
:root {
    --bg: #0A1024;
    --panel: rgba(255,255,255,.06);
    --panel2: rgba(255,255,255,.09);
    --text: rgba(255,255,255,.92);
    --muted: rgba(255,255,255,.60);
    --line: rgba(255,255,255,.12);
    --brand: #2F5DF0;
    --brand2: #6E9BFF;
    --good: #F0A22F;
    --warn: #FFC24B;
    --bad: #FF6B6B;
    --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 6px; letter-spacing: -.3px; }
h1 { font-size: 26px; }
.h2 { font-size: 17px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(47,93,240,.10), transparent 260px);
    padding: 18px 14px;
    position: sticky; top: 0; height: 100vh; overflow: auto;
}

.brand-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-row img { height: 26px; }
.brand-row .bt { font-weight: 700; letter-spacing: -.4px; }

.side-nav { display: grid; gap: 2px; }
.side-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: 11px;
    color: var(--muted); font-weight: 500;
    transition: background .15s, color .15s;
}
.side-nav a:hover { background: var(--panel); color: var(--text); }
.side-nav a.active { background: var(--panel2); color: var(--text); }
.nav-ico { width: 20px; text-align: center; font-size: 15px; }

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

.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 26px; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; background: rgba(10,16,36,.85);
    backdrop-filter: blur(10px); z-index: 5;
}
.topbar .user { color: var(--muted); font-size: 14px; cursor: pointer; }

.content { padding: 26px; max-width: 1180px; width: 100%; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 25px; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ cards */
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.divider { border-top: 1px solid var(--line); margin: 14px 0; }
.stack { display: grid; gap: 16px; align-content: start; }

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--panel);
    color: var(--text); font: inherit; font-size: 14px; font-weight: 550;
    cursor: pointer; transition: transform .12s, background .15s;
}
.btn:hover { background: var(--panel2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); border-color: transparent; color: #EDEFF5; font-weight: 650; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255,107,107,.4); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.mini-link { color: var(--brand2); font-size: 13.5px; }

/* ------------------------------------------------------------------ kpis */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.kpi-label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .6px; }
.kpi-value { font-size: 19px; font-weight: 640; letter-spacing: -.3px; }
.kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; }

/* ------------------------------------------------------------------ table */
.table { display: grid; }
.row {
    display: grid; grid-template-columns: 2.2fr 1fr 1.6fr 1fr .7fr;
    gap: 12px; align-items: center;
    padding: 13px 4px; border-top: 1px solid var(--line);
}
.row.head { border-top: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
a.row { transition: background .15s; border-radius: 10px; }
a.row:hover { background: var(--panel); }
.row .title { font-weight: 560; }
.cta { color: var(--brand2); font-size: 13.5px; }

.progress { height: 6px; border-radius: 99px; background: rgba(255,255,255,.10); overflow: hidden; }
.progress .bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand2)); }

/* ------------------------------------------------------------------ pills */
.pill-status, .status-pill {
    display: inline-block; padding: 3px 10px; border-radius: 99px;
    font-size: 12px; font-weight: 600; border: 1px solid var(--line);
}
.status-pill.queued,   .pill-status.queued   { color: var(--muted); }
.status-pill.editing,  .pill-status.editing  { color: var(--brand2); border-color: rgba(110,155,255,.35); }
.status-pill.inreview, .status-pill.review,
.pill-status.review, .pill-status.due        { color: var(--warn); border-color: rgba(255,194,75,.35); }
.status-pill.delivered,.pill-status.delivered{ color: var(--good); border-color: rgba(240,162,47,.35); }

.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--muted); margin-top: 7px; }
.dot.review { background: var(--warn); }
.dot.editing { background: var(--brand2); }
.dot.delivered { background: var(--good); }

.feed { display: grid; gap: 13px; }
.feed-item { display: flex; gap: 11px; align-items: flex-start; }

.quick { display: grid; gap: 9px; }
.quick-item { display: flex; gap: 11px; align-items: center; padding: 9px; border-radius: 11px; transition: background .15s; }
.quick-item:hover { background: var(--panel); }
.q-ico { font-size: 17px; }

/* ------------------------------------------------------------------ forms */
input, select, textarea {
    width: 100%; padding: 11px 13px;
    background: rgba(255,255,255,.04); color: var(--text);
    border: 1px solid var(--line); border-radius: 11px;
    font: inherit; font-size: 14.5px; outline: none;
}
input:focus, select, textarea:focus { border-color: rgba(47,93,240,.55); }
select option { background: #10131F; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ------------------------------------------------------------------ dropzone */
.dropzone {
    border: 1.5px dashed rgba(255,255,255,.22);
    border-radius: var(--radius);
    padding: 40px 20px; text-align: center;
    color: var(--muted); cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: rgba(47,93,240,.07); }
.dropzone .big { font-size: 30px; margin-bottom: 8px; }

.upload-list { display: grid; gap: 10px; margin-top: 16px; }
.upload-item { display: grid; gap: 7px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.upload-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.upload-name { font-weight: 550; word-break: break-all; }
.upload-pct { color: var(--muted); font-size: 13px; white-space: nowrap; }
.upload-item.err { border-color: rgba(255,107,107,.45); }
.upload-item.err .upload-pct { color: var(--bad); }
.upload-item.ok .upload-pct { color: var(--good); }

/* ------------------------------------------------------------------ empty / toast */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 10px; }

.toast {
    position: fixed; bottom: 22px; right: 22px; z-index: 50;
    padding: 12px 18px; border-radius: 12px;
    background: #14182A; border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0,0,0,.5);
    opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.bad { border-color: rgba(255,107,107,.5); }

/* ------------------------------------------------------------------ login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo { height: 34px; margin-bottom: 18px; }
.auth-err { color: var(--bad); font-size: 13.5px; min-height: 19px; margin-top: 10px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-switch a { color: var(--brand2); cursor: pointer; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .side-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
    .side-nav a span:last-child { display: none; }
    .side-nav hr { display: none; }
    .dash-grid { grid-template-columns: 1fr; }
    .row { grid-template-columns: 1fr 1fr; }
    .row.head { display: none; }
    .content { padding: 18px; }
}
