/* RADIANCE VAULT — design system (shared by the user portal and the admin panel) */

@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('/fonts/red-hat-display-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('/fonts/red-hat-display-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/fonts/red-hat-mono-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --bg-elev: #101115;
  --surface: #15171c;
  --surface-2: #1b1d24;
  --surface-3: #22252d;
  --border: #252830;
  --border-strong: #343843;
  --text: #f4f5f7;
  --text-2: #c9ccd3;
  --muted: #9aa0ab;
  --faint: #6c727e;
  --gold: #f6c63c;
  --gold-hi: #ffd866;
  --gold-text: #f6c63c;
  --gold-ink: #1b1505;
  --gold-soft: rgba(246, 198, 60, 0.12);
  --gold-line: rgba(246, 198, 60, 0.35);
  --green: #3dd68c;
  --green-soft: rgba(61, 214, 140, 0.13);
  --red: #f2555a;
  --red-soft: rgba(242, 85, 90, 0.13);
  --orange: #ff9f43;
  --orange-soft: rgba(255, 159, 67, 0.14);
  --blue: #5b9cf6;
  --blue-soft: rgba(91, 156, 246, 0.14);
  --purple: #b48cf5;
  --purple-soft: rgba(180, 140, 245, 0.14);
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  --shadow-pop: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: 'Red Hat Display', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Red Hat Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --focus: 0 0 0 3px rgba(246, 198, 60, 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f5f1;
  --bg-elev: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f4f3ee;
  --surface-3: #ebe9e2;
  --border: #e5e2da;
  --border-strong: #d2cec3;
  --text: #15161a;
  --text-2: #33363e;
  --muted: #676b74;
  --faint: #9a9ea7;
  --gold: #f6c63c;
  --gold-hi: #f2b705;
  --gold-text: #9a6b00;
  --gold-ink: #1b1505;
  --gold-soft: rgba(246, 198, 60, 0.18);
  --gold-line: rgba(196, 140, 0, 0.35);
  --green: #148a55;
  --green-soft: rgba(20, 138, 85, 0.1);
  --red: #d22f36;
  --red-soft: rgba(210, 47, 54, 0.09);
  --orange: #c4620a;
  --orange-soft: rgba(224, 123, 18, 0.12);
  --blue: #2b6fd6;
  --blue-soft: rgba(43, 111, 214, 0.1);
  --purple: #7c4fd0;
  --purple-soft: rgba(124, 79, 208, 0.1);
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.04), 0 8px 24px rgba(20, 20, 30, 0.06);
  --shadow-pop: 0 24px 60px rgba(20, 20, 30, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
::selection {
  background: var(--gold);
  color: var(--gold-ink);
}
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-xs);
}
.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}
.muted {
  color: var(--muted);
}
.faint {
  color: var(--faint);
}
.gold {
  color: var(--gold-text);
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.icon.sm {
  width: 15px;
  height: 15px;
}
.icon.lg {
  width: 22px;
  height: 22px;
}

/* ---------- Brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffd866, #f6c63c 45%, #c99712);
  color: var(--gold-ink);
  box-shadow: 0 6px 18px rgba(246, 198, 60, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.brand-mark svg {
  width: 20px;
  height: 20px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text .k {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: var(--gold-text);
}
.brand-text .v {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
h1 {
  font-size: 28px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.lead {
  color: var(--text-2);
  font-size: 15.5px;
}
p {
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.08s var(--ease), color 0.15s;
  user-select: none;
}
.btn:hover {
  background: var(--surface-3);
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled],
.btn.is-loading {
  opacity: 0.55;
  pointer-events: none;
}
.btn.primary {
  background: var(--gold);
  border-color: transparent;
  color: var(--gold-ink);
  box-shadow: 0 6px 18px rgba(246, 198, 60, 0.18);
}
.btn.primary:hover {
  background: var(--gold-hi);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn.danger {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
}
.btn.danger:hover {
  background: var(--red);
  color: #fff;
}
.btn.sm {
  --h: 32px;
  padding: 0 11px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}
.btn.lg {
  --h: 48px;
  padding: 0 22px;
  font-size: 15px;
}
.btn.block {
  width: 100%;
}
.btn.icon-only {
  width: var(--h);
  padding: 0;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > label,
.label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-2);
}
.hint {
  font-size: 12.5px;
  color: var(--muted);
}
.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea {
  height: auto;
  min-height: 90px;
  padding: 10px 12px;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa0ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold-line);
  box-shadow: var(--focus);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--faint);
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group > .icon {
  position: absolute;
  left: 12px;
  color: var(--faint);
  pointer-events: none;
}
.input-group > .input {
  padding-left: 38px;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14px;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}
.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.15s;
}
.switch span::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 0.18s var(--ease), background 0.15s;
}
.switch input:checked + span {
  background: var(--gold);
  border-color: transparent;
}
.switch input:checked + span::after {
  transform: translateX(16px);
  background: var(--gold-ink);
}
.switch input:focus-visible + span {
  box-shadow: var(--focus);
}

/* OTP boxes */
.otp {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.otp input {
  width: 48px;
  height: 58px;
  text-align: center;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  caret-color: var(--gold);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.otp input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--focus);
}
.otp .sep {
  width: 10px;
}
.otp.error input {
  border-color: var(--red);
  animation: shake 0.35s;
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* ---------- Cards & layout ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-head h2,
.card-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-body {
  padding: 20px;
}
.card-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}
.row {
  display: flex;
  align-items: center;
  gap: var(--gap, 12px);
}
.row.wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.grid {
  display: grid;
  gap: var(--gap, 16px);
}
.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.divider {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title h2 {
  font-size: 17px;
}

/* ---------- Badges, chips, pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.badge.plain::before {
  display: none;
}
.badge.green {
  background: var(--green-soft);
  color: var(--green);
}
.badge.red {
  background: var(--red-soft);
  color: var(--red);
}
.badge.orange {
  background: var(--orange-soft);
  color: var(--orange);
}
.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.badge.gold {
  background: var(--gold-soft);
  color: var(--gold-text);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover {
  background: var(--surface-2);
}
.chip.active {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--gold-text);
}
.kbd {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
}

/* ---------- Avatar ---------- */
.avatar {
  --s: 40px;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 750;
  font-size: calc(var(--s) * 0.38);
  letter-spacing: 0.02em;
  color: var(--gold-ink);
  background: linear-gradient(145deg, #ffd866, #e9b42a);
  position: relative;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.xs {
  --s: 26px;
}
.avatar.sm {
  --s: 32px;
}
.avatar.lg {
  --s: 64px;
}
.avatar.xl {
  --s: 104px;
}
.avatar.c1 {
  background: linear-gradient(145deg, #7fb4ff, #4a83de);
  color: #fff;
}
.avatar.c2 {
  background: linear-gradient(145deg, #6fe3a9, #2fb874);
  color: #062514;
}
.avatar.c3 {
  background: linear-gradient(145deg, #cdb0ff, #9a6ee8);
  color: #fff;
}
.avatar.c4 {
  background: linear-gradient(145deg, #ffb58f, #f07a45);
  color: #2a0f02;
}
.avatar.c5 {
  background: linear-gradient(145deg, #ff8f93, #e34f55);
  color: #fff;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
  position: sticky;
  top: 0;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tbody tr {
  transition: background 0.12s;
}
.table tbody tr.clickable {
  cursor: pointer;
}
.table tbody tr:hover {
  background: var(--surface-2);
}

/* ---------- List rows ---------- */
.list {
  display: flex;
  flex-direction: column;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child {
  border-bottom: 0;
}
.list-item .grow {
  flex: 1;
  min-width: 0;
}
.list-item .title {
  font-weight: 650;
}
.list-item .sub {
  font-size: 13px;
  color: var(--muted);
}
.icon-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-3);
  color: var(--text-2);
}
.icon-tile.gold {
  background: var(--gold-soft);
  color: var(--gold-text);
}
.icon-tile.green {
  background: var(--green-soft);
  color: var(--green);
}
.icon-tile.red {
  background: var(--red-soft);
  color: var(--red);
}
.icon-tile.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.icon-tile.purple {
  background: var(--purple-soft);
  color: var(--purple);
}
.icon-tile.orange {
  background: var(--orange-soft);
  color: var(--orange);
}

/* ---------- Tabs / segmented ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab {
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 650;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--text);
  border-bottom-color: var(--gold);
}
.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.segmented button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* ---------- Alerts / callouts ---------- */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
}
.callout > .icon {
  margin-top: 1px;
}
.callout .title {
  font-weight: 700;
  margin-bottom: 2px;
}
.callout.info {
  border-color: rgba(91, 156, 246, 0.3);
  background: var(--blue-soft);
}
.callout.info > .icon {
  color: var(--blue);
}
.callout.success {
  border-color: rgba(61, 214, 140, 0.3);
  background: var(--green-soft);
}
.callout.success > .icon {
  color: var(--green);
}
.callout.warning {
  border-color: rgba(255, 159, 67, 0.35);
  background: var(--orange-soft);
}
.callout.warning > .icon {
  color: var(--orange);
}
.callout.critical,
.callout.danger {
  border-color: rgba(242, 85, 90, 0.35);
  background: var(--red-soft);
}
.callout.critical > .icon,
.callout.danger > .icon {
  color: var(--red);
}
.callout.gold {
  border-color: var(--gold-line);
  background: var(--gold-soft);
}
.callout.gold > .icon {
  color: var(--gold-text);
}

/* ---------- Empty / skeleton ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--muted);
}
.empty .icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}
.empty h3 {
  color: var(--text);
}
.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 6, 8, 0.62);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.15s ease-out;
}
.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  animation: pop 0.2s var(--ease);
}
.modal.wide {
  width: min(760px, 100%);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 6px;
}
.modal-body {
  padding: 14px 22px 22px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 400px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  font-size: 14px;
  animation: pop 0.22s var(--ease);
}
.toast.success .icon {
  color: var(--green);
}
.toast.error .icon {
  color: var(--red);
}
.toast.info .icon {
  color: var(--gold-text);
}

/* ---------- Dropdown menu ---------- */
.menu-wrap {
  position: relative;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  animation: pop 0.14s var(--ease);
}
.menu button,
.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-2);
}
.menu button:hover,
.menu a:hover {
  background: var(--surface-2);
  color: var(--text);
}
.menu .danger {
  color: var(--red);
}
.menu hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ---------- Key/value ---------- */
.kv {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 10px 16px;
  font-size: 14px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .kv dd {
    margin-bottom: 10px;
  }
}

/* ---------- Status dot ---------- */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--faint);
  flex: none;
}
.dot.green {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.dot.red {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.dot.orange {
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.dot.gold {
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

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