:root {
  --primary: #2563eb;
  --secondary: #06b6d4;
  --accent: #10b981;
  --bg: #081120;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.9);
  --panel-strong: rgba(15, 23, 42, 0.98);
  --panel-alt: rgba(30, 41, 59, 0.88);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}
[data-theme="light"] {
  --bg: #eef4ff;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --panel-alt: rgba(226, 232, 240, 0.82);
  --border: rgba(37, 99, 235, 0.14);
  --text: #0f172a;
  --muted: #475569;
  --shadow: 0 18px 45px rgba(37, 99, 235, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", Aptos, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 32%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 26%),
    linear-gradient(180deg, #06101e 0%, #0f172a 100%);
  color: var(--text);
}
[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.1), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #e8f0fb 100%);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 16px 0 40px;
}
main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.site-header,
.panel,
.marketing-card,
.pricing-card,
.bottom-card,
.download-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.site-header {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.72fr);
  gap: 14px;
  padding: 16px 18px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.12)), var(--panel-strong);
}
.brand-block { display: grid; grid-template-columns: 68px 1fr; gap: 14px; align-items: start; }
.brand-mark {
  width: 68px; height: 68px; border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid; place-items: center;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.28);
}
.brand-icon { font-size: 1.95rem; color: white; font-weight: 800; transform: translateY(-1px); }
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7dd3fc;
  font-size: 0.75rem;
  font-weight: 800;
}
h1, h2, h3, h4, p, ul { margin-top: 0; }
h1 {
  font-size: clamp(1.4rem, 2.4vw, 2.15rem);
  line-height: 1.06;
  margin-bottom: 8px;
}
h2 { font-size: clamp(1.35rem, 2.3vw, 2rem); margin-bottom: 10px; }
h3 { font-size: 1.15rem; margin-bottom: 10px; }
.hero-copy, .muted { color: var(--muted); }
.brand-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.brand-top-row .eyebrow { margin-bottom: 0; }
.hero-copy { max-width: 54ch; font-size: 0.94rem; line-height: 1.45; margin-bottom: 0; }
.top-theme-btn {
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-actions, .button-row, .trust-row { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-row { margin-top: 8px; }
.trust-row span, .pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(148, 163, 184, 0.12);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.88rem;
}
.hero-card, .pricing-card, .bottom-card { border-radius: 30px; padding: 20px; }
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(18px);
}
.hero-balance-label { color: var(--muted); margin-top: 12px; }
.hero-balance {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 800;
  margin: 8px 0 16px;
}
.hero-mini-grid, .mini-grid, .metrics-grid, .marketing-grid, .download-grid, .chart-grid, .form-grid, .workspace-split { display: grid; gap: 18px; }
.hero-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-mini-grid span, .mini-label, .metric-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.hero-mini-grid strong { font-size: 1.15rem; }
.marketing-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.7fr);
  margin: 0;
  display: none;
}
.downloads-section { margin-bottom: 0; }
.download-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.downloads-section .download-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.download-card {
  border-radius: 22px;
  padding: 20px;
  background: rgba(30, 41, 59, 0.72);
}
[data-theme="light"] .download-card,
[data-theme="light"] .install-guide-card,
[data-theme="light"] .quickstart-card,
[data-theme="light"] .chart-card,
[data-theme="light"] .shot-card,
[data-theme="light"] .metric-card,
[data-theme="light"] .insight-card,
[data-theme="light"] .bottom-card,
[data-theme="light"] .network-panel,
[data-theme="light"] .sync-panel,
[data-theme="light"] .setup-card,
[data-theme="light"] .receipt-card,
[data-theme="light"] .panel {
  background: rgba(255, 255, 255, 0.88);
}
[data-theme="light"] .glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
}
[data-theme="light"] .eyebrow {
  color: #0ea5e9;
}
[data-theme="light"] .trust-row span,
[data-theme="light"] .pill {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.14);
}
[data-theme="light"] .premium-pill {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
[data-theme="light"] .premium-pill.active {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
[data-theme="light"] .btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(37, 99, 235, 0.14);
}
[data-theme="light"] .btn-ghost {
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.16);
  background: rgba(255, 255, 255, 0.55);
}
.update-card {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.92));
}
[data-theme="light"] .update-card {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.96));
}
.download-card .btn { width: 100%; text-align: center; }
.install-guides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.install-guide-card,
.quickstart-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.guide-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.guide-head h3 {
  margin: 0;
}
.install-steps {
  margin: 0;
  padding-left: 22px;
  color: #dbeafe;
  line-height: 1.7;
}
.quickstart-panel {
  margin-bottom: 0;
  display: none;
}
.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.quickstart-card {
  display: grid;
  gap: 12px;
}
.quickstart-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.quickstart-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #dbeafe;
  font-weight: 900;
}
.marketing-card, .pricing-card {
  border-radius: 28px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.88);
}
.price-row { display: flex; align-items: end; gap: 8px; margin: 18px 0; }
.price-row strong { font-size: 2.6rem; }
.pricing-list { padding-left: 18px; color: #dbeafe; line-height: 1.9; }
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.compact-features { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.feature-list > div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.feature-list strong { display: block; margin-bottom: 8px; }
.feature-list span { color: var(--muted); line-height: 1.5; }
.workspace-grid {
  display: grid;
  gap: 20px;
  order: 1;
}
.marketing-grid { order: 2; }
.downloads-section { order: 3; }
.quickstart-panel { order: 4; }
.screens-section { order: 5; display: none; }
.bottom-marketing { order: 6; }
.panel {
  border-radius: 28px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.9);
}
.ai-panel { display: grid; gap: 18px; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ai-chat-shell { gap: 14px; }
.ai-terminal-shell {
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.55fr);
  gap: 16px;
  background: linear-gradient(180deg, rgba(1, 8, 20, 0.98), rgba(7, 17, 33, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.14);
}
.ai-terminal-sidebar,
.ai-terminal-main {
  display: grid;
  gap: 14px;
}
.ai-session-tabs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ai-session-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-session-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ai-session-tab.is-active {
  background: rgba(8, 47, 73, 0.78);
  border-color: rgba(34, 211, 238, 0.28);
}
.ai-session-tab-label {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
}
.ai-project-open,
.ai-session-tab-open {
  border: none;
  padding: 0;
  background: transparent;
  color: #e2e8f0;
  text-align: left;
  font: inherit;
  font-weight: 700;
}
.ai-project-open:hover,
.ai-session-tab-open:hover {
  color: #67e8f9;
}
.ai-session-tab .btn {
  min-width: 0;
}
.ai-terminal-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ai-terminal-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ai-terminal-panel-head h3 {
  margin: 0;
  font-size: 0.98rem;
}
.ai-project-list,
.ai-session-list,
.ai-history-list {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}
.ai-project-item,
.ai-session-item,
.ai-history-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.ai-project-item.is-active {
  background: rgba(8, 47, 73, 0.72);
  border-color: rgba(34, 211, 238, 0.24);
}
.ai-project-meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.ai-session-item strong,
.ai-history-item strong {
  color: #e2e8f0;
}
.ai-session-title-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.92rem;
}
.ai-session-item p,
.ai-history-item p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.45;
}
.ai-session-meta,
.ai-history-meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.ai-command-bar-label {
  gap: 10px;
}
.ai-command-bar-shell {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.06);
}
.ai-command-bar-prompt {
  padding-top: 10px;
  color: #67e8f9;
  font-weight: 900;
  font-size: 1rem;
}
.ai-command-bar-shell textarea {
  min-height: 92px;
  border: none;
  border-radius: 0;
  padding: 0;
  resize: vertical;
  background: transparent;
  color: #dbeafe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.6;
}
.ai-command-bar-shell textarea:focus {
  outline: none;
  box-shadow: none;
}
.ai-command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ai-command-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ai-command-toggle input {
  width: 18px;
  height: 18px;
}
.ai-quick-prompts { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ai-status-chip {
  display: inline-grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ai-status-chip strong {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #67e8f9;
}
.ai-status-chip span {
  color: #e2e8f0;
  font-weight: 700;
}
.ai-workbench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ai-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ai-plan-console,
.ai-tool-log,
.ai-workspace-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
}
.ai-plan-item,
.ai-tool-log-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.ai-plan-item p,
.ai-tool-log-item p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.45;
}
.ai-plan-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.ai-plan-state.pending {
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}
.ai-plan-state.in_progress {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
}
.ai-plan-state.complete {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}
.ai-tool-log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ai-tool-log-head strong {
  color: #e2e8f0;
}
.ai-tool-log-head span {
  color: var(--muted);
  font-size: 0.78rem;
}
.ai-tool-log-item.success {
  border-color: rgba(16, 185, 129, 0.2);
}
.ai-tool-log-item.warn {
  border-color: rgba(245, 158, 11, 0.2);
}
.ai-tool-log-item.error {
  border-color: rgba(239, 68, 68, 0.24);
}
.ai-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ai-workspace-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.ai-workspace-item strong {
  color: #e2e8f0;
}
.ai-workspace-item p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.45;
}
.ai-workspace-task-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}
.ai-conversation,
.ai-knowledge-list {
  display: grid;
  gap: 12px;
}
.ai-conversation {
  min-height: 180px;
  max-height: 460px;
  overflow: auto;
  padding: 14px;
  border-radius: 18px;
  background: rgba(1, 6, 17, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.12);
}
.ai-message {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(9, 17, 32, 0.9);
}
.ai-message strong { display: block; margin-bottom: 6px; }
.ai-message p { margin: 0; color: #dbeafe; white-space: pre-wrap; }
.ai-message.user {
  background: rgba(8, 47, 73, 0.68);
  border-color: rgba(34, 211, 238, 0.22);
}
.ai-message.assistant {
  background: rgba(15, 23, 42, 0.94);
}
.ai-message.system {
  background: rgba(8, 47, 73, 0.45);
  border-color: rgba(34, 211, 238, 0.22);
}
.ai-message-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
.ai-knowledge-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.78);
}
.ai-knowledge-item p { margin: 8px 0 0; }
.ai-knowledge-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-knowledge-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
  font-size: 0.78rem;
}
.ai-knowledge-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.empty-ai { color: var(--muted); margin: 0; }
.network-panel {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.network-copy strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.network-copy p { margin: 0; color: var(--muted); }
.network-meta { display: grid; gap: 8px; justify-items: end; color: var(--muted); }
.sync-badge {
  min-width: 118px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}
.sync-badge.synced { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.sync-badge.pending { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.sync-badge.syncing { background: rgba(6, 182, 212, 0.18); color: #67e8f9; }
.sync-badge.local { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card {
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.72);
}
.metric-card strong { font-size: 1.8rem; }
.gradient-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.72), rgba(6, 182, 212, 0.52));
}
.section-head {
  display: flex; justify-content: space-between; align-items: start; gap: 16px;
  margin-bottom: 18px;
}
.help-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(14, 165, 233, 0.14);
  color: #e0f2fe;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: none;
}
.help-button.small-help {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
}
.help-button:hover,
.help-button:focus-visible {
  outline: 3px solid rgba(186, 230, 253, 0.45);
  outline-offset: 2px;
}
.card-inset {
  border-radius: 22px;
  padding: 18px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}
.setup-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; color: #dbeafe; }
[data-theme="light"] label { color: #1e293b; }
input, select, textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 13px 14px;
  background: rgba(15, 23, 42, 0.94);
  color: var(--text);
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(37, 99, 235, 0.14);
  color: #0f172a;
}
input[type="date"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(191, 219, 254, 0.34);
  color-scheme: dark;
}
[data-theme="light"] input[type="date"] {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.22);
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.95);
  opacity: 0.92;
}
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.78;
}
textarea {
  resize: vertical;
  min-height: 140px;
  font: inherit;
  line-height: 1.55;
}
input::file-selector-button {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  margin-right: 12px;
  background: rgba(37, 99, 235, 0.16);
  color: #dbeafe;
}
.btn {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.btn-secondary {
  color: var(--text);
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
}
.btn-ghost {
  color: #dbeafe;
  background: transparent;
  border-color: rgba(125, 211, 252, 0.24);
}
.small { padding: 9px 12px; border-radius: 14px; }
.chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.chart-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  margin-bottom: 12px;
}
canvas {
  width: 100%;
  height: 320px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,23,42,0.4), rgba(15,23,42,0.1));
}
.insights-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.insight-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.insight-card strong { display: block; margin-bottom: 8px; }
.insight-card p { color: var(--muted); margin: 0; line-height: 1.55; }
.workspace-split { grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.8fr); }
.side-stack { display: grid; gap: 16px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  vertical-align: top;
}
th { color: #bfdbfe; font-size: 0.92rem; }
.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.83rem;
}
.status.pending { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.status.paid { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.status.overdue { background: rgba(239, 68, 68, 0.15); color: #fda4af; }
.status.scheduled { background: rgba(37, 99, 235, 0.15); color: #93c5fd; }
.due-list, .receipt-list, .payment-history { display: grid; gap: 12px; }
.due-item, .receipt-item, .payment-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.due-item div, .receipt-item div, .payment-item div { color: var(--muted); margin-top: 4px; }
.receipt-tool-row { align-items: center; }
.receipt-tool-row .btn { flex: 1 1 0; }
.receipt-camera-dialog { width: min(880px, calc(100vw - 28px)); }
.receipt-camera-body { display: grid; gap: 18px; }
.receipt-camera-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 260px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.receipt-camera-video,
.receipt-camera-canvas {
  display: block;
  width: 100%;
  min-height: 260px;
  max-height: 60vh;
  object-fit: cover;
  background: rgba(2, 6, 23, 0.92);
}
.receipt-camera-actions .btn { flex: 1 1 0; }
.receipt-qr-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  font-size: 0.84rem;
  font-weight: 700;
}
.receipt-ocr-preview {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}
.receipt-ocr-preview summary {
  cursor: pointer;
  color: #bfdbfe;
  font-weight: 800;
}
.receipt-ocr-preview p {
  margin: 8px 0 0;
  line-height: 1.5;
}
#receiptOcrText {
  min-height: 104px;
  resize: vertical;
}
.error-text { color: #fecaca; margin: 0; }
.login-dialog { border: none; background: transparent; padding: 0; }
.login-dialog::backdrop { background: rgba(2, 6, 23, 0.72); }
.login-card {
  width: min(92vw, 440px);
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.help-modal[hidden] { display: none !important; }
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
}
.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
}
.help-modal-dialog {
  position: relative;
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 17, 32, 0.98);
  box-shadow: var(--shadow);
}
.help-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 22px 24px 0;
}
.help-modal-close {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.92);
  color: var(--text);
  font-weight: 800;
}
.help-modal-body {
  padding: 0 24px 24px;
}
.help-lead {
  color: #dbeafe;
  line-height: 1.65;
}
.help-steps {
  margin: 0;
  padding-left: 22px;
  color: #dbeafe;
  line-height: 1.8;
}
.help-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.18);
  color: #dbeafe;
}
.help-tag {
  margin-top: 16px;
  display: inline-flex;
}
.snackbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 180;
  max-width: min(560px, calc(100vw - 24px));
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(8, 17, 32, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: var(--shadow);
  transform: translate(-50%, 120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 160ms ease, opacity 160ms ease;
}
.snackbar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
.bottom-marketing { margin-top: 24px; }
.bottom-card h2 { margin-bottom: 16px; }
.empty-text { color: var(--muted); }
@media (max-width: 1120px) {
  .site-header,
  .marketing-grid,
  .download-grid,
  .install-guides,
  .quickstart-grid,
  .workspace-split,
  .chart-grid,
  .form-grid,
  .ai-grid,
  .ai-workbench-grid,
  .ai-workspace-grid,
  .ai-command-grid,
  .ai-terminal-shell {
    grid-template-columns: 1fr;
  }
  .ai-session-tabs-head {
    flex-direction: column;
    align-items: stretch;
  }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-list,
  .insights-grid,
  .compact-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { width: min(100vw - 16px, 1320px); padding-top: 8px; }
  .site-header, .panel, .marketing-card, .pricing-card, .bottom-card, .download-card { padding: 18px; border-radius: 24px; }
  .brand-block { grid-template-columns: 1fr; }
  .brand-top-row { flex-direction: column; align-items: stretch; }
  .top-theme-btn { width: 100%; }
  .brand-mark { width: 72px; height: 72px; border-radius: 22px; }
  .network-panel, .section-head, .button-row, .hero-actions { flex-direction: column; align-items: stretch; }
  .network-meta { justify-items: stretch; }
  .metrics-grid, .feature-list, .download-grid, .insights-grid, .compact-features, .hero-mini-grid, .mini-grid, .ai-grid, .ai-workbench-grid, .ai-workspace-grid, .setup-grid { grid-template-columns: 1fr; }
  .button-row .btn, .hero-actions .btn { width: 100%; }
  .help-modal-dialog { width: min(100vw - 16px, 820px); }
  .receipt-camera-dialog { width: min(100vw - 16px, 880px); }
  .help-modal-header { flex-direction: column; }
  .help-button, .help-modal-close { width: 100%; min-width: 0; }
  th:nth-child(6), td:nth-child(6) { display: none; }
}

.subscription-panel,
.screens-section { margin-top: 0; }
.button-stack { display: grid; gap: 10px; }
.sub-pill-row { margin-top: 14px; display: grid; gap: 8px; }
.premium-pill { background: rgba(37, 99, 235, 0.16); color: #bfdbfe; }
.premium-pill.active { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.tiny { font-size: 0.86rem; }
.screens-section .section-head { margin-bottom: 16px; }
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.shot-card {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.92);
}
.shot-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: #bfdbfe;
  font-weight: 700;
}
.shot-body {
  min-height: 220px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(37,99,235,0.15), rgba(6,182,212,0.04));
}
.shot-balance {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.shot-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 120px; }
.shot-bars span { display: block; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, #2563eb, #06b6d4); }
.shot-bars span:nth-child(1) { height: 42%; }
.shot-bars span:nth-child(2) { height: 80%; }
.shot-bars span:nth-child(3) { height: 58%; }
.shot-bars span:nth-child(4) { height: 95%; }
.shot-mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.shot-mini-cards div, .shot-file, .shot-price, .shot-line, .shot-button { border-radius: 16px; background: rgba(255,255,255,0.08); }
.shot-mini-cards div { height: 54px; }
.shot-file { height: 44px; margin-bottom: 10px; }
.shot-file.short, .shot-line.short { width: 64%; }
.shot-tag-row { display: flex; gap: 8px; margin-top: 18px; }
.shot-tag-row span { width: 72px; height: 22px; border-radius: 999px; background: rgba(34,211,238,0.18); }
.shot-price { height: 78px; margin-bottom: 16px; background: linear-gradient(135deg, rgba(37,99,235,0.4), rgba(6,182,212,0.25)); }
.shot-line { height: 16px; margin-bottom: 12px; }
.shot-button { margin-top: 24px; height: 42px; width: 55%; background: linear-gradient(135deg, #2563eb, #06b6d4); }
.receipt-actions { margin-top: 10px; }

@media (max-width: 1120px) {
  .shot-grid { grid-template-columns: 1fr; }
}
