:root {
  color-scheme: dark;
  --bg: #08131d;
  --surface: #102230;
  --surface-2: #162d3e;
  --surface-3: #1c3749;
  --text: #f2f7fb;
  --muted: #86a0b4;
  --line: #2a4658;
  --accent: #71e2bd;
  --blue: #70baff;
  --warning: #f4bd67;
  --danger: #ff8f8f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 75% -15%, #21495a 0, transparent 32%), var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shell { width: min(1080px, 100%); margin: auto; padding: 34px 28px 56px; }
.hero { align-items: flex-start; display: flex; justify-content: space-between; gap: 28px; margin-bottom: 24px; }
.eyebrow, .section-label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; margin: 0 0 8px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -.065em; line-height: .95; margin-bottom: 11px; }
h2 { font-size: 21px; letter-spacing: -.02em; margin: 0; }
.subtitle { color: var(--muted); margin: 0; }
.status { border: 1px solid #2d685b; border-radius: 99px; color: var(--accent); font-size: 11px; padding: 7px 11px; white-space: nowrap; }
.status i { background: var(--accent); border-radius: 50%; display: inline-block; height: 6px; margin-right: 5px; width: 6px; }
.toast { color: var(--accent); min-height: 20px; margin: 0 0 14px; text-align: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab { background: transparent; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); padding: 9px 15px; transition: .2s; }
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #08231b; font-weight: 800; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stats div, .panel, .current-bot { background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line); border-radius: 18px; }
.stats div { padding: 15px 16px; }
.stats span { color: var(--muted); display: block; font-size: 10px; letter-spacing: .12em; margin-bottom: 5px; text-transform: uppercase; }
.stats strong { font-size: 16px; }
.panel { padding: 20px; }
.panel-heading { align-items: center; display: flex; gap: 14px; justify-content: space-between; margin-bottom: 14px; }
.panel-heading > button, #refresh { background: transparent; color: var(--accent); font-size: 13px; padding: 4px 0; }
.panel-intro { color: var(--muted); font-size: 13px; margin: -3px 0 15px; }
.current-bot { align-items: center; background: linear-gradient(115deg, #173548, #102a38); display: flex; gap: 17px; margin-bottom: 14px; min-height: 126px; padding: 20px 22px; transition: border-color .2s, background .2s; }
.current-bot.state-selected { border-color: var(--accent); box-shadow: 0 0 0 1px #71e2bd22, 0 16px 40px #00000024; }
.current-bot.state-unavailable { border-color: var(--warning); }
.current-bot-avatar, .bot-avatar { align-items: center; background: var(--surface-3); border-radius: 16px; color: var(--accent); display: flex; flex: 0 0 58px; font-size: 22px; font-weight: 850; height: 58px; justify-content: center; }
.current-bot-copy { min-width: 0; flex: 1; }
.current-bot-title { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 3px; }
.current-bot-title h2 { font-size: 24px; }
.current-bot-copy p { color: var(--text); margin: 0 0 3px; }
.current-bot-copy small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-badge, .status-badge { border: 1px solid #386b5e; border-radius: 99px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 5px 8px; white-space: nowrap; }
.state-unavailable .state-badge { border-color: #8c6a3d; color: var(--warning); }
.secondary-button { background: var(--surface-3); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 13px; padding: 10px 13px; white-space: nowrap; }
.secondary-button:hover { border-color: var(--accent); }
.bots-panel { margin-bottom: 14px; }
.bots-list { display: grid; gap: 9px; }
.bot-card { align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 13px; display: flex; gap: 12px; padding: 12px; transition: .2s; }
.bot-card:hover { border-color: #477085; transform: translateY(-1px); }
.bot-card.selected { background: #1b3d48; border-color: var(--accent); }
.bot-card > div:nth-child(2) { flex: 1; min-width: 0; }
.bot-card strong, .bot-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-card span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.bot-avatar { border-radius: 12px; flex-basis: 42px; font-size: 16px; height: 42px; }
.select-bot { background: var(--accent); border-radius: 8px; color: #092019; font-size: 12px; font-weight: 750; padding: 8px 11px; white-space: nowrap; }
.select-bot:disabled { background: #244d4d; color: var(--accent); cursor: default; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.automation-panel, .logs-panel { min-width: 0; }
.status-badge { color: var(--muted); border-color: var(--line); }
.full-button { margin-bottom: 15px; width: 100%; }
.primary-button { background: var(--accent); border-radius: 9px; color: #092019; font-weight: 800; padding: 12px; }
.primary-button:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.actions button { align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; display: flex; gap: 10px; padding: 11px; text-align: left; transition: .2s; }
.actions button:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.actions button:disabled { cursor: not-allowed; opacity: .43; }
.actions b { align-items: center; background: #214257; border-radius: 9px; color: var(--accent); display: flex; flex: 0 0 34px; font-size: 18px; height: 34px; justify-content: center; }
.actions strong, .actions small { display: block; }
.actions small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.logs { display: grid; gap: 8px; }
.log { align-items: center; background: var(--surface-2); border-radius: 10px; display: flex; gap: 11px; padding: 11px 12px; }
.dot { border-radius: 50%; flex: 0 0 8px; height: 8px; }
.success { background: var(--accent); } .info { background: var(--blue); } .warning { background: var(--warning); }
.log-text { flex: 1; min-width: 0; } .log-time { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 15px 0; text-align: center; }
.teleport-options { background: var(--surface-2); border: 1px solid var(--accent); border-radius: 11px; display: grid; gap: 10px; margin-top: 14px; padding: 13px; }
.teleport-options > div { display: grid; gap: 8px; } .destination-button { background: #214257; border-radius: 9px; padding: 11px; text-align: left; }
.bot-settings { margin-top: 14px; }
.settings-form { display: grid; gap: 12px; }
.settings-form label, #account-form label { color: var(--muted); display: grid; font-size: 12px; gap: 6px; }
.settings-form input, .settings-form textarea, .settings-form select, #account-form input, .auth-step input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; color: var(--text); outline: none; padding: 10px 11px; width: 100%; }
.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus, #account-form input:focus, .auth-step input:focus { border-color: var(--accent); }
.settings-form textarea { resize: vertical; } .settings-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.settings-form .check { align-items: center; display: flex; gap: 8px; } .settings-form .check input { width: auto; }
.settings-log-heading { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.accounts-table-heading { color: var(--muted); display: grid; font-size: 10px; grid-template-columns: 1fr 2fr auto; letter-spacing: .08em; margin: 18px 12px 6px; text-transform: uppercase; }
#account-form { display: grid; gap: 12px; } .form-note { color: var(--muted); font-size: 13px; }
.accounts-list { display: grid; gap: 8px; margin-top: 18px; } .account-row { align-items: center; background: var(--surface-2); border-radius: 10px; display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; }
.account-row strong, .account-row span { display: block; } .account-row span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.logout-button { background: #55333a; border-radius: 8px; color: #ffb9bb; font-size: 12px; padding: 8px 10px; white-space: nowrap; }
.logout-notice, .auth-step { background: #1b2b35; border: 1px solid var(--line); border-radius: 11px; margin-top: 16px; padding: 14px; }
.logout-notice { border-color: #8c6a3d; color: #ffe0a4; } .logout-notice table { border-collapse: collapse; margin: 10px 0; width: 100%; } .logout-notice td { border-bottom: 1px solid #3a4a51; padding: 6px 0; } .logout-notice td:last-child { color: var(--text); text-align: right; } .logout-notice small { color: var(--muted); display: block; }
.auth-step { display: grid; gap: 12px; } .auth-step form { display: grid; gap: 10px; }
.guide-list { display: grid; gap: 10px; } .guide-list article { align-items: flex-start; background: var(--surface-2); border-radius: 11px; display: flex; gap: 12px; padding: 13px; } .guide-list article > b { align-items: center; background: #214257; border-radius: 8px; color: var(--accent); display: flex; flex: 0 0 32px; height: 32px; justify-content: center; } .guide-list strong { display: block; margin-bottom: 3px; } .guide-list p, .guide-warning p { color: var(--muted); font-size: 13px; margin: 0; } code { color: var(--accent); } .guide-warning { background: #332b20; border: 1px solid #8c6a3d; border-radius: 11px; color: #ffe0a4; margin-top: 14px; padding: 13px; } .guide-warning strong { display: block; margin-bottom: 4px; }
#teleport-options[hidden] { display: none !important; }
@media (max-width: 760px) { .shell { padding: 26px 16px 42px; } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hero { display: block; } .status { display: inline-block; margin-top: 17px; } .stats { gap: 7px; } .stats div { padding: 12px 10px; } .stats span { font-size: 9px; } .current-bot { align-items: flex-start; flex-wrap: wrap; padding: 17px; } .current-bot-copy { flex-basis: calc(100% - 76px); } .current-bot-copy small { white-space: normal; } .current-bot .secondary-button { margin-left: 75px; } .actions { grid-template-columns: 1fr; } .settings-grid { grid-template-columns: 1fr; } .accounts-table-heading { display: none; } }
