﻿:root {
  --bg: #0b0c10;
  --panel: #14161e;
  --text: #e7e7ea;
  --muted: #a1a1aa;
  --border: #2a2d3a;
  --accent: #7c3aed;
  --danger: #ef4444;
  /* Ensure native form controls render in dark scheme. */
  color-scheme: dark;
}

/* Slightly larger UI + text (~6.25%); `rem` follows this root size; --ui-scale from settings. */
html {
  --ui-scale: 1;
  font-size: calc(106.25% * var(--ui-scale));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}

.smr-toast-host {
  position: fixed;
  left: 50%;
  top: max(14px, env(safe-area-inset-top, 0px));
  bottom: auto;
  transform: translateX(-50%);
  z-index: 12000;
  pointer-events: none;
  padding: 0 18px;
  width: min(640px, calc(100% - 32px));
}
.smr-toast {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
  padding: 14px 24px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(24, 26, 36, 0.96);
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 18px 48px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  color: var(--text);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
}
.smr-toast.is-open {
  opacity: 1;
  transform: translateY(0);
}
.smr-toast--success {
  border-color: rgba(63, 185, 80, 0.85);
  background: linear-gradient(
    180deg,
    rgba(46, 160, 67, 0.22) 0%,
    rgba(24, 26, 36, 0.97) 42%,
    rgba(24, 26, 36, 0.97) 100%
  );
  box-shadow:
    0 0 0 1px rgba(63, 185, 80, 0.35),
    0 0 28px rgba(46, 160, 67, 0.28),
    0 18px 48px rgba(0, 0, 0, 0.62);
}
.smr-toast--error {
  border-color: rgba(248, 113, 113, 0.85);
  background: linear-gradient(
    180deg,
    rgba(239, 68, 68, 0.22) 0%,
    rgba(36, 18, 22, 0.97) 42%,
    rgba(36, 18, 22, 0.97) 100%
  );
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.28),
    0 0 28px rgba(239, 68, 68, 0.22),
    0 18px 48px rgba(0, 0, 0, 0.62);
}

/* Ensure native [hidden] always removes element from layout. */
[hidden] {
  display: none !important;
}
.wrap {
  max-width: 1230px;
  margin: 0 auto;
  padding: 18px;
}
#contentArea {
  margin-top: 19px;
}
/* Login screen: center the gate card in the viewport */
.wrap:has(.topbar.topbar--gate) {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 26px 18px;
  max-width: none;
}
.wrap:has(.topbar.topbar--gate) .topbar.topbar--gate {
  width: min(420px, 100%);
  flex-shrink: 0;
}
button {
  cursor: pointer;
  padding: 11px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #1d2030;
  color: var(--text);
  font-size: 1rem;
}
button.primary {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.18);
}
button.danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
}
