:root {
  color-scheme: dark;
  --bg: #080b12;
  --surface: #101622;
  --surface-raised: #151d2b;
  --surface-soft: #0d1320;
  --line: #263247;
  --line-strong: #35445e;
  --text: #f4f7fc;
  --muted: #9da9bc;
  --blue: #82adff;
  --green: #74e0ae;
  --amber: #f4bf62;
  --red: #ff839b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(92, 134, 224, 0.12), transparent 29rem),
    radial-gradient(circle at 95% 45%, rgba(62, 183, 132, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a,
button,
summary {
  -webkit-tap-highlight-color: transparent;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(107, 151, 255, 0.025), transparent 45%);
}

.shell {
  width: min(calc(100% - 24px), 1200px);
  margin-inline: auto;
  padding: max(12px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
}

.shell > * + * {
  margin-top: 16px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.18;
}

h1 {
  font-size: clamp(1.65rem, 6vw, 2.65rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1rem;
}

h4 {
  font-size: 0.95rem;
}

.eyebrow,
dt,
.quota-kind {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topbar,
.panel,
.account-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(20, 28, 43, 0.97), rgba(12, 17, 28, 0.97));
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  background: url("./token-checker-mark.ef6ee7e8d450.svg") center / contain no-repeat;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 9px 14px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button-primary {
  width: 100%;
  background: linear-gradient(180deg, #21304b, #18243a);
}

.button-quiet {
  background: rgba(12, 18, 29, 0.74);
}

.button:hover {
  border-color: #60789d;
}

.button:active {
  transform: translateY(1px);
}

.button:focus-visible,
summary:focus-visible,
input:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(130, 173, 255, 0.42);
  outline-offset: 2px;
}

.priority-section {
  min-width: 0;
}

.priority-heading {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 4px 2px 0;
}

.priority-copy {
  min-width: 0;
}

.priority-copy h1 {
  margin-top: 5px;
}

.priority-copy > p:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.priority-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  min-height: 58px;
  padding: 9px 11px;
  background: rgba(11, 18, 29, 0.72);
}

.system-status > span:last-child {
  display: grid;
  min-width: 0;
}

.system-status small {
  color: var(--muted);
  font-size: 0.7rem;
}

.system-status strong {
  overflow-wrap: anywhere;
}

.refresh-status,
.reset-credit-summary {
  display: grid;
  min-width: 0;
  min-height: 58px;
  align-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  background: rgba(11, 18, 29, 0.72);
}

.refresh-status small,
.reset-credit-summary small {
  color: var(--muted);
  font-size: 0.7rem;
}

.refresh-status strong,
.reset-credit-summary strong {
  margin-top: 2px;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.reset-credit-summary {
  grid-column: 1 / -1;
}

.reset-credit-summary.reset-credit-available {
  border-color: #426a5c;
  background: linear-gradient(145deg, rgba(24, 66, 52, 0.88), rgba(14, 35, 30, 0.88));
}

.reset-credit-summary.reset-credit-available strong {
  color: var(--green);
}

.reset-credit-summary.reset-credit-empty {
  border-color: #695126;
  background: linear-gradient(145deg, rgba(52, 37, 16, 0.88), rgba(27, 22, 16, 0.88));
}

.reset-credit-summary.reset-credit-empty strong {
  color: var(--amber);
}

.reset-credit-summary strong {
  font-size: 1.08rem;
}

.status-light {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: radial-gradient(circle at 30% 25%, #a1f3ce, #32ad79);
  box-shadow: 0 0 25px rgba(77, 213, 151, 0.24);
}

.system-status.status-warning {
  border-color: #695126;
  background: linear-gradient(145deg, rgba(52, 37, 16, 0.88), rgba(27, 22, 16, 0.88));
}

.status-warning .status-light {
  background: radial-gradient(circle at 30% 25%, #ffd78b, #d88b22);
  box-shadow: 0 0 25px rgba(244, 191, 98, 0.22);
}

.notice {
  border: 1px solid #3c5272;
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(54, 86, 132, 0.17);
  color: #dae7fb;
  overflow-wrap: anywhere;
}

.panel,
.account-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  padding: 16px;
}

.section-heading {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
}

.section-heading > div {
  min-width: 0;
}

.section-heading h2 {
  margin-top: 4px;
}

.section-heading > span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.8rem;
}

.status-pill,
.account-status,
.quota-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cad5e6;
  font-size: 0.72rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.status-pill.status-ready,
.account-status.status-ready {
  border-color: #315e4d;
  color: var(--green);
}

.status-pill.status-warning,
.account-status.status-warning {
  border-color: #6b5129;
  color: var(--amber);
}

.section-intro {
  margin-top: 12px;
  color: #c5cede;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.section-intro strong {
  color: var(--text);
}

.js-countdown {
  font-variant-numeric: tabular-nums;
}

.notification-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.notification-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface-soft);
}

.notification-card > header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}

.notification-card > header > div {
  min-width: 0;
}

.notification-card h3,
.notification-card p {
  overflow-wrap: anywhere;
}

.notification-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #362b16;
  color: var(--amber);
  font-weight: 800;
}

.facts-grid,
.account-meta,
.usage-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.facts-grid {
  margin-top: 12px;
}

.facts-grid > div,
.account-meta > div,
.usage-stats > div {
  min-width: 0;
  border: 1px solid #26344a;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(14, 21, 34, 0.78);
}

dd {
  margin-top: 4px;
  color: #dce5f4;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.facts-grid dd small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.empty-state {
  min-width: 0;
  margin-top: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  padding: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.panel-warning {
  margin-top: 14px;
  border-top: 1px solid #4e3d24;
  padding-top: 12px;
  color: var(--amber);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.secondary-panel {
  padding: 0;
  overflow: hidden;
}

.secondary-panel > summary {
  min-height: 64px;
  padding: 12px 16px;
}

.secondary-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.secondary-heading > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.secondary-heading > span:first-child > strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.secondary-panel-content {
  padding: 0 16px 16px;
}

.accounts-section,
.accounts,
.account-card,
.account-header,
.account-identity,
.account-identity > div,
.quota-grid,
.quota-card,
.account-secondary,
.usage-content {
  min-width: 0;
}

.model-filter {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: rgba(11, 17, 28, 0.72);
}

.model-filter-options {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.model-filter-button {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 4px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.model-filter-button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.model-filter-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.model-filter-button.is-active {
  border-color: #395176;
  background: #17243a;
  color: #d0e2ff;
}

.model-filter-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.accounts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.account-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.account-identity {
  display: flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
}

.account-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #395176;
  border-radius: 11px;
  background: #17243a;
  color: #d0e2ff;
  font-weight: 800;
}

.account-identity h3,
.account-identity p {
  overflow-wrap: anywhere;
}

.account-identity p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.account-status {
  gap: 6px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.reset-credit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.reset-credit-badge.reset-credit-available {
  border-color: #426a5c;
  background: rgba(21, 63, 49, 0.35);
  color: var(--green);
}

.reset-credit-badge.reset-credit-empty {
  border-color: #695126;
  background: rgba(64, 43, 13, 0.35);
  color: var(--amber);
}

.account-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.account-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-error,
.provider-state {
  margin-top: 10px;
  border: 1px solid #613246;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(87, 29, 48, 0.2);
  color: #ffb2c1;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 10px;
  margin-top: 10px;
}

.quota-card {
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  gap: 10px;
  border: 1px solid #2a3c5a;
  border-radius: var(--radius-md);
  padding: 14px;
  background: #0d1524;
}

.quota-card[hidden] {
  display: none;
}

.quota-card.quota-low {
  border-color: #735b25;
}

.quota-card.quota-exhausted {
  border-color: #71364a;
}

.quota-header {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
}

.quota-header > div {
  min-width: 0;
}

.quota-header h4 {
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.quota-status {
  border-color: #315e4d;
  color: var(--green);
}

.quota-low .quota-status {
  border-color: #735b25;
  color: var(--amber);
}

.quota-exhausted .quota-status {
  border-color: #71364a;
  color: var(--red);
}

.quota-primary {
  display: grid;
  min-width: 0;
  gap: 8px;
}

@container (min-width: 560px) {
  .quota-primary {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    align-items: end;
  }
}

.quota-remaining {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.quota-remaining strong {
  font-size: clamp(2.3rem, 10vw, 3.4rem);
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

.quota-remaining sup {
  font-size: 1rem;
}

.quota-remaining span,
.quota-meta,
.quota-reset > span {
  color: var(--muted);
  font-size: 0.74rem;
}

.quota-reset {
  display: grid;
  min-width: 0;
  align-content: center;
  border: 1px solid #2b3d5a;
  border-radius: 11px;
  padding: 9px 10px;
  background: rgba(18, 28, 45, 0.74);
}

.quota-reset strong {
  margin-top: 3px;
  font-size: clamp(0.82rem, 3.5vw, 1.08rem);
  line-height: 1.3;
  overflow-wrap: normal;
  white-space: nowrap;
}

.quota-reset-date {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: #1b2840;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 220ms ease, background 220ms ease;
}

.progress-green i {
  background: linear-gradient(90deg, #39cfa0, var(--green));
}

.progress-yellow i {
  background: linear-gradient(90deg, #f2c94c, #e0b63f);
}

.progress-orange i {
  background: linear-gradient(90deg, #f5a242, #ed7b3b);
}

.progress-red i {
  background: linear-gradient(90deg, #e85f7c, var(--red));
}

.quota-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
}

.provider-state {
  margin-top: 0;
}

.quota-policy-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.account-secondary,
.activity-more {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 17, 28, 0.7);
}

.account-secondary-content {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.account-secondary-content > .usage-content {
  margin-top: 10px;
  padding: 10px 0 0;
}

summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.details-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

summary i {
  display: inline-block;
  transition: transform 160ms ease;
}

details[open] summary i {
  transform: rotate(180deg);
}

.when-open {
  display: none;
}

details[open] > summary .when-open {
  display: inline;
}

details[open] > summary .when-closed {
  display: none;
}

.usage-content {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.usage-stats {
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
}

.usage-stats dd {
  font-size: 1rem;
  font-weight: 750;
}

.usage-chart {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 96px;
  grid-auto-columns: 22px;
  grid-auto-flow: column;
  align-items: end;
  gap: 7px;
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.usage-chart span {
  position: relative;
  display: flex;
  height: 78px;
  align-items: flex-end;
  justify-content: center;
}

.usage-chart i {
  display: block;
  width: 14px;
  min-height: 4px;
  max-height: 100%;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #9dc6ff, #528eea);
}

.activity-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.activity-list article {
  display: grid;
  min-width: 0;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  background: var(--surface-soft);
}

.event-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: #8192ac;
}

.event-quota_low,
.event-check_failed,
.event-notification_failed {
  background: var(--amber);
}

.event-quota_reset,
.event-check_succeeded,
.event-notification_sent {
  background: var(--green);
}

.activity-list p {
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.activity-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.activity-more {
  background: transparent;
}

.activity-more > summary {
  justify-content: center;
  color: #cbd8eb;
}

.activity-more > summary i {
  color: var(--muted);
}

.activity-more > .activity-list {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 10px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 0 3px;
  color: #7f8ca1;
  font-size: 0.76rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.auth-shell {
  display: grid;
  width: min(calc(100% - 24px), 440px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
}

.auth-card {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(145deg, rgba(21, 29, 44, 0.98), rgba(12, 17, 28, 0.98));
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.auth-brand > div {
  min-width: 0;
}

.auth-brand h1 {
  margin-top: 3px;
  font-size: clamp(1.55rem, 8vw, 2rem);
  overflow-wrap: anywhere;
}

.auth-copy,
.auth-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #d6dfef;
  font-size: 0.8rem;
}

.auth-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 11px;
  background: #0c1423;
  color: var(--text);
}

.auth-error {
  color: #ffadb8;
  font-size: 0.82rem;
}

@media (min-width: 480px) {
  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts-grid > div:last-child {
    grid-column: 1 / -1;
  }

}

@media (min-width: 640px) {
  .shell {
    width: min(calc(100% - 32px), 1200px);
    padding-top: 18px;
  }

  .shell > * + * {
    margin-top: 18px;
  }

  .priority-heading {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
    align-items: end;
  }

  .panel,
  .account-card {
    padding: 20px;
  }

  .secondary-panel {
    padding: 0;
  }

  .model-filter {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .model-filter-summary {
    padding-right: 6px;
    text-align: right;
    white-space: nowrap;
  }

}

@media (min-width: 760px) {
  .facts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .facts-grid > div:last-child {
    grid-column: auto;
  }
}

@media (min-width: 900px) {
  .priority-status {
    min-width: 390px;
  }
}

@media (min-width: 1040px) {
  .notification-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-raised: #edf2f8;
    --surface-soft: #f6f8fc;
    --line: #d7e0ec;
    --line-strong: #bcc9d9;
    --text: #172033;
    --muted: #607089;
    --blue: #2468c9;
    --green: #087a52;
    --amber: #9a5b00;
    --red: #b42343;
    --shadow: 0 18px 50px rgba(50, 70, 100, 0.12);
  }

  body {
    background:
      radial-gradient(circle at 8% 0%, rgba(72, 124, 219, 0.13), transparent 29rem),
      radial-gradient(circle at 95% 45%, rgba(40, 159, 112, 0.1), transparent 32rem),
      var(--bg);
  }

  .ambient {
    background: linear-gradient(120deg, rgba(75, 122, 204, 0.05), transparent 45%);
  }

  .topbar,
  .panel,
  .account-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 253, 0.99));
  }

  .button-primary {
    background: linear-gradient(180deg, #2869bd, #1e56a0);
    color: #ffffff;
  }

  .button-quiet {
    background: rgba(255, 255, 255, 0.8);
  }

  .button:hover {
    border-color: #7794ba;
  }

  .system-status,
  .refresh-status {
    background: rgba(255, 255, 255, 0.82);
  }

  .reset-credit-summary.reset-credit-available {
    border-color: #72ad96;
    background: linear-gradient(145deg, #e3f6ee, #f0faf6);
  }

  .reset-credit-summary.reset-credit-available small {
    color: #3f6d5c;
  }

  .reset-credit-summary.reset-credit-available strong {
    color: #056542;
  }

  .reset-credit-summary.reset-credit-empty {
    border-color: #d7a952;
    background: linear-gradient(145deg, #fff4d9, #fffaf0);
  }

  .reset-credit-summary.reset-credit-empty small {
    color: #765520;
  }

  .reset-credit-summary.reset-credit-empty strong {
    color: #8a5200;
  }

  .reset-credit-badge.reset-credit-empty {
    border-color: #c79a4f;
    background: #fff3d6;
    color: #8a5200;
  }

  .system-status.status-warning {
    border-color: #d7a952;
    background: linear-gradient(145deg, rgba(255, 248, 230, 0.96), rgba(255, 252, 244, 0.96));
  }

  .notice {
    border-color: #9bb9df;
    background: rgba(205, 225, 249, 0.55);
    color: #234c7c;
  }

  .status-pill,
  .account-status,
  .quota-status {
    color: #52637a;
  }

  .status-pill.status-ready,
  .account-status.status-ready,
  .quota-status {
    border-color: #66a991;
  }

  .status-pill.status-warning,
  .account-status.status-warning,
  .quota-low .quota-status {
    border-color: #c79a4f;
  }

  .section-intro {
    color: #485a73;
  }

  .notification-icon {
    background: #fff0cf;
  }

  .facts-grid > div,
  .account-meta > div,
  .usage-stats > div {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.84);
  }

  dd {
    color: var(--text);
  }

  .panel-warning {
    border-top-color: #d9b46d;
  }

  .model-filter {
    background: rgba(255, 255, 255, 0.78);
  }

  .model-filter-button.is-active {
    border-color: #9bbbe4;
    background: #e6f0ff;
    color: #174c8f;
  }

  .account-avatar {
    border-color: #9bbbe4;
    background: #e6f0ff;
    color: #174c8f;
  }

  .account-error,
  .provider-state {
    border-color: #df9bad;
    background: #fff0f3;
    color: #9f1d3a;
  }

  .quota-card {
    border-color: #c9d7e8;
    background: #ffffff;
  }

  .quota-card.quota-low {
    border-color: #d7ad63;
  }

  .quota-card.quota-exhausted,
  .quota-exhausted .quota-status {
    border-color: #d494a5;
  }

  .quota-reset {
    border-color: #d0dcea;
    background: #f4f8fd;
  }

  .progress {
    background: #dce5f1;
  }

  .account-secondary,
  .activity-more {
    background: rgba(255, 255, 255, 0.7);
  }

  .event-dot {
    background: #64748b;
  }

  .activity-more > summary {
    color: var(--text);
  }

  footer {
    color: #68778d;
  }

  .auth-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 253, 0.99));
  }

  .auth-form label {
    color: var(--text);
  }

  .auth-form input {
    background: #ffffff;
  }

  .auth-error {
    color: var(--red);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
