/* ---- Theme: Color Pop ----
   Y2K playful neo-brutalism: hot pink canvas, hard-edged black borders,
   crisp offset drop shadows, chunky pill buttons, and neon lime accents. ---- */

:root {
  --bg-primary: #180d24;
  --bg-surface: #26143b;
  --bg-card: #341a4e;
  --border-color: rgba(215, 215, 215, 0.718);
  --border-hover: #ff79c6;
  --text-main: #fdf2f8;
  --text-muted: #e9d5ff;
  --text-secondary: #fbcfe8;
  --color-accent: #b4cf6a;
  --color-accent-hover: #c6dc8a;
  --divider: rgba(244, 114, 182, 0.25);
  --rule: #f472b6;
  --nav-active: #b4cf6a;
  --nav-hover: #3b1d5c;
  --scope-mine: #f472b6;
  --scope-partner: #c084fc;
  --scope-together: #22d3ee;
  --color-pos: #4ade80;
  --color-neg: #fb7185;
  --color-warn: #fb923c;
  --color-liab: #f43f5e;
  --alloc-stock: #4ade80;
  --alloc-stock-intl: #86efac;
  --alloc-bond: #facc15;
  --alloc-bond-intl: #fef08a;
  --alloc-cash: #38bdf8;
  --alloc-other: #c084fc;

  --mark-tile: #41067d;
  --mark-bars: var(--color-accent);
  --mark-coin: var(--nav-hover);
  --mark-dollar: var(--rule);
}

[data-theme="light"] {
  --bg-primary: #fbb7e2;
  --bg-surface: #ffffff;
  --bg-card: #fff0f8;
  --border-color: #111111;
  --border-hover: #000000;
  --text-main: #111111;
  --text-muted: #581c87;
  --text-secondary: #3b0764;
  --color-accent: #6d28d9;
  --color-accent-hover: #5b21b6;
  --divider: rgba(17, 17, 17, 0.12);
  --rule: #111111;
  --nav-active: #6d28d9;
  --nav-hover: #fce7f3;
  --scope-mine: #db2777;
  --scope-partner: #7c3aed;
  --scope-together: #0891b2;
  --color-pos: #15803d;
  --color-neg: #be123c;
  --color-warn: #c2410c;
  --color-liab: #9f1239;
  --alloc-stock: #15803d;
  --alloc-stock-intl: #16a34a;
  --alloc-bond: #eab308;
  --alloc-bond-intl: #facc15;
  --alloc-cash: #0284c7;
  --alloc-other: #7c3aed;

  --mark-tile: var(--bg-primary);
  --mark-bars: #6d28d9;
  --mark-coin: #fff0f8;
  --mark-dollar: var(--color-pos);
}

.brand-icon {
  border: 2px solid var(--text-muted);
  box-shadow: 1px 1px 0 var(--rule);
}

/* Hard outlines and crisp offset box shadows */
.card {
  background: var(--bg-surface);
  border: 2.5px solid #111111;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #111111;
}

[data-theme="dark"] .card {
  border: 2px solid #f472b6;
  box-shadow: 4px 4px 0 #ff33aa;
}

/* App Header bar */
.app-header {
  border-bottom: 2.5px solid #111111;
  box-shadow: 0 3px 0 #111111;
}

[data-theme="dark"] .app-header {
  background: #1e0e2e;
  border-bottom: 2px solid #f472b6;
  box-shadow: 0 3px 0 #ff33aa;
}

/* Navigation tabs: chunky pills with hard shadows */
.tabs {
  gap: 0.35rem !important;
}

.tab {
  border: 2px solid #111111;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  padding: 0.35rem 0.95rem;
  margin: 0;
  box-shadow: 2px 2px 0 #111111;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.tab:hover {
  background: #fdf2f8;
  color: #111111;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #111111;
}

.tab[aria-current="page"] {
  background: #6d28d9;
  color: #ffffff;
  box-shadow: 2px 2px 0 #111111;
  font-weight: 800;
}

.tab[aria-current="page"]:hover {
  background: #bef264;
}

[data-theme="dark"] .tab {
  border: 2px solid #f472b6;
  background: #26143b;
  color: #fdf2f8;
  box-shadow: 2px 2px 0 #ff33aa;
}

[data-theme="dark"] .tab:hover {
  background: #341a4e;
  color: #ffffff;
  box-shadow: 3px 3px 0 #ff33aa;
}

[data-theme="dark"] .tab[aria-current="page"] {
  background: #b4cf6a;
  color: #111111;
  border-color: #ffffff;
  box-shadow: 2px 2px 0 #ff33aa;
}

/* Chunky pill buttons */
.btn,
.btn-secondary {
  border: 2px solid #111111;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  box-shadow: 2.5px 2.5px 0 #111111;
  padding: 0.45rem 1.1rem;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:hover,
.btn-secondary:hover {
  background: #fdf2f8;
  color: #111111;
  transform: translate(-1px, -1px);
  box-shadow: 3.5px 3.5px 0 #111111;
}

.btn:active,
.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 0.5px 0.5px 0 #111111;
}

.btn-primary {
  border: 2.5px solid #111111;
  border-radius: 999px;
  background: #6d28d9;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 3px 3px 0 #111111;
  padding: 0.45rem 1.15rem;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-primary:hover {
  background: #bef264;
  color: #111111;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #111111;
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #111111;
}

[data-theme="dark"] .btn,
[data-theme="dark"] .btn-secondary {
  border: 2px solid #f472b6;
  background: #26143b;
  color: #fdf2f8;
  box-shadow: 2.5px 2.5px 0 #ff33aa;
}

[data-theme="dark"] .btn:hover,
[data-theme="dark"] .btn-secondary:hover {
  background: #341a4e;
  color: #ffffff;
}

[data-theme="dark"] .btn-primary {
  border: 2px solid #ffffff;
  background: #b4cf6a;
  color: #111111;
  box-shadow: 3px 3px 0 #ff33aa;
}

/* Range controls */
.ranges {
  gap: 0.35rem;
}

.range {
  border: 2px solid #111111;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  box-shadow: 2px 2px 0 #111111;
  padding: 0.3rem 0.8rem;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.range:hover {
  background: #fdf2f8;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #111111;
}

.range[aria-pressed="true"] {
  background: #6d28d9;
  color: #ffffff;
  box-shadow: 2px 2px 0 #111111;
  font-weight: 800;
  text-decoration: none;
}

[data-theme="dark"] .range {
  border: 2px solid #f472b6;
  background: #26143b;
  color: #fdf2f8;
  box-shadow: 2px 2px 0 #ff33aa;
}

[data-theme="dark"] .range[aria-pressed="true"] {
  background: #b4cf6a;
  color: #111111;
  border-color: #ffffff;
  box-shadow: 2px 2px 0 #ff33aa;
}

/* Accessible text links and action buttons */
.card-head button.link-btn,
.card-head a,
.link-btn,
.setting-text a,
a.link-text {
  color: #701a75;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

.card-head button.link-btn:hover,
.card-head a:hover,
.link-btn:hover {
  color: #9d174d;
}

[data-theme="dark"] .card-head button.link-btn,
[data-theme="dark"] .card-head a,
[data-theme="dark"] .link-btn,
[data-theme="dark"] .setting-text a,
[data-theme="dark"] a.link-text {
  color: #f472b6;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

[data-theme="dark"] .card-head button.link-btn:hover,
[data-theme="dark"] .card-head a:hover,
[data-theme="dark"] .link-btn:hover {
  color: #fbcfe8;
}

/* Consistent positive progress bars across all widgets */
.meter-fill,
.meter-fill.income {
  background: var(--color-pos);
}

.gauge-dot.contributed,
.gauge-dot.behind {
  background: var(--color-pos);
}

/* Clean flat data rows without curved bowl borders or shadows */
.row,
.tile .row,
.tile .row.clickable {
  border-radius: 0;
  box-shadow: none;
}

/* Form controls */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="date"],
select,
textarea {
  border: 2px solid #111111;
  border-radius: 10px;
  box-shadow: 2px 2px 0 #111111;
  background: #ffffff;
  color: #111111;
  font-weight: 600;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #6d28d9;
  border-color: #ffffff;
  box-shadow: 3px 3px 0 #111111;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  border: 2px solid #f472b6;
  box-shadow: 2px 2px 0 #ff33aa;
  background: #1f0e30;
  color: #fdf2f8;
}

/* Theme dropdown selector */
.theme-dropdown-trigger {
  border: 2px solid #111111;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  box-shadow: 2.5px 2.5px 0 #111111;
}

.theme-dropdown-caret {
  border-right-color: #111111;
  border-bottom-color: #111111;
}

.theme-dropdown-trigger:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3.5px 3.5px 0 #111111;
}

.theme-dropdown-menu {
  border: 2.5px solid #111111;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #111111;
  background: #ffffff;
}

.theme-dropdown-item {
  border-radius: 8px;
}

.theme-dropdown-item.is-selected {
  background: #6d28d9;
  color: #ffffff;
  font-weight: 800;
}

.theme-dropdown-check {
  border-right-color: #111111;
  border-bottom-color: #111111;
}

[data-theme="dark"] .theme-dropdown-trigger {
  border: 2px solid #f472b6;
  background: #26143b;
  color: #fdf2f8;
  box-shadow: 2.5px 2.5px 0 #ff33aa;
}

[data-theme="dark"] .theme-dropdown-caret {
  border-right-color: #f472b6;
  border-bottom-color: #f472b6;
}

[data-theme="dark"] .theme-dropdown-menu {
  border: 2px solid #f472b6;
  background: #26143b;
  box-shadow: 4px 4px 0 #ff33aa;
}

[data-theme="dark"] .theme-dropdown-item.is-selected {
  background: #b4cf6a;
  color: #111111;
}

[data-theme="dark"] .theme-dropdown-check {
  border-right-color: #111111;
  border-bottom-color: #111111;
}

/* Sidebar rail */
.rail {
  border: 2.5px solid #111111;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #111111;
  background: var(--bg-surface);
}

.rail-net {
  background: #fef08a;
  border-bottom: 2.5px solid #111111;
  padding: 1.25rem 1.4rem;
}

.rail-label {
  color: #111111;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-value {
  color: #111111;
  font-weight: 800;
  letter-spacing: -0.03em;
}

[data-theme="dark"] .rail {
  border: 2px solid #f472b6;
  box-shadow: 4px 4px 0 #ff33aa;
}

[data-theme="dark"] .rail-net {
  background: #3c1e5c;
  border-bottom: 2px solid #f472b6;
}

[data-theme="dark"] .rail-label {
  color: #b4cf6a;
}

[data-theme="dark"] .rail-value {
  color: #fdf2f8;
}

/* Modals and dialogs */
dialog,
.dialog {
  border: 3px solid #111111;
  border-radius: 18px;
  box-shadow: 6px 6px 0 #111111;
  background: var(--bg-surface);
}

[data-theme="dark"] dialog,
[data-theme="dark"] .dialog {
  border: 2.5px solid #f472b6;
  box-shadow: 6px 6px 0 #ff33aa;
}

/* Badges and tags */
.badge,
.pill {
  border: 1.5px solid #111111;
  border-radius: 999px;
  box-shadow: 1.5px 1.5px 0 #111111;
  font-weight: 700;
}

[data-theme="dark"] .badge,
[data-theme="dark"] .pill {
  border: 1.5px solid #f472b6;
  box-shadow: 1.5px 1.5px 0 #ff33aa;
}

/* Bold typography */
.hero-value {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand h1 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

th {
  border-bottom: 2px solid var(--border-color);
  font-weight: 800;
  color: var(--text-main);
}

/* Selected items in the sidebar and the scope switch: white on violet in light, dark on lime in dark. */
[data-theme="light"] .settings-link[aria-current="page"],
[data-theme="light"] .scope-btn[aria-pressed="true"] {
  color: #ffffff;
}

[data-theme="dark"] .settings-link[aria-current="page"],
[data-theme="dark"] .scope-btn[aria-pressed="true"] {
  color: #111111;
}

/* A box with a unit beside it: the wrapper wears the field look and the input inside goes bare. */
.input-affix {
  border: 2px solid #111111;
  border-radius: 10px;
  box-shadow: 2px 2px 0 #111111;
  background: #ffffff;
}

[data-theme="dark"] .input-affix {
  border-color: #f472b6;
  box-shadow: 2px 2px 0 #ff33aa;
  background: #1f0e30;
}

[data-theme] .input-affix input[type] {
  border: 0;
  box-shadow: none;
  background: none;
  outline: none;
}