/* ═══════════════════════════════════════════════════════════
   REAL — Account pages (login, register, dashboard)
   ═══════════════════════════════════════════════════════════ */

/* ── Auth shell (login / register / discord-setup) ── */
.auth-body { overflow: hidden; }

.auth-shell {
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
  overflow-y: auto;
}

.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-bg::before {
  content: '';
  position: absolute;
  top: -12%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.045) 0%, transparent 70%);
}
.auth-bg .hero-grid {
  opacity: 0.95;
  mask-image: radial-gradient(ellipse 78% 58% at 50% 12%, black 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 12%, black 18%, transparent 78%);
}

.auth-box {
  position: relative;
  z-index: 1;
  width: min(340px, calc(100vw - 40px));
  display: flex; flex-direction: column; align-items: center;
  animation: auth-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Brand row */
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 8px;
}
.auth-logo img { width: 30px; height: 30px; border-radius: 7px; object-fit: contain; }
.auth-logo-text {
  font-size: 26px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--white); line-height: 1;
}
.auth-tagline {
  font-size: 13px; color: var(--white-30); font-weight: 500;
  margin: 0 0 26px; text-align: center; line-height: 1.4;
}

/* Form */
.auth-form {
  width: 100%; display: flex; flex-direction: column; gap: 7px;
}

/* Field wrapper */
.auth-field {
  display: flex; flex-direction: column; gap: 5px; width: 100%;
}
.auth-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--white-30);
}

/* Input */
.auth-input-wrap { position: relative; width: 100%; }
.auth-input {
  width: 100%; height: 44px; padding: 0 14px;
  background: rgba(255,255,255,0.014);
  border: 1px solid var(--border);
  border-radius: 10px; outline: none;
  color: var(--white); font-size: 13.5px; font-weight: 500; font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-input::placeholder { color: var(--white-30); font-weight: 400; }
.auth-input:hover { border-color: var(--border-hover); }
.auth-input:focus {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.auth-input:disabled {
  color: var(--white-55);
  -webkit-text-fill-color: var(--white-55);
  background: rgba(255,255,255,0.008);
  border-color: rgba(255,255,255,0.045);
  cursor: not-allowed;
  opacity: 1;
}
.auth-input.has-suffix { padding-right: 44px; }
.auth-field.invalid .auth-input { border-color: rgba(255,90,90,0.45); }

/* Password toggle */
.auth-pw-toggle {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--white-30); transition: color 0.12s;
}
.auth-pw-toggle:hover { color: var(--white-50); }
.auth-pw-toggle svg { width: 16px; height: 16px; }

/* Field error */
.auth-err {
  font-size: 11.5px; color: rgba(255,90,90,0.9); font-weight: 500;
  display: none; line-height: 1.4;
}
.auth-field.invalid .auth-err { display: block; }

/* Remember / forgot row */
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.auth-row label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--white-40); cursor: pointer;
}
.auth-row label input[type="checkbox"] { width: 13px; height: 13px; accent-color: #86efac; }
.auth-row a { font-size: 12px; color: var(--white-30); text-decoration: none; transition: color 0.12s; }
.auth-row a:hover { color: var(--white-60, rgba(255,255,255,0.6)); }

/* Password strength */
.auth-strength {
  display: flex; align-items: center; gap: 8px; padding-top: 2px;
}
.auth-strength-bars { display: flex; gap: 3px; }
.auth-strength-bar {
  width: 30px; height: 3px; border-radius: 2px;
  background: var(--border); transition: background 0.2s;
}
.auth-strength[data-level="1"] .auth-strength-bar:nth-child(1) { background: #e05555; }
.auth-strength[data-level="2"] .auth-strength-bar:nth-child(-n+2) { background: #f0a500; }
.auth-strength[data-level="3"] .auth-strength-bar { background: #4ade80; }
.auth-strength-text { font-size: 11px; color: var(--white-30); }

/* Status message */
.auth-message {
  width: 100%; min-height: 0; font-size: 12px; font-weight: 500;
  line-height: 1.45; text-align: center; color: transparent;
}
.auth-message[data-kind="error"]   { color: rgba(255,90,90,0.9); animation: auth-in 0.18s ease-out both; }
.auth-message[data-kind="success"] { color: #4ade80; }

/* Submit */
.auth-submit {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; width: 100%; margin-top: 4px;
  background: var(--white); color: #0a0a0a;
  border: none; border-radius: 10px;
  font-size: 13.5px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background 0.15s, transform 0.08s;
}
.auth-submit:hover:not(:disabled) { background: rgba(255,255,255,0.88); }
.auth-submit:active:not(:disabled) { transform: scale(0.985); }
.auth-submit:disabled { opacity: 0.35; cursor: not-allowed; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin: 12px 0 10px;
  color: var(--white-20); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Discord button */
.auth-discord {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; width: 100%;
  background: #5865F2; color: #fff;
  border: none; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}
.auth-discord:hover { background: #4752C4; transform: translateY(-1px); }
.auth-discord:active { transform: scale(0.985); }

/* Footer */
.auth-footer {
  margin-top: 18px; font-size: 12.5px;
  color: var(--white-30); text-align: center;
}
.auth-footer a {
  color: var(--white-50); font-weight: 500;
  text-decoration: none; transition: color 0.12s;
}
.auth-footer a:hover { color: var(--white); }

/* ──────────────────────────────────────────────
   FORM FIELDS
   ────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-50);
}
.form-field .hint {
  font-size: 11px;
  color: var(--white-30);
  line-height: 1.5;
}
.form-field .err {
  font-size: 12px;
  color: #ff6b6b;
  font-weight: 500;
  display: none;
  line-height: 1.5;
}
.form-field.invalid .err { display: block; }
.form-field.invalid .input-wrap input {
  border-color: rgba(255,107,107,0.45);
  box-shadow: 0 0 0 3px rgba(255,107,107,0.06);
}
.inline-message {
  min-height: 18px;
  margin: 8px 4px var(--s2);
  font-size: 12px;
  line-height: 1.5;
  color: var(--white-40);
}
.inline-message[data-kind="success"] { color: #86efac; }
.inline-message[data-kind="error"] { color: #ff8b8b; }
.inline-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--white-30);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--white);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.005em;
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}
.input-wrap input::placeholder { color: var(--white-30); }
.input-wrap input:hover { border-color: var(--border-hover); }
.input-wrap input:focus {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.035);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.input-wrap input[type="password"],
.input-wrap input.has-suffix { padding-right: 44px; }

.input-wrap .input-suffix {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--white-50);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.input-wrap .input-suffix:hover { color: var(--white); background: var(--white-06); }
.input-wrap .input-suffix svg { width: 18px; height: 18px; }

.input-wrap input.mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ──────────────────────────────────────────────
   PASSWORD STRENGTH
   ────────────────────────────────────────────── */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.pw-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.pw-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--white-06);
  transition: background var(--dur-fast) var(--ease);
}
.pw-strength[data-level="1"] .pw-bar:nth-child(1) { background: #ff6b6b; }
.pw-strength[data-level="2"] .pw-bar:nth-child(-n+2) { background: #f0b35e; }
.pw-strength[data-level="3"] .pw-bar { background: #4ade80; }
.pw-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-30);
  min-width: 60px;
  text-align: right;
}
.pw-strength[data-level="1"] .pw-label { color: #ff6b6b; }
.pw-strength[data-level="2"] .pw-label { color: #f0b35e; }
.pw-strength[data-level="3"] .pw-label { color: #4ade80; }

/* ──────────────────────────────────────────────
   INLINE NOTICE (e.g. "check your inbox")
   ────────────────────────────────────────────── */
.inline-notice {
  margin-top: var(--s2);
  padding: 14px 16px;
  border: 1px solid var(--border-hover);
  border-radius: var(--r-md);
  background: rgba(74,222,128,0.04);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: noticeIn 0.4s var(--ease) both;
}
.inline-notice[hidden] { display: none !important; }
@keyframes noticeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.inline-notice-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.inline-notice-icon svg { width: 12px; height: 12px; color: #4ade80; }
.inline-notice-body { flex: 1; }
.inline-notice-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--white);
}
.inline-notice-text {
  font-size: 12px;
  color: var(--white-50);
  line-height: 1.6;
}

/* ──────────────────────────────────────────────
   SPINNER (CSS-only, used inside buttons)
   ────────────────────────────────────────────── */
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn[data-loading="true"] {
  pointer-events: none;
  opacity: 0.85;
}
.btn[data-loading="true"] .btn-label { opacity: 0.6; }

/* ──────────────────────────────────────────────
   DASHBOARD NAV
   ────────────────────────────────────────────── */
.dash-nav .nav-inner { padding: 0 var(--s4); }
.dash-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.dash-user:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.04); }
.dash-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.dash-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.005em;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-signout {
  height: 36px;
  padding: 0 14px;
  font-size: 12px;
}

@media (max-width: 760px) {
  /* keep the dashboard nav visible on mobile (no dock for account) */
  .dash-nav { display: flex !important; }
  .dash-nav .nav-inner { padding: 0 var(--s2); }
  .dash-username { display: none; }
  .dash-signout { padding: 0 12px; }
}

/* ──────────────────────────────────────────────
   DASHBOARD LAYOUT
   ────────────────────────────────────────────── */
.dash-shell {
  width: min(100% - (var(--s3) * 2), 760px);
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--s6)) 0 var(--s10);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  overflow-x: clip;
}

.dash-greeting {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--s1);
}
.dash-greeting-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-30);
}
.dash-greeting-title {
  font-size: clamp(28px, 4vw, var(--text-2xl));
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.account-id-strip {
  margin-top: 2px;
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.account-id-strip span {
  display: none;
}
.account-id-strip code {
  max-width: min(440px, 62vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 10.5px;
  color: var(--white-30);
}

/* ──────────────────────────────────────────────
   STATUS CARD
   ────────────────────────────────────────────── */
.status-card {
  position: relative;
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.status-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  flex-wrap: wrap;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  background: transparent;
}
.status-pill[data-state="active"] {
  color: #86efac;
}
.status-pill[data-state="expired"] {
  color: var(--white-50);
}

.status-headline {
  margin-top: var(--s3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-30);
}
.status-date {
  margin-top: 4px;
  font-size: clamp(22px, 3.4vw, var(--text-lg));
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.status-date.is-empty {
  color: var(--white-50);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
}
.status-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--white-30);
  line-height: 1.6;
}

/* skeleton variants of status fields */
.status-pill.skeleton-pill {
  width: 110px;
  height: 28px;
  border-radius: 999px;
}
.status-date.skeleton-date {
  width: 280px;
  max-width: 100%;
  height: 28px;
  border-radius: var(--r-sm);
}

/* ──────────────────────────────────────────────
   SECTION HEADERS WITHIN DASHBOARD
   ────────────────────────────────────────────── */
.dash-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: var(--s2);
  padding: 0 4px;
}
.dash-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-50);
}
.dash-section-meta {
  font-size: 12px;
  color: var(--white-30);
  font-variant-numeric: tabular-nums;
}

/* ──────────────────────────────────────────────
   REDEEM SECTION
   ────────────────────────────────────────────── */
.redeem-card {
  padding: var(--s5);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.redeem-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s2);
}
@media (max-width: 520px) {
  .redeem-row { grid-template-columns: 1fr; }
}
.redeem-card .input-wrap input { height: 46px; }
.redeem-card .btn { height: 46px; }
.redeem-help {
  margin-top: var(--s2);
  font-size: 12px;
  color: var(--white-30);
  line-height: 1.6;
}

/* ──────────────────────────────────────────────
   DEVICES
   ────────────────────────────────────────────── */
.devices-list {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.device-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin: -4px 4px var(--s1);
  flex-wrap: wrap;
}
.device-reset-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white-70);
  font-size: 12px;
  font-weight: 600;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.device-reset-btn:hover:not(:disabled) {
  color: var(--white);
  border-color: var(--border-hover);
  background: var(--white-06);
}
.device-reset-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.device-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3) var(--s4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.device-card:hover { border-color: var(--border-hover); }
.device-card.is-revoked { opacity: 0.55; }

.device-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--white-06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.device-icon svg { width: 18px; height: 18px; color: var(--white-50); }

.device-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.device-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.device-label {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-hash {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--white-30);
  letter-spacing: 0.02em;
}
.device-sub {
  font-size: 11px;
  color: var(--white-30);
  line-height: 1.5;
}

.kp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--white-06);
  color: var(--white-50);
}
.kp-badge[data-kp="TPM"]      { color: #86efac; border-color: rgba(74,222,128,0.28); background: rgba(74,222,128,0.06); }
.kp-badge[data-kp="SOFTWARE"] { color: var(--white-50); }
.kp-badge[data-kp="FALLBACK"] { color: #f0b35e; border-color: rgba(240,179,94,0.28); background: rgba(240,179,94,0.06); }

.revoked-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,107,107,0.28);
  background: rgba(255,107,107,0.06);
  color: #ff9b9b;
}

.device-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.device-revoke-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--white-50);
  border: 1px solid var(--border);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.device-revoke-btn:hover {
  color: #ff9b9b;
  border-color: rgba(255,107,107,0.35);
  background: rgba(255,107,107,0.04);
}

/* inline confirm */
.device-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
}
.device-confirm-text {
  font-size: 11px;
  color: var(--white-50);
  font-weight: 500;
}
.device-confirm .yes,
.device-confirm .no {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.device-confirm .yes {
  color: #ff9b9b;
  border-color: rgba(255,107,107,0.35);
}
.device-confirm .yes:hover {
  background: rgba(255,107,107,0.1);
  color: #ffb3b3;
}
.device-confirm .no { color: var(--white-50); }
.device-confirm .no:hover { color: var(--white); border-color: var(--border-hover); }

/* skeleton device */
.device-card.skeleton-device {
  height: 76px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: block;
  grid-template-columns: none;
}

.devices-empty {
  padding: var(--s5);
  text-align: center;
  border: 1px dashed var(--border-hover);
  border-radius: var(--r-lg);
  color: var(--white-50);
}
.devices-empty-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--white-80);
  margin-bottom: 4px;
}
.devices-empty-text { font-size: 12px; color: var(--white-30); line-height: 1.6; }

@media (max-width: 560px) {
  .device-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .device-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ──────────────────────────────────────────────
   TOAST SYSTEM
   ────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
@media (max-width: 760px) {
  .toast-stack {
    bottom: calc(86px + env(safe-area-inset-bottom));
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 12px 14px 12px 14px;
  background: rgba(20,20,20,0.96);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border-hover);
  border-left-width: 3px;
  border-radius: var(--r-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: flex-start;
  animation: toastIn 0.3s var(--ease) both;
}
.toast.leaving {
  animation: toastOut 0.32s var(--ease) forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px) scale(0.97); }
}
.toast[data-kind="success"] { border-left-color: #4ade80; }
.toast[data-kind="error"]   { border-left-color: #ff6b6b; }
.toast[data-kind="info"]    { border-left-color: rgba(255,255,255,0.4); }

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.toast[data-kind="success"] .toast-icon { background: rgba(74,222,128,0.15); color: #4ade80; }
.toast[data-kind="error"]   .toast-icon { background: rgba(255,107,107,0.15); color: #ff6b6b; }
.toast[data-kind="info"]    .toast-icon { background: var(--white-06); color: var(--white-80); }
.toast-icon svg { width: 11px; height: 11px; }

.toast-body { min-width: 0; }
.toast-title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--white);
  margin-bottom: 2px;
  word-wrap: break-word;
}
.toast-msg {
  font-size: 12px;
  color: var(--white-50);
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-close {
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-30);
  transition: color var(--dur-fast), background var(--dur-fast);
  flex-shrink: 0;
}
.toast-close:hover { color: var(--white); background: var(--white-06); }
.toast-close svg { width: 12px; height: 12px; }

/* tighten focus ring inside cards */
.input-wrap input:focus-visible { outline: none; }

/* ── Discord OAuth button ──────────────────────────────────────────────────── */
.btn-discord {
  background: #5865F2;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-weight: 600;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.btn-discord:hover { background: #4752C4; transform: translateY(-2px); }
.btn-discord:active { transform: scale(0.97); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--white-30);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
