/* Cold alpine skin layered over the base component system. */
:root {
  --bg: #050d16;
  --surface: #0a1722;
  --surface-2: #102231;
  --line: rgba(185, 225, 255, .105);
  --text: #f2f8fc;
  --muted: #8299aa;
  --cyan: #8be9ff;
  --blue: #72a9ff;
  --yellow: #d8e9ff;
  --trace: rgba(165, 210, 238, .38);
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, transparent 0, rgba(2, 8, 14, .08) 42%, rgba(2, 7, 13, .63) 100%),
    repeating-linear-gradient(180deg, rgba(198, 229, 247, .012) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: .58;
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 110px rgba(0, 4, 9, .82);
}

.mountain-bg {
  position: fixed;
  z-index: 0;
  inset: -22px;
  background-image:
    linear-gradient(180deg, rgba(5, 13, 22, .45) 0%,
      rgba(5, 13, 22, .76) 36%, rgba(5, 13, 22, .97) 74%),
    url('/assets/mountains.png');
  background-size: cover;
  background-position: 50% 24%;
  filter: blur(8px) saturate(.56) contrast(1.12);
  opacity: .61;
  transform: scale(1.055);
  pointer-events: none;
}

.ambient { z-index: 0; filter: blur(90px); opacity: .1; }
.ambient-one { background: #9be9ff; }
.ambient-two { background: #487fda; }
.shell { z-index: 1; }
.topbar {
  background: linear-gradient(180deg, rgba(4,11,18,.98) 55%, transparent);
}
.topbar::after {
  content: "SECURE MARKET TRACE";
  position: absolute;
  right: 50px;
  bottom: 7px;
  color: rgba(151, 190, 215, .38);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 7px;
  letter-spacing: .16em;
  display: none;
}
.brand-copy { min-width: 0; }
.brand-mark {
  border-color: rgba(139,233,255,.27);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(139,233,255,.14), rgba(114,169,255,.055));
  box-shadow: inset 0 0 18px rgba(139,233,255,.06), 0 8px 28px rgba(0,0,0,.2);
}
.icon-button {
  flex: 0 0 40px;
  background: rgba(9,22,33,.62);
  backdrop-filter: blur(14px);
}
.eyebrow, .brand-copy small {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: .19em;
}
.hero {
  position: relative;
  margin-top: 4px;
  padding: 20px 16px 25px;
  border-left: 1px solid var(--trace);
  background: linear-gradient(90deg, rgba(127, 190, 225, .045), transparent 64%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  left: -1px;
  width: 18px;
  height: 1px;
  background: var(--trace);
}
.hero::before { top: 0; }
.hero::after { bottom: 0; }
.pulse {
  border-radius: 5px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  background: rgba(112, 184, 218, .055);
}
.metric {
  background: linear-gradient(150deg, rgba(18,39,54,.74), rgba(7,18,28,.66));
  backdrop-filter: blur(16px);
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0,0,0,.16), inset 0 1px rgba(212,239,255,.025);
}
.metric.accent {
  background: linear-gradient(145deg, rgba(89,178,211,.2), rgba(40,78,118,.12));
  border-color: rgba(139,233,255,.2);
}
.signal-card {
  background: linear-gradient(145deg, rgba(15,34,48,.86), rgba(7,19,29,.9));
  backdrop-filter: blur(18px);
  border-radius: 15px;
  box-shadow: 0 14px 38px rgba(0,0,0,.19), inset 0 1px rgba(214,239,255,.025);
}
.signal-card::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 11px;
  height: 11px;
  border-right: 1px solid rgba(146, 198, 225, .18);
  border-bottom: 1px solid rgba(146, 198, 225, .18);
}
.score-badge { border-radius: 8px; }
.tag { border: 1px solid rgba(176,215,237,.045); }
.quality-preview, .collection-card, .breakdown-row {
  background: rgba(9,23,34,.7);
  backdrop-filter: blur(16px);
  border-radius: 14px;
}
.bottom-nav {
  background: rgba(4,11,18,.93);
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav button { position: relative; }
.bottom-nav button.active::before {
  content: "";
  position: absolute;
  top: -8px;
  width: 24px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(139,233,255,.48);
}
.sheet {
  background: linear-gradient(165deg, rgba(14,31,44,.98), rgba(5,15,23,.995));
  border-radius: 17px 17px 0 0;
}
.price-history {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.price-history h3 { margin: 0 0 13px; font-size: 15px; }
.history-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 11px;
}
.history-summary span {
  padding: 10px;
  border: 1px solid rgba(176, 215, 237, .07);
  border-radius: 10px;
  background: rgba(163, 211, 238, .035);
  color: var(--muted);
  font-size: 9px;
}
.history-summary b {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
}
.history-event {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  padding: 10px 2px;
  border-top: 1px solid rgba(176, 215, 237, .055);
  font-size: 10px;
}
.history-event time {
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
}
.history-event span { text-align: right; }
.history-event i { color: var(--cyan); font-style: normal; padding: 0 3px; }
.history-empty {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.admin-actions {
  display: grid;
  gap: 9px;
  margin-bottom: 28px;
}
.control-action, .save-button {
  width: 100%;
  border: 1px solid rgba(139, 233, 255, .13);
  border-radius: 13px;
  background: rgba(9, 25, 37, .78);
  color: var(--text);
  padding: 14px 16px;
  text-align: left;
}
.control-action.primary, .save-button {
  background: linear-gradient(135deg, rgba(86, 177, 214, .25), rgba(43, 93, 128, .17));
  border-color: rgba(139, 233, 255, .25);
}
.control-action b { display: block; font-size: 13px; }
.control-action span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.control-action:disabled, .save-button:disabled { opacity: .48; }
.settings-card {
  margin: 0 0 28px;
  padding: 6px 15px;
  border: 1px solid rgba(176, 215, 237, .08);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(13, 31, 44, .82), rgba(6, 18, 28, .82));
  backdrop-filter: blur(16px);
}
.toggle-row, .field-row {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(176, 215, 237, .06);
}
.toggle-row span { display: grid; gap: 4px; }
.toggle-row b, .field-row span { font-size: 11px; }
.toggle-row small, .setting-note { color: var(--muted); font-size: 9px; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row i {
  width: 38px; height: 21px; flex: 0 0 auto; border-radius: 12px;
  background: #233545; position: relative; transition: .2s;
}
.toggle-row i::after {
  content: ""; position: absolute; width: 15px; height: 15px; top: 3px; left: 3px;
  border-radius: 50%; background: #8195a7; transition: .2s;
}
.toggle-row input:checked + i { background: rgba(75, 207, 190, .34); }
.toggle-row input:checked + i::after { left: 20px; background: #70ead9; }
.field-row input, .field-row select {
  width: min(48%, 210px); border: 1px solid rgba(176, 215, 237, .11);
  border-radius: 9px; background: rgba(2, 12, 19, .7); color: var(--text);
  padding: 9px 10px; font-size: 10px; outline: none;
}
.save-button { margin: 12px 0; text-align: center; font-weight: 800; font-size: 11px; }
.save-button.secondary { background: rgba(116, 176, 207, .08); }
.setting-note { line-height: 1.5; padding: 8px 0 2px; }
.status-pill {
  color: var(--cyan); border: 1px solid rgba(139, 233, 255, .15);
  border-radius: 8px; padding: 6px 8px; font: 8px ui-monospace, Consolas, monospace;
}
.beta-user { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid rgba(176,215,237,.06); }
.beta-user span { display: grid; gap: 3px; }
.beta-user b { font-size: 10px; }
.beta-user small { color: var(--muted); font-size: 9px; }
.beta-user button { border: 0; color: #ff8998; background: transparent; font-size: 9px; }

@media (min-width: 500px) {
  .topbar::after { display: block; }
}

@media (max-width: 380px) {
  .hero { padding-inline: 12px; }
}
