:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07100f;
  color: #effcf8;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #103c33, #07100f 42%); }
.shell { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #20b995; color: #06100e; font-size: 24px; font-weight: 800; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(25px, 5vw, 36px); letter-spacing: -.04em; }
h2 { font-size: 24px; letter-spacing: -.03em; }
h3 { font-size: 18px; }
.eyebrow { color: #75dfc2; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, small, footer { color: #9ab4ad; line-height: 1.55; }
.card { border: 1px solid #20443c; border-radius: 22px; background: rgba(9, 26, 23, .88); box-shadow: 0 18px 50px rgba(0, 0, 0, .24); padding: clamp(22px, 5vw, 36px); }
.card-heading, .history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.step, .success-badge { border-radius: 999px; padding: 7px 10px; color: #b9fbe9; background: #103d34; font-size: 12px; font-weight: 700; white-space: nowrap; }
.form-grid { display: grid; gap: 16px; margin-top: 26px; }
label { display: grid; gap: 8px; color: #d9eee8; font-size: 14px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #2b554b; border-radius: 12px; background: #071714; color: #effcf8; padding: 13px 14px; font: inherit; outline: none; }
input:focus, textarea:focus { border-color: #32cda7; box-shadow: 0 0 0 3px rgba(50, 205, 167, .16); }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 13px 16px; font: inherit; font-weight: 800; transition: transform .15s ease, opacity .15s ease; }
button:hover { transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .55; transform: none; }
.primary { background: #20b995; color: #04100d; }
.secondary, .ghost { border: 1px solid #2b554b; background: transparent; color: #c9e8df; }
.ghost { padding: 8px 11px; font-size: 12px; }
.status-line { display: flex; align-items: center; gap: 10px; margin-top: 28px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #efb64a; box-shadow: 0 0 0 5px rgba(239, 182, 74, .12); }
.dot.pairing { background: #7cc8ff; box-shadow: 0 0 0 5px rgba(124, 200, 255, .12); }
.dot.connected { background: #2ed49c; box-shadow: 0 0 0 5px rgba(46, 212, 156, .12); }
.dot.failed { background: #ff7777; box-shadow: 0 0 0 5px rgba(255, 119, 119, .12); }
.pairing-code-box { display: grid; gap: 8px; margin: 26px 0; padding: 22px; border: 1px dashed #38c9a6; border-radius: 16px; background: #0c322a; text-align: center; }
.pairing-code-box strong { color: #a6ffe6; font-size: clamp(30px, 8vw, 46px); letter-spacing: .12em; }
.session-reference { margin-top: 24px; font-size: 12px; }
code { color: #92e7cf; word-break: break-all; }
.notice { margin-bottom: 16px; border-radius: 12px; padding: 12px 14px; background: #173a31; color: #c8f8e9; }
.notice.error { background: #4c2425; color: #ffd0d0; }
.notice.success { background: #154b3a; color: #c9ffe9; }
.history-heading { margin-top: 34px; align-items: center; }
.history { display: grid; gap: 8px; margin-bottom: 22px; }
.history-row { display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 10px; border: 1px solid #20443c; border-radius: 10px; padding: 11px 12px; color: #c9e8df; font-size: 13px; }
.history-row time { color: #8ba69f; font-size: 11px; text-align: right; }
.direction { font-weight: 800; text-transform: capitalize; }
.direction.incoming { color: #7cc8ff; }
.direction.outgoing { color: #75dfc2; }
footer { padding: 18px 4px; font-size: 12px; text-align: center; }
[hidden] { display: none !important; }
@media (max-width: 560px) { .history-row { grid-template-columns: 1fr 1fr; } .history-row time { grid-column: 1 / -1; text-align: left; } }
