/* ════════════════════════════════════════════════════════════════════
   PuenTrade — Black / Blue / Gray / White
   Solid surfaces · no glow / glass / aurora
   Load AFTER styles.css
   ════════════════════════════════════════════════════════════════════ */





/* ── Kill decoration ────────────────────────────────────────────── */

.aurora,
.aurora__blob,
.aurora__grid,
#particles,
.cursor-glow {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  animation: none !important;
}

body::before {
  background: var(--bg-0) !important;
  opacity: 1 !important;
}

body {
  font-family: var(--ff-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
}



/* Soften ticker — secondary noise */
.ticker-strip {
  display: none !important;
}

/* ── Type ───────────────────────────────────────────────────────── */

.view__title,
.brand__name,
.card__title,
.kpi__value,
h1, h2, h3 {
  font-family: var(--ff-display);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  filter: none !important;
}

.view__title {
  font-size: clamp(1.35rem, 1.8vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1) !important;
  -webkit-text-fill-color: var(--text-1) !important;
  line-height: 1.25;
}

.view__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}

.view__subtitle {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.5;
  margin-top: 6px;
}

.view__header {
  margin-bottom: 20px;
}

.card__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.card__sub,
.muted {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.5;
}

.kpi__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-3);
}

.kpi__value {
  font-size: 1.4rem;
  font-weight: 650;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}

.kpi__hint {
  font-size: 0.78rem;
  color: var(--text-2);
  margin-top: 4px;
}

/* ── Sidebar ────────────────────────────────────────────────────── */

.sidebar {
  background: var(--bg-1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-right: 1px solid var(--border);
  box-shadow: none !important;
  padding: 12px 10px;
}

.sidebar__brand {
  position: relative;
  padding: 6px 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  align-items: center;
}

.brand__logo {
  background: rgba(37, 99, 235, 0.12) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  box-shadow: none !important;
}

.brand__name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1) !important;
  -webkit-text-fill-color: var(--text-1) !important;
}

.brand__sub {
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-3);
}

.sidebar__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  box-shadow: none;
  z-index: 5;
}

.sidebar__toggle:hover {
  background: var(--bg-2);
  color: var(--text-1);
  border-color: var(--border-strong);
  box-shadow: none;
}

.sidebar:not(.is-collapsed) .brand__text {
  padding-right: 32px;
}

.sidebar.is-collapsed .sidebar__brand {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 12px;
}

.sidebar.is-collapsed .sidebar__toggle {
  position: static;
  transform: none;
  margin: 0 auto;
}

.sidebar.is-collapsed .sidebar__toggle svg {
  transform: rotate(180deg);
}

.nav__section {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-4);
  padding: 4px 10px 2px;
}

.nav__item {
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  min-height: 38px;
  background: transparent;
  box-shadow: none !important;
}

.nav__item:hover {
  background: rgba(var(--ink), 0.04);
  color: var(--text-1);
}

.nav__item.is-active {
  background: rgba(37, 99, 235, 0.12) !important;
  color: var(--text-1) !important;
  box-shadow: none !important;
  font-weight: 600;
}

.nav__item.is-active::before {
  background: var(--accent) !important;
  box-shadow: none !important;
  width: 2px;
  top: 10px;
  bottom: 10px;
}

.nav__item.is-active .nav__icon {
  color: var(--accent-3) !important;
  filter: none !important;
}

.nav__icon {
  color: var(--text-3);
  filter: none !important;
}

.nav__badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text-3);
  border: none;
  box-shadow: none;
}

.nav__pulse {
  display: none !important;
}

.sidebar.is-collapsed .nav__item {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.is-collapsed .nav__item.is-active::before {
  display: none;
}

/* ── Topbar ─────────────────────────────────────────────────────── */

.topbar {
  height: var(--topbar-h);
  background: var(--bg-1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none !important;
  padding: 0 16px;
}

.topbar__search {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 34px;
  box-shadow: none !important;
}

.topbar__search:focus-within {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
  background: var(--bg-0);
}

.topbar__search input {
  font-size: 0.85rem;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-2) !important;
  box-shadow: none !important;
  transform: none !important;
}

.icon-btn:hover {
  background: var(--bg-2) !important;
  color: var(--text-1) !important;
  border-color: var(--border-strong) !important;
  transform: none !important;
  box-shadow: none !important;
}

.acc-switch--topbar {
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
}

/* ── Cards / KPI — solid, no glass ──────────────────────────────── */

.main {
  padding: calc(var(--topbar-h) + 18px) 22px 56px !important;
  background: var(--bg-0);
}

.card,
.kpi {
  background: var(--surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  transform: none !important;
}

.card {
  padding: 16px 16px;
}

.kpi {
  padding: 14px 14px;
}

.card::before,
.kpi::before,
.kpi::after,
.card::after {
  display: none !important;
  content: none !important;
}

.card:hover,
.kpi:hover {
  transform: none !important;
  border-color: var(--border-strong) !important;
  box-shadow: none !important;
}

.card__head {
  margin-bottom: 12px;
}

.kpi-grid {
  gap: 10px;
  margin-bottom: 16px;
}

.grid-2-1,
.grid-1-2,
.grid-1-1,
.grid-1-1-1 {
  gap: 12px;
  margin-bottom: 12px;
}

/* Hero / motivation — de-slop */
.hero-card,
.motivation-card,
[class*="hero-card"] {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.hero-card__sparkles,
.hero-card__sparkles::before,
.hero-card__sparkles::after {
  display: none !important;
}

/* ── Buttons ────────────────────────────────────────────────────── */

.btn {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  min-height: 36px;
  padding: 8px 14px;
  letter-spacing: 0;
  box-shadow: none !important;
  transition: background 0.1s ease, border-color 0.1s ease, opacity 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent) !important;
  color: #fff !important;
  border: 1px solid transparent;
  box-shadow: none !important;
}

.btn--primary:hover {
  background: var(--accent-2) !important;
  filter: none;
  box-shadow: none !important;
}

.btn--ghost {
  background: transparent !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-2) !important;
}

.btn--ghost:hover {
  background: var(--bg-2) !important;
  color: var(--text-1) !important;
  border-color: var(--border-strong) !important;
}

.btn--block {
  min-height: 40px;
}

/* Chips */
.chip {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  box-shadow: none;
  min-height: 30px;
}

.chip:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

.chip.is-active {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.4);
  color: #93c5fd;
  box-shadow: none;
}

.seg {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
}

/* ── Forms ──────────────────────────────────────────────────────── */

.input,
.select,
textarea,
input.input,
select.select {
  font-size: 0.9rem;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 38px;
  box-shadow: none !important;
}

.input:focus,
.select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ── Tables ─────────────────────────────────────────────────────── */

table th,
thead th {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-3) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 12px !important;
}

table td,
tbody td {
  font-size: 0.85rem;
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(var(--ink), 0.04) !important;
}

tbody tr:hover {
  background: rgba(var(--ink), 0.025) !important;
}

.is-pos,
.pnl.is-pos {
  color: var(--win);
}

.is-neg,
.pnl.is-neg {
  color: var(--loss);
}

.is-pos,
.is-neg,
.pnl,
.num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ── Menus / modals ─────────────────────────────────────────────── */

.avatar-menu,
.notif-panel,
.dropdown__menu,
.acc-switch-menu,
.popover,
.modal__box,
.drawer__panel {
  background: var(--bg-1) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-lg) !important;
  backdrop-filter: none !important;
}

.modal__overlay {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.avatar-menu__item {
  border-radius: 6px;
  color: var(--text-2);
  min-height: 38px;
  font-size: 0.875rem;
}

.avatar-menu__item:hover {
  background: var(--bg-2);
  color: var(--text-1);
}

/* Boot loader — calm */
.boot-loader {
  background: var(--bg-0) !important;
}

.boot-text {
  font-family: var(--ff-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.boot-bar {
  background: var(--bg-2);
}

.boot-bar span {
  background: var(--accent);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--ink), 0.1);
  border-radius: 8px;
}

::selection {
  background: rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
}

/* Kill leftover purple glows / gradients on common chrome */
.nav__item.is-active,
.btn--primary,
.topbar__avatar,
.account-card {
  box-shadow: none !important;
}

.account-card {
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
}

.account-card::before {
  display: none !important;
}

/* Paywall / badges — quieter */
.paywall__badge,
.nav__badge--alert {
  box-shadow: none !important;
}

/* Toast */
.toast {
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
}

/* Mobile */
@media (max-width: 820px) {
  .main {
    padding: calc(var(--topbar-h) + 12px) 12px 40px !important;
  }

  .nav__item {
    min-height: 42px;
  }

  .kpi__value {
    font-size: 1.25rem;
  }
}

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

/* ════════════════════════════════════════════════════════════════════
   DAYLIGHT — light-theme surface corrections
   ────────────────────────────────────────────────────────────────────
   Most of the UI inverts on its own: the chrome reads from tokens, and
   the ~450 low-alpha veils now mix from --ink, which this theme flips to
   dark slate. What can't invert automatically is the set of panels that
   hardcode a dark literal (rgba(18,18,25,…) and friends) instead of a
   token. Those are re-pointed at the surface tokens here.

   Scoped to html[data-theme="daylight"], so the dark themes are untouched.
   Loaded from ui-readable.css, which is the last sheet in, so these land
   after the literals they replace.
   ════════════════════════════════════════════════════════════════════ */

/* Raised panels — cards, popovers, menus, toolbars */
html[data-theme="daylight"] .card,
html[data-theme="daylight"] .kpi,
html[data-theme="daylight"] .pb-card,
html[data-theme="daylight"] .tm-kpi,
html[data-theme="daylight"] .hero-card,
html[data-theme="daylight"] .ai-hero,
html[data-theme="daylight"] .ai-result,
html[data-theme="daylight"] .extract-card,
html[data-theme="daylight"] .vsn-result,
html[data-theme="daylight"] .jrnl-stat,
html[data-theme="daylight"] .cmdk,
html[data-theme="daylight"] .dropdown-pop,
html[data-theme="daylight"] .acc-switch-menu,
html[data-theme="daylight"] .graph-legend,
html[data-theme="daylight"] .graph-controls,
html[data-theme="daylight"] .chart-toolbar,
html[data-theme="daylight"] .tm-controls,
html[data-theme="daylight"] .tw-header,
html[data-theme="daylight"] .lo-savebar,
html[data-theme="daylight"] .pdpa-banner,
html[data-theme="daylight"] .price-compare,
html[data-theme="daylight"] .gallery-compact-card,
html[data-theme="daylight"] .compare-wide-bento-card {
  background: var(--surface) !important;
  border-color: var(--border);
}

/* Recessed wells — inputs, tracks, stages, inner strips */
html[data-theme="daylight"] .input,
html[data-theme="daylight"] .select,
html[data-theme="daylight"] .textarea,
html[data-theme="daylight"] .seg,
html[data-theme="daylight"] .topbar__search,
html[data-theme="daylight"] .cv-hero__search,
html[data-theme="daylight"] .graph-stage,
html[data-theme="daylight"] .cv-worldmap,
html[data-theme="daylight"] .vsn-progress,
html[data-theme="daylight"] .img-caption-strip,
html[data-theme="daylight"] .compare-img-box,
html[data-theme="daylight"] .price-compare__table,
html[data-theme="daylight"] .filters-cats {
  background: var(--bg-2) !important;
  border-color: var(--border);
}

/* The featured KPI tile leads with an accent wash rather than a dark slab. */
html[data-theme="daylight"] .kpi-grid > .kpi:first-child {
  background:
    linear-gradient(180deg, rgba(var(--accent-glow), 0.08), rgba(var(--accent-glow), 0.02)) !important;
  border-color: rgba(var(--accent-glow), 0.28) !important;
}

/* Tooltips stay inverted — dark chip on light page reads as "floating",
   which is the convention users expect from a tooltip. */
html[data-theme="daylight"] .pnl-tip,
html[data-theme="daylight"] .day-chart-tooltip,
html[data-theme="daylight"] .info-tooltip-btn .tooltip-content {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.9);
}

/* Modal / drawer scrims: lighter than the dark theme's, or the page
   underneath disappears entirely behind a near-black wash. */
html[data-theme="daylight"] .modal-backdrop,
html[data-theme="daylight"] .trade-drawer__overlay,
html[data-theme="daylight"] .sidebar.is-open::after {
  background: rgba(15, 23, 42, 0.32) !important;
}

/* Sidebar and topbar sit one step back from the white content surface so
   the app frame still reads as a frame. */
html[data-theme="daylight"] .sidebar,
html[data-theme="daylight"] .topbar {
  background: var(--bg-0) !important;
}

/* Scrollbars */
html[data-theme="daylight"] ::-webkit-scrollbar-thumb {
  background: rgba(var(--ink), 0.18);
}
html[data-theme="daylight"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--ink), 0.28);
}
