:root {
  --ink: #191817;
  --ink-2: #4f4b48;
  --ink-3: #7e7873;
  --paper: #f4f2ed;
  --paper-2: #eeebe5;
  --surface: #fffefb;
  --surface-2: #f8f6f2;
  --line: #e5e0d8;
  --line-strong: #d8d1c7;
  --red: #f04452;
  --red-deep: #d72d3c;
  --red-soft: #fff0f1;
  --green: #167a55;
  --green-soft: #e9f7f0;
  --amber: #b66e0b;
  --amber-soft: #fff5df;
  --blue: #4267b2;
  --blue-soft: #edf2ff;
  --shadow-sm: 0 1px 2px rgba(24, 22, 20, .04), 0 6px 18px rgba(24, 22, 20, .04);
  --shadow-md: 0 16px 50px rgba(24, 22, 20, .10);
  --shadow-lg: 0 28px 90px rgba(24, 22, 20, .18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --sidebar: 236px;
  --topbar: 72px;
  --font: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(240, 68, 82, .18); outline-offset: 2px; }
button { border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.fill-icon { fill: currentColor; stroke: none; }
::selection { color: #fff; background: var(--red); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d7d1c8; border: 2px solid transparent; background-clip: padding-box; border-radius: 20px; }
::-webkit-scrollbar-track { background: transparent; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); padding: 24px 16px 18px; color: #f8f5ee; background: #181716; display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,.06); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; margin-bottom: 34px; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--red); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); transform: rotate(-4deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border-radius: 999px; background: #fff; }
.brand-mark::before { width: 15px; height: 5px; transform: rotate(-45deg); }
.brand-mark::after { width: 5px; height: 15px; transform: rotate(-45deg); }
.brand-mark span { width: 4px; height: 4px; border-radius: 50%; background: #181716; position: absolute; z-index: 2; }
.brand-mark.small { width: 28px; height: 28px; border-radius: 9px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 16px; letter-spacing: .07em; }
.brand-copy small { margin-top: 5px; color: rgba(255,255,255,.4); font-size: 9px; font-weight: 700; letter-spacing: .22em; }
.sidebar-section-label { padding: 0 13px; margin-bottom: 9px; color: rgba(255,255,255,.31); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 13px; color: rgba(255,255,255,.58); background: transparent; border-radius: 12px; text-align: left; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item span { font-size: 13px; font-weight: 650; }
.nav-item .nav-badge { margin-left: auto; padding: 2px 7px; color: #181716; background: #ece8df; border-radius: 999px; font-size: 9px; font-weight: 800; }
.nav-item .nav-count { margin-left: auto; color: rgba(255,255,255,.38); font-size: 11px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.active { color: #fff; background: #2b2926; box-shadow: inset 3px 0 0 var(--red); }
.nav-item.active svg { color: #ff6d78; }
.nav-item:active { transform: scale(.985); }
.sidebar-spacer { flex: 1; min-height: 24px; }
.local-card { display: flex; gap: 10px; align-items: flex-start; margin: 12px 4px 14px; padding: 13px 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 14px; }
.local-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; color: #7ce0b0; background: rgba(74,211,145,.1); border-radius: 9px; }
.local-icon svg { width: 15px; height: 15px; }
.local-card strong { display: block; color: rgba(255,255,255,.82); font-size: 11px; margin: 1px 0 4px; }
.local-card span:last-child { display: block; color: rgba(255,255,255,.35); font-size: 9px; line-height: 1.5; }
.account-card { display: flex; align-items: center; gap: 10px; padding: 13px 8px 3px; border-top: 1px solid rgba(255,255,255,.07); }
.account-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.account-copy strong { color: rgba(255,255,255,.82); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy span { margin-top: 3px; color: rgba(255,255,255,.35); font-size: 9px; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; user-select: none; }
.avatar-dark { width: 32px; height: 32px; color: #171615; background: #e9e5dc; font-size: 12px; }
.avatar-sm { width: 34px; height: 34px; color: #fff; background: linear-gradient(135deg, #ff6977, #c9283a); font-size: 12px; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.workspace { width: calc(100% - var(--sidebar)); min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 0 30px; background: rgba(244,242,237,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(216,209,199,.65); }
.mobile-brand { display: none; align-items: center; gap: 8px; background: transparent; }
.global-search { width: min(440px, 42vw); display: flex; align-items: center; gap: 9px; padding: 10px 12px; color: var(--ink-3); background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 12px; transition: background .18s, border-color .18s, box-shadow .18s; }
.global-search:focus-within { background: #fff; border-color: #c9c1b7; box-shadow: 0 0 0 3px rgba(240,68,82,.06); }
.global-search svg { width: 16px; height: 16px; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.global-search input::placeholder { color: #aaa39c; }
kbd { padding: 3px 6px; color: #99918a; background: #f2efe9; border: 1px solid #e4dfd7; border-radius: 6px; font-family: inherit; font-size: 9px; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.sync-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: #5e5954; background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 650; }
.status-dot { width: 6px; height: 6px; background: #34b77b; border-radius: 50%; box-shadow: 0 0 0 3px rgba(52,183,123,.12); }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; color: #625d58; background: rgba(255,255,255,.66); border: 1px solid var(--line); border-radius: 11px; transition: background .18s, color .18s, transform .18s; }
.icon-button:hover { color: var(--ink); background: #fff; }
.icon-button:active { transform: scale(.95); }
.icon-button svg { width: 17px; height: 17px; }
.icon-button.subtle { width: 30px; height: 30px; color: rgba(255,255,255,.45); background: transparent; border: 0; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; background: var(--red); border: 1.5px solid #fff; border-radius: 50%; }
.main-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 30px; }

/* Shared UI */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: clamp(26px, 2.5vw, 38px); line-height: 1.15; letter-spacing: -.045em; }
.page-head p { max-width: 650px; margin: 9px 0 0; color: var(--ink-3); font-size: 12px; line-height: 1.7; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--red-deep); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 15px; height: 1px; background: currentColor; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid transparent; font-size: 11px; font-weight: 750; transition: transform .17s, background .17s, border-color .17s, box-shadow .17s, opacity .17s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { color: #fff; background: var(--ink); box-shadow: 0 6px 16px rgba(25,24,23,.15); }
.btn-primary:hover { background: #2b2927; }
.btn-red { color: #fff; background: var(--red); box-shadow: 0 7px 18px rgba(240,68,82,.2); }
.btn-red:hover { background: var(--red-deep); }
.btn-secondary { color: var(--ink); background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: #cfc7bc; background: #fff; }
.btn-ghost { color: var(--ink-2); background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(25,24,23,.045); }
.btn-soft { color: var(--red-deep); background: var(--red-soft); border-color: #ffdadd; }
.btn-sm { min-height: 32px; padding: 0 11px; border-radius: 8px; font-size: 10px; }
.btn-wide { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 9px; font-weight: 700; }
.pill.red { color: var(--red-deep); background: var(--red-soft); border-color: #ffdce0; }
.pill.green { color: var(--green); background: var(--green-soft); border-color: #ceeedf; }
.pill.amber { color: var(--amber); background: var(--amber-soft); border-color: #f2dfb5; }
.pill.blue { color: var(--blue); background: var(--blue-soft); border-color: #dae3ff; }
.muted { color: var(--ink-3); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.section-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 10px; }
.text-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px; color: var(--ink-3); background: transparent; font-size: 10px; font-weight: 700; }
.text-link:hover { color: var(--ink); }
.text-link svg { width: 13px; height: 13px; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 20px; margin-bottom: 20px; }
.hero-card { position: relative; min-height: 366px; padding: 35px 38px; overflow: hidden; color: #fff; background: #1b1a19; border-radius: var(--radius-xl); box-shadow: 0 24px 60px rgba(27,26,25,.14); }
.hero-card::before { content: ""; position: absolute; width: 270px; height: 270px; right: -65px; top: -85px; background: radial-gradient(circle, rgba(240,68,82,.55) 0, rgba(240,68,82,.1) 45%, transparent 70%); border-radius: 50%; }
.hero-card::after { content: ""; position: absolute; right: 42px; bottom: 27px; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.025), 0 0 0 45px rgba(255,255,255,.02); }
.hero-card .eyebrow { color: #ff8791; }
.hero-card h1 { position: relative; z-index: 1; max-width: 610px; margin: 0; font-size: clamp(30px, 3.1vw, 48px); line-height: 1.12; letter-spacing: -.055em; }
.hero-card h1 span { color: #aaa59e; }
.hero-sub { position: relative; z-index: 1; max-width: 530px; margin: 14px 0 24px; color: rgba(255,255,255,.5); font-size: 12px; line-height: 1.75; }
.hero-search { position: relative; z-index: 2; width: min(610px, 100%); display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 15px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.2); }
.hero-search svg { width: 17px; height: 17px; color: #99928b; flex: 0 0 17px; }
.hero-search input { min-width: 0; flex: 1; height: 38px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.hero-search input::placeholder { color: #aaa39c; }
.hero-search .btn { min-height: 40px; padding-inline: 17px; }
.hero-chips { position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.hero-chips span { color: rgba(255,255,255,.34); font-size: 9px; }
.hero-chip { padding: 5px 9px; color: rgba(255,255,255,.65); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 999px; font-size: 9px; transition: background .18s, color .18s; }
.hero-chip:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero-meta { position: absolute; z-index: 2; left: 38px; bottom: 22px; display: flex; gap: 18px; color: rgba(255,255,255,.35); font-size: 9px; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta i { width: 4px; height: 4px; background: #51c891; border-radius: 50%; }
.hero-orbit { position: absolute; z-index: 1; right: 76px; bottom: 82px; width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, #ff626f, #be1f34); box-shadow: 0 18px 45px rgba(240,68,82,.24); display: grid; place-items: center; transform: rotate(7deg); }
.hero-orbit svg { width: 34px; height: 34px; color: #fff; stroke-width: 1.3; }
.hero-orbit small { position: absolute; bottom: -27px; left: 5px; color: rgba(255,255,255,.25); font-size: 8px; letter-spacing: .12em; }
.signal-card { display: flex; flex-direction: column; min-height: 366px; padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.signal-top { display: flex; align-items: flex-start; justify-content: space-between; }
.signal-top h2 { margin: 0; font-size: 15px; }
.signal-top p { margin: 5px 0 0; color: var(--ink-3); font-size: 9px; }
.trend-up { display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 9px; font-weight: 800; }
.mini-chart { position: relative; height: 130px; margin: 22px -4px 5px; }
.mini-chart svg { width: 100%; height: 100%; overflow: visible; }
.mini-chart .grid-line { stroke: #eee9e1; stroke-width: 1; }
.mini-chart .chart-area { fill: url(#chartFill); stroke: none; }
.mini-chart .chart-line { stroke: var(--red); stroke-width: 2.3; fill: none; }
.chart-tooltip { position: absolute; top: 9px; right: 14px; padding: 7px 9px; color: #fff; background: #1b1a19; border-radius: 8px; font-size: 9px; box-shadow: var(--shadow-sm); }
.chart-tooltip span { display: block; margin-top: 2px; color: rgba(255,255,255,.45); font-size: 8px; }
.industry-list { display: grid; gap: 9px; margin-top: auto; }
.industry-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px; font-size: 9px; }
.industry-row .rank { color: var(--ink-3); font-weight: 800; }
.industry-row .industry-name { margin-bottom: 5px; font-weight: 700; }
.industry-bar { height: 4px; background: #f0ece5; border-radius: 999px; overflow: hidden; }
.industry-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.industry-row:nth-child(1) .industry-bar i { background: var(--red); }
.industry-row .growth { color: var(--green); font-size: 8px; font-weight: 800; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.metric-card { position: relative; padding: 18px 19px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; position: absolute; right: -18px; bottom: -28px; width: 80px; height: 80px; border-radius: 50%; background: var(--surface-2); }
.metric-label { display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 9px; font-weight: 700; }
.metric-label svg { width: 15px; height: 15px; color: #a49c94; }
.metric-value { position: relative; z-index: 1; margin-top: 14px; font-size: 27px; font-weight: 850; letter-spacing: -.045em; }
.metric-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--ink-3); font-size: 8px; }
.metric-foot strong { color: var(--green); font-size: 8px; }
.metric-foot strong.warn { color: var(--amber); }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel-pad { padding: 22px; }
.run-list { display: grid; gap: 7px; }
.run-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px 9px; border-radius: 12px; transition: background .16s; }
.run-row:hover { background: var(--surface-2); }
.run-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--red-deep); background: var(--red-soft); border-radius: 12px; }
.run-icon.dark { color: #fff; background: #211f1d; }
.run-icon.green { color: var(--green); background: var(--green-soft); }
.run-icon svg { width: 17px; height: 17px; }
.run-copy { min-width: 0; }
.run-copy strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.run-copy span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 8px; }
.run-result { text-align: right; }
.run-result strong { display: block; font-size: 11px; }
.run-result span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 8px; }
.quick-card { position: relative; min-height: 100%; padding: 24px; overflow: hidden; color: #fff; background: linear-gradient(145deg, #272421, #191817); }
.quick-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -80px; top: -90px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.018), 0 0 0 52px rgba(255,255,255,.014); }
.quick-card h2 { position: relative; z-index: 1; margin: 0 0 8px; font-size: 19px; letter-spacing: -.03em; }
.quick-card p { position: relative; z-index: 1; margin: 0; color: rgba(255,255,255,.44); font-size: 10px; line-height: 1.7; }
.quick-actions { position: relative; z-index: 1; display: grid; gap: 8px; margin-top: 22px; }
.quick-action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px; color: rgba(255,255,255,.75); background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.07); border-radius: 11px; text-align: left; font-size: 10px; transition: background .18s, color .18s, transform .18s; }
.quick-action:hover { color: #fff; background: rgba(255,255,255,.09); transform: translateX(2px); }
.quick-action svg { width: 15px; height: 15px; color: #ff7c86; }
.quick-action span { flex: 1; }
.quick-action small { color: rgba(255,255,255,.25); font-size: 8px; }

/* Radar */
.radar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.filter-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-chip { padding: 7px 11px; color: var(--ink-3); background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 9px; font-weight: 700; }
.filter-chip:hover { color: var(--ink); background: var(--surface-2); }
.filter-chip.active { color: var(--ink); background: var(--paper); border-color: var(--line); }
.radar-controls { display: flex; align-items: center; gap: 8px; }
.compact-select { height: 34px; padding: 0 29px 0 10px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 9px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7c756e 50%), linear-gradient(135deg, #7c756e 50%, transparent 50%); background-position: calc(100% - 13px) 14px, calc(100% - 9px) 14px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
.scan-banner { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px 17px; margin-bottom: 16px; overflow: hidden; color: #fff; background: #201e1c; border-radius: var(--radius-md); }
.scan-banner::after { content: ""; position: absolute; right: 70px; top: -70px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(240,68,82,.28), transparent 68%); }
.scan-symbol { position: relative; z-index: 1; display: grid; place-items: center; width: 42px; height: 42px; background: rgba(240,68,82,.18); border: 1px solid rgba(240,68,82,.28); border-radius: 12px; }
.scan-symbol svg { width: 19px; color: #ff7a84; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.05); } }
.scan-copy { position: relative; z-index: 1; min-width: 0; }
.scan-copy strong { font-size: 11px; }
.scan-copy p { margin: 4px 0 8px; color: rgba(255,255,255,.42); font-size: 9px; }
.progress-track { height: 4px; overflow: hidden; background: rgba(255,255,255,.09); border-radius: 999px; }
.progress-track i { display: block; width: var(--progress,0%); height: 100%; background: linear-gradient(90deg, #d72d3c, #ff717c); border-radius: inherit; transition: width .4s ease; }
.scan-meta { position: relative; z-index: 1; text-align: right; }
.scan-meta strong { display: block; font-size: 14px; }
.scan-meta span { display: block; margin-top: 3px; color: rgba(255,255,255,.38); font-size: 8px; }
.radar-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.radar-summary h2 { margin: 0; font-size: 15px; }
.radar-summary p { margin: 4px 0 0; color: var(--ink-3); font-size: 9px; }
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.note-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.note-card:hover { transform: translateY(-3px); border-color: #d2cabe; box-shadow: 0 16px 35px rgba(24,22,20,.09); }
.note-cover { position: relative; aspect-ratio: 4/3.45; overflow: hidden; background: #ddd; }
.note-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 35%, rgba(0,0,0,.25)); pointer-events: none; }
.cover-art { position: absolute; inset: 0; overflow: hidden; }
.cover-art::before, .cover-art::after { content: ""; position: absolute; border-radius: 50%; }
.cover-art::before { width: 58%; aspect-ratio: 1; right: -16%; top: -19%; background: rgba(255,255,255,.34); }
.cover-art::after { width: 32%; aspect-ratio: 1; left: 11%; bottom: 17%; border: 1px solid rgba(255,255,255,.5); box-shadow: 0 0 0 16px rgba(255,255,255,.11); }
.cover-1 .cover-art { background: linear-gradient(145deg, #e7b8b2, #9e4547 48%, #3f2023); }
.cover-2 .cover-art { background: linear-gradient(145deg, #ddd4b8, #9b875b 52%, #4d4230); }
.cover-3 .cover-art { background: linear-gradient(145deg, #b6d3c6, #5e8979 52%, #253b34); }
.cover-4 .cover-art { background: linear-gradient(145deg, #c4c0d3, #70658f 50%, #302a3e); }
.cover-5 .cover-art { background: linear-gradient(145deg, #d8b997, #b9733d 50%, #54301b); }
.cover-6 .cover-art { background: linear-gradient(145deg, #b5c8d6, #5d7c92 52%, #263a49); }
.cover-7 .cover-art { background: linear-gradient(145deg, #dcc5c5, #9a6565 52%, #492d31); }
.cover-8 .cover-art { background: linear-gradient(145deg, #d9d1b4, #9a8f4f 52%, #474226); }
.cover-label { position: absolute; z-index: 2; left: 13px; top: 13px; padding: 5px 8px; color: rgba(255,255,255,.85); background: rgba(20,18,17,.42); border: 1px solid rgba(255,255,255,.17); backdrop-filter: blur(8px); border-radius: 7px; font-size: 8px; font-weight: 800; letter-spacing: .05em; }
.cover-quote { position: absolute; z-index: 2; left: 15px; right: 30px; bottom: 18px; color: #fff; font-size: clamp(16px, 1.45vw, 23px); font-weight: 850; line-height: 1.38; letter-spacing: -.04em; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.cover-quote span { color: rgba(255,255,255,.38); }
.cover-score { position: absolute; z-index: 3; right: 12px; top: 12px; display: grid; place-items: center; width: 47px; height: 47px; color: #fff; background: rgba(240,68,82,.9); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(10px); border-radius: 50%; font-size: 11px; font-weight: 850; box-shadow: 0 8px 18px rgba(92,13,22,.22); }
.cover-score small { display: block; margin-top: -7px; font-size: 7px; font-weight: 700; opacity: .7; }
.note-body { padding: 14px; }
.note-title { display: -webkit-box; min-height: 37px; margin: 0 0 10px; overflow: hidden; font-size: 12px; font-weight: 750; line-height: 1.55; letter-spacing: -.01em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-meta { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 8px; }
.note-meta .author { max-width: 95px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note-stats { display: flex; gap: 12px; padding-top: 11px; margin-top: 11px; border-top: 1px solid #eee9e2; }
.note-stat { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 8px; }
.note-stat svg { width: 12px; height: 12px; }
.note-stat.strong { color: var(--red-deep); }
.note-tag { margin-left: auto; padding: 4px 7px; color: var(--red-deep); background: var(--red-soft); border-radius: 6px; font-size: 7px; font-weight: 800; }
.empty-state { grid-column: 1/-1; display: grid; place-items: center; min-height: 280px; padding: 40px; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); text-align: center; }
.empty-state strong { display: block; margin: 12px 0 5px; color: var(--ink); font-size: 14px; }
.empty-state p { max-width: 320px; margin: 0; font-size: 10px; line-height: 1.7; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--red-deep); background: var(--red-soft); border-radius: 50%; }

/* Factory */
.factory-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 18px; }
.drafts-list { display: grid; gap: 10px; }
.draft-card { display: grid; grid-template-columns: 88px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.draft-card:hover { transform: translateY(-1px); border-color: #d2c9bf; box-shadow: var(--shadow-sm); }
.draft-thumb { position: relative; width: 88px; aspect-ratio: 1.05; overflow: hidden; border-radius: 10px; background: #ddd; }
.draft-thumb .cover-art { position: absolute; inset: 0; }
.draft-thumb span { position: absolute; z-index: 2; left: 8px; bottom: 7px; color: #fff; font-size: 7px; font-weight: 800; text-shadow: 0 1px 5px rgba(0,0,0,.3); }
.draft-copy { min-width: 0; }
.draft-copy h3 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.draft-copy p { display: -webkit-box; overflow: hidden; margin: 5px 0 9px; color: var(--ink-3); font-size: 9px; line-height: 1.6; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.draft-meta { display: flex; align-items: center; gap: 7px; }
.draft-actions { display: flex; align-items: center; gap: 5px; }
.factory-side { display: grid; gap: 14px; align-content: start; }
.insight-panel { padding: 22px; background: #1e1c1a; border-radius: var(--radius-lg); color: #fff; }
.insight-panel .eyebrow { color: #ff8791; }
.insight-panel h2 { margin: 0 0 7px; font-size: 17px; }
.insight-panel p { margin: 0 0 18px; color: rgba(255,255,255,.42); font-size: 9px; line-height: 1.7; }
.ai-score { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.score-ring { --score: 92; width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(#ff626f calc(var(--score) * 1%), rgba(255,255,255,.09) 0); display: grid; place-items: center; }
.score-ring::after { content: "92"; display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: #1e1c1a; border-radius: 50%; font-size: 13px; font-weight: 850; }
.ai-score-copy strong { display: block; font-size: 10px; }
.ai-score-copy span { display: block; margin-top: 5px; color: rgba(255,255,255,.35); font-size: 8px; line-height: 1.5; }
.mini-note { padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.mini-note strong { display: block; margin-bottom: 7px; font-size: 10px; }
.mini-note p { margin: 0; color: var(--ink-3); font-size: 9px; line-height: 1.7; }

/* Publish */
.publish-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.publish-stat { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.publish-stat span { display: block; color: var(--ink-3); font-size: 9px; }
.publish-stat strong { display: block; margin-top: 8px; font-size: 23px; letter-spacing: -.04em; }
.publish-table { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.publish-row { display: grid; grid-template-columns: 60px minmax(0,1.4fr) minmax(110px,.7fr) 105px 85px; align-items: center; gap: 13px; padding: 12px 15px; border-bottom: 1px solid #eee9e2; }
.publish-row:last-child { border-bottom: 0; }
.publish-row.header { padding-block: 10px; color: var(--ink-3); background: #faf8f4; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.publish-thumb { width: 48px; height: 54px; border-radius: 8px; overflow: hidden; position: relative; }
.publish-title { min-width: 0; }
.publish-title strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.publish-title span { display: block; margin-top: 5px; color: var(--ink-3); font-size: 8px; }
.publish-account { display: flex; align-items: center; gap: 7px; font-size: 9px; }
.publish-account .avatar { width: 24px; height: 24px; font-size: 8px; }
.publish-status { display: inline-flex; align-items: center; gap: 5px; font-size: 8px; }
.publish-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.publish-status.published i { background: #33ad76; }
.publish-status.pending i { background: #e2a13a; }
.publish-status.failed i { background: var(--red); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions .icon-button { width: 28px; height: 28px; border-radius: 8px; }
.row-actions .icon-button svg { width: 13px; height: 13px; }

/* Leads */
.leads-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.lead-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-stat { padding: 8px 11px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 9px; }
.lead-stat strong { margin-right: 4px; color: var(--ink); font-size: 12px; }
.lead-table { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.lead-row { display: grid; grid-template-columns: minmax(145px,.85fr) minmax(220px,1.6fr) 88px 100px 110px 84px; align-items: center; gap: 13px; padding: 14px 15px; border-bottom: 1px solid #eee9e2; }
.lead-row:last-child { border-bottom: 0; }
.lead-row.header { padding-block: 10px; color: var(--ink-3); background: #faf8f4; font-size: 8px; font-weight: 800; letter-spacing: .07em; }
.lead-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lead-avatar { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; }
.lead-avatar.c1 { background: linear-gradient(135deg,#ed8b91,#a72f3d); }
.lead-avatar.c2 { background: linear-gradient(135deg,#8ba8c8,#405e85); }
.lead-avatar.c3 { background: linear-gradient(135deg,#b7a06c,#756136); }
.lead-avatar.c4 { background: linear-gradient(135deg,#8ebba4,#43735d); }
.lead-avatar.c5 { background: linear-gradient(135deg,#b999c5,#725581); }
.lead-person-copy { min-width: 0; }
.lead-person-copy strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }
.lead-person-copy span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 8px; }
.lead-comment { min-width: 0; color: var(--ink-2); font-size: 9px; line-height: 1.55; }
.lead-comment span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 8px; }
.intent { display: flex; align-items: center; gap: 6px; }
.intent-bar { width: 38px; height: 4px; background: #f0ece6; border-radius: 999px; overflow: hidden; }
.intent-bar i { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.intent strong { font-size: 9px; }
.lead-source { color: var(--ink-3); font-size: 8px; line-height: 1.5; }
.lead-status { display: inline-flex; padding: 5px 8px; border-radius: 6px; font-size: 8px; font-weight: 700; }
.lead-status.new { color: var(--amber); background: var(--amber-soft); }
.lead-status.following { color: var(--blue); background: var(--blue-soft); }
.lead-status.replied { color: var(--green); background: var(--green-soft); }

/* Tasks */
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.task-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.task-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-title { display: flex; align-items: center; gap: 10px; }
.task-icon { display: grid; place-items: center; width: 33px; height: 33px; color: var(--red-deep); background: var(--red-soft); border-radius: 9px; }
.task-icon svg { width: 15px; height: 15px; }
.task-title strong { display: block; font-size: 10px; }
.task-title span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 8px; }
.task-stats { display: flex; gap: 20px; margin: 16px 0 13px; padding: 11px 0; border-top: 1px solid #eee9e2; border-bottom: 1px solid #eee9e2; }
.task-stats div strong { display: block; font-size: 13px; }
.task-stats div span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 7px; }
.task-log { display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 8px; }
.task-log span { display: inline-flex; align-items: center; gap: 5px; }
.task-log i { width: 5px; height: 5px; background: var(--green); border-radius: 50%; }

/* Settings */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 18px; }
.settings-menu { display: grid; align-content: start; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.settings-menu button { padding: 10px 12px; color: var(--ink-3); background: transparent; border-radius: 8px; text-align: left; font-size: 9px; font-weight: 700; }
.settings-menu button.active { color: var(--ink); background: var(--paper); }
.settings-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.settings-panel h2 { margin: 0 0 5px; font-size: 17px; }
.settings-panel > p { margin: 0 0 23px; color: var(--ink-3); font-size: 9px; }
.settings-group { padding: 18px 0; border-top: 1px solid #eee9e2; }
.settings-group:first-of-type { padding-top: 0; border-top: 0; }
.settings-group h3 { margin: 0 0 13px; font-size: 11px; }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) 260px; align-items: center; gap: 25px; padding: 10px 0; }
.field-row label strong { display: block; font-size: 9px; }
.field-row label span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 8px; line-height: 1.5; }
.input, .select, .textarea { width: 100%; color: var(--ink); background: #fbfaf7; border: 1px solid var(--line); border-radius: 9px; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s; }
.input, .select { height: 38px; padding: 0 11px; font-size: 10px; }
.select { appearance: none; }
.textarea { min-height: 110px; padding: 11px; font-size: 10px; line-height: 1.7; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { background: #fff; border-color: #cfc5ba; box-shadow: 0 0 0 3px rgba(240,68,82,.06); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: 0 0 38px; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch span { position: absolute; inset: 0; cursor: pointer; background: #d8d2ca; border-radius: 999px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::before { transform: translateX(16px); }
.disabled-switch { opacity: .5; }

/* Drawer */
.drawer-layer { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(18,17,16,.36); backdrop-filter: blur(4px); animation: fadeIn .2s ease; }
.drawer { width: min(520px, 94vw); height: 100%; overflow-y: auto; background: var(--surface); box-shadow: -25px 0 80px rgba(0,0,0,.18); animation: slideIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slideIn { from { transform: translateX(35px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; background: rgba(255,254,251,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.drawer-head strong { font-size: 12px; }
.drawer-cover { position: relative; height: 250px; overflow: hidden; }
.drawer-cover .cover-art { position: absolute; inset: 0; }
.drawer-cover-copy { position: absolute; z-index: 2; left: 24px; right: 60px; bottom: 25px; color: #fff; font-size: 28px; font-weight: 850; line-height: 1.25; letter-spacing: -.045em; }
.drawer-body { padding: 23px; }
.drawer-author { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.drawer-author-copy strong { display: block; font-size: 10px; }
.drawer-author-copy span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 8px; }
.drawer-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 18px; }
.drawer-metric { padding: 11px; background: var(--surface-2); border-radius: 9px; text-align: center; }
.drawer-metric strong { display: block; font-size: 12px; }
.drawer-metric span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 7px; }
.drawer-section { margin-top: 20px; }
.drawer-section h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 11px; }
.drawer-section p { margin: 0; color: var(--ink-2); font-size: 10px; line-height: 1.8; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.drawer-tags span { padding: 5px 8px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; font-size: 8px; }
.insight-box { padding: 14px; color: #f8f5ee; background: #1e1c1a; border-radius: 12px; }
.insight-box strong { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #ff8791; font-size: 9px; }
.insight-box p { color: rgba(255,255,255,.6); font-size: 9px; line-height: 1.75; }
.insight-box ul { margin: 8px 0 0; padding: 0 0 0 14px; color: rgba(255,255,255,.48); font-size: 9px; line-height: 1.75; }
.drawer-footer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 14px 20px; background: rgba(255,254,251,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.drawer-footer .btn { flex: 1; }

/* Modal */
.modal-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 22px; background: rgba(18,17,16,.44); backdrop-filter: blur(5px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(620px, 100%); max-height: min(840px, calc(100vh - 44px)); overflow-y: auto; background: var(--surface); border: 1px solid rgba(255,255,255,.6); border-radius: 22px; box-shadow: var(--shadow-lg); animation: modalIn .25s cubic-bezier(.2,.8,.2,1); }
.modal.wide { width: min(900px, 100%); }
@keyframes modalIn { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-title h2 { margin: 0; font-size: 18px; letter-spacing: -.03em; }
.modal-title p { margin: 6px 0 0; color: var(--ink-3); font-size: 9px; line-height: 1.6; }
.modal-body { padding: 21px 22px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 15px 22px; background: #faf8f4; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1/-1; }
.form-field label { color: var(--ink-2); font-size: 9px; font-weight: 700; }
.form-hint { color: var(--ink-3); font-size: 8px; line-height: 1.55; }
.rewrite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.rewrite-panel { min-width: 0; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.rewrite-panel h3 { margin: 0 0 11px; font-size: 10px; }
.rewrite-panel h3 span { margin-left: 5px; color: var(--ink-3); font-size: 8px; font-weight: 500; }
.rewrite-panel p { margin: 0; color: var(--ink-2); font-size: 9px; line-height: 1.75; }
.ai-loading { display: flex; align-items: center; gap: 9px; padding: 12px; color: var(--red-deep); background: var(--red-soft); border-radius: 9px; font-size: 9px; font-weight: 700; }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(240,68,82,.2); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.check-row { display: flex; align-items: flex-start; gap: 9px; padding: 11px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 9px; line-height: 1.55; }
.check-row input { margin-top: 2px; accent-color: var(--red); }
.preflight { display: grid; gap: 8px; margin-top: 13px; }
.preflight-row { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 9px; }
.preflight-row span { display: inline-flex; align-items: center; gap: 6px; }
.preflight-row svg { width: 13px; height: 13px; color: var(--green); }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; color: #fff; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 9px var(--green-soft); }
.success-mark svg { width: 26px; height: 26px; }
.success-copy { text-align: center; }
.success-copy h2 { margin: 0 0 8px; font-size: 20px; }
.success-copy p { max-width: 360px; margin: 0 auto; color: var(--ink-3); font-size: 10px; line-height: 1.7; }

/* Toast */
.toast-stack { position: fixed; z-index: 150; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 240px; max-width: 360px; padding: 11px 13px; color: #fff; background: #211f1d; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; box-shadow: var(--shadow-md); font-size: 9px; animation: toastIn .25s ease; pointer-events: auto; }
.toast .toast-icon { display: grid; place-items: center; width: 22px; height: 22px; color: #7ce0b0; background: rgba(74,211,145,.12); border-radius: 7px; flex: 0 0 22px; }
.toast.error .toast-icon { color: #ff7b85; background: rgba(240,68,82,.15); }
.toast svg { width: 13px; height: 13px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive */
.mobile-nav { display: none; }
.mobile-overlay { display: none; }
@media (max-width: 1180px) {
  :root { --sidebar: 212px; }
  .main-content { padding: 24px; }
  .topbar { padding-inline: 24px; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); }
  .hero-card { padding-inline: 30px; }
  .hero-meta { left: 30px; }
  .lead-row { grid-template-columns: minmax(125px,.8fr) minmax(180px,1.4fr) 75px 90px 100px 72px; gap: 10px; }
  .publish-row { grid-template-columns: 52px minmax(0,1.2fr) minmax(95px,.65fr) 90px 75px; }
}
@media (max-width: 920px) {
  :root { --sidebar: 0px; --topbar: 64px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .mobile-overlay { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(0,0,0,.32); backdrop-filter: blur(2px); }
  .workspace { width: 100%; margin-left: 0; }
  .mobile-brand { display: flex; }
  .topbar { padding: 0 18px; gap: 12px; }
  .global-search { display: none; }
  .sync-pill { display: none; }
  .main-content { padding: 20px 18px 85px; }
  .mobile-nav { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; justify-content: space-around; padding: 7px; background: rgba(26,24,22,.94); border: 1px solid rgba(255,255,255,.1); border-radius: 17px; box-shadow: 0 15px 50px rgba(0,0,0,.24); backdrop-filter: blur(18px); }
  .mobile-nav .nav-item { width: auto; flex: 1; flex-direction: column; gap: 3px; padding: 7px 4px; border-radius: 10px; }
  .mobile-nav .nav-item span { font-size: 8px; }
  .mobile-nav .nav-item svg { width: 17px; height: 17px; }
  .mobile-nav .nav-item.active { background: rgba(255,255,255,.08); box-shadow: none; }
  .mobile-nav .nav-badge, .mobile-nav .nav-count { display: none; }
  .dashboard-grid, .dashboard-lower, .factory-layout { grid-template-columns: 1fr; }
  .hero-card { min-height: 350px; }
  .hero-orbit { right: 55px; bottom: 60px; width: 72px; height: 72px; }
  .signal-card { min-height: auto; }
  .industry-list { margin-top: 10px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .lead-row { grid-template-columns: minmax(135px,1fr) minmax(200px,1.6fr) 80px 100px 86px; }
  .lead-row > :nth-child(5), .lead-row.header > :nth-child(5) { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-menu { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr; gap: 9px; }
}
@media (max-width: 660px) {
  .main-content { padding-inline: 14px; }
  .topbar { padding-inline: 14px; }
  .topbar-actions .icon-button { display: none; }
  .page-head { flex-direction: column; margin-bottom: 19px; }
  .page-actions { width: 100%; }
  .hero-card { min-height: 400px; padding: 27px 22px; border-radius: 22px; }
  .hero-card h1 { font-size: 34px; }
  .hero-sub { margin-bottom: 19px; }
  .hero-search { padding-left: 11px; }
  .hero-search .btn { padding-inline: 13px; }
  .hero-meta { left: 22px; bottom: 17px; gap: 11px; }
  .hero-orbit { display: none; }
  .notes-grid { grid-template-columns: 1fr; }
  .note-cover { aspect-ratio: 1.2; }
  .radar-toolbar { align-items: stretch; flex-direction: column; }
  .radar-controls { justify-content: space-between; }
  .radar-controls .compact-select { flex: 1; }
  .scan-banner { grid-template-columns: 38px minmax(0,1fr); }
  .scan-meta { display: none; }
  .task-grid { grid-template-columns: 1fr; }
  .rewrite-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .draft-card { grid-template-columns: 72px minmax(0,1fr); }
  .draft-thumb { width: 72px; }
  .draft-actions { grid-column: 1/-1; justify-content: flex-end; }
  .publish-summary { grid-template-columns: 1fr 1fr 1fr; }
  .publish-row { grid-template-columns: 46px minmax(0,1fr) 75px; }
  .publish-row > :nth-child(3), .publish-row > :nth-child(5), .publish-row.header > :nth-child(3), .publish-row.header > :nth-child(5) { display: none; }
  .leads-toolbar { align-items: flex-start; flex-direction: column; }
  .lead-row { grid-template-columns: minmax(120px,1fr) minmax(160px,1.4fr) 76px; padding-inline: 11px; }
  .lead-row > :nth-child(4), .lead-row > :nth-child(5), .lead-row > :nth-child(6), .lead-row.header > :nth-child(4), .lead-row.header > :nth-child(5), .lead-row.header > :nth-child(6) { display: none; }
  .settings-menu { grid-template-columns: 1fr 1fr; }
  .modal-layer { padding: 10px; align-items: end; }
  .modal { max-height: calc(100vh - 20px); border-radius: 19px 19px 14px 14px; }
  .modal-body, .modal-head { padding-inline: 17px; }
  .modal-footer { padding-inline: 17px; }
  .drawer { width: 100%; }
  .drawer-cover { height: 225px; }
  .drawer-cover-copy { font-size: 24px; }
  .toast-stack { left: 14px; right: 14px; bottom: 80px; }
  .toast { width: 100%; max-width: none; }
}

/* Functional app additions */
.extension-steps { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px 10px; align-items: start; margin: 12px 0 16px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.extension-steps > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; background: var(--ink); font-size: 9px; font-weight: 800; }
.extension-steps > p { margin: 2px 0 0; color: var(--ink-2); font-size: 9px; line-height: 1.65; }
.secret-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 12px; color: var(--green); background: var(--green-soft); border: 1px solid #ccebdd; border-radius: 9px; font-size: 9px; line-height: 1.5; }
.secret-note.warn { color: var(--amber); background: var(--amber-soft); border-color: #f2dfb5; }
.import-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mini-code { display: block; max-width: 100%; overflow: auto; padding: 8px 9px; color: #e8e3db; background: #24211e; border-radius: 8px; font-family: Consolas, monospace; font-size: 8px; white-space: nowrap; }


/* Platform publishing connections */
.settings-note { margin:0 0 14px; color:var(--ink-3); font-size:9px; line-height:1.7; }
.platform-config-card { padding:16px; margin:12px 0; background:#fbfaf7; border:1px solid var(--line); border-radius:14px; }
.platform-config-card.xhs { background:linear-gradient(135deg,#fff8f8,#fffdfb); }
.platform-config-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:15px; }
.platform-config-head > div { display:flex; align-items:flex-start; gap:11px; min-width:0; }
.platform-config-head strong { display:block; font-size:10px; }
.platform-config-head span:not(.platform-mark):not(.pill) { display:block; margin-top:4px; color:var(--ink-3); font-size:8px; line-height:1.55; }
.platform-mark { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border-radius:11px; color:#fff; font-size:11px; font-weight:900; box-shadow:0 8px 20px rgba(0,0,0,.12); }
.platform-mark.douyin { background:linear-gradient(135deg,#161616 48%,#25f4ee 49%,#25f4ee 54%,#fe2c55 55%); }
.platform-mark.xhs { background:linear-gradient(135deg,#ff4d5e,#df1f36); }
.platform-accounts { display:grid; gap:8px; margin-top:14px; }
.platform-account-row { display:grid; grid-template-columns:34px minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:11px; background:#fff; border:1px solid var(--line); border-radius:11px; }
.platform-avatar { width:34px; height:34px; border-radius:10px; object-fit:cover; }
.platform-avatar.fallback { display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#2c2926,#171615); font-size:11px; font-weight:850; }
.platform-account-main { min-width:0; }
.platform-account-main strong, .platform-account-main span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.platform-account-main strong { font-size:9px; }
.platform-account-main span { margin-top:3px; color:var(--ink-3); font-size:7px; }
.platform-actions { display:flex; gap:5px; }
.platform-empty { padding:13px; color:var(--ink-3); background:#f7f4ef; border:1px dashed #dcd4ca; border-radius:10px; font-size:8px; line-height:1.65; }
.platform-empty strong { display:block; margin-bottom:4px; color:var(--ink); font-size:9px; }
.platform-empty p { margin:0; font-size:8px; line-height:1.7; }
.callback-url { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:9px; padding:9px 10px; margin:12px 0; background:#f2eee8; border-radius:9px; }
.callback-url > span { color:var(--ink-3); font-size:8px; font-weight:700; }
.callback-url code { overflow:hidden; color:var(--ink-2); font:8px Consolas,monospace; text-overflow:ellipsis; white-space:nowrap; }
.callback-url a { overflow:hidden; color:var(--blue); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }

/* Real publication packages */
.draft-publish-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.draft-publish-card { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:center; gap:11px; padding:10px; background:#fbfaf7; border:1px solid var(--line); border-radius:12px; }
.draft-publish-card .draft-thumb { width:58px; aspect-ratio:1; }
.draft-publish-card strong { display:block; overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.draft-publish-card p { margin:5px 0 0; overflow:hidden; color:var(--ink-3); font-size:7px; text-overflow:ellipsis; white-space:nowrap; }
.publication-source { display:flex; align-items:center; gap:13px; padding:11px; margin-bottom:16px; background:#f6f2ec; border-radius:12px; }
.publication-source .draft-thumb { flex:0 0 64px; width:64px; }
.publication-source h3 { margin:5px 0 3px; font-size:11px; }
.publication-source p { margin:0; color:var(--ink-3); font-size:8px; }
.file-input { width:100%; padding:9px; color:var(--ink-2); background:#fbfaf7; border:1px dashed #cec5bb; border-radius:9px; font-size:9px; }
.file-input::file-selector-button { padding:7px 10px; margin-right:9px; color:#fff; background:var(--ink); border:0; border-radius:7px; font:inherit; font-weight:700; cursor:pointer; }
.upload-status { padding:9px 11px; color:var(--ink-3); background:#f6f2ec; border-radius:8px; font-size:8px; }
.media-multi { min-height:112px; padding:6px; }
.media-multi option { padding:6px 7px; border-radius:5px; }
.publication-media-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:13px 0 16px; }
.publication-media-item { position:relative; display:block; overflow:hidden; aspect-ratio:1; background:#ece7e0; border-radius:10px; }
.publication-media-item img, .publication-media-item video { width:100%; height:100%; object-fit:cover; }
.publication-media-item span { position:absolute; right:5px; bottom:5px; left:5px; overflow:hidden; padding:4px 5px; color:#fff; background:rgba(0,0,0,.55); border-radius:5px; font-size:6px; text-overflow:ellipsis; white-space:nowrap; backdrop-filter:blur(4px); }
.publication-status-line { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-bottom:11px; }
.publication-copy { padding:14px; background:#f8f5f0; border:1px solid var(--line); border-radius:11px; }
.publication-copy h3 { margin:0 0 8px; font-size:10px; }
.publication-copy p { margin:0; color:var(--ink-2); font-size:9px; line-height:1.75; }
.publication-copy > div { display:flex; gap:5px; flex-wrap:wrap; margin-top:10px; }
.publication-copy > div span { padding:4px 7px; color:#b33240; background:#fff0f1; border-radius:999px; font-size:7px; }
.media-placeholder { display:grid; place-items:center; color:var(--ink-3); background:#f0ece6; }
.media-placeholder svg { width:17px; height:17px; }
.publish-status.review i, .publish-status.needs_review i { background:#e2a13a; }
.publish-status.ready i, .publish-status.ready_to_confirm i { background:#3b7dd8; }
.publish-status.published i { background:#33ad76; }
.publish-status.failed i { background:var(--red); }

@media (max-width: 920px) {
  .platform-account-row { grid-template-columns:34px minmax(0,1fr) auto; }
  .platform-actions { grid-column:1/-1; justify-content:flex-end; }
  .draft-publish-grid { grid-template-columns:1fr; }
  .publication-media-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 660px) {
  .platform-config-head, .platform-config-head > div { flex-wrap:wrap; }
  .platform-account-row { grid-template-columns:34px minmax(0,1fr); }
  .platform-account-row > .pill { grid-column:2; justify-self:start; }
  .platform-actions { grid-column:1/-1; }
  .callback-url { grid-template-columns:1fr auto; }
  .callback-url code { grid-column:1/-1; grid-row:2; }
  .draft-publish-card { grid-template-columns:52px minmax(0,1fr); }
  .draft-publish-card > .btn { grid-column:1/-1; }
  .publication-media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .publication-source { align-items:flex-start; }
}

/* Authentication */
.auth-layer { position:fixed; inset:0; z-index:300; display:grid; place-items:center; padding:24px; background:radial-gradient(circle at 18% 12%,rgba(240,68,82,.16),transparent 34%),linear-gradient(145deg,#171615,#24211e); }
.auth-card { width:min(410px,100%); padding:30px; color:var(--ink); background:var(--surface); border:1px solid rgba(255,255,255,.35); border-radius:24px; box-shadow:0 35px 100px rgba(0,0,0,.35); }
.auth-brand { display:flex; align-items:center; gap:11px; margin-bottom:28px; }
.auth-brand > div { display:flex; flex-direction:column; }
.auth-brand strong { font-size:15px; letter-spacing:.07em; }
.auth-brand small { margin-top:4px; color:var(--ink-3); font-size:8px; font-weight:700; letter-spacing:.18em; }
.auth-card h1 { margin:0 0 9px; font-size:27px; letter-spacing:-.045em; }
.auth-card > p { margin:0 0 22px; color:var(--ink-3); font-size:10px; line-height:1.7; }
.auth-card form { display:grid; gap:13px; }
.auth-error { padding:9px 11px; color:#a92836; background:#fff1f2; border:1px solid #f6d3d6; border-radius:8px; font-size:9px; line-height:1.5; }
.auth-error.hidden { display:none; }
.auth-foot { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:18px; color:var(--ink-3); font-size:8px; }
.auth-foot svg { width:12px; height:12px; }
