/* =========================================================
   PRO BASKET — base tokens & shared components
   Used by both the storefront and the admin panel.
   Brand colors and fonts are injected from the admin
   (Appearance) as CSS variables in <style id="pb-theme">.
   Dark = near-black with a volt accent. Light = bright,
   Apple-style surfaces with a blue accent.
   ========================================================= */

:root {
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --container: 1240px;
  --header-h: 76px;
  --gold: #FFC23D;
  --hot: #FF3B4A;
}

[data-theme="dark"] {
  --bg: #030604;
  --bg-2: #080C09;
  --bg-3: #101611;
  --text: #F3F5F0;
  --text-2: #CBD0C6;
  --muted: #8F968B;
  --faint: #5C6259;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --glass: rgba(255, 255, 255, .05);
  --glass-2: rgba(255, 255, 255, .09);
  --glass-strong: rgba(9, 13, 10, .84);
  --surface: rgba(16, 19, 17, .78);
  --surface-solid: #0F1210;
  --card-bg: linear-gradient(180deg, #131614, #0B0D0C);
  --card-ring: inset 0 0 0 1px rgba(255, 255, 255, .07);
  --hl: rgba(255, 255, 255, .1);
  --shadow: 0 30px 60px -34px rgba(0, 0, 0, .92);
  --shadow-sm: 0 14px 30px -18px rgba(0, 0, 0, .85);
  --btn-ring: rgba(0, 0, 0, .45);
  --btn-glass-bg: rgba(255, 255, 255, .06);
  --btn-glass-ring: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .12);
  --ink-bg: #F3F5F0;
  --ink-fg: #0B1004;
  --field-bg: rgba(255, 255, 255, .04);
  --field-ring: rgba(255, 255, 255, .11);
  --success: #3EE29A;
  --danger: #FF5470;
  --warn: #FFC23D;
  --info: #5AB0FF;
  --violet: #B49CFF;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F5F5F7;
  --bg-2: #FFFFFF;
  --bg-3: #E8E8ED;
  --text: #1D1D1F;
  --text-2: #424245;
  --muted: #6E6E73;
  --faint: #A1A1A6;
  --line: rgba(0, 0, 0, .08);
  --line-2: rgba(0, 0, 0, .14);
  --glass: rgba(255, 255, 255, .72);
  --glass-2: #FFFFFF;
  --glass-strong: rgba(255, 255, 255, .88);
  --surface: #FFFFFF;
  --surface-solid: #FFFFFF;
  --card-bg: #FFFFFF;
  --card-ring: inset 0 0 0 1px rgba(0, 0, 0, .06);
  --hl: rgba(255, 255, 255, .95);
  --shadow: 0 30px 60px -36px rgba(0, 0, 0, .28);
  --shadow-sm: 0 12px 28px -18px rgba(0, 0, 0, .22);
  --btn-ring: rgba(0, 0, 0, .08);
  --btn-glass-bg: rgba(255, 255, 255, .88);
  --btn-glass-ring: inset 0 0 0 1.5px rgba(0, 0, 0, .12);
  --ink-bg: #1D1D1F;
  --ink-fg: #FFFFFF;
  --field-bg: #FFFFFF;
  --field-ring: rgba(0, 0, 0, .14);
  --success: #12855A;
  --danger: #D70F3B;
  --warn: #A35F00;
  --info: #0066CC;
  --violet: #5E5CE6;
  color-scheme: light;
}

/* Sections that pin their own theme (nav, drawers, footer) still need their text color. */
[data-theme] { color: var(--text); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
svg { display: inline-block; vertical-align: middle; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; font-family: var(--font-display); letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(var(--primary-rgb), .35); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.ico { flex: none; }
[data-theme="dark"] { scrollbar-color: #2A302B transparent; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography helpers ---------- */
.display { font-family: var(--font-display); letter-spacing: -.03em; }
.h1 { font-family: var(--font-display); font-size: clamp(34px, 5.4vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.h2 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.h3 { font-family: var(--font-display); font-size: clamp(18px, 2vw, 22px); line-height: 1.25; letter-spacing: -.02em; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.tiny { font-size: .75rem; }
.strong { font-weight: 700; }
.mono { font-family: var(--font-mono); font-size: .9em; letter-spacing: .01em; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary-ink); }

/* Italic accent words in headlines: *like this* in the admin. */
.acc {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  background: linear-gradient(100deg, var(--acc-a) 0%, var(--primary) 45%, var(--acc-c) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.narrow { max-width: 640px; margin-inline: auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 10px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; } .mt-5 { margin-top: 36px; }
.mb-2 { margin-bottom: 10px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ---------- Background stage: grid + drifting aura ---------- */
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.stage-grid {
  position: absolute; inset: -80px;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask: radial-gradient(70% 60% at 50% 0%, #000 10%, transparent 75%);
  mask: radial-gradient(70% 60% at 50% 0%, #000 10%, transparent 75%);
  animation: gridShift 24s linear infinite;
}
.aura { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .22; will-change: transform; }
.aura.a1 { width: 46vw; height: 46vw; top: -22vw; left: -12vw; background: var(--brand); opacity: .13; animation: auraDrift1 26s ease-in-out infinite; }
.aura.a2 { width: 40vw; height: 40vw; top: 10vh; right: -16vw; background: var(--glint); opacity: .14; animation: auraDrift2 32s ease-in-out infinite; }
.aura.a3 { width: 34vw; height: 34vw; bottom: -18vw; left: 30vw; background: #8B6CFF; opacity: .08; animation: auraDrift3 38s ease-in-out infinite; }
:root[data-theme="light"] .stage-grid { background-image: linear-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, .04) 1px, transparent 1px); }
:root[data-theme="light"] .aura.a1 { background: #8EC5FF; opacity: .35; }
:root[data-theme="light"] .aura.a2 { background: #C9B8FF; opacity: .3; }
:root[data-theme="light"] .aura.a3 { background: #A8F0D8; opacity: .22; }
@keyframes gridShift { to { background-position: 72px 72px; } }
@keyframes auraDrift1 { 50% { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes auraDrift2 { 50% { transform: translate(-6vw, 8vh) scale(1.1); } }
@keyframes auraDrift3 { 50% { transform: translate(4vw, -6vh) scale(1.12); } }

/* ---------- Surfaces ---------- */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow);
}
.panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: var(--card-ring), var(--shadow);
}
.panel-flat { box-shadow: var(--card-ring); }
.panel-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }
.perf { border: 0; border-top: 1px dashed var(--line-2); margin: 18px 0; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform .25s var(--spring), box-shadow .3s var(--ease), background-color .2s, color .2s, opacity .2s, filter .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn .ico { transition: transform .3s var(--ease); }
.btn:hover .ico-arrow-right, .btn:hover > .ico:last-child:not(:first-child) { transform: translateX(3px); }

.btn-primary {
  color: var(--on-primary);
  background: linear-gradient(180deg, var(--primary-hi), var(--primary) 55%, var(--primary-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 1px var(--btn-ring), 0 14px 34px -12px rgba(var(--primary-rgb), .65);
}
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 1px var(--btn-ring), 0 18px 40px -12px rgba(var(--primary-rgb), .85); filter: saturate(1.08); }

.btn-glint {
  color: var(--on-glint-btn);
  background: linear-gradient(180deg, var(--glint-btn-hi), var(--glint-btn) 55%, var(--glint-btn-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px var(--btn-ring), 0 14px 30px -14px rgba(var(--glint-rgb), .8);
}
.btn-glint:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 0 1px var(--btn-ring), 0 18px 36px -12px rgba(var(--glint-rgb), .9); }

.btn-accent {
  color: var(--on-accent);
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 14px 30px -14px rgba(var(--accent-rgb), .75);
}

.btn-glass {
  color: var(--text);
  background: var(--btn-glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--btn-glass-ring);
}
.btn-glass:hover { background-color: var(--glass-2); box-shadow: var(--btn-glass-ring), 0 10px 24px -14px rgba(0, 0, 0, .5); }

.btn-ink { color: var(--ink-fg); background: var(--ink-bg); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .6); }
.btn-ink:hover { filter: brightness(1.12); }

.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 55%), var(--danger);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 26px -14px rgba(255, 70, 100, .7);
}
.btn-success {
  color: #04140C;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 55%), #3EE29A;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 12px 26px -14px rgba(62, 226, 154, .7);
}
.btn-wa {
  color: #fff;
  background: linear-gradient(180deg, #3BE07A, #1EBE5A 55%, #179B49);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 28px -14px rgba(30, 190, 90, .8);
}
.btn-ghost { color: var(--text-2); background: transparent; }
.btn-ghost:hover { background: var(--glass-2); color: var(--text); }
.btn-link { height: auto; padding: 0; border-radius: 4px; color: var(--primary-ink); font-weight: 600; font-family: inherit; overflow: visible; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; transform: none; }

/* A soft light sweep, used on the main call-to-action buttons. */
.btn-shine::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sheen 4.5s 1.2s infinite;
  pointer-events: none;
}
@keyframes sheen { 40%, 100% { transform: translateX(120%); } }

.btn-sm { --h: 36px; padding: 0 15px; font-size: .85rem; gap: 6px; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 1.02rem; }
.btn-icon { width: var(--h); padding: 0; border-radius: 50%; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; }
.btn.is-loading::before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: calc(50% - 10px); top: calc(50% - 10px);
  border-radius: 50%;
  border: 2.5px solid var(--on-primary);
  border-color: var(--on-primary) transparent var(--on-primary) transparent;
  animation: spin .8s linear infinite;
}
.btn-glass.is-loading::before { border-color: var(--text) transparent var(--text) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.label { display: flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.label .req { color: var(--accent-ink); }
.help { display: block; font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--field-bg);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--field-ring);
  color: var(--text);
  outline: none;
  transition: box-shadow .2s, background-color .2s;
}
.textarea { height: auto; min-height: 110px; padding: 13px 16px; line-height: 1.5; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238F968B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
.select option { background: var(--surface-solid); color: var(--text); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .4); }
.input:focus, .select:focus, .textarea:focus {
  box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 4px rgba(var(--primary-rgb), .16);
}
.input.is-invalid, .textarea.is-invalid, .select.is-invalid { box-shadow: inset 0 0 0 1.5px var(--danger), 0 0 0 4px rgba(255, 84, 112, .14); }
.field-error { color: var(--danger); font-size: .82rem; margin-top: 6px; display: block; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .ico { position: absolute; left: 16px; color: var(--faint); pointer-events: none; }
.input-group > .input { padding-left: 44px; }
.input-group > .btn { position: absolute; right: 5px; }
input[type="color"] { width: 54px; height: 44px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass); cursor: pointer; }
input[type="file"] { font-size: .85rem; color: var(--muted); }
input[type="file"]::file-selector-button { margin-right: 10px; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--glass-2); color: var(--text); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; }

/* checkbox + radio */
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--field-bg); cursor: pointer; display: grid; place-items: center; transition: all .15s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: solid var(--on-primary); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--on-primary); transform: none; }

/* switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 27px; flex: none; border-radius: 99px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .3s var(--spring); }
.switch input:checked + .track { background: var(--primary); box-shadow: none; }
.switch input:checked + .track::after { transform: translateX(19px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Chips, badges, status ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--text-2);
  font-size: .88rem; font-weight: 500;
  white-space: nowrap;
  transition: background .2s, box-shadow .2s, color .2s, transform .25s var(--spring);
}
.chip img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.chip:hover { box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), .55); color: var(--text); }
.chip.is-active { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 22px -12px rgba(var(--primary-rgb), .8); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.badge-sale { background: var(--accent); color: var(--on-accent); }
.badge-hot { background: var(--primary); color: var(--on-primary); }
.badge-new { background: var(--glint); color: var(--on-glint); }
.badge-glass { background: rgba(10, 12, 11, .6); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.badge-muted { background: rgba(10, 12, 11, .72); color: #fff; }

.status { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-amber { color: var(--warn); background: rgba(255, 194, 61, .12); border-color: rgba(255, 194, 61, .3); }
.status-amber i { animation: blink 1.6s ease-in-out infinite; }
.status-cyan { color: var(--info); background: rgba(90, 176, 255, .12); border-color: rgba(90, 176, 255, .3); }
.status-green { color: var(--success); background: rgba(62, 226, 154, .12); border-color: rgba(62, 226, 154, .3); }
.status-red { color: var(--danger); background: rgba(255, 84, 112, .12); border-color: rgba(255, 84, 112, .3); }
.status-grey { color: var(--muted); background: var(--glass); border-color: var(--line-2); }
.status-violet { color: var(--violet); background: rgba(180, 156, 255, .13); border-color: rgba(180, 156, 255, .32); }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- Alerts & notes ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: .9rem; line-height: 1.5; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2); }
.note > .ico { margin-top: 2px; }
.note-info { box-shadow: inset 0 0 0 1px rgba(90, 176, 255, .35); background: rgba(90, 176, 255, .08); }
.note-info > .ico { color: var(--info); }
.note-warn { box-shadow: inset 0 0 0 1px rgba(255, 194, 61, .4); background: rgba(255, 194, 61, .08); }
.note-warn > .ico { color: var(--warn); }
.note-success { box-shadow: inset 0 0 0 1px rgba(62, 226, 154, .4); background: rgba(62, 226, 154, .08); }
.note-success > .ico { color: var(--success); }
.note-danger { box-shadow: inset 0 0 0 1px rgba(255, 84, 112, .4); background: rgba(255, 84, 112, .08); }
.note-danger > .ico { color: var(--danger); }

/* ---------- Stars ---------- */
.stars { position: relative; display: inline-flex; vertical-align: middle; line-height: 0; }
.stars-base, .stars-fill { display: inline-flex; gap: 2px; }
.stars-base { color: var(--line-2); }
.stars-base .ico { fill: currentColor; stroke: none; }
.stars-fill { position: absolute; inset: 0; width: var(--fill); overflow: hidden; color: var(--gold); }
.stars-fill .ico { fill: currentColor; stroke: none; }

/* ---------- Avatar ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex: none; }
.avatar-text { display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; font-family: var(--font-display); color: var(--on-primary); background: linear-gradient(135deg, var(--primary-hi), var(--primary-lo)); }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); background: var(--card-bg); box-shadow: var(--card-ring); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 13px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--glass); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--glass); }
.table .num { text-align: right; white-space: nowrap; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 400; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px;
  border-radius: 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 22px 44px -18px rgba(0, 0, 0, .7);
  font-size: .92rem; font-weight: 500;
  animation: toastIn .5s var(--spring) both;
}
.toast .ico { color: var(--primary-ink); }
.toast.is-success .ico { color: var(--primary-ink); }
.toast.is-error .ico { color: var(--danger); }
.toast.is-out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; visibility: hidden; pointer-events: none; }
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 4, 3, .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s var(--ease); }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-card {
  position: relative;
  width: min(100%, 460px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 var(--hl), 0 50px 100px -40px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(18px) scale(.97);
  transition: opacity .3s var(--ease), transform .5s var(--spring);
}
.modal.is-open .modal-card { opacity: 1; transform: none; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform .25s var(--spring), background .2s; }
.modal-x:hover { transform: rotate(90deg); background: var(--glass); }

/* ---------- Copy row (numbers, credentials) ---------- */
.copy-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line-2); }
.copy-row .copy-val { flex: 1 1 auto; min-width: 0; font-weight: 700; word-break: break-all; }
.copy-row .copy-label { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
[data-calm] *, [data-calm] *::before, [data-calm] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
