/* Ninjamatic Account – base styles (scaffold, light theme, mobile-first) */

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

* {
  margin: 0;
}

:root {
  /*
   * Skalenrollen (Primary / Success / Warning / Danger / Info):
   * 50–100  dezente Hintergründe
   * 200–300 Borders, Focus-Flächen und passive Highlights
   * 400–500 Marken- und Statusakzente
   * 600–700 Hover, aktive Zustände und Links
   * 800–900 Text auf hellen semantischen Flächen
   */

  /* =========================================================
   * Neutral
   * ======================================================= */

  --color-bg: #f7f8fc;
  --color-surface: #ffffff;
  --color-text: #1a1d23;
  --color-text-muted: #667085;
  --color-border: #e4e7ec;

  /* =========================================================
   * Primary — modernes, frisches Produkt-Lila
   * ======================================================= */

  --color-primary-50: #f5f2ff;
  --color-primary-100: #ece6ff;
  --color-primary-200: #d9ccff;
  --color-primary-300: #bfa8ff;
  --color-primary-400: #a084ff;
  --color-primary-500: #7c5cfc;
  --color-primary-600: #6b46f2;
  --color-primary-700: #5836d6;
  --color-primary-800: #472cb0;
  --color-primary-900: #39258a;

  /* =========================================================
   * Success — frisch und freundlich
   * ======================================================= */

  --color-success-50: #f0fdf4;
  --color-success-100: #dcfce7;
  --color-success-200: #bbf7d0;
  --color-success-300: #86efac;
  --color-success-400: #4ade80;
  --color-success-500: #22c55e;
  --color-success-600: #16a34a;
  --color-success-700: #15803d;
  --color-success-800: #166534;
  --color-success-900: #14532d;

  /* =========================================================
   * Warning — basiert auf #F9F871
   * ======================================================= */

  --color-warning-50: #fffef0;
  --color-warning-100: #fffdcb;
  --color-warning-200: #fcfba1;
  --color-warning-300: #f9f871;
  --color-warning-400: #f3e94d;
  --color-warning-500: #e7d72d;
  --color-warning-600: #c8b51c;
  --color-warning-700: #9e8b17;
  --color-warning-800: #766714;
  --color-warning-900: #544a12;

  /* =========================================================
   * Danger — Ninjamatic Marketing-Akzent #FC5757
   * ======================================================= */

  --color-danger-50: #fff2f2;
  --color-danger-100: #ffe1e1;
  --color-danger-200: #ffc5c5;
  --color-danger-300: #ff9a9a;
  --color-danger-400: #ff7373;
  --color-danger-500: #fc5757;
  --color-danger-600: #e64040;
  --color-danger-700: #be3030;
  --color-danger-800: #982929;
  --color-danger-900: #772525;

  /* =========================================================
   * Info — frisches, helles Blau
   * ======================================================= */

  --color-info-50: #effaff;
  --color-info-100: #ddf5ff;
  --color-info-200: #b8eafe;
  --color-info-300: #87dbfc;
  --color-info-400: #5ac8fa;
  --color-info-500: #32b5f0;
  --color-info-600: #1597d4;
  --color-info-700: #1179aa;
  --color-info-800: #12658a;
  --color-info-900: #14546f;

  /* =========================================================
   * Semantic aliases
   * Komponenten verwenden bevorzugt diese Tokens.
   * ======================================================= */

  --color-primary: var(--color-primary-500);
  --color-primary-hover: var(--color-primary-600);
  --color-primary-active: var(--color-primary-700);
  --color-focus: var(--color-primary-300);

  --color-success: var(--color-success-500);
  --color-warning: var(--color-warning-300);
  --color-danger: var(--color-danger-500);
  --color-info: var(--color-info-400);

  /* =========================================================
   * Semantic component colors
   * Für Alerts, Badges, Validierung und Statusflächen.
   * ======================================================= */

  --color-success-bg: var(--color-success-50);
  --color-success-border: var(--color-success-200);
  --color-success-text: var(--color-success-800);

  --color-warning-bg: var(--color-warning-50);
  --color-warning-border: var(--color-warning-300);
  --color-warning-text: var(--color-warning-900);

  --color-danger-bg: var(--color-danger-50);
  --color-danger-border: var(--color-danger-200);
  --color-danger-text: var(--color-danger-700);

  --color-info-bg: var(--color-info-50);
  --color-info-border: var(--color-info-200);
  --color-info-text: var(--color-info-800);

  /* Neutrale Hilfsflächen (Disabled, Nav-Hover) */
  --color-surface-muted: #eef1f5;

  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --line-height-base: 1.5;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-auth: 0 8px 24px rgba(26, 29, 35, 0.08);

  --container-sm: 28rem;
  --container-md: 48rem;
  --container-lg: 72rem;

  /* Auth layout */
  --auth-max-width: 58rem;
  --auth-single-max-width: 26rem;
  --auth-panel-gap: var(--space-6);
  --auth-control-height: 2.75rem;
  --auth-logo-height: 2.375rem;

  /* App shell: sticky topbar height (padding + control + border) */
  --app-topbar-height: calc(2.5rem + (2 * var(--space-3)) + 1px);

  /* Dark marketing / promo panel */
  --color-promo-bg: #2d3544;
  --color-promo-border: rgba(255, 255, 255, 0.08);
  --color-promo-text: #f4f6f9;
  --color-promo-muted: #b0b8c6;
  --color-promo-icon-bg: rgba(124, 92, 252, 0.22);
  --color-promo-icon: #c4b5fd;
  --color-promo-callout-bg: rgba(255, 255, 255, 0.06);
  --color-promo-badge-bg: rgba(252, 87, 87, 0.18);
  --color-promo-badge-text: #ff9a9a;
  --color-promo-accent: var(--color-danger-400);
}

html {
  -webkit-text-size-adjust: 100%;
}

:root,
.theme-light {
  color-scheme: light;
}

.theme-dark {
  color-scheme: dark;
  --color-bg: #12141a;
  --color-surface: #1c1f28;
  --color-surface-muted: #262a35;
  --color-text: #f4f6f9;
  --color-text-muted: #a8b0bd;
  --color-border: #2e3442;
  --color-primary-50: #241f3d;
  --color-primary-100: #2f274f;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.icon--sm {
  width: 1rem;
  height: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.status-pill--success {
  background: #86efac;
  color: #14532d;
}

.status-pill--warning {
  background: #f9f871;
  color: #544a12;
}

.status-pill--info {
  background: #93c5fd;
  color: #1e3a8a;
}

.theme-dark .status-pill--success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.theme-dark .status-pill--warning {
  background: rgba(249, 248, 113, 0.16);
  color: #f9f871;
}

.theme-dark .status-pill--info {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

body.is-nav-locked {
  overflow: hidden;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Globale Alert-Basis; Status über Modifier (--success|--warning|--danger|--info) */
.alert {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-base);
}

.alert--success {
  background: var(--color-success-bg);
  border-color: var(--color-success-border);
  color: var(--color-success-text);
}

.alert--warning {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning-text);
}

.alert--danger {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger-text);
}

.alert--info {
  background: var(--color-info-bg);
  border-color: var(--color-info-border);
  color: var(--color-info-text);
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--color-primary-hover);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.page--auth {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 50% at 18% 38%,
      rgba(124, 92, 252, 0.16),
      transparent 62%
    ),
    radial-gradient(
      ellipse 70% 45% at 82% 58%,
      rgba(167, 139, 250, 0.12),
      transparent 58%
    ),
    radial-gradient(
      ellipse 55% 38% at 50% 88%,
      rgba(124, 92, 252, 0.08),
      transparent 52%
    );
  z-index: 0;
}

.auth-atmosphere::before,
.auth-atmosphere::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  height: 44%;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    rgba(124, 92, 252, 0.06),
    rgba(196, 181, 253, 0.14),
    rgba(124, 92, 252, 0.05)
  );
  filter: blur(10px);
}

.auth-atmosphere::before {
  top: 26%;
  transform: rotate(-2.5deg);
}

.auth-atmosphere::after {
  top: 40%;
  transform: rotate(3deg);
  opacity: 0.65;
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  width: 100%;
  max-width: 100%;
  padding: var(--space-6) var(--space-4) var(--space-4);
}

.auth-brand {
  text-align: center;
  width: 100%;
  max-width: var(--auth-max-width);
}

.auth-brand__link {
  display: inline-flex;
  text-decoration: none;
}

.auth-brand__logo {
  display: block;
  height: var(--auth-logo-height);
  width: auto;
  max-width: min(12.5rem, 72vw);
}

.auth-layout {
  width: 100%;
  max-width: var(--auth-max-width);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--auth-panel-gap);
  align-items: stretch;
}

.auth-layout--single {
  max-width: var(--auth-single-max-width);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-panel--login {
  order: 0;
}

.auth-panel--marketing {
  order: 1;
}

.page--auth-single .auth-panel--marketing {
  display: none;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}

.card__title {
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  color: inherit;
}

.card__text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

.card--auth,
.card--promo {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-auth);
  padding: clamp(var(--space-6), 3.5vw, var(--space-8));
  width: 100%;
}

.card--auth {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.card--promo {
  background: var(--color-promo-bg);
  border: 1px solid var(--color-promo-border);
  color: var(--color-promo-text);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  flex: 1;
}

.card--promo .card__title {
  color: var(--color-promo-text);
  margin-bottom: var(--space-3);
}

.card--promo .card__text {
  color: var(--color-promo-muted);
  margin-bottom: 0;
}

.card--promo__header {
  flex-shrink: 0;
}

.card--promo__footer {
  margin-top: auto;
  display: grid;
  gap: var(--space-4);
}

.promo-accent {
  color: var(--color-promo-accent);
  font-weight: 700;
}

.card--marketing {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.form {
  display: grid;
  gap: var(--space-4);
}

.form__group {
  display: grid;
  gap: var(--space-2);
}

.form__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.form__input {
  width: 100%;
  min-height: var(--auth-control-height);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.form__input:disabled {
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form__hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--auth-control-height);
  padding: 0.7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button--primary {
  background: var(--color-primary);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.badge--promo {
  background: var(--color-promo-badge-bg);
  color: var(--color-promo-badge-text);
  margin-bottom: var(--space-3);
}

.promo-steps {
  list-style: none;
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
}

.promo-steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}

.promo-steps__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-md);
  background: var(--color-promo-icon-bg);
  color: var(--color-promo-icon);
}

.promo-steps__icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.promo-steps__item strong {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--color-promo-text);
  font-size: var(--font-size-sm);
}

.promo-steps__item span {
  color: var(--color-promo-muted);
  font-size: var(--font-size-sm);
  line-height: 1.45;
}

.promo-callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-promo-callout-bg);
  color: var(--color-promo-text);
  border: 1px solid var(--color-promo-border);
}

.promo-callout__icon {
  color: var(--color-promo-accent);
  flex-shrink: 0;
}

.promo-callout p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.45;
  color: var(--color-promo-muted);
}

.promo-more {
  margin: 0;
}

.promo-more__link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-promo-icon);
  cursor: default;
}

.input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon__leading {
  position: absolute;
  left: 0.85rem;
  display: inline-flex;
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-icon__leading .icon,
.input-icon__toggle .icon,
.button .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.input-icon .form__input {
  padding-left: 2.65rem;
  padding-right: 2.85rem;
}

.input-icon__toggle {
  position: absolute;
  right: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.input-icon__toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-muted);
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.form__link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.form__link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.form__error {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-danger-700);
}

.form__group--error .form__input {
  border-color: var(--color-danger-400);
}

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
}

.checkbox input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.button--block {
  width: 100%;
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.button--secondary:hover:not(:disabled) {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.button.is-loading {
  opacity: 0.75;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Einheitlicher Abstand: Formular → darunterliegende Links / Divider */
.card--auth > .form + .auth-footer-link,
.card--auth > .form + .auth-divider {
  margin-top: var(--space-8);
}

.card--auth > .button + .auth-footer-link,
.card--auth > .auth-divider + .button {
  margin-top: 0;
}

.auth-footer-link {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.card--auth > .button.button--block + .auth-footer-link {
  margin-top: var(--space-6);
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.alert--success {
  background: var(--color-success-50);
  border-color: var(--color-success-200);
  color: var(--color-success-800);
}

.alert--error {
  background: var(--color-danger-50);
  border-color: var(--color-danger-200);
  color: var(--color-danger-800);
}

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

.site-footer {
  position: relative;
  z-index: 1;
  padding: var(--space-5) var(--space-4) var(--space-6);
  text-align: center;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  align-items: center;
}

.site-footer__link {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-footer__sep {
  color: var(--color-border);
  font-size: var(--font-size-sm);
}

.site-footer__copy {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.app-sidebar__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.app-sidebar__logout {
  padding-top: 0;
}

/* =========================================================
 * App shell – dashboard layout (mobile-first)
 * ======================================================= */

.page--app {
  background: var(--color-bg);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
  position: relative;
}

.app-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 28, 0.45);
  z-index: 40;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(18.5rem, 88vw);
  z-index: 50;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  transform: translateX(-105%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.app-shell.is-nav-open .app-sidebar {
  transform: translateX(0);
}

.app-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-4);
  gap: var(--space-4);
  overflow-y: auto;
}

.app-sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.app-sidebar__brand {
  display: inline-flex;
  text-decoration: none;
}

.app-sidebar__logo {
  height: 2rem;
  width: auto;
  max-width: 10rem;
}

.app-sidebar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.app-sidebar__nav {
  display: grid;
  gap: 0.25rem;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 2.75rem;
}

.app-sidebar__link:hover,
.app-sidebar__link:focus-visible {
  color: var(--color-text);
  background: var(--color-surface-muted);
  outline: none;
}

.app-sidebar__link.is-active {
  color: var(--color-primary-700);
  background: var(--color-primary-50);
}

.theme-dark .app-sidebar__link.is-active {
  color: var(--color-primary-300);
  background: var(--color-primary-50);
}

.app-sidebar__link-icon {
  display: inline-flex;
  color: inherit;
}

.app-sidebar__link-label {
  flex: 1;
}

.app-sidebar__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-primary);
}

.app-news-card {
  margin-top: 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #1a1d23 0%, #2a2148 100%);
  color: #f4f6f9;
  position: relative;
  overflow: hidden;
}

.app-news-card__badge {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.app-news-card__body {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
}

.app-news-card__title {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.app-news-card__text {
  font-size: 0.8rem;
  color: rgba(244, 246, 249, 0.78);
  margin-bottom: 0.65rem;
  line-height: 1.45;
}

.app-news-card__cta {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.app-news-card__cta:hover,
.app-news-card__cta:focus-visible {
  text-decoration: underline;
}

.app-news-card__icon {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.95;
}

.app-sidebar__logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.app-topbar__left,
.app-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.app-topbar__home,
.app-topbar__menu-btn,
.app-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}

.app-topbar__home:hover,
.app-topbar__menu-btn:hover,
.app-icon-btn:hover,
.app-topbar__home:focus-visible,
.app-topbar__menu-btn:focus-visible,
.app-icon-btn:focus-visible {
  background: var(--color-surface-muted);
  outline: none;
}

.app-icon-btn__badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-topbar__title {
  font-size: 1.25rem;
  line-height: 1.25;
}

.app-topbar__email {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.app-topbar__help {
  display: none;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
}

.app-topbar__help:hover,
.app-topbar__help:focus-visible {
  color: var(--color-text);
  background: var(--color-surface-muted);
  outline: none;
}

.app-theme-toggle__btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  border-radius: 999px;
  padding: 0.2rem;
  cursor: pointer;
}

.app-theme-toggle__track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem;
}

.app-theme-toggle__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  color: var(--color-text-muted);
}

.app-theme-toggle__option.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(26, 29, 35, 0.08);
}

.app-user-menu {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 0.25rem 0.65rem 0.25rem 0.25rem;
  cursor: pointer;
  color: var(--color-text);
  max-width: 14rem;
}

.app-user-menu__name {
  display: none;
  font-size: var(--font-size-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-menu:hover,
.app-user-menu:focus-visible {
  background: var(--color-surface-muted);
  outline: none;
}

.app-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--color-primary-100);
  color: var(--color-primary-700);
  font-size: 0.75rem;
  font-weight: 700;
}

.app-dropdown {
  position: relative;
}

.app-dropdown__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 14rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(26, 29, 35, 0.12);
  padding: var(--space-2);
  z-index: 40;
}

.app-dropdown__panel--notifications {
  width: min(20rem, calc(100vw - 2rem));
}

.app-dropdown__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
}

.app-dropdown__head a {
  color: var(--color-primary);
  text-decoration: none;
}

.app-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-dropdown__item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.app-dropdown__item:hover,
.app-dropdown__item:focus-visible {
  background: var(--color-surface-muted);
  outline: none;
}

.app-dropdown__item-icon {
  color: var(--color-primary);
}

.app-dropdown__item-title {
  display: block;
  font-weight: 600;
}

.app-dropdown__item-meta {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.app-dropdown__logout {
  margin: 0;
}

.app-content {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
  flex: 1;
  align-content: start;
}

.site-footer--app {
  margin-top: auto;
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.site-footer__link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-size-sm);
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Dashboard content */
.dash-welcome {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  background:
    radial-gradient(circle at 90% 10%, rgba(124, 92, 252, 0.14), transparent 40%),
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dash-welcome__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.dash-welcome__text {
  color: var(--color-text-muted);
  max-width: 40rem;
}

.dash-welcome__visual {
  justify-self: end;
}

.dash-welcome__visual img {
  width: 5.5rem;
  height: 5.5rem;
  object-fit: contain;
}

.dash-info-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  color: var(--color-primary-800);
}

.dash-info-banner__icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
}

.dash-info-banner__title {
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.dash-info-banner__extra {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-primary-700);
}

.dash-info-banner__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dash-info-banner__more,
.dash-info-banner__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  background: transparent;
  color: var(--color-primary-700);
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  text-decoration: none;
  padding: 0.35rem 0;
}

.theme-dark .dash-info-banner {
  color: #fff;
  border-color: var(--color-primary-100);
}

.theme-dark .dash-info-banner__extra,
.theme-dark .dash-info-banner__more,
.theme-dark .dash-info-banner__link {
  color: #fff;
}

.dash-kpi-grid {
  display: grid;
  gap: var(--space-3);
}

.dash-kpi {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-kpi:hover,
.dash-kpi:focus-visible {
  border-color: var(--color-primary-300);
  box-shadow: 0 8px 20px rgba(26, 29, 35, 0.06);
  outline: none;
}

.dash-kpi__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-50);
  color: var(--color-primary);
}

.dash-kpi--success .dash-kpi__icon {
  background: var(--color-success-bg);
  color: var(--color-success-700);
}

.dash-kpi--warning .dash-kpi__icon {
  background: var(--color-warning-bg);
  color: var(--color-warning-800);
}

.dash-kpi--info .dash-kpi__icon {
  background: var(--color-info-bg);
  color: var(--color-info-700);
}

.theme-dark .dash-kpi__icon,
.theme-dark .dash-kpi--success .dash-kpi__icon,
.theme-dark .dash-kpi--warning .dash-kpi__icon,
.theme-dark .dash-kpi--info .dash-kpi__icon {
  background: var(--color-primary-50);
  color: var(--color-primary-300);
}

.dash-kpi__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.dash-kpi__value {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0.15rem 0;
}

.dash-kpi__meta {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 500;
}

.dash-split {
  display: grid;
  gap: var(--space-4);
}

.dash-panel {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.dash-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.dash-panel__title {
  font-size: 1.05rem;
}

.dash-panel__link {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.dash-panel__link:hover,
.dash-panel__link:focus-visible {
  text-decoration: underline;
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.dash-list__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  min-height: 3.25rem;
}

.dash-list__row:hover,
.dash-list__row:focus-visible {
  background: var(--color-surface-muted);
  outline: none;
}

.dash-list__mark,
.dash-list__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.theme-dark .dash-list__mark,
.theme-dark .dash-list__icon {
  color: var(--color-primary-300);
}

.dash-list__main {
  flex: 1;
  min-width: 0;
}

.dash-list__title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.dash-list__sub {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-top: 0.1rem;
}

.dash-list__amount {
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-list__chevron {
  color: var(--color-text-muted);
}

.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.dash-quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  text-decoration: none;
  color: inherit;
  min-height: 6.5rem;
}

.dash-quick:hover,
.dash-quick:focus-visible {
  border-color: var(--color-primary-300);
  outline: none;
}

.dash-quick__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-50);
  color: var(--color-primary);
}

.dash-quick__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-note {
  display: flex;
  gap: var(--space-3);
  padding: 0.75rem 0.25rem;
}

.dash-note__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-50);
  color: var(--color-primary);
  flex-shrink: 0;
}

.theme-dark .dash-note__icon,
.theme-dark .dash-quick__icon {
  color: var(--color-primary-300);
}

.dash-note__title {
  display: block;
  font-weight: 600;
}

.dash-note__text {
  display: block;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-top: 0.15rem;
}

.dash-note__date {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

.app-breadcrumbs {
  margin: 0;
}

.app-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.app-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.app-breadcrumbs__link {
  color: var(--color-text-muted);
  text-decoration: none;
}

.app-breadcrumbs__link:hover,
.app-breadcrumbs__link:focus-visible {
  color: var(--color-text);
  text-decoration: underline;
  outline: none;
}

.app-breadcrumbs__sep {
  color: var(--color-border);
}

.app-breadcrumbs__current {
  color: var(--color-text);
  font-weight: 500;
}

.card--placeholder {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  max-width: 40rem;
}

.card--placeholder .card__title {
  margin-bottom: var(--space-2);
}

.card--placeholder .card__text,
.card--placeholder .card__hint {
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.card--placeholder .button {
  margin-top: var(--space-2);
}

@media (min-width: 480px) {
  :root {
    --auth-logo-height: 2.5rem;
  }

  .auth-main {
    padding: var(--space-8) var(--space-5) var(--space-6);
  }

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

@media (min-width: 768px) {
  :root {
    --auth-logo-height: 2.625rem;
  }

  .auth-main {
    gap: var(--space-8);
    padding: var(--space-10) var(--space-6) var(--space-8);
  }

  .auth-layout:not(.auth-layout--single) {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: stretch;
  }

  .auth-layout--single {
    grid-template-columns: 1fr;
  }

  .auth-layout:not(.auth-layout--single) > .auth-panel {
    display: flex;
    height: 100%;
  }

  .auth-layout:not(.auth-layout--single) .card--auth,
  .auth-layout:not(.auth-layout--single) .card--promo {
    flex: 1 1 auto;
    height: 100%;
  }

  .auth-panel--marketing {
    order: 0;
  }

  .app-shell {
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .app-overlay,
  .app-sidebar__close,
  .app-topbar__menu-btn {
    display: none !important;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none;
    width: auto;
  }

  .app-topbar__help,
  .app-user-menu__name {
    display: inline-flex;
  }

  .app-user-menu__name {
    display: inline;
  }

  .app-content {
    padding: var(--space-6);
    gap: var(--space-5);
  }

  .dash-welcome {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: var(--space-6);
  }

  .dash-welcome__visual img {
    width: 7rem;
    height: 7rem;
  }

  .dash-info-banner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .dash-info-banner__actions {
    grid-column: auto;
  }

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

@media (min-width: 1024px) {
  :root {
    --auth-max-width: 62rem;
  }

  .auth-main {
    padding-inline: var(--space-8);
  }

  .app-shell {
    grid-template-columns: 17.5rem minmax(0, 1fr);
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .app-content {
    padding: var(--space-8);
  }
}

@media (min-width: 1280px) {
  :root {
    --auth-max-width: 64rem;
  }
}

@media (max-height: 720px) and (min-width: 768px) {
  .auth-main {
    justify-content: flex-start;
    padding-top: var(--space-6);
    padding-bottom: var(--space-4);
  }

  .auth-brand {
    margin-bottom: 0;
  }
}

@media (max-width: 359px) {
  .auth-main {
    padding-inline: var(--space-3);
  }

  .card--auth,
  .card--promo {
    padding: var(--space-5);
  }

  .form__row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* —— Account module —— */
.status-pill--neutral {
  background: color-mix(in srgb, var(--color-text) 12%, transparent);
  color: var(--color-text);
}

.status-pill--danger {
  background: #dc2626;
  color: #fff;
}

.theme-dark .status-pill--danger {
  background: color-mix(in srgb, #f87171 28%, transparent);
  color: #fecaca;
}

.button--ghost {
  background: transparent;
  color: var(--color-text-muted, var(--color-muted));
  border-color: transparent;
}

.button--ghost:hover:not(:disabled) {
  background: color-mix(in srgb, var(--color-text) 6%, transparent);
  color: var(--color-text);
}

.button--danger {
  background: var(--color-danger);
  color: #fff;
}

.button--danger:hover:not(:disabled) {
  background: var(--color-danger-600);
  color: #fff;
}

.button--sm {
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  font-size: var(--font-size-sm);
}

.account-layout {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}

.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: color-mix(in srgb, #0f172a 45%, transparent);
}

.account-sidebar {
  display: none;
}

.account-sidebar__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface, var(--color-bg));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.account-sidebar__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.account-sidebar__heading {
  min-width: 0;
  flex: 1;
}

.account-sidebar__heading .app-breadcrumbs {
  margin: 0;
}

.account-sidebar__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.account-nav {
  display: grid;
  gap: 0.25rem;
}

.account-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.account-nav__link:hover,
.account-nav__link:focus-visible {
  background: color-mix(in srgb, var(--color-text) 6%, transparent);
  outline: none;
}

.account-nav__link.is-active {
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
}

.account-nav__icon {
  display: inline-flex;
  color: inherit;
}

.account-nav__icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.account-main__toolbar {
  margin-bottom: var(--space-3);
}

.account-nav-toggle {
  display: inline-flex;
  gap: var(--space-2);
}

.account-main__content {
  display: grid;
  gap: var(--space-4);
  width: 100%;
  max-width: 40rem;
}

.account-form {
  display: grid;
  gap: var(--space-4);
  max-width: 28rem;
}

form.account-form {
  width: 100%;
}

.account-prefs-form {
  display: grid;
  gap: var(--space-5);
}

.account-form--danger {
  max-width: none;
}

.account-form-row {
  display: grid;
  gap: var(--space-4);
}

.account-card {
  background: var(--color-surface, var(--color-bg));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.account-card--danger {
  border-color: var(--color-danger-200);
  background: color-mix(in srgb, var(--color-danger-50) 55%, var(--color-surface));
}

.account-card__header {
  margin-bottom: var(--space-4);
}

.account-card__header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.account-card__title {
  margin: 0 0 var(--space-2);
  font-size: 1.15rem;
  font-weight: 650;
}

.account-card__desc,
.account-card__text,
.account-card__hint,
.account-card__meta {
  margin: 0;
  color: var(--color-text-muted, var(--color-muted));
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.account-card__hint {
  margin-top: var(--space-4);
}

.account-card__meta {
  margin-top: var(--space-3);
}

.account-card__actions {
  margin-top: var(--space-4);
}

.account-card__actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.account-theme-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
}

.account-theme-picker {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.account-theme-option {
  display: block;
  cursor: pointer;
}

.account-theme-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-theme-option__card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 4.25rem;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.account-theme-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-warning-100);
  color: var(--color-warning-800);
  flex-shrink: 0;
}

.account-theme-option__icon--dark {
  background: var(--color-primary-100);
  color: var(--color-primary-700);
}

.account-theme-option__icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.account-theme-option__copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.account-theme-option__label {
  font-size: var(--font-size-sm);
  font-weight: 650;
  color: var(--color-text);
}

.account-theme-option__hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.account-theme-option__input:checked + .account-theme-option__card {
  border-color: var(--color-primary-300);
  background: var(--color-primary-50);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.account-theme-option__input:focus-visible + .account-theme-option__card {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.account-theme-option:hover .account-theme-option__card {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
}

.account-meta-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.account-meta-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg);
}

.account-meta-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  flex-shrink: 0;
}

.account-meta-item__icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.account-meta-item__body {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.account-meta-item__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.account-meta-item__value {
  margin: 0;
  color: var(--color-text);
  font-weight: 550;
  word-break: break-word;
}

.account-meta-item__value .status-badge {
  margin-top: 0.1rem;
}

.account-meta-item__value--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.account-meta-item__hint,
.account-meta-item__link {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.account-meta-item__link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  width: fit-content;
}

.account-meta-item__link:hover,
.account-meta-item__link:focus-visible {
  color: var(--color-primary-hover);
  text-decoration: underline;
  outline: none;
}

.account-readonly-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
}

.account-readonly {
  display: grid;
  gap: 0.2rem;
}

.account-readonly__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted, var(--color-muted));
}

.account-readonly__value {
  margin: 0;
  color: var(--color-text);
  word-break: break-word;
}

.account-readonly__hint {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted, var(--color-muted));
}

.account-empty {
  padding: var(--space-4);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.account-empty__title {
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

.account-empty__text {
  margin: 0;
  color: var(--color-text-muted, var(--color-muted));
  font-size: var(--font-size-sm);
}

.account-session-list,
.account-legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.account-session,
.account-legal-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-session__title-row,
.account-legal-item {
  align-items: center;
}

.account-session__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 0.25rem;
}

.account-session__meta,
.account-legal-item__meta {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted, var(--color-muted));
}

.account-danger-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}

.account-danger-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  border: 1px solid var(--color-danger-200);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.account-danger-card--emphasis {
  grid-column: 1 / -1;
}

.account-danger-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-danger-100);
  color: var(--color-danger-700);
  flex-shrink: 0;
}

.account-danger-card__icon .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.account-danger-card__body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  flex: 1;
}

.account-danger-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: var(--color-text);
}

.account-danger-card__text {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.account-danger-card__text code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  background: var(--color-danger-50);
  color: var(--color-danger-800);
}

.theme-dark .account-meta-item {
  background: color-mix(in srgb, var(--color-surface) 80%, #000);
}

.theme-dark .account-theme-option__input:checked + .account-theme-option__card {
  background: var(--color-primary-50);
}

.theme-dark .account-card--danger {
  background: color-mix(in srgb, var(--color-danger-50) 35%, var(--color-surface));
}

.theme-dark .account-danger-card {
  background: var(--color-surface);
}

.account-layout.is-account-nav-open .account-overlay {
  display: block;
}

.account-layout.is-account-nav-open .account-sidebar {
  display: block;
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: min(20rem, 88vw);
  padding: var(--space-3);
  overflow: auto;
  background: var(--color-bg);
  box-shadow: 0 12px 40px color-mix(in srgb, #0f172a 25%, transparent);
}

.account-layout.is-account-nav-open .account-sidebar__inner {
  border: 0;
  padding: var(--space-3);
}

@media (min-width: 640px) {
  .account-theme-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .account-meta-item--wide {
    grid-column: 1 / -1;
  }

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

@media (min-width: 768px) {
  .account-layout {
    grid-template-columns: 14.5rem minmax(0, 1fr);
    gap: var(--space-5);
  }

  .account-overlay,
  .account-main__toolbar,
  .account-sidebar__close {
    display: none !important;
  }

  .account-sidebar {
    display: block;
    position: sticky;
    /* Unter dem sticky Topbar halten: Header-Höhe + mind. 24px Abstand */
    top: calc(var(--app-topbar-height) + var(--space-6));
    z-index: 10;
  }

  .account-sidebar__inner {
    padding: var(--space-4);
  }

  .account-main__content {
    max-width: 42rem;
  }
}

@media (min-width: 1024px) {
  .account-layout {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: var(--space-6);
  }

  .account-card {
    padding: var(--space-6);
  }

  .account-main__content {
    max-width: 44rem;
  }

  .account-form {
    max-width: 30rem;
  }
}

/* License portal */
.license-section-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
}

.license-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.license-key-input {
  flex: 1 1 16rem;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--text-sm);
}

.license-list .dash-list__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-list__empty {
  padding: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Webmaster area */
.account-main__content--wide {
  max-width: 72rem;
}

.webmaster-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.webmaster-stat {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.webmaster-stat__label {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.webmaster-stat__value {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 600;
  word-break: break-word;
}

.webmaster-check-list {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.webmaster-check {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: baseline;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.webmaster-check--ok {
  border-color: var(--color-success-border, var(--color-border));
}

.webmaster-check--error,
.webmaster-check--fail {
  border-color: var(--color-danger-border);
  background: color-mix(in srgb, var(--color-danger-50) 40%, var(--color-surface));
}

.webmaster-check--na,
.webmaster-check--warn {
  border-color: var(--color-warning-border, var(--color-border));
}

.webmaster-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-3);
}

.webmaster-nav-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.webmaster-nav-card:hover {
  border-color: var(--color-primary, var(--color-border));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--color-text) 6%, transparent);
}

.webmaster-nav-card__icon {
  display: inline-flex;
  color: var(--color-text-muted);
}

.webmaster-nav-card__label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.webmaster-nav-card__title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.webmaster-nav-card__desc {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.webmaster-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.webmaster-filters .form__input {
  flex: 1 1 10rem;
  min-width: 0;
}

.webmaster-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.webmaster-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.webmaster-table th,
.webmaster-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.webmaster-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.webmaster-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.webmaster-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
}

.webmaster-dl dt {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

.webmaster-dl dd {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
}

.webmaster-subtitle {
  margin: var(--space-5) 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
}

.webmaster-log-pre,
.debug-event__pre {
  margin: 0;
  padding: var(--space-3);
  overflow: auto;
  max-height: 24rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--text-xs);
  background: color-mix(in srgb, var(--color-text) 4%, var(--color-surface));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
}

.webmaster-license-form .form__row--2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .webmaster-license-form .form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.webmaster-feature-fieldset {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.webmaster-feature-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
}

.webmaster-feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .webmaster-feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.webmaster-feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem var(--space-2);
  align-items: start;
  font-size: var(--text-sm);
}

.webmaster-feature-item input {
  grid-row: span 2;
  margin-top: 0.2rem;
}

.webmaster-feature-id {
  grid-column: 2;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.webmaster-license-matrix-wrap {
  overflow-x: auto;
}

.webmaster-license-matrix {
  min-width: 64rem;
  font-size: var(--text-xs);
}

.webmaster-license-matrix th,
.webmaster-license-matrix td {
  white-space: nowrap;
  padding: var(--space-2);
}

.webmaster-license-matrix__flag {
  text-align: center;
  font-weight: 600;
}

.webmaster-license-matrix__flag.is-on {
  color: var(--color-success-700, #1b7a3d);
}

.webmaster-license-matrix__flag.is-off {
  color: var(--color-text-muted);
}

.account-card__actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.debug-sev {
  display: inline-block;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}

.debug-sev--critical { background: var(--color-danger-100); color: var(--color-danger-800); }
.debug-sev--medium { background: #fff3e0; color: #9a5b00; }
.debug-sev--low { background: #eef3ff; color: #304889; }
.debug-sev--hint { background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); color: var(--color-text-muted); }
.debug-sev--info { background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface)); color: var(--color-text-muted); }

/* Debug bar + sheets + toasts */
.app-content--debug-bar {
  padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

.debug-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  border-top: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 20px color-mix(in srgb, var(--color-text) 8%, transparent);
}

.debug-bar.is-critical { border-top-color: var(--color-danger-500); }
.debug-bar.is-medium { border-top-color: #f0a000; }
.debug-bar.is-low { border-top-color: #6b8cff; }
.debug-bar.is-hint,
.debug-bar.is-info { border-top-color: var(--color-border); }

.debug-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  max-width: 90rem;
  margin: 0 auto;
  padding: var(--space-2) var(--space-4);
  min-height: 3rem;
}

.debug-bar__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
}

.debug-bar__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-text-muted);
}

.debug-bar.is-critical .debug-bar__dot { background: var(--color-danger-500); }
.debug-bar.is-medium .debug-bar__dot { background: #f0a000; }
.debug-bar.is-low .debug-bar__dot { background: #6b8cff; }

.debug-bar__counts {
  display: flex;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.debug-bar__count {
  min-width: 1.5rem;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  background: color-mix(in srgb, var(--color-text) 6%, var(--color-surface));
}

.debug-bar__count.is-critical { background: var(--color-danger-100); color: var(--color-danger-800); }
.debug-bar__count.is-medium { background: #fff3e0; color: #9a5b00; }
.debug-bar__count.is-low { background: #eef3ff; color: #304889; }

.debug-bar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex: 1 1 auto;
}

.debug-bar__sim {
  color: var(--color-warning-text, #9a5b00);
  font-weight: 600;
}

.debug-bar__actions {
  display: flex;
  gap: var(--space-1);
  margin-left: auto;
}

.debug-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.debug-bar__btn:hover {
  border-color: color-mix(in srgb, var(--color-text) 25%, var(--color-border));
}

.debug-sheet[hidden] {
  display: none !important;
}

.debug-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.debug-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, #000 35%, transparent);
}

.debug-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 40rem);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 -8px 32px color-mix(in srgb, var(--color-text) 12%, transparent);
}

.debug-sheet__panel--wide {
  max-height: min(85vh, 48rem);
}

.debug-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.debug-sheet__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.debug-sheet__title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 600;
}

.debug-sheet__body {
  overflow: auto;
  padding: var(--space-4);
}

.debug-control-group {
  margin-bottom: var(--space-5);
}

.debug-control-group__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

.debug-control-group--danger {
  padding: var(--space-3);
  border: 1px solid var(--color-danger-200);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-danger-50) 45%, var(--color-surface));
}

.debug-control-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.debug-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.debug-event {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.debug-event__toggle {
  display: grid;
  gap: var(--space-1);
  width: 100%;
  padding: var(--space-3);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.debug-event__sev {
  font-size: var(--text-xs);
  font-weight: 700;
}

.debug-event__msg {
  font-size: var(--text-sm);
}

.debug-event__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.debug-event__detail {
  padding: 0 var(--space-3) var(--space-3);
  font-size: var(--text-sm);
  border-top: 1px solid var(--color-border);
}

.toast-host {
  position: fixed;
  right: var(--space-4);
  bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-text) 12%, transparent);
  font-size: var(--text-sm);
  pointer-events: auto;
  animation: toast-in 0.18s ease-out;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast--success {
  border-color: var(--color-success-border, var(--color-border));
  background: color-mix(in srgb, var(--color-success-bg, #e8f7ee) 70%, var(--color-surface));
}

.toast--info {
  border-color: #c5d4ff;
  background: color-mix(in srgb, #eef3ff 70%, var(--color-surface));
}

.toast--warning {
  border-color: #f0c988;
  background: color-mix(in srgb, #fff6e8 70%, var(--color-surface));
}

.toast--error {
  border-color: var(--color-danger-border);
  background: color-mix(in srgb, var(--color-danger-50) 70%, var(--color-surface));
  color: var(--color-danger-800);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .debug-sheet__panel {
    left: auto;
    right: var(--space-4);
    bottom: calc(3.75rem + env(safe-area-inset-bottom, 0px));
    width: min(28rem, calc(100vw - 2rem));
    max-height: min(70vh, 36rem);
    border-radius: var(--radius-lg);
  }

  .debug-sheet__panel--wide {
    width: min(40rem, calc(100vw - 2rem));
  }
}

html.theme-dark .debug-bar,
html.theme-dark .debug-sheet__panel,
html.theme-dark .toast {
  background: var(--color-surface);
}
