:root {
  color-scheme: dark;
  --bg: #080d19;
  --surface: rgba(18, 26, 43, .86);
  --surface-2: #151e30;
  --border: rgba(157, 176, 210, .16);
  --text: #f3f6fc;
  --muted: #95a2b8;
  --accent: #6ee7b7;
  --accent-strong: #39d69b;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font: 15px/1.55 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(32, 190, 142, .12), transparent 28rem),
    radial-gradient(circle at 92% 75%, rgba(71, 104, 180, .12), transparent 34rem), var(--bg);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.page-shell { width: min(1180px, calc(100% - 40px)); min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #81f2c7, #31b984); color: #062118; font-size: 20px; font-weight: 900; box-shadow: 0 8px 24px rgba(48, 210, 150, .22); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 11px; }
.session-actions { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(110, 231, 183, .1); }
main { flex: 1; }
.auth-layout { min-height: calc(100vh - 145px); display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(40px, 9vw, 130px); align-items: center; padding: 64px 6%; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.intro h1, .console-heading h1 { margin: 0; line-height: 1.14; letter-spacing: -.035em; }
.intro h1 { font-size: clamp(38px, 5vw, 64px); }
.intro h1 span { color: var(--accent); }
.intro-copy { max-width: 620px; margin: 24px 0; color: var(--muted); font-size: 16px; }
.trust-note { display: flex; gap: 13px; align-items: center; max-width: 500px; padding: 14px 16px; border: 1px solid rgba(110, 231, 183, .15); border-radius: 13px; background: rgba(110, 231, 183, .055); }
.trust-note span { color: var(--muted); font-size: 13px; }
.shield { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--accent) !important; background: rgba(110, 231, 183, .12); font-weight: 800; }
.panel { border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(24, 34, 54, .92), rgba(15, 23, 38, .92)); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-card { padding: 30px; }
.panel-heading { display: flex; gap: 13px; align-items: center; margin-bottom: 25px; }
.panel-heading.compact { margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 18px; }
.panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.icon-box, .step, .pulse-icon { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--accent); background: rgba(110, 231, 183, .1); font-weight: 800; }
label { display: block; margin-bottom: 7px; color: #cbd4e3; font-size: 12px; font-weight: 650; }
input { width: 100%; height: 46px; border: 1px solid var(--border); border-radius: 10px; outline: 0; background: rgba(6, 12, 23, .7); color: var(--text); padding: 0 13px; transition: border .2s, box-shadow .2s; }
input::placeholder { color: #626e82; }
input:focus { border-color: rgba(110, 231, 183, .62); box-shadow: 0 0 0 3px rgba(110, 231, 183, .1); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.reveal-button { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); padding: 7px; cursor: pointer; font-size: 11px; }
.button { min-height: 42px; border: 1px solid transparent; border-radius: 10px; padding: 0 17px; font-weight: 750; cursor: pointer; transition: transform .15s, filter .15s, background .15s; }
.button:hover:not(:disabled) { filter: brightness(1.08); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { background: var(--accent-strong); color: #052219; }
.button-wide { width: 100%; }
.login-card .button-wide { margin-top: 20px; }
.button-ghost { border-color: var(--border); background: rgba(255,255,255,.025); color: #c9d3e3; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; }
.button-danger { border-color: rgba(251, 113, 133, .25); background: rgba(251, 113, 133, .08); color: #fda4af; }
.form-error { margin: 10px 0 0; color: #fda4af; font-size: 12px; }
.console-view { padding: 46px 0 70px; }
.console-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 27px; }
.console-heading h1 { font-size: 35px; }
.console-heading > div > p:last-child { margin: 7px 0 0; color: var(--muted); }
.status-pill { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 12px; }
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill[data-tone="active"] { color: var(--accent); border-color: rgba(110,231,183,.2); }
.status-pill[data-tone="warning"] { color: var(--warning); }
.status-pill[data-tone="error"] { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 20px; align-items: start; }
.left-column { display: grid; gap: 20px; }
.task-panel, .two-factor-panel, .browser-panel, .status-panel { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy-line { margin: 15px 0 18px; color: var(--muted); font-size: 11px; }
.privacy-line span { color: var(--accent); }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
#twoFactorCode { letter-spacing: .3em; font-size: 17px; }
.browser-heading { align-items: center; }
.browser-heading .button { margin-left: auto; white-space: nowrap; }
.browser-warning { margin: -5px 0 14px; padding: 10px 12px; border-radius: 9px; background: rgba(251,191,36,.08); color: #fcd97b; font-size: 11px; }
.browser-panel iframe { display: block; width: 100%; height: clamp(420px, 58vh, 680px); border: 1px solid var(--border); border-radius: 11px; background: #05080f; }
.status-panel { position: sticky; top: 20px; }
.pulse-icon { font-size: 10px; }
.status-hero { padding: 20px 6px 25px; text-align: center; }
.status-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: auto; border-radius: 50%; color: var(--muted); background: rgba(148,163,184,.08); font-size: 22px; font-weight: 900; }
.status-icon[data-tone="active"] { color: var(--accent); background: rgba(110,231,183,.1); }
.status-icon[data-tone="warning"] { color: var(--warning); background: rgba(251,191,36,.1); }
.status-icon[data-tone="error"] { color: var(--danger); background: rgba(251,113,133,.1); }
.status-hero h3 { margin: 14px 0 6px; font-size: 17px; }
.status-hero p { min-height: 43px; margin: 0; color: var(--muted); font-size: 12px; }
.error-box { margin: 0 0 18px; padding: 12px; border: 1px solid rgba(251,113,133,.2); border-radius: 10px; background: rgba(251,113,133,.07); color: #fecdd3; font-size: 12px; }
.error-box p { margin: 3px 0 0; color: #fda4af; overflow-wrap: anywhere; }
.status-meta { margin: 0 0 18px; border-top: 1px solid var(--border); }
.status-meta div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.status-meta dt { color: var(--muted); }
.status-meta dd { margin: 0; color: #dbe4f2; text-align: right; overflow-wrap: anywhere; }
footer { padding: 18px; border-top: 1px solid var(--border); color: #657187; text-align: center; font-size: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(360px, calc(100vw - 48px)); padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: #172136; box-shadow: var(--shadow); color: #e7edf7; font-size: 12px; }
@media (max-width: 850px) {
  .auth-layout { grid-template-columns: 1fr; gap: 35px; padding: 55px 3%; }
  .intro h1 { font-size: 44px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .status-panel { position: static; grid-row: 1; }
}
@media (max-width: 600px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .topbar { height: 70px; }
  .brand small, .session-actions > span:not(.online-dot) { display: none; }
  .auth-layout { min-height: auto; padding: 46px 0 60px; }
  .intro h1 { font-size: 37px; }
  .intro-copy { font-size: 14px; }
  .login-card, .task-panel, .two-factor-panel, .browser-panel, .status-panel { padding: 19px; }
  .console-view { padding-top: 34px; }
  .console-heading { align-items: start; gap: 18px; }
  .console-heading h1 { font-size: 29px; }
  .console-heading > div > p:last-child { font-size: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .code-row { grid-template-columns: 1fr; }
  .browser-heading { flex-wrap: wrap; }
  .browser-heading .button { margin-left: 51px; }
  .browser-panel iframe { height: 480px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
