:root {
  color-scheme: light;
  --page: #f5f0e9;
  --sidebar: #15161a;
  --dark: #191a1d;
  --dark-soft: #202126;
  --white: #fffdf9;
  --text: #191a1d;
  --muted: #77736f;
  --muted-dark: #a9a5a0;
  --accent: #c97852;
  --accent-dark: #b35f3e;
  --accent-pale: #f8ede6;
  --border: #e2d9d0;
  --rule: #ded5ca;
  --green: #55c7a4;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--sidebar); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--sidebar);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body.idea-editor-open, body.post-editor-open { overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--page);
  color: var(--text);
}
.auth-gate-card {
  display: grid;
  width: min(100%, 430px);
  justify-items: center;
  padding: 42px 34px 34px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(25, 26, 29, .08);
  text-align: center;
}
.auth-gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 38px;
}
.auth-gate-brand .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.auth-gate-brand .brand-mark i { left: 11px; width: 16px; }
.auth-gate-brand .brand-mark i:nth-child(1) { top: 13px; }
.auth-gate-brand .brand-mark i:nth-child(2) { top: 18px; left: 14px; }
.auth-gate-brand .brand-mark i:nth-child(3) { top: 23px; left: 11px; }
.auth-gate-brand strong {
  font-family: Geist, Inter, sans-serif;
  font-size: 13px;
  letter-spacing: .025em;
}
.auth-gate-eyebrow {
  margin: 0 0 9px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.auth-gate-card h1 {
  margin: 0;
  font-family: Geist, Inter, sans-serif;
  font-size: 28px;
  letter-spacing: -.045em;
}
.auth-gate-copy {
  max-width: 320px;
  margin: 10px 0 27px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.auth-gate-login { display: grid; justify-items: center; gap: 12px; min-width: min(100%, 260px); }
.auth-gate-login-widget { min-height: 44px; }
.auth-gate-login-widget iframe { max-width: 100%; }
.auth-gate-button {
  min-width: 260px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  transition: background .18s ease, transform .18s ease;
}
.auth-gate-button:hover { background: #2a2b30; transform: translateY(-1px); }
.auth-gate-bot-link {
  color: var(--accent-dark);
  font-size: 10px;
  text-decoration: none;
}
.auth-gate-bot-link:hover { text-decoration: underline; }
.auth-gate-status {
  min-height: 14px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}
.auth-gate-status[data-mode="error"] { color: #ad5544; }

.app-shell { width: 100%; min-height: 100vh; }
.shell-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 28px 24px 24px;
  background: var(--sidebar);
  color: var(--white);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: var(--white);
  text-decoration: none;
}
.brand-mark {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: var(--accent);
}
.brand-mark i {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transform: rotate(-18deg);
}
.brand-mark i:nth-child(1) { top: 14px; }
.brand-mark i:nth-child(2) { top: 20px; left: 15px; }
.brand-mark i:nth-child(3) { top: 26px; left: 12px; }
.brand strong {
  font-family: Geist, Inter, sans-serif;
  font-size: 14px;
  letter-spacing: .025em;
}
.sidebar-label {
  margin: 24px 8px 17px;
  color: #7f7b77;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}
.nav-list { display: grid; gap: 7px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--dark-soft);
  color: #a9a5a0;
  font-size: 12px;
  line-height: 1.15;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover:not(:disabled) { color: var(--white); transform: translateX(1px); }
.nav-item.active { background: var(--accent); color: var(--white); }
.nav-item.is-disabled { opacity: .56; }
.nav-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  flex: 0 0 16px;
  color: currentColor;
  font-size: 16px;
  line-height: 1;
}
.sidebar-auth { margin-top: auto; }
.sidebar-auth .sidebar-label { margin-top: 26px; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0 0 10px;
  padding: 9px 8px;
  border: 1px solid #2c2d32;
  border-radius: 12px;
  background: #1d1e22;
}
.sidebar-user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  background-color: var(--accent);
  background-position: center;
  background-size: cover;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}
.sidebar-user > span:last-child { display: grid; min-width: 0; gap: 3px; }
.sidebar-user strong, .sidebar-user small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: var(--white); font-size: 10px; }
.sidebar-user small { color: #8d8985; font-size: 9px; }
.sidebar-auth-button, .sidebar-logout-button {
  width: 100%;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid #3b3c42;
  border-radius: 10px;
  background: transparent;
  color: #d9d2ca;
  font-size: 10px;
  text-align: left;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.sidebar-auth-button:hover, .sidebar-logout-button:hover { border-color: var(--accent); color: var(--white); background: #23242a; }

.content {
  min-width: 0;
  min-height: 100vh;
  padding: 34px 36px 34px;
  background: var(--page);
  color: var(--text);
}
.view { min-width: 0; }
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--rule);
}
.eyebrow, .card-eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
}
h1, h2, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin-bottom: 6px;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: clamp(28px, 3vw, 31px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.project-chip {
  display: grid;
  width: 202px;
  min-height: 52px;
  flex: 0 0 202px;
  gap: 5px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--dark-soft);
  color: var(--white);
  text-align: left;
  transition: background .18s ease, transform .18s ease;
}
.project-chip:hover { background: #292a30; transform: translateY(-1px); }
.project-chip strong { font-size: 11px; font-weight: 500; }
.project-chip small { color: #71717a; font-size: 9px; }
.flow-footer {
  display: grid;
  grid-template-columns: auto auto auto auto auto auto auto;
  align-items: center;
  width: min(820px, 100%);
  min-height: 82px;
  margin-top: 16px;
  padding: 18px 24px;
  border-radius: 16px;
  background: #201f24;
  color: #eee9e3;
  font-size: 11px;
  font-weight: 500;
}
.flow-footer b { padding: 0 8px; color: #aaa4a0; font-weight: 400; }
.flow-footer .flow-current { color: var(--white); font-weight: 700; }
.flow-footer small {
  grid-column: 1 / -1;
  margin-top: 9px;
  color: #8f8985;
  font-size: 9px;
  font-weight: 400;
}
.toast {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 20;
  max-width: 380px;
  padding: 13px 16px;
  border: 1px solid #d2a18a;
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  box-shadow: 0 18px 50px rgba(35, 26, 20, .18);
  font-size: 12px;
}

.scanner-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  align-items: start;
  gap: 24px;
  margin-top: 32px;
}
.setup-card {
  display: grid;
  min-height: 520px;
  gap: 16px;
  padding: 13px 40px 20px;
  border-radius: 24px;
  background: var(--white);
  color: var(--text);
}
.form-field { display: grid; gap: 7px; min-width: 0; }
.form-field label, .choice-group legend {
  color: #5f5a55;
  font-size: 11px;
  font-weight: 500;
}
.form-field input, .form-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  transition: border .18s ease, box-shadow .18s ease;
}
.form-field input::placeholder { color: #77736f; }
.form-field input:focus, .form-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 120, 82, .13);
}
.choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 8px; }
.choice-grid { display: grid; gap: 11px; }
.choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  transition: border .18s ease, background .18s ease, color .18s ease;
}
.choice:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-weight: 600;
}
.choice:disabled { opacity: .84; }
.input-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
}
.input-with-action input { min-height: 42px; }
.icon-button {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--accent-dark);
  font-size: 22px;
  line-height: 1;
}
.icon-button:hover { border-color: var(--accent); background: var(--accent-pale); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.switch-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.switch-field input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  padding: 3px;
  border-radius: 99px;
  background: #d0c8c0;
  transition: background .18s ease;
}
.switch span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}
.switch-field input:checked + .switch { background: var(--accent); }
.switch-field input:checked + .switch span { transform: translateX(16px); }
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}
.primary-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.primary-button { padding: 0 16px; background: var(--dark); color: var(--white); }
.run-button {
  width: 100%;
  min-height: 56px;
  margin-top: 1px;
  border-radius: 12px;
  background: var(--dark);
  font-size: 12px;
}
.run-button:disabled { opacity: .72; }
.button-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--white);
  border-radius: 50%;
}
.run-button.is-loading .button-spinner { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card-note {
  margin: -7px 0 0;
  color: #9b948d;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.scanner-aside { display: grid; gap: 24px; }
.dark-info-card, .light-info-card { border-radius: 20px; padding: 25px 20px; }
.dark-info-card {
  min-height: 260px;
  background: var(--dark);
  color: var(--white);
}
.dark-info-card .card-eyebrow { color: var(--accent); }
.dark-info-card h2, .light-info-card h2, .results-insight h2 {
  margin: 0;
  font-family: Geist, Inter, sans-serif;
  letter-spacing: -.035em;
}
.dark-info-card h2 { font-size: 18px; }
.dark-info-card > p:last-child {
  margin: 22px 0 0;
  color: #8e8984;
  font-size: 9px;
  line-height: 1.35;
}
.step-list {
  display: grid;
  gap: 14px;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}
.step-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #e9e1d8;
  font-size: 11px;
  font-weight: 500;
}
.step-list li span { color: #9e9994; font-size: 9px; }
.step-list li.current { color: var(--accent); }
.step-list li.current span { color: var(--accent); }
.light-info-card {
  min-height: 250px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}
.light-info-card .card-eyebrow { color: var(--accent); }
.light-info-card h2 { font-size: 17px; line-height: 1.15; }
.light-info-card ul {
  display: grid;
  gap: 11px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 10px;
}
.light-info-card li::before { margin-right: 8px; color: var(--accent); content: "•"; }

.logs-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-areas:
    "heading heading"
    "progress console"
    "completion completion";
  gap: 0 28px;
  margin-top: 32px;
  padding: 23px 24px 21px;
  border-radius: 20px;
  background: var(--dark);
  color: var(--white);
}
.logs-heading {
  display: flex;
  grid-area: heading;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}
.logs-heading .card-eyebrow { margin-bottom: 7px; }
.logs-heading h2 {
  margin: 0;
  color: var(--white);
  font-family: Geist, Inter, sans-serif;
  font-size: 18px;
  letter-spacing: -.03em;
}
.logs-heading h2 span { color: #f0ad8d; }
.logs-heading > span { padding-top: 3px; color: #e9e1d8; font-size: 9px; }
.progress-list {
  display: grid;
  grid-area: progress;
  align-content: start;
  gap: 8px;
  margin-top: 18px;
}
.progress-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #e9e1d8;
  font-size: 10px;
}
.progress-marker {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #2ea89b;
  border-radius: 50%;
  color: #65d7c8;
  font-size: 11px;
}
.progress-row.pending { color: #8e8984; }
.progress-row.pending .progress-marker { border-color: #5e5a56; color: #77736f; }
.progress-row.error .progress-marker { border-color: #c97852; color: #f0ad8d; }
.progress-row strong { font-weight: 600; }
.progress-row small { display: none; }
.progress-row em { color: #e9e1d8; font-size: 9px; font-style: normal; }
.console-log {
  display: grid;
  grid-area: console;
  align-content: start;
  gap: 6px;
  max-height: 143px;
  margin-top: 18px;
  overflow: auto;
  padding: 11px 13px;
  border-radius: 10px;
  background: #111217;
  color: #d8d0c8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  line-height: 1.35;
}
.console-log p { margin: 0; }
.console-log time { color: #f0ad8d; }
.console-log span { margin: 0 6px; color: #77736f; }
.completion-banner {
  display: flex;
  grid-area: completion;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 14px;
  border: 1px solid #4230a8;
  border-radius: 11px;
  background: #211656;
  color: var(--white);
}
.completion-icon { color: #f2c96d; font-size: 18px; }
.completion-banner strong { font-size: 11px; }
.completion-banner button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #c9b9ff;
  font-size: 10px;
  font-weight: 700;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 18px;
  background: var(--dark);
  color: var(--white);
}
.results-summary .card-eyebrow { margin-bottom: 5px; }
.results-summary h2 {
  margin: 0;
  color: var(--white);
  font-family: Geist, Inter, sans-serif;
  font-size: 17px;
  letter-spacing: -.03em;
}
.results-summary p:last-child { margin: 5px 0 0; color: #bdb5ac; font-size: 10px; }
.run-status {
  min-width: 112px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.run-status[data-status="running"], .run-status[data-status="queued"] { background: #a76b4f; }
.run-status[data-status="failed"] { background: #8d4b45; }
.results-history {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
}
.results-history-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 180px) minmax(180px, 1.1fr);
  gap: 10px;
  align-items: stretch;
}
.history-control {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.history-control span, .results-period-filter span, .results-account-filter span { color: var(--muted); font-size: 9px; }
.history-control strong { color: var(--text); font-family: Geist, Inter, sans-serif; font-size: 12px; }
.history-control small { color: var(--muted); font-size: 9px; }
.history-control:hover { border-color: var(--accent); }
.history-control.is-selected { border-color: var(--accent); background: var(--accent-pale); }
.results-history-list { display: flex; min-width: 0; gap: 7px; overflow-x: auto; padding: 2px 0; }
.results-period-filter, .results-account-filter { display: grid; gap: 4px; min-width: 0; }
.results-period-filter select, .results-account-filter select {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: 9px;
}
.results-period-filter select:focus, .results-account-filter select:focus { border-color: var(--accent); outline: 0; }
.history-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.history-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.history-chip.is-selected { border-color: var(--accent); background: var(--accent-pale); color: var(--accent-dark); }
.history-empty { color: var(--muted); font-size: 10px; }
.results-filter-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 27px;
}
.results-filter-heading > div { display: grid; gap: 5px; }
.results-filter-heading strong { font-family: Geist, Inter, sans-serif; font-size: 15px; letter-spacing: -.025em; }
.results-filter-heading span { color: var(--muted); font-size: 10px; }
.results-filter-heading .result-count { color: var(--accent-dark); font-weight: 600; white-space: nowrap; }
.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 780px) minmax(250px, 290px);
  align-items: start;
  gap: 30px;
  margin-top: 15px;
}
.results-main { min-width: 0; }
.results-toolbar { margin-bottom: 13px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  transition: background .18s ease, border .18s ease, color .18s ease;
}
.tab:hover { border-color: var(--accent); color: var(--accent-dark); }
.tab.is-selected { border-color: var(--dark); background: var(--dark); color: var(--white); }
.results-list { display: grid; gap: 12px; }
.result-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 82px;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border .18s ease, box-shadow .18s ease, transform .18s ease;
}
.result-card:hover, .result-card.is-selected {
  border-color: #d4a18a;
  box-shadow: 0 10px 24px rgba(72, 45, 30, .08);
  transform: translateY(-1px);
}
.result-visual {
  display: grid;
  width: 118px;
  height: 102px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 14px;
  color: var(--white);
}
.result-visual > span { font-size: 20px; line-height: 1; }
.result-visual small { font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.result-visual.terracotta { background: var(--accent); }
.result-visual.sage { background: #8e9a83; }
.result-visual.rose { background: #a87a6b; }
.result-visual.clay { background: #9b765e; }
.result-card-copy {
  display: block;
  min-width: 0;
}
.result-card-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.result-card-copy small {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-original-link, .idea-original-link, .editor-original-link {
  display: inline-block;
  width: fit-content;
  margin-top: 7px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}
.result-original-link:hover, .idea-original-link:hover, .editor-original-link:hover { color: var(--accent); text-decoration: underline; }
.result-metric-line {
  display: block;
  margin-top: 13px;
  overflow-wrap: anywhere;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}
.result-bookmark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-self: start;
  border: 0;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.result-bookmark:hover { background: #ead0bf; transform: scale(1.04); }
.result-bookmark.is-saved { background: var(--accent); color: var(--white); }
.result-card-actions { display: grid; align-self: start; justify-items: stretch; gap: 8px; }
.result-trash {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid #e2d4c8;
  border-radius: 10px;
  background: transparent;
  color: #9b8172;
  cursor: pointer;
  transition: background .18s ease, border .18s ease, color .18s ease, transform .18s ease;
}
.result-trash:hover { border-color: var(--accent); background: var(--accent-pale); color: var(--accent-dark); transform: scale(1.04); }
.result-trash.is-trashed { border-color: #a4b19b; color: #6b8062; }
.result-trash svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.result-card:focus-visible, .idea-card:focus-visible, .history-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.empty-results {
  display: grid;
  gap: 7px;
  padding: 42px 20px;
  border: 1px dashed #d3c8bd;
  border-radius: 16px;
  background: rgba(255, 253, 249, .52);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.empty-results strong { color: var(--text); font-size: 13px; }
.results-insight {
  align-self: start;
  min-height: 462px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  color: var(--text);
}
.results-insight .card-eyebrow { color: var(--accent-dark); }
.results-insight h2 { font-size: 18px; line-height: 1.14; }
.results-insight > p:not(.card-eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.insight-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  margin-top: 20px;
}
.insight-metric {
  display: grid;
  gap: 7px;
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.insight-metric span { color: var(--muted); font-size: 10px; }
.insight-metric strong {
  color: var(--accent-dark);
  font-family: Geist, Inter, sans-serif;
  font-size: 22px;
}
.results-insight .primary-button { width: 100%; margin-top: 22px; }
.results-insight .primary-button:disabled { opacity: .42; }
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  margin-top: 26px;
  padding: 11px 20px;
  border-radius: 16px;
  background: var(--accent-pale);
}
.next-step .card-eyebrow { margin-bottom: 4px; }
.next-step strong { color: var(--text); font-family: Geist, Inter, sans-serif; font-size: 13px; }
.next-step button {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.next-step button:hover { color: var(--accent-dark); }
.results-log-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 17px;
  padding: 14px 17px;
  border-radius: 12px;
  background: #ebe2d9;
}
.results-log-preview .card-eyebrow { margin: 0; white-space: nowrap; }
.results-log-preview p {
  margin: 0;
  overflow: hidden;
  color: #6e6964;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.secondary-button {
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}
.secondary-button:hover { border-color: var(--accent); color: var(--accent-dark); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.section-heading.compact { align-items: start; }
.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: 18px;
  letter-spacing: -.035em;
}
.section-heading p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.section-count {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ideas-layout, .account-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  align-items: start;
  gap: 24px;
  margin-top: 32px;
}
.ideas-main, .account-main { min-width: 0; }
.ideas-list { display: grid; gap: 12px; margin-top: 18px; }
.idea-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border .18s ease, box-shadow .18s ease, transform .18s ease;
}
.idea-card:hover, .idea-card.is-selected {
  border-color: #d4a18a;
  box-shadow: 0 10px 24px rgba(72, 45, 30, .08);
  transform: translateY(-1px);
}
.idea-preview, .idea-preview-fallback {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  overflow: hidden;
  place-items: center;
  border-radius: 14px;
}
.idea-preview { background: var(--accent); }
.idea-preview-fallback { background: #8e9a83; color: var(--white); }
.idea-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idea-preview.has-preview::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(25, 26, 29, .72);
  color: var(--white);
  content: "REEL";
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
}
.idea-preview-fallback span { font-size: 20px; }
.idea-copy { min-width: 0; }
.idea-copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.idea-copy small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.idea-original-link { margin-top: 6px; }
.idea-metric {
  display: block;
  margin-top: 10px;
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 600;
}
.idea-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.idea-status {
  display: inline-flex;
  margin-top: 0;
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.idea-status-draft { background: #f3eee8; color: #817266; }
.idea-status-ready { background: #edf1e9; color: #60735a; }
.idea-status-post { background: #f8e9df; color: #ad6240; }
.idea-status-carousel { background: #eee9f8; color: #74569b; }
.idea-status-reels { background: #e7f0ef; color: #4f7670; }
.idea-status-trash { background: #eef1eb; color: #63775b; }
.idea-action {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  align-self: start;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 18px;
}
.idea-editor-card {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(25, 26, 29, .54);
}
.idea-editor-card[hidden] { display: none; }
.idea-editor-dialog {
  width: min(880px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(215, 195, 180, .9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(19, 17, 16, .24);
}
.idea-editor-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.idea-editor-heading-actions { display: flex; align-items: start; gap: 12px; }
.idea-editor-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--page);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.idea-editor-close:hover { border-color: var(--accent); color: var(--accent-dark); }
.idea-editor-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: 17px;
  line-height: 1.14;
  letter-spacing: -.03em;
}
.idea-editor-heading > div > p:not(.card-eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.editor-original-link { margin-top: 5px; }
.idea-editor-preview {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent-dark);
}
.idea-editor-preview img { width: 100%; height: 100%; object-fit: cover; }
.idea-editor-preview span { font-size: 18px; }
.idea-editor-form { display: grid; gap: 12px; margin-top: 16px; }
.editor-field { display: grid; gap: 6px; }
.editor-field label { color: var(--text); font-size: 9px; font-weight: 700; }
.editor-field textarea {
  width: 100%;
  min-height: 0;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--text);
  font: inherit;
  font-size: 10px;
  line-height: 1.45;
  resize: vertical;
}
.editor-field textarea:focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(205, 122, 82, .12); }
.idea-editor-actions { display: grid; gap: 8px; margin-top: 2px; }
.idea-editor-actions .primary-button, .idea-editor-actions .secondary-button { width: 100%; }
.idea-editor-actions .secondary-button { min-height: 38px; border-radius: 9px; font-size: 10px; }
.idea-output-actions {
  display: grid;
  gap: 7px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.idea-output-actions span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.idea-output-actions button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f5eee7;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  text-align: left;
}
.idea-output-actions button:not(:disabled):hover { border-color: var(--accent); color: var(--accent-dark); }
.idea-output-actions button.is-primary {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
}
.idea-output-actions button.is-primary:hover { border-color: var(--dark); color: var(--white); filter: brightness(1.08); }
.idea-output-actions button:disabled { color: #9d938a; cursor: not-allowed; opacity: .72; }
.ideas-empty {
  display: grid;
  gap: 8px;
  padding: 40px 24px;
  border: 1px dashed #d3c8bd;
  border-radius: 16px;
  background: rgba(255, 253, 249, .52);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.ideas-empty strong { color: var(--text); font-size: 13px; }
.ideas-aside, .account-aside { display: grid; gap: 24px; }
.ideas-insight-card { min-height: 250px; }
.ideas-insight-card h2 { font-size: 20px; line-height: 1.12; }
.ideas-insight-list {
  display: grid;
  gap: 11px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: #d9d2ca;
  font-size: 10px;
}
.ideas-insight-list li::before { margin-right: 8px; color: var(--accent); content: "•"; }
.ideas-next-card { min-height: 250px; }
.ideas-next-card h2 { font-size: 18px; }
.ideas-next-card > p:not(.card-eyebrow) {
  min-height: 44px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.ideas-next-card .primary-button { width: 100%; margin-top: 20px; }
.ideas-next-card .primary-button:disabled { opacity: .42; }
.ideas-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(820px, 100%);
  min-height: 58px;
  margin-top: 32px;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--dark);
  color: #bdb5ac;
  font-size: 10px;
}
.idea-filter {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #37343a;
  border-radius: 8px;
  background: transparent;
  color: #bdb5ac;
  font-size: 9px;
}
.idea-filter:hover { border-color: var(--accent); color: var(--white); }
.idea-filter.is-selected { border-color: var(--accent); background: var(--accent); color: var(--white); }
.ideas-filter-note { margin-left: auto; color: #817b77; font-size: 9px; }

.posts-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 280px;
  align-items: start;
  gap: 24px;
  margin-top: 32px;
}
.posts-main { min-width: 0; }
.posts-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-height: 318px;
  padding: 38px 40px;
  border: 1px dashed #d3c8bd;
  border-radius: 24px;
  background: rgba(255, 253, 249, .62);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.posts-empty strong { color: var(--text); font-family: Geist, Inter, sans-serif; font-size: 20px; letter-spacing: -.03em; }
.posts-empty > span:not(.posts-empty-icon) { max-width: 460px; }
.posts-empty .secondary-button { margin-top: 12px; }
.posts-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 20px;
}
.posts-list-heading { align-items: end; }
.posts-list { display: grid; gap: 12px; margin-top: 18px; }
.post-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--white);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border .18s ease, box-shadow .18s ease, transform .18s ease;
}
.post-card:hover, .post-card.is-selected {
  border-color: #d4a18a;
  box-shadow: 0 10px 24px rgba(72, 45, 30, .08);
  transform: translateY(-1px);
}
.post-card-visual {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 25px;
}
.post-card .idea-statuses { margin-top: 2px; }
.post-editor-card {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(25, 26, 29, .54);
}
.post-editor-card[hidden] { display: none; }
.post-editor-dialog {
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(215, 195, 180, .9);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(19, 17, 16, .24);
}
.post-editor-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.post-editor-heading-actions { display: flex; align-items: start; gap: 12px; }
.editor-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--page);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.editor-close:hover { border-color: var(--accent); color: var(--accent-dark); }
.post-editor-heading h2 {
  margin: 0;
  color: var(--text);
  font-family: Geist, Inter, sans-serif;
  font-size: 17px;
  line-height: 1.14;
  letter-spacing: -.03em;
}
.post-editor-heading > div > p:not(.card-eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.post-editor-form { display: grid; gap: 18px; margin-top: 18px; }
.post-title-field { margin-top: 1px; }
.post-save-state {
  align-self: start;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.post-editor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.post-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 390px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdfa;
}
.post-pane-editable { border-color: #d6a98e; background: #fffaf6; }
.post-pane-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.post-pane-heading span { color: var(--text); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.post-pane-heading small { color: var(--muted); font-size: 9px; }
.post-pane textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 11px;
  line-height: 1.55;
  resize: vertical;
}
.post-pane textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 120, 82, .13); }
.post-pane textarea[readonly] { background: #f5f0e9; color: #6f6962; }
.post-text-tools { display: flex; align-items: center; gap: 8px; min-height: 28px; color: var(--muted); font-size: 9px; }
.post-text-tools-placeholder { visibility: hidden; }
.post-text-tools > span { font-weight: 600; }
.post-text-tools > small { color: #a29a92; font-size: 8px; }
.post-emoji-control { position: relative; }
.emoji-toggle {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.emoji-toggle:hover, .emoji-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-dark); }
.post-emoji-picker {
  position: absolute;
  z-index: 3;
  bottom: calc(100% + 7px);
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 28px);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(35, 26, 20, .14);
}
.post-emoji-picker[hidden] { display: none; }
.post-emoji-picker button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
}
.post-emoji-picker button:hover { background: var(--accent-pale); }
.post-pane-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.post-editor-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.post-editor-actions .primary-button, .post-editor-actions .secondary-button { width: 100%; }
.post-editor-actions .secondary-button:disabled { color: #9d938a; background: #f5eee7; }
.posts-aside { display: grid; gap: 24px; }
.posts-info-card { min-height: 260px; }
.posts-info-card h2 { font-size: 19px; line-height: 1.15; }
.posts-info-card ul { display: grid; gap: 11px; margin: 23px 0 0; padding: 0; list-style: none; color: #d9d2ca; font-size: 10px; }
.posts-info-card li::before { margin-right: 8px; color: var(--accent); content: "•"; }
.posts-profile-card { min-height: 240px; }
.posts-profile-card h2 { font-size: 18px; }
.posts-profile-card > p:not(.card-eyebrow) { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.posts-profile-card .secondary-button { width: 100%; margin-top: 20px; }
.account-profile-card, .account-activity-card {
  border-radius: 20px;
  background: var(--white);
  color: var(--text);
}
.account-auth-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fbf7f1;
}
.account-auth-card h2 { margin: 0; font-family: Geist, Inter, sans-serif; font-size: 18px; letter-spacing: -.025em; }
.account-auth-card p:not(.card-eyebrow) { max-width: 590px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.telegram-login-area { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; min-width: 210px; }
.telegram-login-area .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; text-decoration: none; }
.auth-widget-note { color: var(--muted); font-size: 9px; line-height: 1.35; text-align: right; }
[data-authenticated="true"] { border-color: #d4e1d4; background: #f6faf5; }
.admin-heading-badge {
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--dark);
  color: #d8d2ca;
  font-size: 9px;
}
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 32px; }
.admin-main { min-width: 0; }
.admin-stats-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: var(--dark);
  color: var(--white);
}
.admin-stat { display: grid; gap: 8px; min-height: 78px; padding: 15px; border-radius: 13px; background: #24252a; }
.admin-stat span { color: #a9a5a0; font-size: 9px; }
.admin-stat strong { color: var(--accent); font-family: Geist, Inter, sans-serif; font-size: 25px; }
.admin-users-card { margin-top: 24px; padding: 24px 26px 20px; border-radius: 20px; background: var(--white); }
.admin-users-table-wrap { overflow-x: auto; margin-top: 18px; }
.admin-users-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.admin-users-table th { padding: 0 10px 10px; color: var(--muted); font-size: 9px; font-weight: 500; text-align: left; }
.admin-users-table td { padding: 12px 10px; border-top: 1px solid var(--rule); color: var(--muted); white-space: nowrap; }
.admin-users-table td:first-child { min-width: 180px; color: var(--text); }
.admin-users-table td:first-child strong, .admin-users-table td:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; }
.admin-users-table td:first-child strong { font-size: 10px; }
.admin-users-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.admin-role { display: inline-flex; padding: 5px 7px; border-radius: 7px; background: #f3eee8; color: #817266; font-size: 9px; }
.admin-role.is-admin { background: var(--accent-pale); color: var(--accent-dark); }
.admin-aside { display: grid; align-content: start; gap: 24px; }
.admin-info-card { min-height: 210px; }
.admin-info-card h2 { font-size: 18px; line-height: 1.15; }
.admin-info-card > p:not(.card-eyebrow) { margin-top: 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.account-profile-card { display: grid; gap: 24px; padding: 24px 26px 22px; }
.account-handle {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
}
.account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.account-save-button { width: 100%; }
.account-activity-card { margin-top: 24px; padding: 24px 26px 22px; }
.section-heading.compact > span:not(.account-handle) { color: var(--muted); font-size: 9px; }
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.account-stats div {
  display: grid;
  gap: 6px;
  padding: 15px 13px;
  border-radius: 12px;
  background: var(--page);
}
.account-stats strong { color: var(--accent-dark); font-family: Geist, Inter, sans-serif; font-size: 24px; }
.account-stats span { color: var(--muted); font-size: 9px; }
.account-plan-card { min-height: 250px; }
.account-plan-card h2 { font-size: 20px; }
.account-plan-copy {
  margin: 14px 0 0;
  color: #aaa5a0;
  font-size: 10px;
  line-height: 1.45;
}
.account-plan-meter { margin-top: 27px; color: #d9d2ca; font-size: 10px; }
.account-plan-meter b { color: var(--accent); }
.account-plan-meter > i {
  display: block;
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #353238;
}
.account-plan-meter > i > i {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.account-control-card { min-height: 250px; }
.account-control-card h2 { font-size: 18px; }
.account-control-card > p:not(.card-eyebrow) {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.account-control-card .secondary-button { width: 100%; margin-top: 21px; }

.result-visual { position: relative; overflow: hidden; }
.result-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-visual.has-preview::after {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(25, 26, 29, .72);
  color: var(--white);
  content: "REEL";
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
}
.result-visual.has-preview > span, .result-visual.has-preview > small { display: none; }

@media (max-width: 1120px) {
  .scanner-layout, .results-layout, .ideas-layout, .posts-layout, .account-layout, .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .scanner-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .results-insight, .ideas-insight-card, .ideas-next-card, .account-plan-card, .account-control-card { min-height: 0; }
  .ideas-aside, .posts-aside, .account-aside, .admin-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell-body { display: block; }
  .sidebar {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    padding: 12px 14px;
    border-bottom: 1px solid #2b2b30;
  }
  .brand { min-width: max-content; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
  .brand-mark i { left: 9px; width: 14px; }
  .brand-mark i:nth-child(1) { top: 10px; }
  .brand-mark i:nth-child(2) { top: 15px; left: 11px; }
  .brand-mark i:nth-child(3) { top: 20px; left: 9px; }
  .brand strong { font-size: 12px; }
  .sidebar-label { display: none; }
  .nav-list { display: flex; gap: 6px; }
  .nav-item { width: auto; min-height: 36px; padding: 0 11px; white-space: nowrap; }
  .nav-item br { display: none; }
  .nav-icon { display: none; }
  .content { padding: 24px 16px 32px; }
  .auth-gate { padding: 16px; }
  .auth-gate-card { padding: 32px 22px 27px; border-radius: 18px; }
  .auth-gate-brand { margin-bottom: 30px; }
  .auth-gate-card h1 { font-size: 25px; }
  .auth-gate-button { width: 100%; min-width: 0; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 17px; }
  .project-chip { width: 100%; flex-basis: auto; }
  .flow-footer { display: block; min-height: 0; padding: 17px 18px; line-height: 1.8; }
  .flow-footer b { padding: 0 5px; }
  .flow-footer small { display: block; margin-top: 5px; line-height: 1.35; }
  .scanner-layout { margin-top: 22px; }
  .setup-card { min-height: 0; padding: 20px 18px 22px; border-radius: 18px; }
  .field-row { grid-template-columns: 1fr; gap: 15px; }
  .scanner-aside { grid-template-columns: 1fr; }
  .ideas-aside, .posts-aside, .account-aside, .admin-aside { grid-template-columns: 1fr; }
  .logs-panel {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "progress" "console" "completion";
    gap: 0;
    padding: 20px 16px;
    border-radius: 17px;
  }
  .progress-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .console-log { max-height: 150px; }
  .completion-banner { align-items: start; flex-wrap: wrap; }
  .completion-banner button { width: 100%; margin-left: 0; text-align: left; }
  .results-summary { align-items: stretch; flex-direction: column; }
  .results-history-controls { grid-template-columns: 1fr; }
  .results-history-list { width: 100%; }
  .results-period-filter, .results-account-filter { width: 100%; }
  .run-status { width: 100%; }
  .results-filter-heading { align-items: start; flex-direction: column; gap: 8px; }
  .results-toolbar { margin-bottom: 10px; }
  .tabs { width: 100%; }
  .tab { flex: 1 1 calc(50% - 8px); }
  .result-card {
    position: relative;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    min-height: 0;
    padding: 14px;
  }
  .result-visual { width: 72px; height: 72px; }
  .result-card-copy { padding-right: 27px; }
  .result-card-copy strong { font-size: 13px; }
  .result-card-copy small { white-space: normal; }
  .result-metric-line { margin-top: 10px; }
  .result-card-copy { padding-right: 76px; }
  .result-card-actions { position: absolute; top: 14px; right: 14px; gap: 5px; }
  .result-bookmark { width: 34px; height: 34px; font-size: 15px; }
  .result-trash { width: 34px; height: 34px; }
  .result-trash svg { width: 15px; height: 15px; }
  .next-step { align-items: start; flex-direction: column; padding: 15px 18px; }
  .next-step button { padding: 0; }
  .results-log-preview { align-items: start; flex-direction: column; gap: 6px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .posts-empty { min-height: 0; padding: 28px 20px; border-radius: 18px; }
  .post-card { grid-template-columns: 72px minmax(0, 1fr); position: relative; padding: 14px; }
  .post-editor-card { padding: 12px; }
  .post-editor-dialog { max-height: calc(100vh - 24px); padding: 18px; border-radius: 17px; }
  .post-editor-heading-actions { gap: 7px; }
  .post-editor-columns, .post-editor-actions { grid-template-columns: 1fr; }
  .post-pane { min-height: 0; }
  .post-pane textarea { min-height: 210px; }
  .account-fields { grid-template-columns: 1fr; gap: 15px; }
  .account-stats { grid-template-columns: 1fr; }
  .account-auth-card { align-items: stretch; flex-direction: column; }
  .telegram-login-area { justify-content: flex-start; min-width: 0; }
  .auth-widget-note { text-align: left; }
  .admin-stats-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ideas-filters { align-items: start; flex-wrap: wrap; }
  .ideas-filter-note { width: 100%; margin-left: 0; }
  .idea-card { grid-template-columns: 72px minmax(0, 1fr); position: relative; padding: 14px; }
  .idea-preview, .idea-preview-fallback { width: 72px; height: 72px; }
  .idea-copy { padding-right: 28px; }
  .idea-action { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; font-size: 15px; }
  .idea-editor-card { padding: 12px; }
  .idea-editor-dialog { max-height: calc(100vh - 24px); padding: 18px; border-radius: 17px; }
  .idea-editor-heading-actions { gap: 7px; }
  .idea-editor-preview { flex-basis: 48px; width: 48px; height: 48px; }
  .idea-editor-close { width: 29px; height: 29px; font-size: 17px; }
  .toast { right: 16px; bottom: 16px; left: 16px; max-width: none; }
}
