:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1a1e24;
  --line: #2a3039;
  --text: #f2f4f7;
  --muted: #979faa;
  --green: #39d98a;
  --yellow: #f5bf55;
  --red: #ff6b68;
  --blue: #7aa8ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(75, 117, 196, .16), transparent 34rem),
    radial-gradient(circle at 90% 18%, rgba(54, 182, 130, .08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }

.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 32px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; }
.muted { color: var(--muted); }

.login-card {
  width: min(430px, 100%);
  margin: 8vh auto 0;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(20, 23, 28, .92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  border-radius: 14px;
  background: linear-gradient(145deg, #7aa8ff, #6a6ee8);
  font-weight: 900;
  font-size: 22px;
}

form { display: grid; gap: 10px; margin-top: 28px; }
label { color: #c9ced6; font-size: 14px; font-weight: 650; }
input {
  width: 100%;
  margin-bottom: 8px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #0f1216;
  color: var(--text);
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(122, 168, 255, .14); }
button {
  min-height: 43px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #07101f;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { cursor: wait; opacity: .55; }
button.secondary { background: #242b35; color: var(--text); border: 1px solid #343c48; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.error { min-height: 20px; margin: 4px 0 0; color: var(--red); font-size: 14px; }

.topbar { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.topbar .muted { margin: 12px 0 0; }
.actions { display: flex; gap: 10px; }
.notice { margin-bottom: 20px; padding: 12px 15px; border: 1px solid rgba(245, 191, 85, .3); border-radius: 11px; background: rgba(245, 191, 85, .08); color: #f6cf82; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }

.account-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(27, 31, 38, .98), rgba(17, 20, 25, .98));
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.provider { display: inline-flex; align-items: center; gap: 8px; color: #cdd2d9; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.provider-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(122,168,255,.12); }
.provider-dot.claude { background: #e5895e; box-shadow: 0 0 0 4px rgba(229,137,94,.12); }
.email { margin: 10px 0 0; overflow-wrap: anywhere; font-size: 17px; font-weight: 760; }
.badge { padding: 5px 9px; border-radius: 999px; background: rgba(57, 217, 138, .1); color: var(--green); font-size: 12px; font-weight: 800; }
.badge.warning { background: rgba(245,191,85,.1); color: var(--yellow); }
.badge.error { background: rgba(255,107,104,.1); color: var(--red); }
.plan { margin-top: 6px; color: var(--muted); font-size: 13px; }
.limits { display: grid; gap: 20px; margin-top: 26px; }
.limit-row { display: grid; gap: 8px; }
.limit-meta { display: flex; justify-content: space-between; gap: 16px; color: #cdd2d9; font-size: 14px; }
.limit-meta strong { color: var(--text); }
.bar { height: 8px; overflow: hidden; border-radius: 999px; background: #292f37; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bar.warn > span { background: var(--yellow); }
.bar.danger > span { background: var(--red); }
.reset { color: var(--muted); font-size: 12px; }
.empty { padding: 36px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.card-error { margin: 22px 0 0; color: var(--yellow); font-size: 14px; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; color: #737c88; font-size: 12px; }

@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 1180px); padding-top: 28px; }
  .login-card { padding: 26px 22px; }
  .topbar { align-items: stretch; flex-direction: column; }
  .actions { width: 100%; }
  .actions button { flex: 1; }
  .account-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
