:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111722;
  --panel-2: #151d2b;
  --line: rgba(255,255,255,.10);
  --text: #edf2ff;
  --muted: #95a0b8;
  --brand: #43d4ff;
  --brand-2: #8cffc1;
  --accent: #ffcb6b;
  --danger: #ff7d7d;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% 0%, #15314d 0, transparent 34%), var(--bg); color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px; border-right: 1px solid var(--line); background: rgba(9, 11, 16, .78); backdrop-filter: blur(18px); }
.brand { width: 100%; display: flex; gap: 12px; align-items: center; border: 0; background: transparent; color: var(--text); text-align: left; padding: 8px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #051018; font-weight: 900; }
.brand small, .muted { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.side-nav { display: grid; gap: 8px; margin-top: 34px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted); text-align: left; }
.nav-item:hover, .nav-item.active { background: rgba(67, 212, 255, .12); color: var(--text); border-color: rgba(67, 212, 255, .26); }
.nav-item span { width: 20px; text-align: center; color: var(--brand); }
.sidebar-card { position: absolute; left: 20px; right: 20px; bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sidebar-card strong { display: block; font-size: 30px; margin: 8px 0 14px; }
.main { min-width: 0; padding: 24px; }
.topbar { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--brand-2); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
.top-actions, .hero-actions, .filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.primary-btn, .secondary-btn, .ghost-btn, .small-btn { border-radius: var(--radius); border: 1px solid var(--line); min-height: 40px; padding: 0 16px; color: var(--text); background: var(--panel-2); }
.primary-btn { border-color: transparent; background: linear-gradient(135deg, #28b7ff, #7af5ad); color: #071018; font-weight: 800; }
.secondary-btn:hover, .ghost-btn:hover, .small-btn:hover { border-color: rgba(67,212,255,.45); }
.small-btn { width: 100%; }
.view { display: none; }
.view.active { display: block; }
.hero-grid { display: grid; grid-template-columns: 1.5fr .85fr; gap: 18px; }
.hero-panel { min-height: 420px; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, rgba(21,29,43,.96), rgba(12,16,26,.92)); }
.hero-copy { padding: 44px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(140,255,193,.25); border-radius: 999px; padding: 8px 12px; color: var(--brand-2); background: rgba(140,255,193,.08); font-size: 13px; }
.status-pill i { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-2); }
.hero-copy h2 { font-size: clamp(34px, 4vw, 62px); line-height: 1.05; margin: 24px 0 18px; letter-spacing: 0; }
.hero-copy p { color: var(--muted); line-height: 1.75; max-width: 620px; }
.hero-visual { position: relative; height: 100%; min-height: 360px; background: linear-gradient(180deg, rgba(67,212,255,.08), rgba(140,255,193,.05)); }
.core-orb, .pulse-ring { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.core-orb { width: 134px; height: 134px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #071018; font-size: 42px; font-weight: 950; box-shadow: 0 0 80px rgba(67,212,255,.34); z-index: 2; }
.pulse-ring { width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.16); }
.orbit-card { position: absolute; z-index: 3; padding: 12px 16px; border-radius: var(--radius); background: rgba(9,11,16,.84); border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0,0,0,.24); }
.card-a { top: 22%; left: 13%; }
.card-b { right: 10%; top: 34%; }
.card-c { left: 24%; bottom: 22%; }
.metric-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.metric-grid article, .workflow-card, .price-card, .table-card, .ops-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,23,34,.88); }
.metric-grid article { padding: 22px; }
.metric-grid span, .workflow-card p, .price-card p, .table-head span { color: var(--muted); }
.metric-grid strong { display: block; font-size: 32px; margin: 8px 0; }
.metric-grid small { color: var(--brand-2); }
.section-title { margin: 34px 0 16px; }
.section-title span { color: var(--brand); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.section-title h3 { margin: 8px 0 0; font-size: 30px; }
.section-title.compact { margin-top: 0; }
.workflow-grid, .model-grid, .pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.workflow-card, .model-card, .price-card { padding: 22px; }
.workflow-card .icon { font-size: 28px; }
.workflow-card h4 { margin: 18px 0 9px; font-size: 18px; }
.workflow-card p { line-height: 1.65; margin-bottom: 0; }
.chat-layout { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - 132px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.model-rail { padding: 16px; background: rgba(11,15,23,.8); border-right: 1px solid var(--line); overflow: auto; }
.rail-header { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.model-choice { display: block; width: 100%; text-align: left; padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--text); }
.model-choice span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.model-choice.active { border-color: rgba(67,212,255,.55); background: rgba(67,212,255,.10); }
.chat-panel { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.chat-head, .composer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.chat-head span { display: block; color: var(--muted); font-size: 12px; }
.messages { padding: 22px; overflow: auto; }
.message { max-width: 720px; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 14px; line-height: 1.65; }
.message.ai { background: var(--panel-2); border: 1px solid var(--line); }
.message.user { margin-left: auto; background: rgba(67,212,255,.12); border: 1px solid rgba(67,212,255,.25); }
.composer { border-top: 1px solid var(--line); border-bottom: 0; }
.composer input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: #0b1018; color: var(--text); padding: 0 14px; outline: 0; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.chip.active { color: #071018; background: var(--brand-2); border-color: transparent; font-weight: 800; }
.model-grid { margin-top: 18px; }
.model-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17,23,34,.9); }
.model-card-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.model-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius); background: rgba(67,212,255,.13); color: var(--brand); font-weight: 900; }
.tag { color: var(--brand-2); font-size: 12px; }
.model-card h4 { margin: 0 0 8px; }
.model-card p { color: var(--muted); line-height: 1.55; margin-bottom: 16px; }
.model-card footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.pricing-grid { grid-template-columns: repeat(3, 1fr); }
.price-card h4 { margin: 10px 0; font-size: 44px; }
.price-card button, .pay-grid button { width: 100%; min-height: 42px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--text); background: var(--panel-2); }
.price-card.featured { border-color: rgba(67,212,255,.45); background: linear-gradient(180deg, rgba(67,212,255,.15), rgba(17,23,34,.95)); }
.table-card, .ops-card { margin-top: 18px; padding: 20px; overflow: auto; }
.table-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.ok { color: var(--brand-2); }
.warn { color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: 1.55fr .75fr; gap: 18px; }
.table-card.wide { margin-top: 0; }
.ops-card { margin-top: 0; }
.health-row { display: grid; grid-template-columns: 82px 1fr 44px; gap: 12px; align-items: center; margin-top: 20px; }
.health-row i { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.health-row em { color: var(--muted); font-style: normal; }
.modal-backdrop { position: fixed; inset: 0; display: none; place-items: center; padding: 20px; background: rgba(0,0,0,.62); z-index: 20; }
.modal-backdrop.active { display: grid; }
.modal { position: relative; width: min(520px, 100%); padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: #111722; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--text); font-size: 24px; }
.modal p { color: var(--muted); line-height: 1.65; }
.pay-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.pay-grid button { display: grid; gap: 6px; padding: 18px; text-align: left; }
.pay-grid strong { font-size: 24px; }
.pay-grid span { color: var(--muted); }
.full { width: 100%; }
.field-label { display: block; margin: 14px 0 8px; color: var(--muted); font-size: 13px; }
.modal-input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #0b1018; color: var(--text); padding: 0 13px; outline: 0; }
.modal-input:focus { border-color: rgba(67,212,255,.6); }
@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-card { position: static; margin-top: 20px; }
  .side-nav { grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow: auto; }
  .hero-grid, .hero-panel, .admin-grid { grid-template-columns: 1fr; }
  .workflow-grid, .model-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .main { padding: 16px; }
  .topbar, .chat-head, .composer { align-items: stretch; flex-direction: column; }
  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .model-rail { border-right: 0; border-bottom: 1px solid var(--line); }
  .workflow-grid, .model-grid, .pricing-grid, .pay-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 26px; }
  .hero-copy h2 { font-size: 34px; }
  .hero-visual { min-height: 280px; }
}

.pay-grid button.selected {
  border-color: rgba(140,255,193,.85);
  background: rgba(140,255,193,.14);
  box-shadow: 0 0 0 2px rgba(140,255,193,.18) inset;
}
