/* Dé Pitch portal */
:root {
  --ink: #0d0f12;
  --ink-2: #3c4148;
  --muted: #6b7178;
  --line: #e3e6e8;
  --paper: #ffffff;
  --wash: #f4f6f7;
  --navy: #011D38;
  --navy-2: #0b2c4d;
  --sage: #95B5BF;
  --sage-soft: #e6eff2;
  --ok: #1f7a4d;   --ok-bg: #e5f4ec;
  --warn: #9a6200; --warn-bg: #fdf1dc;
  --bad: #b3261e;  --bad-bg: #fbe7e5;
  --info: #1e5a8a; --info-bg: #e3eef8;
  --radius: 12px;
  --side: 248px;
  font-size: 15px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--wash); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); }
.auth-art { background: var(--navy) url('images/container02.jpg') center / cover; position: relative; color: #fff; display: flex; align-items: flex-end; padding: 40px; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1,29,56,.25), rgba(1,29,56,.85)); }
.auth-art > * { position: relative; }
.auth-art h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; max-width: 18ch; }
.auth-art p { margin-top: 10px; opacity: .85; max-width: 40ch; }
.auth-form { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 18px; }
.auth-card img { width: 132px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 600; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- forms ---------- */
label.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea, .input {
  width: 100%; padding: .7rem .8rem; border: 1px solid #cfd4d8; border-radius: 8px; background: #fff; font-size: .95rem; outline: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(1,29,56,.12); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.error { color: var(--bad); font-size: .88rem; min-height: 1.2em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: .62rem 1rem; border-radius: 8px; border: 1px solid transparent; background: var(--ink); color: #fff; font-weight: 600; font-size: .88rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #2a2f36; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #cfd4d8; }
.btn.secondary:hover { background: var(--wash); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--wash); }
.btn.danger { background: #fff; color: var(--bad); border-color: #efc9c5; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: .4rem .7rem; font-size: .8rem; }
.btn.block { width: 100%; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.side .brand img { width: 96px; filter: brightness(0) invert(1); }
.side .brand span { white-space: nowrap; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.12); padding: 3px 7px; border-radius: 5px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: .6rem .75rem; border-radius: 8px; text-decoration: none; color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: #fff; color: var(--navy); }
.nav .count { font-size: .72rem; font-weight: 700; background: #e3402c; color: #fff; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav a.active .count { background: #e3402c; color: #fff; }
.side .me { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 8px 0; display: grid; gap: 8px; font-size: .85rem; }
.side .me b { display: block; font-size: .92rem; }
.side .me span { opacity: .7; word-break: break-all; }
.side .me .btn { background: rgba(255,255,255,.1); }
.side .me .btn:hover { background: rgba(255,255,255,.2); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px clamp(16px, 3vw, 40px) 60px; display: grid; gap: 22px; max-width: 1240px; width: 100%; }
.page-head h1 { font-size: 1.55rem; font-weight: 600; }
.page-head p { color: var(--muted); margin-top: 4px; }

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .topbar img { width: 104px; }
  .topbar button { background: none; border: 0; padding: 8px; cursor: pointer; }
}

/* ---------- announcement bar ---------- */
.announce { display: flex; gap: 12px; align-items: center; background: var(--sage-soft); border: 1px solid #cfe0e5; color: var(--navy); padding: 10px 14px; border-radius: 10px; font-size: .9rem; }
.announce .tag { flex: none; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--navy); color: #fff; border-radius: 5px; padding: 3px 7px; }
.announce .msgs { display: grid; gap: 4px; min-width: 0; }
.announce a { font-weight: 600; }

/* ---------- cards / panels ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel > h2, .panel-title { font-size: 1.02rem; font-weight: 600; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.stat.hero { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat.hero .label, .stat.hero .sub { color: rgba(255,255,255,.7); }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1060px) { .cols { grid-template-columns: 1fr; } }

/* earnings bars */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; align-items: end; height: 190px; padding-top: 18px; }
.bar { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; text-align: center; min-width: 0; }
.bar .fill-wrap { display: flex; align-items: flex-end; height: 100%; position: relative; }
.bar .fill { width: 100%; background: var(--sage); border-radius: 5px 5px 2px 2px; min-height: 2px; position: relative; }
.bar.paid .fill { background: var(--navy); }
.bar.pending .fill { background: repeating-linear-gradient(45deg, var(--sage), var(--sage) 4px, #b9cfd6 4px, #b9cfd6 8px); }
.bar .m { font-size: .72rem; color: var(--muted); }
.bar .amt { position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: .66rem; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 640px) { .bar .amt { display: none; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fafbfb; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t td.r, .t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.t tbody tr:hover { background: #fbfcfc; }
.t .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 28px; text-align: center; color: var(--muted); font-size: .92rem; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.info { color: var(--info); background: var(--info-bg); }
.pill.mute { color: var(--muted); background: #eef0f1; }

/* tabs (segmented) */
.seg { display: inline-flex; background: #e9eced; border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: .45rem .85rem; border-radius: 7px; font-size: .85rem; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* line editors (weekly report / payroll / invoice) */
.lines { display: grid; gap: 8px; }
.line { display: grid; gap: 8px; align-items: start; }
.line .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; padding: 6px; line-height: 1; }
.line .x:hover { color: var(--bad); }
.line input, .line select, .line textarea { width: 100%; padding: .55rem .65rem; border: 1px solid #cfd4d8; border-radius: 7px; font-size: .88rem; background: #fff; }
.line textarea { min-height: 42px; resize: vertical; }
.line-head { display: grid; gap: 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.task-line { grid-template-columns: 34px 2.2fr 1fr .7fr 2fr 30px; }
.blocker-line { grid-template-columns: 2fr 1.4fr 1.4fr 1.4fr 30px; }
.money-line { grid-template-columns: 2fr 1fr 30px; }
.inv-line { grid-template-columns: 2.6fr 1fr 30px; }
.task-line .no { padding-top: .55rem; font-weight: 600; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .line-head { display: none; }
  .task-line, .blocker-line { grid-template-columns: 1fr; background: #fafbfb; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
  .task-line .no { text-align: left; padding: 0; }
  .line .x { justify-self: end; }
}
.section-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--navy); padding: 8px 10px; background: var(--sage-soft); border-radius: 6px; }

/* report sheet view (mirrors the Excel layout) */
.sheet { overflow-x: auto; }
.sheet table { border-collapse: collapse; font-size: .82rem; min-width: 900px; width: 100%; }
.sheet td, .sheet th { border: 1px solid #cdd3d6; padding: 6px 8px; vertical-align: top; text-align: left; }
.sheet th { background: #eef3f5; font-weight: 600; }
.sheet .sec { background: var(--navy); color: #fff; font-weight: 700; letter-spacing: .03em; }
.sheet .k { font-weight: 600; background: #fafbfb; width: 150px; }
.sheet .gap { border: 0; background: transparent; width: 14px; }

/* ---------- modal ---------- */
dialog#modal { border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
dialog#modal.wide { width: min(1100px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(1, 15, 30, .5); }
.modal-inner { display: grid; grid-template-rows: auto 1fr auto; max-height: calc(100vh - 32px); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h3 { font-size: 1.1rem; font-weight: 600; }
.modal-head .close { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; background: #fafbfb; border-radius: 0 0 14px 14px; }

/* toast */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 1000; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }

/* talent cards */
.talents { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.talent { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 10px; }
.talent .who { display: flex; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--sage); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: none; }
.talent dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .85rem; }
.talent dt { color: var(--muted); }
.talent dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: none; border: 0; font-size: 1.6rem; color: #ccd2d5; cursor: pointer; padding: 0 2px; line-height: 1; }
.stars button.on { color: #e3a400; }
.temp-pass { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; background: var(--wash); border: 1px dashed #b9c1c6; padding: 12px; border-radius: 8px; text-align: center; letter-spacing: .04em; user-select: all; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: 6px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* live chat (People Ops) */
.chat-admin { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .chat-admin { grid-template-columns: 1fr; } }
.chat-list { padding: 8px; display: grid; gap: 4px; max-height: 70vh; overflow-y: auto; }
.chat-item { text-align: left; background: #fff; border: 1px solid transparent; border-radius: 9px; padding: 10px 12px; display: grid; gap: 3px; cursor: pointer; font: inherit; color: inherit; }
.chat-item:hover { background: var(--wash); }
.chat-item.on { border-color: var(--navy); background: var(--sage-soft); }
.chat-item .count { font-size: .72rem; font-weight: 700; background: var(--navy); color: #fff; border-radius: 999px; padding: 1px 7px; }
.chat-view { display: grid; gap: 12px; min-height: 420px; grid-template-rows: auto 1fr auto; }
.chat-thread { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; padding: 6px 2px; }
.bubble { max-width: 75%; padding: 9px 12px; border-radius: 12px; font-size: .92rem; }
.bubble p { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.bubble .small { opacity: .75; font-size: .72rem; }
.bubble.them { align-self: flex-start; background: var(--wash); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.chat-reply { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.chat-reply textarea { width: 100%; padding: .65rem .8rem; border: 1px solid #cfd4d8; border-radius: 8px; font: inherit; resize: vertical; }

#menu-btn { position: relative; }
#menu-btn.has-count::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #e3402c; border: 2px solid #fff; }
.seg + .table-wrap, .seg + .row { margin-top: 14px; }
div.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--ink-2); justify-items: start; }
div.field .hint { font-weight: 400; }
#sv-sections { display: grid; gap: 14px; }
#sv-sections .grid-2, #sv-sections .grid-3 { align-items: start; }

/* email marketing */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tpl-card { display: grid; gap: 6px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.tpl-card:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(1,29,56,.08); }
.tpl-card b { font-size: 1rem; margin-top: 4px; }
.tpl-card span { font-size: .82rem; color: var(--muted); line-height: 1.4; }
.tpl-thumb { height: 300px; overflow: hidden; border-radius: 10px; background: #f3f3f1; position: relative; }
.tpl-thumb iframe { width: 640px; height: 1000px; border: 0; transform: scale(.36); transform-origin: 0 0; pointer-events: none; position: absolute; left: 0; top: 0; }
.mkt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 20px; align-items: start; margin-top: 14px; }
.mkt-grid > .stack { display: grid; gap: 16px; }
.mkt-grid .panel.stack { display: grid; gap: 12px; }
.mkt-preview { position: sticky; top: 14px; display: grid; gap: 10px; justify-items: start; }
.frame-wrap { width: 100%; background: #e9e9e7; border-radius: 14px; padding: 10px; overflow: hidden; }
.frame-wrap iframe { border: 0; border-radius: 8px; background: #fff; display: block; }
.img-field .img-row { display: flex; gap: 10px; align-items: center; width: 100%; }
.img-field .img-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: #eee; }
.img-field select { flex: 1; }
div.field select, .img-row select { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; cursor: pointer; }
.tag { display: inline-block; font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--navy); margin: 1px 0; white-space: nowrap; }
@media (max-width: 980px) { .mkt-grid { grid-template-columns: 1fr; } .mkt-preview { position: static; } }
