:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #090e12;
  color: #edf4f7;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #090e12; }
button, input { font: inherit; }
button {
  min-height: 42px;
  border: 1px solid #2c7180;
  border-radius: 6px;
  padding: 0 18px;
  background: #0f9f9a;
  color: #041517;
  font-weight: 700;
  cursor: pointer;
}
button.quiet { background: #141d23; color: #d7e2e7; border-color: #293942; }
button:disabled { opacity: .55; cursor: wait; }

.topbar {
  min-height: 76px;
  padding: 14px 24px;
  border-bottom: 1px solid #213039;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #0d1419;
}
h1, h2, p { margin-top: 0; }
.topbar h1 { margin-bottom: 0; font-size: 24px; line-height: 1.25; }
.eyebrow, .section-label {
  margin-bottom: 5px;
  color: #68b9c4;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.topbar-actions, .actions { display: flex; align-items: center; gap: 10px; }
.status-pill, .secure-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #31505b;
  border-radius: 999px;
  color: #a9c5ce;
  background: #132027;
  font-size: 13px;
}
.status-pill[data-state="connected"] { border-color: #247b62; color: #7ee2bd; }
.status-pill[data-state="auth_required"], .status-pill[data-state="auth_error"] { border-color: #8e5538; color: #ffb58d; }

.workspace { padding: 20px 24px 32px; display: grid; gap: 16px; }
.status-section, .auth-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.status-section { padding: 18px 0; border-bottom: 1px solid #203039; }
.status-section h2, .auth-heading h2, .news-placeholder h2 { margin-bottom: 5px; font-size: 19px; }
.muted { color: #8da2ad; line-height: 1.55; }
.auth-panel { border: 1px solid #2a3e48; background: #0d151a; }
.auth-heading { padding: 15px 18px; border-bottom: 1px solid #24353e; }
.auth-heading h2 { margin-bottom: 0; }
.auth-screen { width: 100%; height: min(72vh, 900px); min-height: 620px; overflow: hidden; background: #111; }
.auth-screen canvas { width: 100% !important; height: 100% !important; object-fit: contain; }
.news-placeholder { min-height: 180px; padding: 22px 0; border-top: 1px solid #17242b; }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(430px, 100%); padding: 34px; border: 1px solid #293b44; background: #0e171c; }
.brand-mark { width: 38px; height: 5px; margin-bottom: 24px; background: #20b6ae; }
.login-panel h1 { font-size: 27px; margin-bottom: 10px; }
.login-panel form { display: grid; gap: 10px; margin-top: 26px; }
.login-panel label { color: #aabac2; font-size: 13px; font-weight: 600; }
.login-panel input { height: 48px; border: 1px solid #30434c; border-radius: 6px; padding: 0 13px; background: #111c22; color: #fff; }
.login-panel button { margin-top: 8px; }
.error { color: #ff9a8d; font-size: 13px; }

@media (max-width: 700px) {
  .topbar, .status-section, .auth-heading { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .workspace { padding: 16px; }
  .auth-screen { min-height: 520px; }
}
