/* ═══════════════════════════════════════════════
   OGUM — catalog · auth · app panel
   (loads after style.css; reuses its tokens)
═══════════════════════════════════════════════ */

/* ═══════════ CATALOG PAGE ═══════════ */
.catalog-hero {
  padding: 150px 0 60px;
  background:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(46,91,255,0.14), transparent 60%),
    radial-gradient(ellipse 40% 50% at 10% 20%, rgba(255,46,77,0.1), transparent 60%),
    var(--ink);
}
.catalog-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; margin-bottom: 16px; }
.catalog-hero h1 em {
  font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.catalog-hero p { color: var(--muted); max-width: 560px; font-size: 1.05rem; }
.catalog-body { background: var(--paper); color: var(--navy); padding: 44px 0 110px; min-height: 60vh; }
.catalog-toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  margin-bottom: 14px;
}
.catalog-toolbar .tasks__search { flex: 1; min-width: 220px; max-width: 340px; }
.catalog-select {
  font-family: var(--font-display); font-weight: 500; font-size: 0.86rem;
  padding: 10px 16px; border-radius: 100px; border: 1px solid var(--line-light);
  background: #fff; color: var(--navy); cursor: pointer; outline: none;
}
.catalog-count { font-size: 0.85rem; color: var(--muted-dark); margin: 6px 0 22px; }
.catalog-count b { color: var(--navy); }
.catalog-empty {
  text-align: center; padding: 80px 0; color: var(--muted-dark);
  font-family: var(--font-display);
}

/* ═══════════ AUTH PAGE ═══════════ */
.auth-page { min-height: 100svh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(255,46,77,0.22), transparent 60%),
    radial-gradient(ellipse 60% 60% at 85% 75%, rgba(46,91,255,0.28), transparent 60%),
    var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 52px;
}
.auth-brand__logo { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0.05em; }
.auth-brand__quote h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 700; line-height: 1.1; margin-bottom: 20px; }
.auth-brand__quote h2 em {
  font-style: normal; background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-brand__quote p { color: var(--muted); max-width: 400px; }
.auth-brand__stats { display: flex; gap: 34px; }
.auth-brand__stats div b { display: block; font-family: var(--font-display); font-size: 1.4rem; }
.auth-brand__stats div span { font-size: 0.78rem; color: var(--muted); }
.auth-brand__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background-image: linear-gradient(rgba(151,163,189,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151,163,189,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
}
.auth-panel {
  background: var(--paper); color: var(--navy);
  display: flex; align-items: center; justify-content: center; padding: 48px 24px;
}
.auth-card { width: min(420px, 100%); }
.auth-tabs {
  display: flex; background: var(--paper-2); border-radius: 100px; padding: 5px; margin-bottom: 34px;
}
.auth-tabs button {
  flex: 1; padding: 11px; border-radius: 100px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  color: var(--muted-dark); transition: 0.3s;
}
.auth-tabs button.active { background: var(--navy); color: #fff; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 8px; }
.auth-card > p { color: var(--muted-dark); font-size: 0.92rem; margin-bottom: 30px; }
.auth-bonus {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,46,77,0.08); color: var(--red);
  font-family: var(--font-display); font-weight: 600; font-size: 0.8rem;
  border-radius: 100px; padding: 7px 14px; margin-bottom: 26px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.82rem; margin-bottom: 7px; color: var(--navy);
}
.field label .opt { color: var(--muted-dark); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1.5px solid var(--line-light); background: #fff;
  font: inherit; font-size: 0.94rem; color: var(--navy);
  outline: none; transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(46,91,255,0.12);
}
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 0.76rem; color: var(--muted-dark); margin-top: 5px; }
.auth-submit { width: 100%; justify-content: center; margin-top: 8px; }
.auth-alt { text-align: center; font-size: 0.84rem; color: var(--muted-dark); margin-top: 22px; }
.auth-alt a { color: var(--blue); font-weight: 600; }
.auth-error {
  background: rgba(255,46,77,0.08); color: var(--red-deep);
  border-radius: 10px; padding: 11px 14px; font-size: 0.85rem; margin-bottom: 16px; display: none;
}
.auth-error.show { display: block; }

/* ═══════════ APP SHELL ═══════════ */
.app-body { background: var(--paper); color: var(--navy); min-height: 100svh; }
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100svh; }
.side {
  background: var(--ink); color: var(--text);
  display: flex; flex-direction: column;
  padding: 26px 18px; position: sticky; top: 0; height: 100svh;
}
.side__logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.05em; padding: 0 10px 24px;
}
.side__group { margin-bottom: 20px; }
.side__label {
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted-dark); padding: 0 10px 8px; font-family: var(--font-display);
}
.side a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 10px; border-radius: 10px;
  font-size: 0.9rem; color: var(--muted); font-weight: 500;
  transition: 0.2s; margin-bottom: 2px;
}
.side a svg { flex-shrink: 0; opacity: 0.7; }
.side a:hover { color: #fff; background: rgba(255,255,255,0.05); }
.side a.active { color: #fff; background: linear-gradient(90deg, rgba(255,46,77,0.16), rgba(46,91,255,0.1)); }
.side a.active svg { opacity: 1; }
.side__spacer { flex: 1; }
.side__credits {
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.side__credits b { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.side__credits span { font-size: 0.74rem; color: var(--muted); }
.side__credits a {
  padding: 0; margin-top: 8px; font-size: 0.78rem; color: var(--blue-soft); background: none !important;
}
.side__user { display: flex; align-items: center; gap: 10px; padding: 10px; }
.side__avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: #fff;
}
.side__user div b { display: block; font-size: 0.83rem; font-weight: 600; }
.side__user div span { font-size: 0.72rem; color: var(--muted-dark); }

.app-main { padding: 34px 42px 80px; max-width: 1180px; width: 100%; margin-inline: auto; }
.app-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.app-head h1 { font-size: 1.9rem; }
.app-head p { color: var(--muted-dark); font-size: 0.92rem; margin-top: 6px; }

/* generic panel card */
.panel {
  background: #fff; border: 1px solid var(--line-light);
  border-radius: var(--r-md); padding: 26px;
}
.panel h3 { font-size: 1.05rem; margin-bottom: 16px; }

/* dashboard */
.dash-hero {
  border-radius: var(--r-lg); padding: 34px;
  background:
    radial-gradient(ellipse 45% 90% at 90% 10%, rgba(255,46,77,0.28), transparent 60%),
    radial-gradient(ellipse 45% 90% at 70% 90%, rgba(46,91,255,0.3), transparent 60%),
    var(--ink);
  color: var(--text); margin-bottom: 26px;
}
.dash-hero h2 { font-size: 1.6rem; margin-bottom: 8px; }
.dash-hero p { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.dash-search { display: flex; gap: 10px; max-width: 520px; }
.dash-search input {
  flex: 1; padding: 13px 18px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06);
  color: #fff; font: inherit; font-size: 0.92rem; outline: none;
}
.dash-search input::placeholder { color: var(--muted); }
.dash-search input:focus { border-color: rgba(125,155,255,0.6); }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md); padding: 18px 20px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 1.5rem; }
.stat-card span { font-size: 0.78rem; color: var(--muted-dark); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.dash-section-title { display: flex; justify-content: space-between; align-items: center; margin: 30px 0 14px; }
.dash-section-title h3 { font-size: 1.1rem; }
.dash-section-title a { font-size: 0.84rem; color: var(--blue); font-weight: 600; }

/* agent tiles in app */
.agent-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.agent-tile {
  background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md);
  padding: 20px; display: flex; gap: 14px; align-items: center;
  transition: 0.3s var(--ease); color: var(--navy);
}
.agent-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -16px rgba(11,27,58,0.25); }
.agent-tile .mk {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--ink);
}
.agent-tile .mk svg { width: 30px; height: 30px; }
.agent-tile b { display: block; font-family: var(--font-display); font-size: 0.95rem; }
.agent-tile span { font-size: 0.76rem; color: var(--muted-dark); }

/* task rows / tables */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md); }
.app-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
.app-table th {
  text-align: left; font-family: var(--font-display); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dark);
  padding: 14px 18px; border-bottom: 1px solid var(--line-light);
}
.app-table td { padding: 14px 18px; border-bottom: 1px solid var(--line-light); vertical-align: middle; }
.app-table tr:last-child td { border-bottom: 0; }
.app-table .tnum { font-variant-numeric: tabular-nums; font-family: var(--font-display); }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 100px; font-family: var(--font-display);
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip--delivered, .status-chip--completed { background: rgba(22,163,106,0.1); color: #16a36a; }
.status-chip--generating, .status-chip--qa { background: rgba(255,46,77,0.1); color: var(--red); }
.status-chip--draft { background: rgba(91,103,132,0.12); color: var(--muted-dark); }
.status-chip--revision { background: rgba(46,91,255,0.1); color: var(--blue); }
.amount-pos { color: #16a36a; font-weight: 600; }
.amount-neg { color: var(--red-deep); font-weight: 600; }

/* run flow */
.run-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.run-steps { display: flex; gap: 6px; margin-bottom: 26px; }
.run-steps span {
  flex: 1; height: 4px; border-radius: 4px; background: var(--paper-2);
}
.run-steps span.done { background: var(--grad); }
.run-summary { position: sticky; top: 30px; }
.run-summary .thumb { height: 120px; border-radius: var(--r-sm); overflow: hidden; position: relative; margin-bottom: 16px; }
.run-summary .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.run-summary h4 { font-size: 1rem; margin-bottom: 4px; }
.run-summary .agent-line { font-size: 0.78rem; color: var(--muted-dark); margin-bottom: 14px; }
.run-summary dl { display: flex; flex-direction: column; gap: 9px; font-size: 0.85rem; }
.run-summary dl div { display: flex; justify-content: space-between; }
.run-summary dt { color: var(--muted-dark); }
.run-summary dd { font-weight: 600; font-family: var(--font-display); }
.run-summary .total { border-top: 1px dashed var(--line-light); margin-top: 6px; padding-top: 12px; }
.balance-warn { color: var(--red-deep) !important; }

/* file dropzone */
.dropzone {
  border: 2px dashed var(--line-light); border-radius: 12px;
  padding: 26px; text-align: center; color: var(--muted-dark);
  font-size: 0.88rem; cursor: pointer; transition: 0.25s; background: #fff;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: rgba(46,91,255,0.04); color: var(--blue); }
.dropzone input { display: none; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-2); border-radius: 100px; padding: 6px 8px 6px 14px;
  font-size: 0.8rem; font-weight: 500;
}
.file-chip button {
  width: 20px; height: 20px; border-radius: 50%; background: rgba(11,27,58,0.1);
  font-size: 0.75rem; line-height: 1; display: grid; place-items: center;
}
.file-chip button:hover { background: var(--red); color: #fff; }

/* processing */
.processing { text-align: center; padding: 60px 20px; }
.processing .forge {
  width: 92px; height: 92px; margin: 0 auto 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--red), #a03df0, var(--blue), var(--red));
  animation: spin 2.4s linear infinite; position: relative;
}
.processing .forge::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper);
}
.processing .forge span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.6rem; z-index: 1; font-family: var(--font-display); font-weight: 700;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing h2 { font-size: 1.4rem; margin-bottom: 10px; }
.processing .stage { color: var(--muted-dark); font-size: 0.95rem; min-height: 24px; }
.processing .stages-done { margin: 26px auto 0; max-width: 320px; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.processing .stages-done div { font-size: 0.85rem; color: var(--muted-dark); display: flex; gap: 10px; align-items: center; }
.processing .stages-done div.done { color: #16a36a; }
.processing .stages-done div.now { color: var(--navy); font-weight: 600; }

/* deliverable */
.deliverable-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.deliverable-doc {
  background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md);
  padding: 48px 52px; line-height: 1.75; font-size: 0.95rem;
}
.deliverable-doc h1 { font-size: 1.6rem; margin-bottom: 6px; }
.deliverable-doc h2 { font-size: 1.15rem; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-light); }
.deliverable-doc p { margin-bottom: 12px; color: #38445e; }
.deliverable-doc ul { margin: 0 0 12px 20px; color: #38445e; }
.deliverable-doc li { margin-bottom: 6px; }
.deliverable-doc .doc-meta { font-size: 0.78rem; color: var(--muted-dark); margin-bottom: 26px; font-family: var(--font-display); }
.deliverable-doc .doc-flag {
  margin-top: 30px; padding: 12px 16px; border-radius: 10px;
  background: var(--paper); font-size: 0.78rem; color: var(--muted-dark);
}
.rating-stars { display: flex; gap: 6px; margin: 10px 0 4px; }
.rating-stars button { font-size: 1.5rem; color: #d5dcea; transition: 0.15s; }
.rating-stars button.on { color: #f5a623; }
.side-actions { display: flex; flex-direction: column; gap: 10px; }
.side-actions .btn { justify-content: center; }

.status-chip--failed { background: rgba(255, 46, 77, 0.1); color: var(--red-deep); }
.mock-banner {
  background: rgba(245, 166, 35, 0.12); border: 1px solid rgba(245, 166, 35, 0.4);
  color: #8a5a00; border-radius: 10px; padding: 12px 16px;
  font-size: 0.85rem; margin-bottom: 18px;
}
.mock-banner code { background: rgba(245, 166, 35, 0.15); padding: 2px 6px; border-radius: 4px; }

/* ═══════════ PRO DELIVERABLE TYPOGRAPHY ═══════════ */
.deliverable-doc--pro {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.96rem; line-height: 1.75; color: #26314d;
  padding: 0; overflow: hidden;
}
.deliverable-doc--pro > * { padding-left: 52px; padding-right: 52px; }
.doc-cover {
  background:
    radial-gradient(ellipse 60% 120% at 90% -20%, rgba(255,46,77,0.16), transparent 60%),
    radial-gradient(ellipse 50% 100% at 10% 120%, rgba(46,91,255,0.14), transparent 60%),
    var(--ink);
  color: var(--text);
  padding-top: 40px !important; padding-bottom: 36px !important;
  margin-bottom: 30px;
}
.doc-cover__brand {
  display: flex; justify-content: space-between;
  font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 26px;
}
.doc-cover h1 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.12; margin-bottom: 10px; color: #fff;
}
.doc-cover__sub { font-size: 1.05rem; color: var(--muted); font-style: italic; }
.doc-cover__meta {
  display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px;
  font-family: var(--font-display); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-dark);
}
.doc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 24px; }
.doc-stat {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(151,163,189,0.2);
  border-top: 3px solid var(--red); border-radius: 8px; padding: 12px 14px;
  font-family: var(--font-display);
}
.doc-stat b { display: block; font-size: 1.15rem; color: #fff; }
.doc-stat span { font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.doc-summary {
  background: var(--paper); border-left: 4px solid var(--blue);
  margin: 0 52px 26px; padding: 18px 22px !important; border-radius: 0 10px 10px 0;
}
.doc-label, .doc-summary h6, .doc-assumptions h6 {
  font-family: var(--font-display); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-dark);
  margin-bottom: 8px;
}
.doc-summary p { margin: 0; font-size: 0.98rem; }
.doc-section { margin-bottom: 30px; }
.doc-section h2 {
  font-family: var(--font-display); font-size: 1.25rem; color: var(--navy);
  border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 16px;
}
.doc-section__num { color: var(--red); font-size: 0.85rem; margin-right: 12px; vertical-align: 2px; }
.doc-section h3, .doc-section h4, .doc-section h5 { font-family: var(--font-display); color: var(--navy); margin: 18px 0 8px; }
.doc-section h3 { font-size: 1.02rem; } .doc-section h4 { font-size: 0.94rem; }
.doc-section p { margin-bottom: 12px; }
.doc-section ul, .doc-section ol { margin: 0 0 14px 22px; }
.doc-section li { margin-bottom: 6px; }
.doc-section blockquote {
  border-left: 3px solid var(--red); padding: 4px 18px; margin: 16px 0;
  color: var(--muted-dark); font-style: italic;
}
.doc-section code { font-family: ui-monospace, Menlo, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.doc-section hr { border: 0; border-top: 1px solid var(--line-light); margin: 20px 0; }
.doc-table-wrap { overflow-x: auto; margin: 14px 0; border-radius: 8px; border: 1px solid var(--line-light); }
.doc-table-wrap table {
  border-collapse: collapse; width: 100%;
  font-family: var(--font-body); font-size: 0.84rem;
}
.doc-table-wrap th {
  background: var(--navy); color: #fff; text-align: left;
  padding: 10px 14px; font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.04em; white-space: nowrap;
}
.doc-table-wrap td { padding: 9px 14px; border-bottom: 1px solid var(--line-light); vertical-align: top; }
.doc-table-wrap tr:last-child td { border-bottom: 0; }
.doc-table-wrap tr:nth-child(even) td { background: var(--paper); }
/* slides */
.doc-slides { margin-bottom: 30px; }
.slide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slide {
  aspect-ratio: 16 / 10; border-radius: 10px; padding: 18px 20px;
  display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--font-display);
  background: linear-gradient(150deg, var(--ink) 0%, var(--navy) 100%);
  color: var(--text); position: relative;
}
.slide::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 60% at 100% 0%, rgba(255,46,77,0.15), transparent 60%);
}
.slide:first-child { background: linear-gradient(150deg, #1a0b14 0%, var(--red-deep) 130%); }
.slide__num { font-size: 0.68rem; font-weight: 700; color: var(--red); letter-spacing: 0.1em; }
.slide h4 { font-size: 0.98rem; margin: 6px 0 10px; line-height: 1.2; color: #fff; }
.slide ul { list-style: none; margin: 0; font-family: var(--font-body); font-size: 0.76rem; color: var(--muted); }
.slide li { margin-bottom: 5px; padding-left: 14px; position: relative; }
.slide li::before { content: "▸"; position: absolute; left: 0; color: var(--red); }
.slide__note {
  margin-top: auto; font-size: 0.64rem; color: var(--muted-dark);
  border-top: 1px dashed rgba(151,163,189,0.25); padding-top: 7px;
  font-family: var(--font-body); position: relative; z-index: 1;
}
.doc-assumptions { border-top: 1px solid var(--line-light); padding-top: 16px; margin-bottom: 20px; }
.doc-assumptions ul { margin-left: 20px; font-size: 0.88rem; color: var(--muted-dark); }
.deliverable-doc--pro .doc-flag { margin: 0 52px 34px; }
@media (max-width: 720px) {
  .deliverable-doc--pro > *, .doc-summary, .deliverable-doc--pro .doc-flag { padding-left: 22px; padding-right: 22px; margin-left: 0; margin-right: 0; }
  .slide-grid { grid-template-columns: 1fr; }
}

/* billing */
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 26px; }
.balance-card {
  border-radius: var(--r-md); padding: 26px; color: var(--text);
  background: radial-gradient(ellipse 60% 100% at 85% 20%, rgba(255,46,77,0.3), transparent 60%), var(--ink);
}
.balance-card b { font-size: 2.2rem; font-family: var(--font-display); display: block; }
.balance-card span { color: var(--muted); font-size: 0.82rem; }
.topup-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.topup-btn {
  border: 1px solid rgba(255,255,255,0.22); border-radius: 100px;
  padding: 9px 16px; font-size: 0.82rem; font-family: var(--font-display); color: #fff;
  transition: 0.25s;
}
.topup-btn:hover { background: var(--red); border-color: var(--red); }
.plan-mini { display: flex; flex-direction: column; gap: 10px; }
.plan-mini-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; border: 1.5px solid var(--line-light); border-radius: 12px;
  font-size: 0.88rem;
}
.plan-mini-row.current { border-color: var(--blue); background: rgba(46,91,255,0.04); }
.plan-mini-row b { font-family: var(--font-display); }
.plan-mini-row .btn { padding: 8px 16px; font-size: 0.78rem; }

/* profile / settings forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .field--full { grid-column: 1 / -1; }
.save-bar { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.save-note { font-size: 0.82rem; color: #16a36a; opacity: 0; transition: opacity 0.3s; }
.save-note.show { opacity: 1; }

/* refer */
.refer-hero {
  border-radius: var(--r-lg); padding: 40px; text-align: center; color: var(--text);
  background:
    radial-gradient(ellipse 40% 80% at 20% 20%, rgba(255,46,77,0.25), transparent 60%),
    radial-gradient(ellipse 40% 80% at 80% 80%, rgba(46,91,255,0.25), transparent 60%),
    var(--ink);
  margin-bottom: 24px;
}
.refer-hero h2 { font-size: 1.8rem; margin-bottom: 10px; }
.refer-hero p { color: var(--muted); margin-bottom: 24px; }
.refer-link {
  display: flex; max-width: 460px; margin: 0 auto; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 100px; padding: 6px 6px 6px 20px;
  align-items: center; gap: 12px;
}
.refer-link code { font-size: 0.85rem; color: var(--blue-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.refer-link .btn { padding: 10px 20px; font-size: 0.82rem; }

/* help */
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.app-faq .faq__item { border-color: var(--line-light); }
.app-faq .faq__q { color: var(--navy); font-size: 0.95rem; padding: 18px 0; }
.app-faq .faq__q .ico { border-color: var(--line-light); }
.app-faq .faq__a p { color: var(--muted-dark); font-size: 0.88rem; }

/* app catalog reuse */
.app-main .tasks__grid { grid-template-columns: repeat(3, 1fr); }
.app-main .filter-btn { background: #fff; }

/* empty states */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--muted-dark);
  background: #fff; border: 1px dashed var(--line-light); border-radius: var(--r-md);
}
.empty-state b { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--navy); margin-bottom: 6px; }
.empty-state .btn { margin-top: 18px; }

/* mobile app bar */
.app-topbar { display: none; }

@media (max-width: 1024px) {
  .agent-tiles { grid-template-columns: repeat(2, 1fr); }
  .app-main .tasks__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .billing-grid, .help-grid { grid-template-columns: 1fr; }
  .run-layout, .deliverable-layout { grid-template-columns: 1fr; }
  .run-summary { position: static; order: -1; }
}
@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; top: 0; bottom: 0; width: 260px; transform: translateX(-100%); transition: transform 0.35s var(--ease); }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,0.4); }
  .app-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 80;
  }
  .app-topbar .side__logo { padding: 0; font-size: 1.1rem; }
  .app-main { padding: 22px 18px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .app-main .tasks__grid { grid-template-columns: 1fr; }
  .deliverable-doc { padding: 28px 22px; }
}

/* ───── profile type badges ───── */
.profile-type-badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 20px; font-size: 0.72rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
}
.profile-type-badge--company { background: rgba(46,91,255,0.1); color: var(--blue); }
.profile-type-badge--personal { background: rgba(139,92,246,0.1); color: #8b5cf6; }

/* ───── profile list ───── */
.profile-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.profile-card {
  background: #fff; border: 1.5px solid var(--line-light); border-radius: var(--r-md);
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; transition: border-color .18s;
}
.profile-card--active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,91,255,.07); }
.profile-card__main { display: flex; align-items: center; gap: 14px; }
.profile-card__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
  color: #fff; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.profile-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-card__active-pill {
  background: rgba(22,163,106,.1); color: #16a36a; font-size: .72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 20px; letter-spacing: .02em; text-transform: uppercase;
}
.profile-card__sub { font-size: .83rem; color: var(--muted-dark); margin-top: 3px; }
.profile-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ───── profile-new dropdown ───── */
.profile-new-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.10); min-width: 210px; overflow: hidden;
}
.profile-new-option {
  display: block; padding: 12px 18px; font-size: .88rem; color: var(--navy);
  text-decoration: none; transition: background .12s;
}
.profile-new-option:hover { background: var(--bg-soft); }

/* ───── sidebar profile switcher ───── */
.side__profile-switcher { padding: 0 12px 8px; }
.side-profile-btn {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm); cursor: pointer; text-align: left; color: #fff;
  transition: background .15s;
}
.side-profile-btn:hover { background: rgba(255,255,255,.11); }
.side-profile-name { flex: 1; font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-profile-chevron { font-size: .7rem; opacity: .6; }
.side-profile-empty { display: block; padding: 8px 12px; font-size: .82rem; color: rgba(255,255,255,.5); text-decoration: none; }
.side-profile-dd {
  background: var(--ink); border: 1px solid rgba(255,255,255,.12); border-radius: var(--r-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.3); margin-top: 4px; overflow: hidden;
}
.side-profile-dd__opt {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  font-size: .83rem; color: rgba(255,255,255,.75); background: none; border: none; cursor: pointer;
  text-align: left; transition: background .12s;
}
.side-profile-dd__opt:hover, .side-profile-dd__opt.active { background: rgba(255,255,255,.08); color: #fff; }
.side-profile-dd__manage {
  display: block; padding: 9px 14px; font-size: .79rem; color: rgba(255,255,255,.45);
  text-decoration: none; border-top: 1px solid rgba(255,255,255,.08); transition: color .12s;
}
.side-profile-dd__manage:hover { color: rgba(255,255,255,.75); }

/* ───── run profile switcher ───── */
.profile-switcher-run__dd {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line-light); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.10); min-width: 240px; overflow: hidden;
}
.profile-switcher-run__opt {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 11px 16px;
  font-size: .86rem; color: var(--navy); background: none; border: none; border-bottom: 1px solid var(--line-light);
  cursor: pointer; text-align: left; transition: background .12s;
}
.profile-switcher-run__opt:last-of-type { border-bottom: none; }
.profile-switcher-run__opt:hover, .profile-switcher-run__opt.active { background: var(--bg-soft); }
.profile-switcher-run__manage {
  display: block; padding: 10px 16px; font-size: .8rem; color: var(--blue);
  text-decoration: none; border-top: 1px solid var(--line-light);
}
.profile-switcher-run__manage:hover { text-decoration: underline; }

/* ═══════════ FOLLOW-ON SUGGESTIONS ═══════════ */
/* ═══════════ ONBOARDING CHECKLIST ═══════════ */
.ob-widget {
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 20px 24px 16px;
  margin-bottom: 24px;
  overflow: hidden;
}
.ob-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.ob-header__text { flex: 1; }
.ob-header__text b { font-size: 1rem; color: var(--navy); display: block; margin-bottom: 3px; }
.ob-header__text span { font-size: 0.83rem; color: var(--muted-dark); }
.ob-header__text b b { color: var(--blue); }

.ob-ring { flex-shrink: 0; }
.ob-ring__track    { stroke: var(--line-light); }
.ob-ring__progress { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .7s ease; }
.ob-ring__label    { fill: var(--navy); font-family: var(--font-display); font-weight: 700; }

.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ob-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line-light);
  transition: opacity .3s;
}
.ob-step--done { opacity: 0.6; }
.ob-step__check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--line-light); flex-shrink: 0;
}
.ob-step--done .ob-step__check {
  background: #16a34a; border-color: #16a34a;
}
.ob-step__body { flex: 1; min-width: 0; }
.ob-step__label {
  display: block; font-size: 0.88rem; font-weight: 600;
  color: var(--navy); text-decoration: none;
}
.ob-step__label:hover { color: var(--blue); }
.ob-step__label--done { text-decoration: line-through; color: var(--muted-dark); }
.ob-step__hint { font-size: 0.77rem; color: var(--muted-dark); }
.ob-step__badge {
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  color: #b45309; background: #fef3c7; border-radius: 100px;
  padding: 2px 9px; white-space: nowrap; flex-shrink: 0;
}

/* toast */
.ob-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--navy); color: #fff;
  font-size: 0.88rem; padding: 12px 22px;
  border-radius: 100px; box-shadow: 0 6px 24px rgba(0,0,0,.22);
  white-space: nowrap; z-index: 9999;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s;
  pointer-events: none; opacity: 0;
}
.ob-toast--show { transform: translateX(-50%) translateY(0); opacity: 1; }
.ob-toast--party { background: linear-gradient(135deg,#2E5BFF,#a855f7); }

/* confetti */
.ob-confetti-wrap {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 9998; overflow: hidden;
}
.ob-confetti-piece {
  position: absolute; top: -14px;
  width: 9px; height: 14px; border-radius: 2px;
  opacity: 0.9;
  animation: ob-fall linear both;
}
@keyframes ob-fall {
  0%   { transform: translateY(0) rotate(0deg);   opacity: .9; }
  80%  { opacity: .9; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

@media (max-width: 600px) {
  .ob-widget { padding: 14px 14px 12px; }
  .ob-step { gap: 8px; padding: 8px 10px; }
  .ob-step__hint { display: none; }
}

/* ═══════════ FOLLOW-ON SUGGESTIONS ═══════════ */
.follow-on {
  margin-top: 36px; padding-top: 30px;
  border-top: 1px solid var(--line-light);
}
.follow-on__heading {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-dark); margin-bottom: 16px;
}
.follow-on__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.follow-on-card {
  background: #fff; border: 1px solid var(--line-light);
  border-radius: var(--r-md); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 7px;
  transition: 0.25s var(--ease); color: var(--navy); cursor: pointer;
}
.follow-on-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -14px rgba(11,27,58,0.18);
  border-color: var(--blue);
}
.follow-on-card__agent {
  font-family: var(--font-display); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--agent-c, #2E5BFF);
}
.follow-on-card__name {
  font-family: var(--font-display); font-weight: 700; font-size: 0.94rem;
  line-height: 1.25; flex: 1;
}
.follow-on-card__foot {
  display: flex; align-items: center; gap: 10px; margin-top: 2px;
}
.follow-on-card__fmt {
  background: var(--paper-2); color: var(--muted-dark);
  font-family: var(--font-display); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.06em; padding: 3px 8px; border-radius: 100px;
}
.follow-on-card__credits {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  color: #b45309;
}
.follow-on-card__run {
  font-size: 0.78rem; font-weight: 600; color: var(--blue); margin-top: 4px;
}
@media (max-width: 700px) {
  .follow-on__grid { grid-template-columns: 1fr; }
}

/* ── deliverable-card delete button ─────────────────────────────────────── */
.task-card__del {
  position: absolute;
  top: 10px; right: 10px; z-index: 3;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--muted-dark);
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
  padding: 0;
}
.task-card:hover .task-card__del { opacity: 1; }
.task-card__del:hover,
.task-card__del:focus-visible { background: rgba(255,46,77,.1); color: var(--red-deep); outline: none; }
/* Touch devices: hover never fires, so keep the button always visible */
@media (hover: none) {
  .task-card__del { opacity: 1; }
}

/* ── localStorage → server migration sync banner ─────────────────────────── */
.migration-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--navy);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.22);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 9000;
  pointer-events: none;
  white-space: nowrap;
}
.migration-banner--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.migration-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: migration-pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes migration-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.75); }
}

/* ───── checkout toast ───── */
.checkout-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  padding: 14px 22px; border-radius: var(--r-md); font-size: .9rem; font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,.22); z-index: 9999; animation: toastIn .3s ease;
  max-width: 480px; text-align: center;
}
.checkout-toast--success { background: #16a36a; color: #fff; }
.checkout-toast--info    { background: var(--navy); color: rgba(255,255,255,.9); }
@keyframes toastIn { from { opacity:0; transform:translateX(-50%) translateY(12px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }

/* ───── brand-kit live preview ───── */
/* Desktop: fields on the left, mini cover preview on the right.           */
/* Mobile:  preview collapses behind a disclosure toggle button.           */

.brand-kit-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.brand-kit-fields { flex: 1; min-width: 0; }

/* ── preview panel ── */
.brand-preview { width: 220px; flex-shrink: 0; }

.brand-preview__toggle { display: none; }  /* hidden on ≥ 641px */

.brand-preview__label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 8px;
}

/* ── mini cover card ── */
.brand-preview__card {
  background: var(--ink);
  border-radius: 10px;
  padding: 14px 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.brand-preview__stripe {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--preview-color, #6366f1);
}
.brand-preview__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 10px;
  margin-bottom: 14px;
}
.brand-preview__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-preview__agent-tag {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.brand-preview__doc-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 3px;
}
.brand-preview__doc-sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.brand-preview__stats { display: flex; gap: 7px; }
.brand-preview__stat {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(151,163,189,.15);
  border-top: 2px solid var(--preview-color, #6366f1);
  border-radius: 6px;
  padding: 7px 8px;
}
.brand-preview__stat b {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.brand-preview__stat span {
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ── mobile: collapse the preview behind a toggle ── */
@media (max-width: 640px) {
  .brand-kit-layout { flex-direction: column; }
  .brand-kit-fields  { width: 100%; }
  .brand-preview     { width: 100%; }

  .brand-preview__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--line-light);
    border-radius: var(--r-sm);
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-dark);
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
    justify-content: center;
  }
  .brand-preview__toggle:hover { border-color: var(--blue); color: var(--blue); }

  .brand-preview__body { display: none; }
  .brand-preview__body.is-open { display: block; margin-top: 10px; }

  .brand-preview__label { display: none; }   /* toggle replaces the static label */
}
