:root {
  --bg: #000;
  --panel: rgba(8, 8, 8, 0.94);
  --panel-solid: #080808;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f4f4f4;
  --muted: #969696;
  --accent: #88f2bd;
  --accent-strong: #5ce8a4;
  --danger: #ff837d;
  --warning: #ffc96b;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 12% -20%, #151515 0, transparent 38%), var(--bg); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; border-radius: 999px; filter: blur(110px); opacity: .14; pointer-events: none; }
.ambient-one { width: 340px; height: 340px; background: #244438; top: 6%; right: -120px; }
.ambient-two { width: 280px; height: 280px; background: #252525; bottom: -130px; left: -100px; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(480px, 100%); padding: 48px; border: 1px solid var(--line); border-radius: 28px; background: rgba(7, 7, 7, .94); box-shadow: var(--shadow); backdrop-filter: blur(22px); }
.login-card h1 { margin: 10px 0 12px; font-size: clamp(38px, 8vw, 58px); line-height: .95; letter-spacing: -.055em; }
.login-copy { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 34px; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.login-card form { display: grid; gap: 10px; }
.login-card form > label:not(#invite-field) { margin-top: 4px; }
.login-card #auth-submit { width: 100%; margin-top: 10px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: -14px 0 24px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #050505; }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 700; }
.auth-tabs button.active { color: var(--text); background: #171717; }

.brand-mark { display: flex; align-items: flex-end; gap: 4px; width: 42px; height: 34px; margin-bottom: 28px; }
.brand-mark span { display: block; width: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 20px rgba(92, 232, 164, .38); }
.brand-mark span:nth-child(1) { height: 45%; }.brand-mark span:nth-child(2) { height: 100%; }.brand-mark span:nth-child(3) { height: 70%; }
.brand-mark.small { width: 31px; height: 25px; margin: 0; gap: 3px; }.brand-mark.small span { width: 7px; }
.eyebrow { margin: 0; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .17em; }

.app-shell { width: min(1380px, 100%); margin: 0 auto; padding: 26px 34px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.brand-row, .top-actions, .connection-content, .button-row, .form-actions { display: flex; align-items: center; }
.brand-row { gap: 15px; }.brand-row h1 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.025em; }
.top-actions { gap: 10px; }
.user-label { max-width: 140px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(9, 9, 9, .9); font-size: 12px; font-weight: 650; }
.pill i, .dialog-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 14px currentColor; }
.pill.online { color: var(--accent); }.pill.online i { background: var(--accent); }.pill.offline i { background: var(--danger); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; transition: .2s ease; }
.icon-button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.04); }

.panel { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 18px 55px rgba(0,0,0,.16); backdrop-filter: blur(18px); }
.hero-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.window-card, .connection-card { padding: 26px; min-height: 230px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.panel-heading h2 { margin: 7px 0 0; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.045em; }
.panel-heading.compact { align-items: center; }.panel-heading.compact h2 { font-size: 22px; }

.switch { position: relative; cursor: pointer; }.switch input { position: absolute; opacity: 0; pointer-events: none; }.switch span { display: block; width: 48px; height: 28px; border-radius: 99px; background: #171717; border: 1px solid var(--line); transition: .2s; }.switch span::after { content: ""; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: #777; transition: .2s; }.switch input:checked + span { background: rgba(92,232,164,.2); border-color: rgba(92,232,164,.44); }.switch input:checked + span::after { transform: translateX(20px); background: var(--accent); box-shadow: 0 0 16px rgba(92,232,164,.45); }

.timeline { margin: 36px 0 24px; }.timeline-track { height: 6px; border-radius: 99px; background: #191919; overflow: hidden; }.timeline-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent-strong), #bdffe0); border-radius: inherit; transition: width .5s; }.timeline-labels { display: flex; justify-content: space-between; margin-top: 10px; color: #777; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.metric-row > div { display: grid; gap: 5px; }.metric-label { color: var(--muted); font-size: 11px; }.metric-row strong { font-size: 14px; font-weight: 630; }

.connection-card { display: flex; flex-direction: column; }.connection-content { gap: 16px; margin: 28px 0 auto; }.connection-icon { display: grid; place-items: center; flex: 0 0 54px; height: 54px; border-radius: 17px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--accent); font-size: 28px; }.connection-content h2 { margin: 0 0 6px; font-size: 18px; }.connection-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }.button-row { gap: 10px; margin-top: 24px; }

.content-grid { display: grid; grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); gap: 18px; }
.schedule-panel, .schedule-list-panel, .history-panel { padding: 26px; }
.schedule-editor-panel { overflow: hidden; }
.history-wide { grid-column: 1 / -1; }
.count-badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent); background: rgba(136,242,189,.06); font-size: 10px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; }
.editor-status { display: flex; align-items: center; gap: 12px; }
.small-add { min-height: 36px; padding: 0 12px; border: 1px solid rgba(136,242,189,.26); border-radius: 10px; color: var(--accent); background: rgba(136,242,189,.07); cursor: pointer; font-weight: 720; }
.schedule-list { display: grid; gap: 9px; margin-top: 22px; max-height: 620px; overflow: auto; }
.schedule-list-empty, .editor-empty { display: grid; place-items: center; min-height: 220px; padding: 24px; color: var(--muted); text-align: center; line-height: 1.55; }
.schedule-item { display: grid; gap: 7px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: .2s; }
.schedule-item:hover, .schedule-item.selected { border-color: rgba(136,242,189,.38); background: rgba(136,242,189,.07); }
.schedule-item.selected { box-shadow: inset 3px 0 var(--accent); }
.schedule-item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.schedule-item-top strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-item-top i { flex: 0 0 8px; height: 8px; border-radius: 50%; background: #53665f; }
.schedule-item-top i.enabled { background: var(--accent); box-shadow: 0 0 12px rgba(92,232,164,.45); }
.schedule-item-time { color: var(--accent); font-size: 10px; }
.schedule-item-prompt { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
label, fieldset { display: grid; gap: 8px; color: #cfcfcf; font-size: 12px; font-weight: 620; }
fieldset { border: 0; padding: 0; margin: 24px 0; } legend { margin-bottom: 10px; }
input, textarea, select { width: 100%; color: var(--text); border: 1px solid var(--line); background: #050505; border-radius: 12px; outline: none; transition: border .2s, box-shadow .2s; }
input, select { height: 44px; padding: 0 13px; } textarea { resize: vertical; min-height: 116px; padding: 13px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: rgba(92,232,164,.52); box-shadow: 0 0 0 3px rgba(92,232,164,.08); }
.field-grid { display: grid; gap: 16px; margin-top: 24px; }.field-grid.two { grid-template-columns: 1fr 1fr; }
.field-hint { display: flex; justify-content: flex-end; color: #6d867c; font-size: 10px; font-weight: 500; }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }.weekday-picker label { position: relative; overflow: hidden; }.weekday-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }.weekday-picker span { display: grid; place-items: center; height: 38px; border-radius: 11px; border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: .2s; }.weekday-picker input:checked + span { color: #06110d; background: var(--accent); border-color: var(--accent); font-weight: 760; }
.form-actions { gap: 10px; margin-top: 27px; }.form-actions button { flex: 1; }
button.primary, button.secondary, button.quiet { min-height: 44px; padding: 0 18px; border-radius: 12px; cursor: pointer; font-weight: 720; transition: transform .15s, opacity .15s, background .15s; }
button.primary { color: #06110d; background: var(--accent); border: 1px solid var(--accent); }.primary:hover { background: #a1f8cd; }.secondary { background: rgba(136,242,189,.07); border: 1px solid rgba(136,242,189,.26); color: var(--accent); }.secondary:hover { background: rgba(136,242,189,.12); }.quiet { background: transparent; border: 1px solid var(--line); color: var(--muted); } button:active { transform: translateY(1px); } button:disabled { opacity: .45; cursor: wait; }
.danger-button { min-height: 44px; padding: 0 16px; border: 1px solid rgba(255,131,125,.25); border-radius: 12px; color: var(--danger); background: transparent; cursor: pointer; font-weight: 700; }
.save-state { color: var(--muted); font-size: 11px; }.save-state.dirty { color: var(--warning); }.form-error { min-height: 18px; margin: 10px 0 0; color: var(--danger); font-size: 12px; }

.history-list { display: grid; gap: 10px; margin-top: 23px; max-height: 570px; overflow: auto; padding-right: 3px; }.history-empty { display: grid; place-items: center; min-height: 260px; color: var(--muted); text-align: center; line-height: 1.6; }.history-item { padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }.history-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }.history-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 730; text-transform: uppercase; letter-spacing: .06em; }.history-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }.history-status.success { color: var(--accent); }.history-status.success i { background: var(--accent); }.history-status.failed { color: var(--danger); }.history-status.failed i { background: var(--danger); }.history-time { color: #858585; font-size: 10px; }.history-prompt { margin: 12px 0 0; color: #d0d0d0; font-size: 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }.history-result { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }.history-meta { display: flex; justify-content: space-between; margin-top: 12px; color: #747474; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }

dialog { width: min(520px, calc(100% - 32px)); color: var(--text); border: 1px solid var(--line-strong); border-radius: 24px; background: #080808; box-shadow: var(--shadow); padding: 30px; } dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(7px); }.dialog-close { position: absolute; top: 17px; right: 17px; border: 0; background: transparent; color: var(--muted); font-size: 26px; cursor: pointer; }.dialog-copy { color: var(--muted); line-height: 1.55; font-size: 13px; }.verification-link { display: block; margin-top: 23px; padding: 13px; border-radius: 12px; text-align: center; text-decoration: none; color: #06110d; background: var(--accent); font-weight: 730; }.verification-link.disabled { opacity: .45; pointer-events: none; }.device-code { display: grid; width: 100%; margin-top: 12px; padding: 17px; border: 1px dashed rgba(136,242,189,.35); border-radius: 14px; background: rgba(136,242,189,.05); cursor: pointer; }.device-code span { color: var(--accent); font: 720 28px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }.device-code small { margin-top: 5px; color: var(--muted); }.device-message { min-height: 46px; max-height: 110px; overflow: auto; white-space: pre-wrap; color: #999; background: #020202; border-radius: 12px; padding: 12px; font-size: 10px; }.dialog-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.dialog-action { width: 100%; margin-top: 12px; }
#invite-code-output span { overflow-wrap: anywhere; font-size: clamp(14px, 4vw, 22px); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 12px 16px; color: #07110f; background: var(--accent); border-radius: 999px; font-size: 12px; font-weight: 730; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow); }.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) { .hero-grid, .content-grid { grid-template-columns: 1fr; }.history-wide { grid-column: auto; }.schedule-list { max-height: 360px; }.history-list { max-height: none; }.connection-card { min-height: 215px; } }
@media (max-width: 600px) { .app-shell { padding: 18px 14px 36px; }.topbar { margin-bottom: 22px; }.brand-row h1 { font-size: 17px; }.pill span, .user-label { display: none; }.window-card, .connection-card, .schedule-panel, .schedule-list-panel, .history-panel { padding: 20px; border-radius: 18px; }.field-grid.two, .metric-row { grid-template-columns: 1fr; }.weekday-picker { grid-template-columns: repeat(4, 1fr); }.password-row { grid-template-columns: 1fr; }.login-card { padding: 32px 24px; }.form-actions { flex-direction: column; }.form-actions button { width: 100%; }.timeline-labels span:nth-child(2) { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
