/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════ */
:root {
  /* Backgrounds — deep black / zinc (emerald theme) */
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-surface: rgba(24, 24, 27, 0.82);
  --bg-surface-solid: #27272a;
  --bg-elevated: rgba(39, 39, 42, 0.9);
  --bg-input: rgba(9, 9, 11, 0.6);
  --bg-hover: rgba(34, 197, 94, 0.08);

  /* Borders — cool gray with green hover */
  --border-default: rgba(113, 113, 122, 0.22);
  --border-subtle: rgba(82, 82, 91, 0.14);
  --border-hover: rgba(34, 197, 94, 0.45);
  --border-input: rgba(113, 113, 122, 0.35);

  /* Text — zinc-200 / 300 scale (matches 2026_plan.html body + nav) */
  --text-primary: #fafafa;
  --text-secondary: #e4e4e7;
  --text-muted: #d4d4d8;
  --text-dim: #a1a1aa;
  --text-inverse: #18181b;
  /* Typed value in inputs — brighter than body for readability */
  --text-field: #f4f4f5;
  --text-placeholder: #9ca3af;

  /* Accent — emerald (matches 2026 plan) */
  --accent: #22c55e;
  --accent-light: #4ade80;
  --accent-dark: #15803d;
  --accent-cyan: #86efac;
  --accent-bg: rgba(34, 197, 94, 0.12);
  --accent-bg-hover: rgba(34, 197, 94, 0.2);

  /* Semantic — muted but clear */
  --positive: #22c55e;
  --positive-bg: rgba(34, 197, 94, 0.1);
  --negative: #ef4444;
  --negative-bg: rgba(239, 68, 68, 0.1);
  --warning: #eab308;
  --purple: #64748b;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 20px;
  --space-xl: 28px;
  --space-2xl: 40px;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.2);
  --shadow-md: 0 10px 30px rgba(2, 6, 23, 0.35);
  --shadow-lg: 0 12px 40px rgba(2, 6, 23, 0.4);
  --shadow-glow: 0 0 24px rgba(34, 197, 94, 0.14);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Typography */
  --font-sans: "DM Sans", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Space Grotesk", "DM Sans", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;

  /* Layout */
  --header-height: 60px;
  --container-max: 1400px;
  --sidebar-width: 280px;
}

/* ═══════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: #050506;
  background-image:
    linear-gradient(165deg, rgba(5, 6, 8, 0.94) 0%, rgba(9, 9, 11, 0.9) 42%, rgba(12, 18, 14, 0.88) 100%),
    url("https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=2000&q=70");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--text-secondary);
  min-height: 100vh;
  line-height: 1.6;
}

::selection {
  background: rgba(34, 197, 94, 0.35);
  color: #fff;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.3;
  font-weight: 600;
  margin-top: 0;
}

h1 { font-size: 1.6rem;  letter-spacing: -0.025em; }
h2 { font-size: 1.15rem; letter-spacing: -0.015em; }
h3 { font-size: 0.975rem; }

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════ */
/* Same palette as 2026_plan.html nav: bg-zinc-900 border-zinc-800 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #18181b;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e4e4e7;
  border-bottom: 1px solid #27272a;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.9;
}

.brand-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.brand:hover .brand-icon {
  filter: drop-shadow(0 2px 10px rgba(34, 197, 94, 0.25));
  transform: scale(1.02);
}

.brand-text {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #f4f4f5;
}

.header-account {
  display: inline-flex;
}

.header-account select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(9, 9, 11, 0.75);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-field);
  cursor: pointer;
  min-width: 140px;
  transition: border-color var(--transition-fast);
}

.header-account select:hover,
.header-account select:focus {
  border-color: var(--accent);
  outline: none;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: #3f3f46;
  margin: 0 8px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* text-zinc-200 + hover:text-emerald-400 (Tailwind) like 2026_plan.html */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.08);
  text-decoration: none;
}

.nav-link.active {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  font-weight: 600;
}

.nav-link.active .nav-link-label {
  color: inherit;
}

.nav-link-icon {
  padding: 7px 9px;
}

.nav-link-icon svg {
  flex-shrink: 0;
}

.nav-link-label {
  display: inline;
}

/* Custom tooltip */
.nav-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: #18181b;
  color: #e4e4e7;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid #3f3f46;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 500;
}

.nav-link[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hide custom tooltip when text label is already visible */
@media (min-width: 1501px) {
  .nav-link[data-tooltip]::after {
    display: none;
  }
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
  box-shadow: none;
}

.nav-toggle:hover {
  transform: none;
  box-shadow: none;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #d4d4d8;
  border-radius: 1px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1500px) {
  .nav-link-label {
    display: none;
  }
  .nav-link {
    padding: 7px 9px;
  }
  .nav-link-icon {
    padding: 7px 8px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: var(--space-md) var(--space-lg);
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
    padding: var(--space-md) 0 var(--space-sm);
    order: 10;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-group {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: var(--space-xs) 0;
  }

  .nav-link {
    padding: 10px var(--space-md);
    font-size: 0.9rem;
    border-radius: var(--radius-md);
  }

  .nav-link-label {
    display: inline;
  }

  .nav-link[data-tooltip]::after {
    display: none;
  }

  .nav-group-end {
    flex-direction: row;
    gap: 4px;
    padding-top: var(--space-sm);
  }
}

/* ═══════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════ */
.container {
  padding: 24px var(--space-xl);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-elevated);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  margin-bottom: var(--space-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card.small {
  max-width: 460px;
  margin: var(--space-2xl) auto;
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGES (Login / Register)
   ═══════════════════════════════════════════════════════ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 120px);
  padding: var(--space-xl) 0;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo {
  margin-bottom: var(--space-md);
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-field input {
  padding: 11px 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(9, 9, 11, 0.65);
  border: 1px solid var(--border-input);
  color: var(--text-field);
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.auth-submit {
  padding: 12px;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  width: 100%;
}

.auth-alt {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: var(--space-lg) 0 0;
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-2xl);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════
   FLASH MESSAGES (override)
   ═══════════════════════════════════════════════════════ */

.config-page {
  max-width: 1100px;
}

.config-title {
  margin: 0 0 24px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.config-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.config-boxes .config-section {
  flex: 1 1 320px;
  min-width: 0;
  margin-bottom: 0;
}

.config-section {
  background: var(--bg-elevated);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.config-heading {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.config-desc {
  margin: -4px 0 12px 0;
  font-size: 0.9rem;
}

.config-form {
  margin-bottom: 16px;
}

.config-section .table-row.cols-3 {
  grid-template-columns: 1fr minmax(90px, auto) 80px;
}

/* Bills & Finance */
.bills-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.bills-hero-icon {
  font-size: 2.25rem;
  line-height: 1;
  opacity: 0.9;
  flex-shrink: 0;
}

.bills-hero-text {
  flex: 1;
  min-width: 0;
}

.bills-title {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.bills-hero .config-desc {
  margin: 0;
  font-size: 0.9rem;
}

.bills-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.bills-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bills-btn:hover {
  transform: translateY(-1px);
}

.bills-btn-primary {
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
}

.bills-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.bills-btn-secondary {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.bills-btn-secondary:hover {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.2);
}

.bills-icon {
  font-size: 1.2rem;
  font-weight: 700;
}

.bills-icon-small {
  font-size: 1.1rem;
}

.bills-brokerage-page .bills-brokerage-disclaimer {
  position: relative;
  max-width: 52rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  padding: 16px 20px 16px 58px;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.12);
  background: rgba(15, 23, 42, 0.4);
}

.bills-brokerage-page .bills-brokerage-disclaimer::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 36px;
  height: 36px;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='1.75'%3E%3Cpath d='M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bills-brokerage-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.bills-brokerage-metric {
  position: relative;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bills-brokerage-metric--highlight {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.bills-brokerage-metric--warn {
  border-color: rgba(248, 113, 113, 0.35);
}

.bills-brokerage-metric-label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.bills-brokerage-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.bills-brokerage-metric-hint {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.bills-brokerage-metric--target {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.bills-pl-pos {
  color: #4ade80;
  font-weight: 600;
}

.bills-pl-neg {
  color: #f87171;
  font-weight: 600;
}

.bills-pl-warn {
  color: #fbbf24;
  font-weight: 600;
}

.bills-brokerage-page .bills-brokerage-cf-section {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: var(--space-lg) var(--space-xl);
  border-radius: 14px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.09) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.85) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bills-brokerage-page .bills-brokerage-cf-section::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 140px;
  height: 140px;
  opacity: 0.12;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120' fill='none'%3E%3Cpath d='M20 90 L40 55 L58 72 L85 35 L100 50' stroke='%230d9488' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='40' cy='55' r='4' fill='%2322c55e'/%3E%3Ccircle cx='58' cy='72' r='4' fill='%2322c55e'/%3E%3Ccircle cx='85' cy='35' r='4' fill='%2322c55e'/%3E%3C/svg%3E") no-repeat center / contain;
}

.bills-brokerage-cf-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.bills-brokerage-cf-illu {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5eead4;
}

.bills-brokerage-cf-illu svg {
  width: 28px;
  height: 28px;
}

.bills-brokerage-cf-h2 {
  margin: 0 0 4px 0;
}

.bills-brokerage-cf-sub {
  margin: 0;
  font-size: 0.88rem;
}

.bills-brokerage-cf-readonly {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  position: relative;
  z-index: 1;
}

.bills-brokerage-cf-readonly.is-hidden {
  display: none !important;
}

.bills-brokerage-cf-amount {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.bills-brokerage-cf-edit-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
}

.bills-brokerage-page .bills-brokerage-cf-form-edit {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.bills-brokerage-page .bills-brokerage-cf-form-edit.is-hidden {
  display: none !important;
}

.bills-brokerage-page .bills-brokerage-cf-form-edit label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.bills-brokerage-page .bills-brokerage-cf-form-edit input[type="number"] {
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
}

.bills-brokerage-metric-art {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 42px;
  height: 42px;
  opacity: 0.22;
  pointer-events: none;
  color: rgba(34, 197, 94, 0.85);
}

.bills-brokerage-metric--target .bills-brokerage-metric-art {
  color: rgba(56, 189, 248, 0.85);
}

.bills-brokerage-metric-art svg {
  width: 100%;
  height: 100%;
}

.bills-brokerage-page .bills-brokerage-col-spacer {
  min-height: 1px;
}

.bills-brokerage-close-all {
  margin-bottom: 28px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.08) 0%, rgba(15, 23, 42, 0.75) 55%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bills-brokerage-close-all-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #e9d5ff;
}

.bills-brokerage-close-all-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
}

.bills-brokerage-close-all-icon svg {
  width: 22px;
  height: 22px;
}

.bills-brokerage-close-all-intro {
  margin: 0 0 16px 0;
  max-width: 52rem;
  line-height: 1.5;
}

.bills-brokerage-summary--closeall {
  margin-bottom: 0;
}

.bills-brokerage-metric--closeall-main {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(15, 23, 42, 0.5);
}

.bills-brokerage-close-all-foot {
  margin: 14px 0 0 0;
  font-size: 0.85rem;
  max-width: 48rem;
}

.bills-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-section-icon {
  font-size: 1.3rem;
  opacity: 0.9;
}

.bills-upcoming-section {
  margin-bottom: 32px;
}

.bills-tabs {
  margin-top: 12px;
}

.bills-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  padding-bottom: 8px;
}

.bills-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.88rem;
  color: #e4e4e7;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: none;
}

.bills-tab-btn:hover {
  color: #4ade80;
  border-color: var(--border-hover);
  background: rgba(34, 197, 94, 0.06);
  transform: none;
  box-shadow: none;
}

.bills-tab-btn.active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-weight: 600;
}

.bills-tab-pane {
  display: none;
}

.bills-tab-pane.active {
  display: block;
}

.bills-upcoming-table {
  width: 100%;
  border-collapse: collapse;
}

.bills-upcoming-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.bills-upcoming-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
  color: var(--text-secondary);
}

.bills-upcoming-table tbody tr:hover {
  background: rgba(34, 197, 94, 0.04);
}

.bills-upcoming-table .bills-bill-type-icon + strong,
.bills-upcoming-table .bills-bill-type-icon + .bills-paid-name {
  max-width: 220px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.bills-upcoming-table th:nth-child(1),
.bills-upcoming-table td:nth-child(1) {
  min-width: 160px;
  max-width: 240px;
}

.bills-upcoming-table th:nth-child(2),
.bills-upcoming-table td:nth-child(2) { width: 80px; }
.bills-upcoming-table th:nth-child(3),
.bills-upcoming-table td:nth-child(3) { width: 92px; min-width: 92px; }
.bills-upcoming-table th:nth-child(4),
.bills-upcoming-table td:nth-child(4) { width: 95px; min-width: 95px; }
.bills-upcoming-table th:nth-child(5),
.bills-upcoming-table td:nth-child(5) { width: 110px; min-width: 110px; }
.bills-upcoming-table th:nth-child(6),
.bills-upcoming-table td:nth-child(6) { min-width: 120px; }

.bills-bill-type-icon {
  margin-right: 8px;
  opacity: 0.8;
}

.bills-date-cell {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  min-width: 3.5em;
  white-space: nowrap;
}

.bills-actions-cell {
  white-space: nowrap;
}

.bills-actions-cell form,
.bills-actions-cell .link {
  display: inline;
}

.bills-notes-cell {
  position: relative;
}

.bills-action-icon {
  display: inline-block;
  margin-right: 4px;
  font-size: 0.95em;
  vertical-align: -0.1em;
}

.bills-notes-cell .btn-icon,
.bills-actions-cell .btn-icon {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.8;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
}

.bills-notes-cell .btn-icon:hover,
.bills-actions-cell .btn-icon:hover {
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.bills-notes-cell .link.btn-icon,
.bills-actions-cell .link.btn-icon {
  color: var(--text-muted);
}

.bills-notes-cell .link.btn-icon:hover,
.bills-actions-cell .link.btn-icon:hover {
  color: var(--accent);
}

.bills-notes-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.bills-notes-form input {
  min-width: 100px;
  max-width: 140px;
  padding: 3px 6px;
  font-size: 0.85rem;
}

.bills-notes-preview {
  font-size: 0.85rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.bills-paid-badge {
  color: #22c55e;
  font-size: 0.85rem;
}

.bills-collapsible {
  margin-top: 4px;
}

.bills-collapsible .bills-collapsible-content {
  overflow: hidden;
}

.bills-collapsible-minimized .bills-collapsible-content {
  display: none;
}

.bills-collapsible-expanded .bills-collapsible-content {
  display: block;
}

.bills-collapsible-minimized .bills-collapse-icon {
  transform: rotate(-90deg);
}

.bills-collapsible-expanded .bills-collapse-icon {
  transform: rotate(0);
}

.bills-collapse-toggle {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
}

.bills-collapse-toggle:hover {
  color: var(--text-muted);
  transform: none;
  box-shadow: none;
}

.bills-collapsible-expanded .bills-collapse-label {
  display: none;
}

.bills-collapsible-expanded .bills-collapse-label-expanded {
  display: inline !important;
}

.bills-collapsible-minimized .bills-collapse-label-expanded {
  display: none !important;
}

.bills-paid-divider {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(71, 85, 105, 0.5);
}

.bills-paid-divider-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}

.bills-bill-row.bills-paid {
  opacity: 0.6;
}

.bills-bill-row.bills-paid .bills-paid-name,
.bills-bill-row.bills-paid .bills-date-cell {
  color: var(--text-muted);
}

.bills-bill-row.bills-paid .bills-date-cell {
  background: rgba(71, 85, 105, 0.3);
  color: var(--text-muted);
}

.bills-bill-row.bills-paid strong {
  font-weight: 500;
}

.bills-amount-paid {
  color: #64748b;
  font-size: 0.9rem;
}

.bills-bill-row.bills-zero {
  opacity: 0.55;
  color: var(--text-muted);
}

.bills-bill-row.bills-zero strong,
.bills-bill-row.bills-zero .bills-date-cell {
  color: inherit;
}

.bills-zero-hidden {
  display: none !important;
}

.bills-collapsed-block.is-hidden {
  display: none !important;
}

.bills-zero-toggle-row td {
  padding: 8px 12px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.bills-zero-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: none;
}

.bills-zero-toggle-btn:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  transform: none;
  box-shadow: none;
}

.bills-bill-row.bills-zero .bills-date-cell {
  background: rgba(71, 85, 105, 0.25);
  color: var(--text-muted);
}

.bills-upcoming-table .table-row.header {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.bills-upcoming-table .table-row.bills-bill-row > div:nth-child(2) {
  font-weight: 600;
  color: #f1f5f9;
}

.bills-period-total > div:nth-child(2) {
  font-weight: 700;
  color: var(--accent);
}

.bills-summary-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.bills-summary-card:hover {
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.4);
}

.bills-summary-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.bills-summary-item:last-of-type {
  border-bottom: none;
}

.bills-loan-due {
  color: #64748b;
  font-size: 0.85rem;
  margin-left: 2px;
}

.bills-summary-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.bills-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.bills-summary-card {
  position: relative;
  border-left: 4px solid transparent;
}

.bills-card-loans { border-left-color: #64748b; }
.bills-card-salary { border-left-color: #15803d; }
.bills-card-balances { border-left-color: var(--accent); }
.bills-card-combined { border-left-color: #64748b; }

.bills-loans-table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.bills-loans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.bills-loans-table th,
.bills-loans-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.bills-loans-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bills-loans-table td.bills-loans-amt,
.bills-loans-table th.bills-loans-amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bills-loans-table tfoot tr {
  border-bottom: none;
  font-weight: 600;
}

.bills-loans-table tfoot td {
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.bills-loans-horizons {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 139, 250, 0.25);
}

.bills-loans-horizons-title {
  margin: 0 0 6px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-loans-horizons-desc {
  margin: 0 0 12px 0;
  font-size: 0.8rem;
}

.bills-loans-horizons .bills-zero-toggle-btn {
  margin: 0 0 10px 0;
}

.bills-loans-horizons-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bills-loans-horizons-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.9rem;
}

.bills-loans-horizons-list li:last-child {
  border-bottom: none;
}

.bills-loans-horizons-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bills-loans-horizons-sub {
  color: #64748b;
  font-weight: 400;
  font-size: 0.85rem;
}

.bills-loans-horizons-names {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #cbd5e1;
  padding-left: 2px;
}

.bills-loans-horizons-date {
  color: var(--text-muted);
  font-weight: 500;
}

.bills-loans-horizons-amt {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.bills-combined-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .bills-combined-grid {
    grid-template-columns: 1fr;
  }
}

.bills-combined-block {
  min-width: 0;
}

.bills-combined-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-combined-heading .bills-card-link {
  margin-left: auto;
}

.bills-period-total-top {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  color: #e2e8f0;
}

.bills-period-total-top strong {
  color: var(--accent);
}

.bills-combined-value {
  margin: 10px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bills-balance-icon {
  font-size: 1.2rem;
  opacity: 0.9;
}

.bills-balance-amt {
  margin-left: auto;
  font-weight: 600;
  color: var(--accent);
}

.bills-combined-muted {
  margin: 2px 0;
  font-size: 0.85rem;
}

.bills-combined-total {
  margin-top: 8px;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-card-icon {
  font-size: 1.25rem;
}

.bills-card-link {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.bills-card-link:hover {
  color: #7dd3fc;
}

.bills-summary-list {
  margin-top: 12px;
}

.bills-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.bills-summary-total {
  margin-top: 10px;
  font-weight: 600;
  color: #e2e8f0;
}

.bills-summary-salary p {
  margin: 4px 0;
}

.bills-chart-section {
  margin-top: 24px;
}

.bills-chart-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.bills-chart-header .bills-section-heading {
  margin: 0;
}

.bills-chart-starting-badge {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: var(--radius-full);
  padding: 4px 14px;
}

.bills-chart-starting-badge strong {
  color: var(--warning);
}

.bills-chart-intro {
  margin: 0 0 16px 0;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 900px;
  color: var(--text-muted);
}

.bills-chart-cash-label {
  color: var(--warning);
  font-weight: 600;
}

.bills-chart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  background: var(--bg-input);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
}

.bills-chart-empty-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

.bills-chart-empty p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
}

.bills-page .backtest-tabs-row {
  margin-bottom: 20px;
}

.bills-form .form-row-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.bills-form .form-row-inline label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.bills-form .form-row-inline input,
.bills-form .form-row-inline select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  max-width: 120px;
}

.bills-form .form-wrap {
  flex-direction: column;
  align-items: flex-start;
}

.bills-loan-add-form .form-row-inline.form-wrap {
  flex-direction: row;
  flex-wrap: nowrap;
}

/* Monthly expenses page */
.bills-monthly-expenses-page .config-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.expenses-total-badge {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: auto;
}

.expenses-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 640px) {
  .expenses-two-col {
    grid-template-columns: 1fr;
  }
}

.expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  gap: 12px;
}

.expense-row:hover {
  background: rgba(34, 197, 94, 0.08);
}

.expense-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.expense-icon {
  font-size: 1rem;
  opacity: 0.8;
  flex-shrink: 0;
}

.expense-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-action-form {
  display: inline;
}

.expense-action-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.6;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
}

.expense-action-btn:hover {
  opacity: 1;
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.expense-amount {
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.bills-period-card {
  margin-bottom: 20px;
  padding: 18px 22px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bills-period-card:hover {
  border-color: rgba(34, 197, 94, 0.25);
}

.bills-period-label {
  margin: 0 0 14px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bills-period-dates {
  color: var(--accent);
  font-weight: 600;
}

.bills-period-next-pay {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.bills-period-pay-date {
  color: #22c55e;
  font-weight: 600;
}

.bills-period-total {
  font-weight: 600;
  color: #e2e8f0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.bills-chart {
  min-height: 600px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.reminder-section {
  margin-bottom: 16px;
}

.reminder-section h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: var(--accent);
}

.reminder-section ul {
  margin: 0;
  padding-left: 20px;
}

.reminder-section li {
  margin-bottom: 4px;
  color: #e2e8f0;
}

.reminder-modal-header {
  justify-content: flex-start;
}

.reminder-modal-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.reminder-modal-close-btn {
  min-width: 220px;
  width: auto;
  display: block;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-inverse);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(34, 197, 94, 0.3);
}

.reminder-modal-close-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.reminder-modal-close-btn:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.reminder-modal-hint {
  margin: 10px 0 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

.reminder-modal-hint kbd {
  display: inline-block;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 0.85em;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
}

.loans-total .positive,
.balances-total .positive {
  color: #22c55e;
}

.config-section .table-row.cols-5 {
  grid-template-columns: 1fr 1fr 80px 100px 120px;
}

.config-section .table-row.cols-6 {
  grid-template-columns: 1fr 80px 60px 90px 70px 140px;
}

/* Brokerage accounts: spacer column after Unrealized before actions */
.bills-brokerage-page .config-section .table.bills-brokerage-accounts .table-row.cols-6 {
  grid-template-columns: minmax(120px, 1.35fr) minmax(92px, 1fr) minmax(92px, 1fr) minmax(40px, 4.5rem) minmax(56px, 76px) minmax(64px, 88px);
  align-items: center;
}

/* Bills → Targets (Tradier quotes) */
.bills-targets-page .bills-targets-api-note {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(202, 138, 4, 0.35);
  background: rgba(202, 138, 4, 0.08);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.bills-targets-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}

.bills-targets-metric {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.45);
}

.bills-targets-metric-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.bills-targets-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bills-targets-metric--projected .bills-targets-val-projected {
  color: #fbbf24;
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.25);
}

.bills-targets-metric--current .bills-targets-val-current {
  color: #2dd4bf;
  text-shadow: 0 0 24px rgba(45, 212, 191, 0.2);
}

.bills-targets-metric--current .bills-targets-val-current.bills-targets-val-pos {
  color: #4ade80;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.2);
}

.bills-targets-metric--current .bills-targets-val-current.bills-targets-val-neg {
  color: #f87171;
  text-shadow: 0 0 20px rgba(248, 113, 113, 0.15);
}

.bills-targets-metric-hint {
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
}

.bills-targets-form-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.bills-targets-add-section .bills-targets-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.bills-targets-add-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  min-width: 120px;
}

.bills-targets-add-form input[type="text"],
.bills-targets-add-form input[type="number"] {
  min-width: 100px;
  max-width: 160px;
}

.bills-targets-total-readonly {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
  cursor: default;
}

.bills-targets-table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 8px;
  overflow-x: auto;
}

.bills-targets-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.bills-targets-table th,
.bills-targets-table td {
  padding: 5px 3px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.bills-targets-table th {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.65);
}

.bills-targets-table th.num,
.bills-targets-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Column widths — sum 100%; fixed layout avoids horizontal overflow */
.bills-targets-table th:nth-child(1),
.bills-targets-table td:nth-child(1) {
  width: 8%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bills-targets-table th:nth-child(2),
.bills-targets-table td.bills-targets-qty {
  width: 5%;
  max-width: 3rem;
  padding-left: 2px;
  padding-right: 2px;
  font-size: 0.76rem;
}

.bills-targets-table th:nth-child(3),
.bills-targets-table td:nth-child(3),
.bills-targets-table th:nth-child(4),
.bills-targets-table td:nth-child(4) {
  width: 10%;
}

.bills-targets-table th:nth-child(5),
.bills-targets-table td:nth-child(5) {
  width: 8%;
}

.bills-targets-table th:nth-child(6),
.bills-targets-table td:nth-child(6) {
  width: 12%;
}

.bills-targets-table th:nth-child(7),
.bills-targets-table td:nth-child(7) {
  width: 9%;
}

.bills-targets-table th:nth-child(8),
.bills-targets-table td:nth-child(8) {
  width: 12%;
}

.bills-targets-table th:nth-child(9),
.bills-targets-table td:nth-child(9) {
  width: 11%;
}

.bills-targets-table th.bills-targets-th-actions,
.bills-targets-table td.bills-targets-actions {
  width: 15%;
  text-align: right;
  white-space: nowrap;
  padding-left: 2px;
  padding-right: 2px;
}

.bills-targets-table tbody tr:hover td {
  background: rgba(148, 163, 184, 0.06);
}

.bills-targets-table .bills-targets-tfoot td {
  border-top: 2px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.5);
  padding-top: 12px;
  padding-bottom: 12px;
}

.bills-targets-remove {
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 1px;
  min-width: 1rem;
}

.bills-targets-tfoot-margin td {
  background: rgba(202, 138, 4, 0.06);
  font-size: 0.88rem;
}

.bills-targets-tfoot-label {
  text-align: right;
  color: var(--text-muted);
  padding-right: 16px;
}

.bills-targets-deduct {
  color: #f87171;
  font-weight: 600;
}

.bills-targets-tfoot-net td {
  background: rgba(34, 197, 94, 0.06);
}

.bills-targets-pct-need {
  color: #fbbf24;
  font-weight: 600;
}

.bills-targets-pct-above {
  color: #4ade80;
  font-weight: 600;
}

.bills-targets-margin-row td {
  background: rgba(202, 138, 4, 0.07);
  font-size: 0.88rem;
}

.bills-targets-margin-label {
  color: var(--text-muted);
  font-weight: 600;
}

.bills-targets-margin-edit-btn {
  font-size: 0.8rem;
  padding: 6px 12px;
  white-space: nowrap;
}

.bills-targets-empty-row td {
  padding: 14px 12px;
}

.bills-targets-tfoot-total td {
  border-top: 2px solid rgba(45, 212, 191, 0.35);
  background: rgba(15, 23, 42, 0.65);
}

.bills-targets-tfoot-total .bills-targets-val-current {
  color: #5eead4;
}

@media (max-width: 900px) {
  .bills-targets-add-section .bills-targets-add-form {
    flex-direction: column;
    align-items: stretch;
  }
  .bills-targets-add-form label {
    max-width: none;
  }
}

.config-section .table-row.cols-7 {
  grid-template-columns: 1fr 90px 90px 90px 100px 50px 80px;
}

.config-section .table-row.cols-8 {
  grid-template-columns: 1fr 90px 90px 90px 100px 50px 50px;
}

/* Master Trades: review page */
/* Casey Trades (master trades) */
.casey-trades-page {
  max-width: 1000px;
}

.casey-trades-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.casey-trades-desc {
  margin: 0 0 24px 0;
  font-size: 0.95rem;
}

.casey-add-card {
  margin-bottom: 24px;
}

.casey-add-header {
  margin-bottom: 0;
}

.btn-add-toggle {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--accent-bg);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: none;
}

.btn-add-toggle:hover {
  background: var(--accent-bg-hover);
  transform: none;
  box-shadow: none;
}

.casey-add-form-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.casey-add-heading {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.casey-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.casey-form-row-2 {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px 20px;
}

.casey-form-row-2 .field-image,
.casey-form-row-2 .field-notes {
  flex: 0 1 280px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.casey-form-row-2 .field-image .image-upload-box,
.casey-form-row-2 .field-notes textarea {
  flex: 1;
  min-height: 100px;
}

.casey-form-row-2 .field-save {
  align-self: flex-start;
  padding-top: 1.6em;
}

/* Review filters: label above input, one row, aligned */
.casey-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.casey-review-title {
  margin: 0 24px 0 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  flex-shrink: 0;
  align-self: flex-end;
  padding-bottom: 6px;
}

.casey-filters-row .filter-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.casey-filters-row .filter-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
}

.casey-filters-row .filter-block input[type="date"],
.casey-filters-row .filter-block input[type="text"] {
  width: 140px;
  min-width: 120px;
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #f1f5f9;
}

.casey-filters-row .filter-block-apply {
  align-items: flex-end;
}

.casey-filters-row .filter-block-apply .btn-apply {
  padding: 6px 14px;
  font-size: 0.9rem;
}

.casey-default-hint {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
}

.casey-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.casey-days-list {
  gap: 8px;
}

.casey-day-row {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.25);
}

.casey-day-row__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.casey-day-row__date {
  font-weight: 600;
  color: #f1f5f9;
  min-width: 110px;
}

.casey-day-row__summary {
  font-size: 0.9rem;
}

.casey-day-card {
  padding: 20px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 18px;
}

.casey-day-header {
  display: flex;
  gap: 12px 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 16px;
}

.casey-day-date {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
}

.casey-day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 6px;
  font-size: 0.9rem;
}

.casey-day-meta strong {
  color: #cbd5e1;
  font-weight: 600;
  margin-right: 6px;
}

.casey-day-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.casey-day-gallery {
  width: 100%;
}

.casey-gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.casey-gallery-item {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.3);
}

.casey-gallery-thumb {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: rgba(15, 23, 42, 0.6);
}

.casey-gallery-link {
  display: block;
}

.casey-gallery-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
}

.casey-day-notes {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.casey-day-notes-title {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
}

.casey-day-notes-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.paste-multi-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.paste-multi-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.25);
}

.paste-multi-bar .paste-multi-preview {
  flex: 1;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.paste-preview-count {
  padding: 2px 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  white-space: nowrap;
}

.paste-clear {
  white-space: nowrap;
}

.paste-preview-item {
  position: relative;
  flex-shrink: 0;
}

.paste-preview-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  display: block;
}

.paste-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paste-preview-remove:hover,
.paste-preview-remove:focus {
  background: rgba(239, 68, 68, 0.95);
  border-color: rgba(248, 113, 113, 0.6);
  outline: none;
}

.paste-preview-item--uploading {
  position: relative;
}

.paste-preview-thumb--uploading {
  animation: paste-preview-upload-pulse 1.1s ease-in-out infinite;
}

@keyframes paste-preview-upload-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.paste-preview-more { display: none; }

.master-trade-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.master-trade-card__media {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 560px;
}

.master-trade-card__media .view-img-link--img {
  display: block;
  text-decoration: none;
  color: inherit;
}

.master-trade-card__img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  object-position: top left;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  display: block;
}

.master-trade-card__media a.view-img-link--img:hover .master-trade-card__img {
  outline: 2px solid rgba(34, 197, 94, 0.5);
  outline-offset: 2px;
}

.view-img-link--btn {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
}

.view-img-link--btn:hover {
  color: #7dd3fc;
}

.master-trade-card__no-img {
  padding: 48px 24px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  color: #64748b;
  font-size: 0.95rem;
}

.master-trade-card__details {
  flex: 1 1 280px;
  min-width: 0;
}

.master-trade-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 0.95rem;
}

.master-trade-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.master-trade-dl dd {
  margin: 0;
  color: #e2e8f0;
}

.master-trade-notes {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  white-space: pre-wrap;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--long {
  background: var(--positive-bg);
  color: var(--positive);
}

.badge--short {
  background: var(--negative-bg);
  color: var(--negative);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Dashboard: form top, journal below */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-form h2,
.card-journal h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-form {
  flex-shrink: 0;
  padding-bottom: 24px;
}

.card-journal {
  flex: 1;
  min-height: 0;
}

.journal-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.journal-header-row .journal-title {
  margin: 0;
  font-size: 1.1rem;
}

.journal-header-row .journal-account {
  font-size: 0.9rem;
  margin-left: auto;
}

.journal-header-row .filter-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.journal-header-row .filter-inline .filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.journal-header-row .filter-inline input[type="date"],
.journal-header-row .filter-inline select {
  padding: 4px 8px;
  font-size: 0.85rem;
}

.journal-header-row .filter-inline select {
  min-width: 100px;
}

.journal-preview-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.journal-preview-header .journal-title {
  margin: 0;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.journal-preview-header .journal-account {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.journal-link {
  margin-left: auto;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.journal-filters-single .journal-filters-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.journal-filters-row .journal-title {
  margin: 0;
  font-size: 1rem;
  flex-shrink: 0;
  margin-right: 20px;
}

.journal-filters-row .filter-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  flex-shrink: 0;
}

.journal-filters-row .filter-inline .filter-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.journal-filters-row .filter-inline input[type="date"],
.journal-filters-row .filter-inline input[type="number"],
.journal-filters-row .filter-inline select {
  padding: 3px 6px;
  font-size: 0.75rem;
  width: auto;
  min-width: 0;
}

.journal-filters-row .filter-inline input[type="date"] {
  width: 98px;
}

.journal-filters-row .filter-inline input[type="number"] {
  width: 52px;
}

.journal-filters-row .filter-inline select {
  min-width: 72px;
}

.journal-filters-row .journal-account {
  font-size: 0.8rem;
  margin-left: auto;
  flex-shrink: 0;
}

.journal-filters-row .btn-apply,
.journal-filters-row button[type="submit"] {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.8rem;
  margin-right: 8px;
}

.journal-filters {
  margin-bottom: 16px;
}

.filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px 10px;
}

.journal-filters .filter-row {
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-row .filter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  flex-shrink: 0;
}

.filter-row input[type="date"],
.filter-row input[type="number"],
.filter-row select {
  padding: 4px 8px;
  font-size: 0.85rem;
  min-width: 0;
  flex-shrink: 0;
}

.filter-row input[type="date"] {
  width: 130px;
}

.filter-row input[type="number"] {
  width: 78px;
  max-width: 78px;
}

.filter-row select {
  min-width: 90px;
}

.filter-row button[type="submit"] {
  flex-shrink: 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  font-size: 0.88rem;
}

.pagination a {
  padding: 6px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: var(--accent-bg);
  border-color: var(--border-hover);
  text-decoration: none;
}

.pagination-info {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.pagination-disabled {
  color: var(--text-dim);
  cursor: default;
  padding: 6px 14px;
}

a.view-img-link {
  color: var(--accent);
  text-decoration: underline;
}

a.view-img-link:hover {
  color: #7dd3fc;
}

/* Lightbox: click View → full-size image overlay, no new tab */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.img-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.img-lightbox__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
}

.img-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.img-lightbox__inner .img-lightbox__img,
.img-lightbox__inner .img-lightbox__actions {
  pointer-events: auto;
}

.img-lightbox__img {
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.img-lightbox__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.img-lightbox__close,
.img-lightbox__open-tab {
  padding: 8px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  transition: background 0.15s, border-color 0.15s;
}

.img-lightbox__close:hover,
.img-lightbox__open-tab:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--accent);
}

.img-lightbox__open-tab {
  color: var(--accent);
}

/* Compact 2-row form */
.form-compact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-compact .form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

.form-compact .form-row-2 {
  padding-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.form-compact .form-row-notes-save {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px 16px;
}

.form-compact .form-row-notes-save .field-image,
.form-compact .form-row-notes-save .field-reason {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.form-compact .form-row-notes-save .field-image {
  flex: 0 1 35%;
  max-width: 280px;
  min-width: 140px;
  align-self: stretch;
}

.form-compact .form-row-notes-save .field-image .field-label,
.form-compact .form-row-notes-save .field-reason .field-label {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  line-height: 1.2;
  min-height: 1.2em;
}

.form-compact .form-row-notes-save .field-image .image-upload-box {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-compact .form-row-notes-save .field-reason {
  flex: 0 1 35%;
  max-width: 280px;
  min-width: 140px;
  align-self: stretch;
}

.form-compact .form-row-notes-save .field-reason textarea {
  flex: 1;
  min-height: 100px;
  resize: vertical;
}

.form-compact .form-row-notes-save .field-save {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  align-self: flex-start;
  padding-top: 1.6em;
}

.form-compact .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.form-compact .field span,
.form-compact .field .field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-compact .field input,
.form-compact .field select {
  padding: 7px 9px;
  font-size: 0.88rem;
  width: 100%;
  min-width: 52px;
  max-width: 96px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-field);
}

.form-compact .field input::placeholder {
  color: var(--text-placeholder);
}

.form-compact .field input:focus,
.form-compact .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.form-compact .field-pnl output {
  max-width: 96px;
  min-width: 80px;
}

.form-compact .field-symbol input {
  max-width: 68px;
  min-width: 56px;
}

.form-compact .field-qty input {
  max-width: 60px;
  min-width: 52px;
}

.form-compact .field-buy input,
.form-compact .field-sold input {
  max-width: 88px;
  min-width: 72px;
}

.form-compact .field-reason textarea {
  padding: 8px 10px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  min-height: 4.5em;
  resize: vertical;
  width: 100%;
  min-width: 0;
  max-width: none;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-field);
}

.form-compact .field-reason textarea::placeholder {
  color: var(--text-placeholder);
}

.form-compact .field-reason textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.form-compact .field-hint {
  font-size: 0.85rem;
  margin-left: 2px;
  text-decoration: none;
}

.form-compact .field-hint:hover {
  text-decoration: underline;
}

.image-upload-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-upload-box {
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.3);
}

.image-upload-box .paste-zone {
  border-color: rgba(148, 163, 184, 0.25);
}

.paste-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  max-height: 72px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  overflow: hidden;
}

.paste-zone:hover,
.paste-zone:focus {
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.7);
}

.paste-zone-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.paste-zone .paste-preview {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 6px;
}

.image-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.file-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.image-remove-btn {
  font-size: 0.85rem;
  padding: 0;
}

.file-upload-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.image-upload-wrap input[type="file"] {
  max-width: 200px;
  font-size: 0.8rem;
  padding: 4px 6px;
}

.file-selected {
  font-size: 0.8rem;
}

.form-grid {
  display: grid;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.form-row label {
  min-width: 0;
}

.pnl-preview {
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  display: inline-block;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
}

.pnl-preview.positive { color: var(--positive); }
.pnl-preview.negative { color: var(--negative); }

.small { font-size: 0.85rem; }

.form-footer {
  margin: 10px 0 0 0;
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.form-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.form-inline select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
}

.table-row .form-inline {
  margin: 0;
  display: inline-flex;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-open-trade {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}

.field-open-trade .field-label-inline {
  margin-right: 6px;
}

.field-open-trade .field-hint-inline {
  margin-left: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}

input,
select,
textarea {
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background: var(--bg-input);
  color: var(--text-field);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  font-family: var(--font-sans);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent) 100%);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
  filter: brightness(1.05);
}

.btn-save {
  flex-shrink: 0;
}

.btn-apply {
  padding: 7px 16px;
  font-size: 0.82rem;
}

button.link {
  background: none;
  color: var(--accent-cyan);
  padding: 0;
  font-size: 0.85rem;
  box-shadow: none;
}

button.link:hover {
  text-decoration: underline;
  background: none;
  transform: none;
  box-shadow: none;
}

.table {
  width: 100%;
}

.table-row {
  display: grid;
  gap: 10px 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  align-items: center;
  transition: background var(--transition-fast);
}

.table-row:not(.header):hover {
  background: var(--bg-hover);
  border-radius: 4px;
}

.table-row.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.table-row.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-row.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-row.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.table-row.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.table-row.cols-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.table-row.cols-8 {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.table-row.cols-11 {
  grid-template-columns: repeat(11, minmax(0, 1fr));
}

.table-row.cols-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.table-row.cols-13 {
  grid-template-columns: repeat(13, minmax(0, 1fr));
}

.table-row.cols-14 {
  grid-template-columns: repeat(14, minmax(0, 1fr));
}

.table-journal .table-row.cols-13 {
  grid-template-columns: minmax(90px, 1fr) minmax(70px, 1fr) 52px 52px 52px 52px minmax(70px, 1fr) minmax(90px, 1fr) minmax(70px, 1fr) minmax(90px, 1fr) minmax(180px, 2fr) minmax(100px, 1.5fr) 44px;
}

.journal-image-link {
  display: inline-block;
  max-width: 100%;
}

.journal-image {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.table-row.header {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-default);
}

.table-row.header:hover {
  background: transparent;
}

.table-row:last-child {
  border-bottom: none;
}

.positive {
  color: var(--positive);
}

/* Alerts page (renamed from Daily Signals) */
.alerts-page {
  max-width: 100%;
}

.daily-signals-page {
  max-width: 100%;
}

.daily-signals-title {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.daily-signals-filters {
  margin-bottom: 20px;
}

.daily-signals-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.daily-signals-filters-row .filter-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.daily-signals-filters-row .filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.daily-signals-filters-row .filter-block select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  min-width: 120px;
  cursor: pointer;
}

.daily-signals-filters-row .filter-block select:hover,
.daily-signals-filters-row .filter-block select:focus {
  border-color: var(--accent);
  outline: none;
}

.daily-signals-filters-row .filter-block-apply {
  align-items: center;
  margin-left: auto;
}

.daily-signals-filters-row .filter-block-apply .btn-apply,
.daily-signals-filters-row .filter-block-apply .btn-clear {
  padding: 6px 14px;
  font-size: 0.9rem;
  margin-right: 8px;
}

.daily-signals-search {
  margin-bottom: 16px;
}

.daily-signals-search .searchable {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
}

.daily-signals-search .searchable:focus {
  border-color: var(--accent);
  outline: none;
}

.table-daily-signals {
  min-width: 1200px;
}

.table-daily-signals .table-row.cols-12 {
  grid-template-columns: minmax(85px, 1fr) minmax(65px, 0.8fr) minmax(70px, 0.8fr) minmax(65px, 0.7fr) minmax(65px, 0.7fr) minmax(80px, 0.8fr) minmax(50px, 0.6fr) minmax(130px, 1.4fr) minmax(130px, 1.4fr) minmax(65px, 0.7fr) minmax(72px, 0.7fr) minmax(100px, 1fr);
}

.table-daily-signals .table-row.cols-13 {
  grid-template-columns: minmax(85px, 1fr) minmax(65px, 0.8fr) minmax(70px, 0.8fr) minmax(65px, 0.7fr) minmax(65px, 0.7fr) minmax(80px, 0.8fr) minmax(50px, 0.6fr) minmax(130px, 1.4fr) minmax(130px, 1.4fr) minmax(65px, 0.7fr) minmax(72px, 0.7fr) minmax(100px, 1fr) minmax(90px, 0.9fr);
}

.table-daily-signals .table-row.header > div {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.table-daily-signals .table-row.header > div:hover {
  color: var(--accent);
}

.table-daily-signals .signal-cell {
  overflow-wrap: break-word;
  white-space: normal;
  word-break: break-word;
}

.table-daily-signals .signal-indicator-cell {
  font-size: 0.8rem;
  line-height: 1.3;
  max-width: 140px;
}

.bullish {
  color: #4ade80;
  font-weight: 600;
}

.bearish {
  color: #f87171;
  font-weight: 600;
}

/* Alerts section in Configuration */
.alerts-section {
  margin-top: 20px;
}

.alerts-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.alerts-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alerts-filter-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.alerts-filter-group select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  min-width: 120px;
  cursor: pointer;
}

.alerts-filter-group select:hover,
.alerts-filter-group select:focus {
  border-color: var(--accent);
  outline: none;
}

.alert-message {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 0.88rem;
}

.alert-message.success {
  background: var(--positive-bg);
  color: var(--positive);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-message.error {
  background: var(--negative-bg);
  color: var(--negative);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.stocks-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.stock-chip {
  display: inline-block;
  padding: 3px 8px;
  background: var(--accent-bg);
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
}

.stock-chip.removable {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--accent-light);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  margin: 0;
  box-shadow: none;
}

.chip-remove:hover {
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.stocks-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status-badge.status-active {
  background: var(--positive-bg);
  color: var(--positive);
}

.status-badge.status-inactive {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 0;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-enter 0.2s ease;
}

@keyframes modal-enter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content-wide {
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.close-modal,
.close-manage-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.close-modal:hover,
.close-manage-modal:hover {
  color: var(--text-secondary);
  transform: none;
  box-shadow: none;
}

.modal-body {
  padding: 24px;
}

.modal-body .form-group {
  margin-bottom: 20px;
}

.modal-body .form-group label {
  display: block;
  margin-bottom: 8px;
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 500;
}

.modal-body .form-group input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
}

.modal-body .form-group input[type="text"]:focus {
  border-color: var(--accent);
  outline: none;
}

.modal-body .form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.manage-stocks-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.manage-stocks-toolbar input {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
}

.manage-stocks-toolbar input:focus {
  border-color: var(--accent);
  outline: none;
}

.stocks-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

/* Alerts page tabs */
.alerts-title {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.alerts-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-default);
}

.tab-button {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #e4e4e7;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-bottom: -1px;
  box-shadow: none;
}

.tab-button:hover {
  color: #4ade80;
  transform: none;
  box-shadow: none;
}

.tab-button.active {
  color: #4ade80;
  border-bottom-color: #4ade80;
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* PETE Alerts filters */
.pete-alerts-filters {
  margin-bottom: 20px;
}

.pete-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.pete-filters-row .filter-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pete-filters-row .filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.pete-filters-row .filter-block select {
  padding: 6px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  min-width: 120px;
  cursor: pointer;
}

.pete-filters-row .filter-block select:hover,
.pete-filters-row .filter-block select:focus {
  border-color: var(--accent);
  outline: none;
}

.pete-filters-row .filter-block-apply {
  align-items: center;
  margin-left: auto;
}

/* PETE Alerts table */
.table-pete-alerts .table-row.cols-6 {
  grid-template-columns: minmax(80px, 1fr) minmax(160px, 1.5fr) minmax(60px, 1fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(150px, 2fr);
}

/* Analysis table: 7 columns, narrow cols + wide Why (3–4 col width) */
.table-analysis .table-row.cols-7.analysis-header,
.table-analysis .table-row.cols-7.analysis-row {
  grid-template-columns: minmax(70px, 0.7fr) minmax(80px, 0.9fr) minmax(40px, 0.4fr) minmax(70px, 0.8fr) minmax(60px, 0.6fr) minmax(50px, 0.5fr) minmax(200px, 3.5fr);
  gap: 0.5rem;
  align-items: center;
}
.table-analysis .analysis-why {
  min-width: 0;
  word-break: break-word;
}
/* Color grading by alert type */
.table-analysis .analysis-row.analysis-type-tier1 {
  background: rgba(74, 222, 128, 0.12);
}
.table-analysis .analysis-row.analysis-type-tier3 {
  background: rgba(253, 224, 71, 0.18);
}
.table-analysis .analysis-row.analysis-type-top5-bull {
  background: rgba(34, 197, 94, 0.15);
}
.table-analysis .analysis-row.analysis-type-top5-bear {
  background: rgba(248, 113, 113, 0.15);
}
.table-analysis .analysis-header {
  font-weight: 600;
}

.negative {
  color: var(--negative);
  font-weight: 600;
}

.flash-stack {
  margin-bottom: var(--space-lg);
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  animation: flash-slide-in 0.25s ease;
  backdrop-filter: blur(8px);
}

@keyframes flash-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.flash.flash-hiding {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.flash-text { flex: 1; }

.flash-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  padding: 0 4px;
  cursor: pointer;
  opacity: 0.6;
  line-height: 1;
  box-shadow: none;
}

.flash-close:hover {
  opacity: 1;
  transform: none;
  box-shadow: none;
}

.flash.success {
  background: var(--positive-bg);
  color: var(--positive);
  border: 1px solid rgba(34, 197, 94, 0.25);
  box-shadow: none;
}

.flash.error {
  background: var(--negative-bg);
  color: var(--negative);
  border: 1px solid rgba(239, 68, 68, 0.25);
  box-shadow: none;
}

.muted {
  color: var(--text-muted);
}

.wrap {
  word-break: break-word;
}

/* Resources */
.resources-page {
  max-width: 1200px;
}

.resources-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.resources-desc {
  margin: 0 0 24px 0;
  font-size: 0.95rem;
}

/* Sniper (Trading Rules) page */
.sniper-page {
  padding-bottom: 32px;
}

.sniper-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
}

.sniper-desc {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
}

/* Sniper main section tabs: single row, horizontal scroll, no wrap */
.sniper-page-tabs.alerts-tabs {
  flex-wrap: nowrap;
  gap: 0;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
  padding-top: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.2) 100%);
  border-radius: 10px 10px 0 0;
}

.sniper-page-tabs.alerts-tabs::-webkit-scrollbar {
  height: 5px;
}

.sniper-page-tabs.alerts-tabs::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.45);
  border-radius: 3px;
}

.sniper-page-tabs > .tab-button {
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 10px 12px;
  margin-bottom: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  color: #cbd5e1;
  box-shadow: none;
}

.sniper-page-tabs > .tab-button + .tab-button {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.sniper-page-tabs > .tab-button:hover {
  color: #86efac;
  background: rgba(74, 222, 128, 0.07);
  transform: none;
  box-shadow: none;
}

.sniper-page-tabs > .tab-button.active {
  color: #4ade80;
  font-weight: 600;
  border-bottom-color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  box-shadow: none;
}

.sniper-page-content {
  display: none;
}

.sniper-page-content.active {
  display: block;
}

.sniper-practice-desc {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
}

.sniper-practice-desc code {
  font-size: 0.9em;
}

.sniper-practice-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 10px;
}

.sniper-practice-filters .sniper-practice-field-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sniper-practice-filters .sniper-practice-field-inline .sniper-practice-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.sniper-practice-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sniper-practice-select,
.sniper-practice-date {
  padding: 8px 12px;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
  min-width: 120px;
}

.sniper-practice-date {
  min-width: 100px;
}

.sniper-practice-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.sniper-practice-btn:hover {
  background: var(--accent-light);
}

.sniper-practice-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.sniper-practice-btn--secondary {
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-weight: 600;
}

.sniper-practice-btn--secondary:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(74, 222, 128, 0.45);
  color: #f8fafc;
}

.sniper-practice-btn--secondary.is-open {
  border-color: rgba(74, 222, 128, 0.55);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.2);
}

.sniper-practice-btn--danger {
  background: rgba(127, 29, 29, 0.85);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.45);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 12px;
}

.sniper-practice-btn--danger:hover {
  background: rgba(153, 27, 27, 0.95);
  color: #fff;
  border-color: rgba(248, 113, 113, 0.65);
}

.sniper-practice-uploads-panel {
  margin: 0 0 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.sniper-practice-uploads-hint {
  margin: 0 0 10px 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.sniper-practice-uploads-status {
  margin: 0 0 8px 0;
  min-height: 1.2em;
  font-size: 0.85rem;
}

.sniper-practice-uploads-empty {
  margin: 0;
  font-size: 0.9rem;
}

.sniper-practice-uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.sniper-upload-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.65);
}

.sniper-upload-card-images {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.sniper-upload-thumb {
  flex: 1;
  min-width: 0;
  max-height: 96px;
  width: 50%;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.sniper-upload-card-meta {
  margin: 0 0 6px 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.sniper-upload-card-note {
  margin: 0 0 8px 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #cbd5e1;
  word-break: break-word;
}

.sniper-practice-count {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
}

.sniper-practice-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.sniper-practice-tabs--segmented {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sniper-practice-tabs--segmented .tab-button.sniper-practice-tab-btn {
  margin: 0;
  padding: 8px 20px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sniper-practice-tabs--segmented .tab-button.sniper-practice-tab-btn:hover {
  color: #e2e8f0;
}

.sniper-practice-tabs--segmented .tab-button.sniper-practice-tab-btn.active {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.22) 0%, rgba(74, 222, 128, 0.1) 100%);
  color: #86efac;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.sniper-practice-carousel {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 8px;
}

.sniper-practice-carousel-center {
  flex: 1;
  min-width: 0;
}

.sniper-practice-nav {
  flex-shrink: 0;
  align-self: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sniper-practice-nav:hover {
  border-color: rgba(74, 222, 128, 0.45);
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.sniper-practice-nav:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.55);
  outline-offset: 2px;
}

.sniper-practice-nav svg {
  width: 22px;
  height: 22px;
}

.sniper-practice-panels {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .sniper-practice-carousel {
    gap: 6px;
  }

  .sniper-practice-nav {
    width: 38px;
    height: 38px;
  }

  .sniper-practice-nav svg {
    width: 20px;
    height: 20px;
  }
}

.sniper-practice-panel {
  display: none;
}

.sniper-practice-panel.active {
  display: block;
}

.sniper-practice-image-wrap {
  max-width: 72%;
  margin: 0;
  cursor: pointer;
}

.sniper-practice-placeholder {
  margin: 24px 0;
  font-size: 0.95rem;
}

.sniper-practice-filename {
  display: none;
  margin: 0;
  font-size: 0.8rem;
  word-break: break-all;
}

.sniper-practice-add-panel {
  margin: 0 0 16px 0;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.sniper-practice-add-desc {
  margin: 0 0 14px 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.sniper-practice-add-layout {
  --sniper-paste-slot: 50px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}

.sniper-practice-add-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
}

.sniper-practice-add-layout .sniper-practice-add-paste-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, auto);
  gap: 10px 12px;
  margin: 0;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 50%;
  box-sizing: border-box;
}

.sniper-practice-add-layout .sniper-practice-add-meta--inline {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 0;
  padding-top: calc(0.75rem + 4px);
  border: none;
  background: transparent;
  flex: 0 0 auto;
}

.sniper-practice-add-bottom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  padding-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.sniper-practice-field-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.sniper-practice-field-inline .sniper-practice-label {
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 0.8rem;
}

.sniper-practice-add-layout .sniper-practice-field-inline .sniper-practice-label {
  font-size: 0.75rem;
  line-height: var(--sniper-paste-slot);
}

.sniper-practice-add-layout .sniper-practice-field-inline .sniper-practice-select,
.sniper-practice-add-layout .sniper-practice-field-inline .sniper-practice-date {
  width: auto;
  min-width: 4.75rem;
  height: var(--sniper-paste-slot);
  min-height: var(--sniper-paste-slot);
  max-height: var(--sniper-paste-slot);
  padding: 1px 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  box-sizing: border-box;
}

.sniper-practice-add-layout .sniper-practice-note-block--add {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(50%, 22rem);
  box-sizing: border-box;
}

.sniper-practice-add-layout .sniper-practice-btn--add-submit {
  flex: 0 0 auto;
}

/* Paste slots: combined Q+A width matches note column; heights align to compact note */
.sniper-practice-add-panel .sniper-paste-zone {
  min-height: var(--sniper-paste-slot);
  height: var(--sniper-paste-slot);
  padding: 2px 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sniper-practice-add-panel .sniper-paste-zone .paste-zone-text {
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
}

.sniper-practice-add-panel .sniper-paste-zone .paste-preview {
  max-width: 100%;
  max-height: var(--sniper-paste-slot);
  width: auto;
  height: auto;
  object-fit: contain;
}

.sniper-practice-add-panel .sniper-practice-note--compact {
  min-height: 2.5rem;
  max-height: 4.25rem;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.35;
  padding: 4px 8px;
  font-size: 0.82rem;
  resize: vertical;
}

.sniper-practice-add-panel .sniper-practice-label {
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.sniper-practice-add-panel .sniper-paste-clear {
  font-size: 0.7rem;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .sniper-practice-add-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sniper-practice-add-layout .sniper-practice-add-paste-row {
    max-width: 100%;
  }

  .sniper-practice-add-layout .sniper-practice-add-meta--inline {
    padding-top: 0;
    justify-content: flex-start;
  }

  .sniper-practice-add-bottom-row {
    flex-direction: column;
    align-items: stretch;
    border-top: none;
    padding-top: 0;
  }

  .sniper-practice-add-layout .sniper-practice-note-block--add {
    max-width: 100%;
  }

  .sniper-practice-add-layout .sniper-practice-btn--add-submit {
    width: 100%;
  }
}

.sniper-practice-add-meta {
  flex: 0 1 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sniper-practice-add-meta label {
  display: block;
}

.sniper-practice-paste-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  margin-bottom: 16px;
}

.sniper-practice-paste-label {
  flex: 1;
  min-width: 120px;
}

.sniper-paste-zone {
  min-height: 80px;
}

.sniper-paste-zone .paste-preview {
  max-width: 160px;
  max-height: 100px;
}

.sniper-paste-clear {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.sniper-practice-upload-form {
  display: block;
}

.sniper-practice-upload-form .sniper-practice-add-bottom-row .sniper-practice-note-block--add,
.sniper-practice-upload-form .sniper-practice-add-paste-row label {
  display: block;
}

.sniper-practice-upload-form .sniper-practice-field-inline {
  display: flex;
}

.sniper-practice-upload-form input[type="file"] {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.sniper-practice-upload-status {
  margin: 8px 0 0 0;
  font-size: 0.9rem;
  width: 100%;
}

.sniper-practice-upload-status.success {
  color: #86efac;
}

.sniper-practice-upload-status.error {
  color: #fca5a5;
}

.sniper-practice-note-label {
  width: 100%;
}

.sniper-practice-note {
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
  resize: vertical;
}

.sniper-practice-review-note-wrap {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  max-width: 72%;
}

.sniper-practice-review-note-label {
  margin: 0 0 6px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sniper-practice-review-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.sniper-spotlight-wrap {
  margin-bottom: 16px;
}

.sniper-spotlight {
  margin: 0 0 4px 0;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.12);
  border-left: 4px solid #fbbf24;
  border-radius: 6px;
}

.sniper-spotlight-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fbbf24;
  line-height: 1.4;
}

.sniper-spotlight-hint {
  margin: 0;
  font-size: 0.85rem;
}

.sniper-next-rule {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  cursor: pointer;
  color: var(--accent);
  text-decoration: none;
  box-shadow: none;
}

.sniper-next-rule:hover {
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.sniper-rules-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .sniper-rules-list {
    grid-template-columns: 1fr;
  }
}

.sniper-rule-item {
  margin: 0;
}

/* Sniper — All rules tab (filter + sequential read) */
.srules-tab-panel {
  padding-top: 4px;
}

.srules-hub {
  max-width: 920px;
}

.srules-intro {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.srules-modes {
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.srules-panel {
  display: none;
}

.srules-panel.active {
  display: block;
}

.srules-search-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.srules-search-caption {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
}

.srules-search {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #e2e8f0;
}

.srules-search:focus {
  outline: none;
  border-color: rgba(148, 163, 184, 0.45);
}

.srules-browse-meta {
  margin: 0 0 12px;
  font-size: 0.85rem;
}

.srules-rule-list--browse {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.srules-rule-list--browse .sniper-rule-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  margin: 0;
  border-left: 3px solid rgba(148, 163, 184, 0.25);
  border-radius: 0 8px 8px 0;
  background: rgba(15, 23, 42, 0.35);
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.srules-rule-list--browse .sniper-rule-item + .sniper-rule-item {
  margin-top: 8px;
}

.srules-li-num {
  flex-shrink: 0;
  min-width: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #94a3b8);
}

.srules-li-txt {
  flex: 1;
  min-width: 0;
}

.srules-read-hint {
  margin: 0 0 12px;
  font-size: 0.88rem;
}

.srules-read-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.srules-read-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.srules-read-nav:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(30, 41, 59, 0.75);
}

.srules-read-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.srules-read-nav svg {
  width: 22px;
  height: 22px;
}

.srules-read-counter {
  margin: 0;
  min-width: 8rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #94a3b8);
}

.srules-read-body {
  margin: 0;
  padding: 22px 24px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.5);
  font-size: 1.05rem;
  line-height: 1.55;
  color: #f1f5f9;
}

.sniper-tabs {
  margin-bottom: 12px;
}

.sniper-all-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sniper-section {
  scroll-margin-top: 16px;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.sniper-section .sniper-image-wrap {
  max-width: 72%;
  margin: 0;
  overflow: auto;
  padding: 0;
  line-height: 0;
}

.sniper-section .sniper-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: top;
  object-fit: contain;
}

.sniper-levels-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sniper-levels-stack .sniper-image-wrap {
  max-width: 72%;
  margin: 0;
  overflow: auto;
  padding: 0;
  line-height: 0;
}

.sniper-levels-stack .sniper-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  padding: 0;
  vertical-align: top;
  object-fit: contain;
}

@media (max-width: 700px) {
  .sniper-levels-stack .sniper-image-wrap {
    max-width: 100%;
  }
}

/* Trapped X Box standalone page (/sniper/trapped-x-box) and Sniper TXbox tab */
.txbox-page {
  padding-bottom: 40px;
}

.txbox-tab-panel {
  padding-top: 4px;
}

.txbox-article {
  max-width: 52rem;
  margin: 0;
  padding: 0 0 24px 0;
}

.txbox-lead {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.txbox-note-label {
  margin: 16px 0 8px 0;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.txbox-section-title {
  margin: 28px 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #93c5fd;
  scroll-margin-top: 96px;
}

.txbox-section-title:first-of-type {
  margin-top: 8px;
}

.txbox-p {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #e2e8f0;
  word-break: break-word;
}

.txbox-list {
  margin: 0 0 16px 0;
  padding-left: 1.35rem;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.txbox-list li {
  margin-bottom: 8px;
}

.txbox-list li:last-child {
  margin-bottom: 0;
}

.txbox-figure {
  margin: 12px 0 18px 0;
  max-width: 72%;
  overflow: auto;
  line-height: 0;
}

.txbox-figure.txbox-figure--compact {
  max-width: 48%;
}

.txbox-img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .txbox-figure {
    max-width: 100%;
  }

  .txbox-figure.txbox-figure--compact {
    max-width: 100%;
  }
}

/* DTX page (/sniper/dtx) and Sniper DTX tab */
.dtx-tab-panel {
  padding-top: 4px;
}

.dtx-page {
  padding-bottom: 40px;
}

.dtx-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dtx-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.dtx-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .dtx-figure {
    max-width: 100%;
  }
}

/* ODD page (/sniper/odd) and Sniper ODD tab */
.odd-tab-panel {
  padding-top: 4px;
}

.odd-page {
  padding-bottom: 40px;
}

.odd-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.odd-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.odd-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .odd-figure {
    max-width: 100%;
  }
}

/* SD page (/sniper/sd) and Sniper SD tab — hidden divergence */
.sd-tab-panel {
  padding-top: 4px;
}

.sd-page {
  padding-bottom: 40px;
}

.sd-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sd-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.sd-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .sd-figure {
    max-width: 100%;
  }
}

/* SLZ page (/sniper/slz) and Sniper SLZ tab */
.slz-tab-panel {
  padding-top: 4px;
}

.slz-page {
  padding-bottom: 40px;
}

.slz-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.slz-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.slz-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .slz-figure {
    max-width: 100%;
  }
}

/* CZTX page (/sniper/cztx) and Sniper CZTX tab */
.cztx-tab-panel {
  padding-top: 4px;
}

.cztx-page {
  padding-bottom: 40px;
}

.cztx-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cztx-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.cztx-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.cztx-video-note {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  max-width: 72%;
  width: 100%;
  text-align: center;
}

.cztx-video-note a {
  color: var(--accent);
  text-decoration: none;
}

.cztx-video-note a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .cztx-figure {
    max-width: 100%;
  }

  .cztx-video-note {
    max-width: 100%;
  }
}

/* Yellow Elevator page (/sniper/yellow-elevator) and Sniper tab */
.yelev-tab-panel {
  padding-top: 4px;
}

.yelev-page {
  padding-bottom: 40px;
}

.yelev-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.yelev-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.yelev-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .yelev-figure {
    max-width: 100%;
  }
}

/* Pink TBS page (/sniper/pink-tbs) and Sniper tab */
.ptbs-tab-panel {
  padding-top: 4px;
}

.ptbs-page {
  padding-bottom: 40px;
}

.ptbs-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ptbs-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.ptbs-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .ptbs-figure {
    max-width: 100%;
  }
}

/* Triple 90 page (/sniper/triple90) and Sniper tab */
.t90-tab-panel {
  padding-top: 4px;
}

.t90-page {
  padding-bottom: 40px;
}

.t90-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.t90-figure {
  margin: 0 auto;
  width: 100%;
  max-width: 72%;
  line-height: 0;
}

.t90-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 700px) {
  .t90-figure {
    max-width: 100%;
  }
}

/* Mental Game (/sniper/mental-game) and Sniper tab */
.mental-game-tab-panel {
  padding-top: 4px;
}

.mental-game-page {
  padding-bottom: 40px;
}

.mental-game-inner {
  max-width: 720px;
  margin: 0 auto;
}

.mental-game-video-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text-primary, #f4f4f5);
  text-align: center;
}

.mental-game-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0a0c10;
}

.mental-game-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.mental-game-video-link {
  margin: 10px 0 24px;
  text-align: center;
  font-size: 0.9rem;
}

.mental-game-highlight {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.06);
  border: 1px solid rgba(234, 179, 8, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
}

.mental-game-highlight--apex {
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(96, 165, 250, 0.35);
}

.mental-game-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-primary, #f4f4f5);
}

.mental-game-list {
  margin: 0;
  padding-left: 1.35rem;
  color: var(--text-secondary, #d4d4d8);
  line-height: 1.55;
  font-size: 0.95rem;
}

.mental-game-list li {
  margin-bottom: 0.55em;
}

.mental-game-list li:last-child {
  margin-bottom: 0;
}

.mental-game-list--apex {
  padding-left: 1.5rem;
}

@media (max-width: 600px) {
  .mental-game-inner {
    max-width: 100%;
  }

  .mental-game-highlight {
    padding: 14px 16px;
  }
}

/* ETX page (/sniper/etx) and Sniper ETX tab */
.etx-tab-panel {
  padding-top: 4px;
}

.etx-page {
  padding-bottom: 40px;
}

.etx-figure-wrap {
  max-width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 0 32px 0;
  line-height: 0;
}

.etx-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.resources-tabs {
  margin-bottom: 20px;
}

.resources-tabs a.tab-button {
  text-decoration: none;
  display: inline-block;
  color: inherit;
}

.peter-portfolio-intro {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
}

.peter-portfolio-intro code {
  font-size: 0.85em;
}

.peter-portfolio-iframe-wrap {
  width: 100%;
  min-height: 70vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: #f8fafc;
}

.peter-portfolio-iframe {
  display: block;
  width: 100%;
  min-height: 85vh;
  border: none;
  background: #f8fafc;
}

.resource-card {
  background: var(--bg-elevated);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.resource-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-1px);
}

.resource-card-title {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.resource-card-title a {
  color: #f1f5f9;
  text-decoration: none;
}

.resource-card-title a:hover {
  color: var(--accent);
}

.resource-card-desc {
  margin: 0 0 12px 0;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
}

.resource-link {
  display: inline-block;
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.resource-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.resource-links-card {
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.25);
  margin-bottom: 16px;
}

.resource-links-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.resource-links-main {
  min-width: 0;
  flex: 1 1 auto;
}

.resource-links-side {
  position: sticky;
  top: 20px;
  min-width: 240px;
  flex: 0 0 25%;
  padding-left: 0;
}

.resource-links-side .resource-links-card {
  padding: 18px 12px 18px 0;
  margin-left: 0;
  padding-left: 0;
}

.resource-links-side .resource-links-form--stack {
  padding-left: 0;
  margin-left: 0;
}

.resource-links-side .resource-links-form--stack label,
.resource-links-side .resource-links-form--stack .btn-apply {
  margin-left: 0;
  padding-left: 0;
}

.resource-links-side .resource-links-form--stack label {
  text-align: left;
  display: block;
}

.resource-links-side .resource-links-form--stack label select,
.resource-links-side .resource-links-form--stack label input {
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

/* Add link section: zero left space on Title, URL, Type (match Category) */
.resource-links-add-card {
  padding-left: 12px !important;
}
.resource-links-add-form {
  padding-left: 0 !important;
  margin-left: 0 !important;
}
/* Force every direct child of the form to have no left margin/padding */
.resource-links-add-form > * {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.resource-links-add-form label {
  display: block;
  text-align: left;
}
/* Same internal padding as Category for all add-form controls */
.resource-links-add-card input[type="text"],
.resource-links-add-card input[type="url"],
.resource-links-add-card select {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 8px 10px !important; /* match Category; overrides any other padding */
}
.resource-links-add-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px !important;
}
.resource-links-add-form .btn-apply {
  padding-left: 18px !important; /* restore button padding */
}

.resource-links-add-card {
  text-align: left;
}

.resource-links-add-label {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.resource-links-add-control {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 8px 10px !important;
  text-align: left !important;
}

.resource-links-title {
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.resource-links-form,
.resource-links-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.resource-links-filters {
  grid-template-columns: auto auto auto;
  gap: 10px 14px;
}

.resource-links-filters label {
  max-width: 180px;
}

.resource-links-filters label select {
  width: 100%;
  max-width: 180px;
  min-width: 140px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.resource-links-form--stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-links-form label,
.resource-links-filters label {
  margin: 0;
}

.resource-links-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.resource-links-list {
  margin-top: 12px;
}

.resource-links-list .table-wrap {
  overflow-x: visible;
}

.resource-links-table {
  min-width: 0;
  width: 100%;
}

.resource-links-table .table-row.resource-links-header,
.resource-links-table .table-row.resource-links-row {
  grid-template-columns: 1fr minmax(70px, 0.4fr) minmax(80px, 0.5fr) minmax(100px, 0.35fr);
}

.resource-links-title-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.resource-links-title-cell .resource-link-preview {
  flex-shrink: 0;
}

.resource-links-title-cell .resource-link-preview img {
  width: 160px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.2);
  display: block;
}

.resource-links-title-link {
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  flex: 1;
}

.resource-link-preview {
  display: inline-block;
}

.resource-links-actions-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.resource-link-edit summary {
  cursor: pointer;
  color: var(--accent-cyan);
  font-size: 0.85rem;
}

.resource-link-edit summary:hover {
  text-decoration: underline;
}

.resource-link-edit-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.resource-link-edit-form input,
.resource-link-edit-form select {
  width: 100%;
  min-width: 0;
}

/* Resource View */
.resource-view-page {
  max-width: 1400px;
}

.resource-header {
  margin-bottom: 24px;
}

.resource-back-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.resource-back-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

.resource-view-title {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
}

.resource-view-desc {
  margin: 0;
  font-size: 1rem;
}

.resource-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.resource-toc {
  position: sticky;
  top: 24px;
  background: rgba(30, 41, 59, 0.75);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.resource-toc-title {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.resource-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-toc-link {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.resource-toc-link:hover {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent);
}

.resource-toc-link--level-2 {
  font-weight: 500;
  padding-left: 8px;
}

.resource-toc-link--level-3 {
  font-weight: 400;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resource-content {
  min-width: 0;
}

.resource-html {
  background: rgba(30, 41, 59, 0.75);
  padding: 32px 40px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e6edf6;
  line-height: 1.7;
  font-size: 0.95rem;
}

.resource-html h1,
.resource-html h2,
.resource-html h3,
.resource-html h4,
.resource-html h5,
.resource-html h6 {
  color: #f1f5f9;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  scroll-margin-top: 80px;
}

.resource-html h2[id],
.resource-html h3[id] {
  scroll-margin-top: 80px;
}

.resource-html h1 {
  font-size: 1.75rem;
  border-bottom: 2px solid rgba(34, 197, 94, 0.3);
  padding-bottom: 8px;
}

.resource-html h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 6px;
}

.resource-html h3 {
  font-size: 1.25rem;
}

.resource-html h4 {
  font-size: 1.1rem;
}

.resource-html p {
  margin: 0 0 16px 0;
}

.resource-html ul,
.resource-html ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.resource-html li {
  margin: 6px 0;
}

.resource-html table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  overflow: hidden;
}

.resource-html table th,
.resource-html table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.resource-html table th {
  background: rgba(34, 197, 94, 0.15);
  color: #f1f5f9;
  font-weight: 600;
}

.resource-html table tr:last-child td {
  border-bottom: none;
}

.resource-html code {
  background: rgba(15, 23, 42, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  color: #7dd3fc;
}

.resource-html pre {
  background: rgba(15, 23, 42, 0.6);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.resource-html pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
}

.resource-html blockquote {
  border-left: 4px solid rgba(34, 197, 94, 0.5);
  padding-left: 16px;
  margin: 16px 0;
  color: #cbd5e1;
  font-style: italic;
}

.resource-html hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 32px 0;
}

.resource-html strong {
  color: #f1f5f9;
  font-weight: 600;
}

.resource-html a {
  color: var(--accent);
  text-decoration: underline;
}

.resource-html a:hover {
  color: #7dd3fc;
}

.resource-anchor {
  display: block;
  position: relative;
  top: -80px;
  visibility: hidden;
}

/* Blog */
.blog-page {
  max-width: none;
  width: 100%;
}

.blog-form-card {
  margin-bottom: 24px;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  box-shadow: none;
}

.btn-icon:hover,
.btn-icon:focus {
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.7);
  color: var(--accent);
  outline: none;
  transform: none;
  box-shadow: none;
}

.blog-form-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-form-card-header .blog-form-title {
  margin: 0;
}

.blog-form-close-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  box-shadow: none;
}

.blog-form-close-btn:hover,
.blog-form-close-btn:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.blog-add-new-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  box-shadow: none;
}

.blog-add-new-btn:hover,
.blog-add-new-btn:focus {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--accent);
  outline: none;
}

.blog-form-title {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.blog-form {
  display: grid;
  gap: 14px;
}

.blog-form-row-top {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.blog-field-title {
  flex: 1 1 auto;
}

.blog-field-date {
  flex: 0 0 180px;
}

.blog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-field span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.blog-field input,
.blog-field textarea {
  padding: 10px 12px;
  font-size: 0.95rem;
  width: 100%;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  color: #e2e8f0;
}

.blog-field textarea {
  min-height: 140px;
  resize: vertical;
}

.blog-field input:focus,
.blog-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.blog-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-filters-card {
  margin-bottom: 24px;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.blog-filters label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 0 0 auto;
  white-space: nowrap;
}

.blog-filters input[type="date"] {
  padding: 6px 8px;
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  width: 9.5rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.blog-filter-search {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(16rem, 100%);
}

.blog-filter-search input {
  padding: 6px 10px;
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  color: #e2e8f0;
  width: 12rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.blog-filters-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.blog-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.blog-main {
  flex: 0 0 80%;
  min-width: 0;
}

.blog-sidebar {
  flex: 0 0 20%;
  min-width: 180px;
  position: sticky;
  top: 20px;
}

.blog-date-card {
  padding: 16px 14px;
}

.blog-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.blog-date-header .blog-date-title {
  margin-bottom: 0;
}

.blog-date-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #f1f5f9;
}

.blog-date-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-date-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.35);
}

.blog-date-link:hover {
  color: var(--accent);
  border-color: rgba(34, 197, 94, 0.4);
}

.blog-date-count {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.blog-post-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.blog-post-delete-form {
  display: inline;
  margin: 0;
}

.blog-post-title {
  margin: 0;
  font-size: 1.1rem;
}

.blog-post-meta {
  font-size: 0.85rem;
}

.blog-post-gallery {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.blog-post-gallery-link {
  display: block;
  flex: 0 0 calc(50% - 6px);
}

.blog-post-gallery-link img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.blog-post-body {
  margin-top: 12px;
  line-height: 1.6;
  color: #e2e8f0;
  word-break: break-word;
}

.blog-date-group {
  margin-bottom: 18px;
}

.blog-date-heading {
  margin: 8px 2px 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1200px) {
  .resource-layout {
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
  .resource-html {
    padding: 24px 28px;
  }
}

@media (max-width: 900px) {
  .resource-layout {
    grid-template-columns: 1fr;
  }
  .resource-toc {
    position: static;
    max-height: none;
    margin-bottom: 24px;
  }
  .resource-html {
    padding: 20px 24px;
  }
  .table-row:not(.cols-13):not(.cols-12):not(.analysis-header):not(.analysis-row) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resource-links-table .table-row.resource-links-header,
  .resource-links-table .table-row.resource-links-row {
    grid-template-columns: 1fr minmax(70px, 0.4fr) minmax(80px, 0.5fr) minmax(100px, 0.35fr);
  }
  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }
  .resource-links-table {
    min-width: 0;
  }
  .resource-links-filters {
    grid-template-columns: 1fr 1fr auto;
  }
  .resource-links-filters label {
    max-width: none;
  }
  .resource-links-filters label select {
    max-width: none;
  }
  /* Mobile: hide add-link section, show title only */
  .resource-links-side {
    display: none;
  }
  .resource-links-table .table-row.resource-links-header,
  .resource-links-table .table-row.resource-links-row {
    grid-template-columns: 1fr;
  }
  .resource-links-table .resource-links-header > div:not(:first-child),
  .resource-links-table .resource-links-row > div:not(:first-child) {
    display: none;
  }
  .form-compact .field input,
  .form-compact .field select {
    max-width: none;
  }

  .blog-layout {
    flex-direction: column;
  }
  .blog-main,
  .blog-sidebar {
    flex: 1 1 auto;
    min-width: 0;
    position: static;
  }
  .blog-filters {
    flex-wrap: wrap;
  }
  .blog-filter-search {
    flex: 1 1 100%;
    max-width: none;
  }
  .blog-filter-search input {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════
   PSYCHOLOGY PAGE
   ═══════════════════════════════════════════════════════ */

/* ── Hero ── */
.psych-hero {
  position: relative;
  overflow: hidden;
}
.psych-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(34, 197, 94, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(34, 211, 238, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.psych-hero h1 {
  margin: 0 0 4px;
}
.psych-hero-illustration {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 340px;
  height: 200px;
  pointer-events: none;
  opacity: 0.65;
  z-index: 0;
}
.psych-hero-top,
.psych-xp-bar-wrap,
.psych-achievements {
  position: relative;
  z-index: 1;
}
.psych-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
}

.psych-hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.psych-hero-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}
.psych-stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.psych-stat-badge {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px 18px;
  text-align: center;
  min-width: 90px;
}
.psych-stat-badge.accent {
  border-color: rgba(34, 197, 94, 0.4);
}
.psych-stat-badge.fire {
  border-color: rgba(251, 146, 60, 0.4);
}
.psych-stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f0f4f8;
}
.psych-stat-badge.accent .psych-stat-value { color: var(--accent); }
.psych-stat-badge.fire .psych-stat-value { color: #fb923c; }
.psych-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* XP bar */
.psych-xp-bar-wrap {
  margin-top: 18px;
  position: relative;
}
.psych-xp-bar {
  height: 10px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.psych-xp-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  background-size: 200% 100%;
  animation: psych-xp-shimmer 3s ease infinite;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
@keyframes psych-xp-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.psych-xp-text {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Achievements */
.psych-achievements {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.psych-ach-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #64748b;
  cursor: default;
  transition: all 0.3s ease;
}
.psych-ach-badge.unlocked {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

/* ── Grid layouts ── */
.psych-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.psych-right-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.psych-right-stack .card {
  margin-bottom: 0;
}

/* ── Check-In ── */
.psych-checkin-card h2 {
  margin: 0 0 4px;
}
.psych-checkin-sub {
  margin: 0 0 16px;
}
.psych-checkin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.psych-slider-row {
  display: grid;
  grid-template-columns: 110px 1fr 28px;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}
.psych-slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.5);
  outline: none;
  cursor: pointer;
}
.psych-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.psych-slider-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}
.psych-slider-val {
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

/* Readiness ring */
.psych-readiness-done {
  display: flex;
  align-items: center;
  gap: 20px;
}
.psych-readiness-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: conic-gradient(#4ade80 0deg, rgba(30,41,59,0.5) 0deg);
  transition: background 0.6s ease;
}
.psych-readiness-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.95);
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0f4f8;
}

/* ── Mantra ── */
.psych-mantra-card h2 {
  margin: 0 0 12px;
}
.psych-mantra-display {
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
  color: #e2e8f0;
  padding: 16px 0;
  min-height: 60px;
}
.psych-mantra-anim {
  animation: psych-fade-in 0.5s ease;
}
@keyframes psych-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quick stats */
.psych-quick-stats h3 {
  margin: 0 0 12px;
}
.psych-quick-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.psych-quick-item {
  text-align: center;
  padding: 10px 6px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.psych-quick-item span {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-cyan);
}
.psych-quick-item small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ── Buttons ── */
.psych-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-inverse);
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  cursor: pointer;
  transition: all var(--transition-fast);
}
.psych-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}
.psych-btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--accent);
  box-shadow: none;
}
.psych-btn-outline:hover {
  background: var(--accent-bg);
  filter: none;
  box-shadow: none;
}
.psych-btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* ── Demons ── */
.psych-demons-card h2 {
  margin: 0 0 4px;
}
.psych-demons-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.psych-demon-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.psych-demon-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #e2e8f0;
}
.psych-demon-count {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.psych-demon-bar-wrap {
  width: 100%;
}
.psych-demon-bar-bg {
  height: 8px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.psych-demon-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f87171, #fb923c);
  transition: width 0.5s ease;
}

/* Demon modal */
.psych-demon-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.psych-demon-modal-inner {
  max-width: 460px;
  width: 90%;
  text-align: center;
}
.psych-demon-modal-inner h3 {
  margin: 0 0 12px;
  color: #fb923c;
}
.psych-demon-modal-inner p {
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 20px;
}
.psych-demon-modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── Mind Arena ── */
.psych-arena-card h2 {
  margin: 0;
}
.psych-arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.psych-arena-progress {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 12px;
  border-radius: 12px;
}
.psych-scenario {
  margin-top: 20px;
}
.psych-scenario-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
  margin-bottom: 10px;
}
.psych-scenario h3 {
  margin: 0 0 10px;
}
.psych-scenario-situation {
  color: #cbd5e1;
  line-height: 1.65;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.psych-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.psych-choice-btn {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.45;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  box-shadow: none;
}
.psych-choice-btn:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: var(--shadow-glow);
  transform: none;
}

/* Arena feedback */
.psych-feedback {
  margin-top: 20px;
  padding: 20px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(148, 163, 184, 0.15);
  text-align: center;
}
.psych-feedback-icon {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.psych-feedback-icon.best { color: #4ade80; }
.psych-feedback-icon.ok { color: #facc15; }
.psych-feedback-icon.bad { color: #f87171; }
.psych-feedback p {
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 14px;
}
.psych-feedback-xp {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  font-size: 0.95rem;
}
.psych-arena-done {
  text-align: center;
  padding: 30px 0;
}
.psych-arena-done-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.psych-arena-done h3 {
  margin: 0 0 8px;
}

/* ── Zen Zone ── */
.psych-zen-card h2 {
  margin: 0 0 4px;
}
.psych-breath-area {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}
.psych-breath-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(15, 23, 42, 0.5);
  border: 2px solid rgba(148, 163, 184, 0.15);
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.5s ease,
              box-shadow 0.5s ease;
  transform: scale(0.7);
}
.psych-breath-circle.inhale {
  transform: scale(1);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.15), 0 0 80px rgba(34, 197, 94, 0.05);
}
.psych-breath-circle.hold-in {
  transform: scale(1);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15), 0 0 80px rgba(34, 211, 238, 0.05);
}
.psych-breath-circle.exhale {
  transform: scale(0.7);
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.15);
}
.psych-breath-circle.hold-out {
  transform: scale(0.7);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: none;
}
.psych-breath-circle.complete {
  transform: scale(0.85);
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.15);
}
.psych-breath-inner {
  text-align: center;
  z-index: 1;
}
.psych-breath-phase {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
}
.psych-breath-timer {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.psych-breath-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.08);
}
.psych-breath-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.psych-breath-count {
  font-size: 0.82rem;
}

/* ── Quiz ── */
.psych-quiz-card h2 {
  margin: 0 0 4px;
}
.psych-quiz-header {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.psych-quiz-question {
  font-size: 1rem;
  line-height: 1.55;
  color: #e2e8f0;
  margin-bottom: 16px;
}
.psych-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.psych-quiz-opt {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  box-shadow: none;
}
.psych-quiz-opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: none;
  box-shadow: none;
}
.psych-quiz-opt:disabled {
  cursor: default;
  opacity: 0.7;
}
.psych-quiz-opt.correct {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  opacity: 1;
}
.psych-quiz-opt.wrong {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  opacity: 1;
}
.psych-quiz-explanation {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.1);
}
.psych-quiz-explanation p {
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 12px;
  font-size: 0.88rem;
}
.psych-quiz-done {
  text-align: center;
  padding: 30px 0;
}
.psych-quiz-done-score {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Principles ── */
.psych-principles-section h2 {
  margin: 0 0 4px;
}
.psych-principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.psych-principle-card {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: all 0.2s ease;
}
.psych-principle-card.mastered {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.05);
}
.psych-principle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.psych-principle-header h3 {
  margin: 0;
  font-size: 0.95rem;
}
.psych-principle-toggle {
  font-size: 1.2rem;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.psych-principle-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}
.psych-principle-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.psych-principle-body p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0 0 12px;
}
.psych-principle-body h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 8px;
}
.psych-principle-body ol {
  margin: 0;
  padding-left: 20px;
}
.psych-principle-body li {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.psych-mastered-label {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4ade80;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

/* ── 20 Tips for Trading Success ── */
.psych-tips-section h2 {
  margin: 0 0 4px;
}
.psych-tips-attribution {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
.psych-tips-attribution:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
.psych-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.psych-tip-card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.25);
  transition: border-color 0.15s ease;
}
.psych-tip-card:hover {
  border-color: rgba(148, 163, 184, 0.25);
}
.psych-tip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.psych-tip-header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}
.psych-tip-toggle {
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 8px;
}
.psych-tip-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.psych-tip-body p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

/* ── Illustration: Shield watermark (Commandments) ── */
.psych-oath-shield-deco {
  position: absolute;
  right: -10px;
  top: -10px;
  width: 180px;
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
}

/* ── Illustration: Neuron banner (Enforce section) ── */
.psych-enforce-neuro-banner {
  width: 100%;
  height: 70px;
  margin-bottom: 20px;
  opacity: 0.75;
  overflow: hidden;
}
.psych-enforce-neuro-banner svg {
  width: 100%;
  height: 100%;
}

/* ── Illustration: Crossed swords (Mind Arena) ── */
.psych-arena-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.psych-arena-swords {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(251,146,60,0.35));
}

/* ── Illustration: Mountain landscape (Zen Zone) ── */
.psych-zen-landscape {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  pointer-events: none;
  opacity: 0.65;
  z-index: 0;
}
.psych-zen-landscape svg {
  width: 100%;
  height: 100%;
}
.psych-breath-area {
  position: relative;
}
.psych-breath-circle {
  position: relative;
  z-index: 1;
}

/* ── How to Wire These Rules Into Your Brain ── */
.psych-enforce-section {
  position: relative;
  overflow: hidden;
}
.psych-enforce-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 100%, rgba(34, 197, 94, 0.05) 0%, transparent 60%);
  pointer-events: none;
}
.psych-enforce-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}
.psych-enforce-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.psych-enforce-section h2 {
  margin: 0 0 4px;
}
.psych-enforce-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.psych-enforce-card {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.psych-enforce-card:hover,
.psych-enforce-card.open {
  border-color: rgba(34, 197, 94, 0.25);
}
.psych-enforce-card--highlight {
  border-color: rgba(251, 146, 60, 0.2);
  background: rgba(251, 146, 60, 0.03);
}
.psych-enforce-card--highlight:hover,
.psych-enforce-card--highlight.open {
  border-color: rgba(251, 146, 60, 0.4);
}
.psych-enforce-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
}
.psych-enforce-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(34, 197, 94, 0.35);
  min-width: 30px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.psych-enforce-card--highlight .psych-enforce-num {
  color: rgba(251, 146, 60, 0.45);
}
.psych-enforce-card-title-wrap {
  flex: 1;
  min-width: 0;
}
.psych-enforce-card-title-wrap h3 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}
.psych-enforce-sub {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-style: italic;
}
.psych-enforce-toggle {
  font-size: 1.3rem;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.psych-enforce-card.open .psych-enforce-toggle {
  color: var(--accent);
}
.psych-enforce-card--highlight.open .psych-enforce-toggle {
  color: #fb923c;
}
.psych-enforce-body {
  padding: 0 18px 18px 62px;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
}
.psych-enforce-body p {
  font-size: 0.87rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin: 14px 0 10px;
}
.psych-enforce-body p:last-child {
  margin-bottom: 0;
}
.psych-enforce-body ul {
  margin: 8px 0 12px;
  padding-left: 18px;
}
.psych-enforce-body li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.psych-enforce-body strong {
  color: #e2e8f0;
  font-weight: 600;
}
.psych-enforce-body em {
  color: var(--text-muted);
  font-style: italic;
}

/* ── The 10 Commandments — Daily Oath ── */
.psych-oath-section {
  position: relative;
  overflow: hidden;
}
.psych-oath-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 0%, rgba(251, 146, 60, 0.06) 0%, transparent 65%);
  pointer-events: none;
}
.psych-oath-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.psych-oath-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.psych-oath-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fb923c;
  flex-shrink: 0;
}
.psych-oath-section h2 {
  margin: 0 0 4px;
}
.psych-oath-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}
.psych-oath-streak-badge,
.psych-oath-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(rgba(251, 146, 60, 0.15) 0deg, rgba(30, 41, 59, 0.5) 0deg);
  border: 2px solid rgba(251, 146, 60, 0.2);
  transition: background 0.4s ease;
}
.psych-oath-streak-badge {
  background: rgba(30, 41, 59, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
}
.psych-oath-streak-badge.on-fire {
  border-color: rgba(251, 146, 60, 0.5);
  background: rgba(251, 146, 60, 0.08);
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.2);
}
.psych-oath-streak-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fb923c;
  line-height: 1;
}
.psych-oath-streak-label,
.psych-oath-ring-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 2px;
}
.psych-oath-ring-num {
  font-size: 1rem;
  font-weight: 700;
  color: #fb923c;
  line-height: 1;
}
.psych-oath-bar-wrap {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.psych-oath-bar {
  flex: 1;
  height: 8px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
  overflow: hidden;
}
.psych-oath-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #fb923c, #f59e0b);
  transition: width 0.5s ease;
  width: 0%;
}
.psych-oath-bar-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Commandment grid */
.psych-cmd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}
.psych-cmd-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.psych-cmd-card:hover {
  border-color: rgba(251, 146, 60, 0.25);
}
.psych-cmd-card.sworn {
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.04);
}
.psych-cmd-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
}
.psych-cmd-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: rgba(251, 146, 60, 0.3);
  line-height: 1;
  min-width: 28px;
  flex-shrink: 0;
}
.psych-cmd-card.sworn .psych-cmd-num {
  color: rgba(74, 222, 128, 0.4);
}
.psych-cmd-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.psych-cmd-text-wrap {
  flex: 1;
  min-width: 0;
}
.psych-cmd-title {
  margin: 0 0 3px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.3;
}
.psych-cmd-tagline {
  margin: 0;
  font-size: 0.78rem;
  font-style: italic;
  color: #fb923c;
  line-height: 1.3;
}
.psych-cmd-card.sworn .psych-cmd-tagline {
  color: #4ade80;
}

/* Expandable body */
.psych-cmd-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}
.psych-cmd-why {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0 0 12px;
}
.psych-cmd-affirm {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 7px;
  padding: 8px 12px;
  color: #4ade80;
}
.psych-cmd-affirm svg {
  flex-shrink: 0;
  margin-top: 2px;
}
.psych-cmd-affirm em {
  font-size: 0.82rem;
  line-height: 1.5;
  font-style: italic;
}

/* Footer row */
.psych-cmd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}
.psych-cmd-expand-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease;
}
.psych-cmd-expand-btn:hover {
  color: #7dd3fc;
}
.psych-cmd-commit-btn {
  font-size: 0.75rem !important;
  padding: 5px 12px !important;
}
.psych-cmd-sworn-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4ade80;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

/* Full oath + complete state */
.psych-oath-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  flex-wrap: wrap;
}
.psych-oath-all-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(245, 158, 11, 0.2)) !important;
  border: 1px solid rgba(251, 146, 60, 0.4) !important;
  color: #fb923c !important;
}
.psych-oath-all-btn:hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.3), rgba(245, 158, 11, 0.3)) !important;
  border-color: rgba(251, 146, 60, 0.6) !important;
}
.psych-oath-complete {
  text-align: center;
  padding: 28px 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(74, 222, 128, 0.15);
}
.psych-oath-complete-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.psych-oath-complete h3 {
  margin: 0 0 8px;
  color: #4ade80;
  font-size: 1.1rem;
}
.psych-oath-complete p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}

/* ── Telegram Reminders card ── */
.psych-tg-section h2 { margin: 0 0 4px; }
.psych-tg-account-line {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  max-width: 52rem;
}
.psych-tg-account-badge {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 2px 8px;
  border-radius: 5px;
  margin-right: 8px;
  vertical-align: middle;
}
.psych-tg-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.psych-tg-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.psych-tg-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.psych-tg-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.psych-tg-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.psych-tg-status--on  { background: #4ade80; box-shadow: 0 0 6px rgba(74,222,128,0.6); }
.psych-tg-status--off { background: #64748b; }
.psych-tg-status-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-width: 42px;
}
.psych-tg-not-configured {
  font-size: 0.82rem;
  color: #fb923c;
  background: rgba(251,146,60,0.08);
  border: 1px solid rgba(251,146,60,0.2);
  padding: 6px 12px;
  border-radius: 6px;
}

/* Toggle switch */
.psych-toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}
.psych-toggle-switch input { opacity: 0; width: 0; height: 0; }
.psych-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 13px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.psych-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s ease, background 0.2s ease;
}
.psych-toggle-switch input:checked + .psych-toggle-slider {
  background: rgba(74,222,128,0.2);
  border-color: rgba(74,222,128,0.4);
}
.psych-toggle-switch input:checked + .psych-toggle-slider::before {
  transform: translate(20px, -50%);
  background: #4ade80;
}

/* Schedule table */
.psych-tg-schedule {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,0.1);
}
.psych-tg-schedule h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.psych-tg-tz-note {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}
.psych-tg-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.83rem;
}
.psych-tg-row {
  display: grid;
  grid-template-columns: 80px 100px 1fr;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  align-items: center;
  background: rgba(15,23,42,0.2);
  border: 1px solid transparent;
}
.psych-tg-row--head {
  color: #64748b;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  background: none;
  padding-bottom: 2px;
}
.psych-tg-row--danger {
  background: rgba(251,146,60,0.04);
  border-color: rgba(251,146,60,0.12);
}
.psych-tg-row--weekly {
  background: rgba(56,189,248,0.04);
  border-color: rgba(56,189,248,0.1);
}
.psych-tg-row span:first-child {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent);
}
.psych-tg-row span:nth-child(2) {
  color: #64748b;
  font-size: 0.78rem;
}
.psych-tg-note {
  margin-top: 10px;
  font-size: 0.78rem;
}

/* Setup instructions */
.psych-tg-setup {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148,163,184,0.08);
}
.psych-tg-setup-toggle {
  background: none;
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 6px;
  color: #64748b;
  font-size: 0.8rem;
  padding: 6px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.psych-tg-setup-toggle:hover {
  color: var(--text-muted);
  border-color: rgba(148,163,184,0.3);
}
.psych-tg-setup-body {
  margin-top: 14px;
}
.psych-tg-setup-body p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.psych-tg-cron {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 0.78rem;
  color: #4ade80;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 12px;
}

/* All user accounts table */
.psych-tg-all-users {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(148,163,184,0.1);
}
.psych-tg-all-users h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}
.psych-tg-all-intro {
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 56rem;
}
.psych-tg-user-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,0.12);
}
.psych-tg-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.psych-tg-user-table th,
.psych-tg-user-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(148,163,184,0.08);
}
.psych-tg-user-table th {
  color: #64748b;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  background: rgba(15,23,42,0.35);
}
.psych-tg-user-table tr:last-child td {
  border-bottom: none;
}
.psych-tg-user-row--self {
  background: rgba(56,189,248,0.04);
}
.psych-tg-uname {
  font-weight: 600;
  color: #e2e8f0;
}
.psych-tg-you {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}
.psych-tg-yes {
  color: #4ade80;
  font-size: 0.82rem;
}
.psych-tg-no {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.psych-toggle-switch--table {
  vertical-align: middle;
}
.psych-toggle-switch--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.psych-toggle-switch--disabled .psych-toggle-slider {
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .psych-principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .psych-grid-2 {
    grid-template-columns: 1fr;
  }
  .psych-principles-grid,
  .psych-tips-grid,
  .psych-cmd-grid {
    grid-template-columns: 1fr;
  }
  .psych-hero-top {
    flex-direction: column;
  }
  .psych-choices {
    grid-template-columns: 1fr;
  }
  .psych-demon-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .psych-quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Backtest page */
.backtest-page .page-title {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f1f5f9;
}
.backtest-caption {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
}
.backtest-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.backtest-tabs-row .backtest-tabs {
  margin-bottom: 0;
}
.backtest-cache-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 100%;
}
.backtest-cache-actions .backtest-reload-cache-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  box-shadow: none;
  font-weight: 600;
}
.backtest-cache-actions .backtest-reload-cache-btn:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text-primary);
  transform: none;
  box-shadow: none;
}
.backtest-cache-actions .backtest-reload-cache-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.backtest-cache-status {
  font-size: 0.85rem;
  max-width: min(420px, 100%);
}
.backtest-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}
.backtest-tab {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.9rem;
  box-shadow: none;
  transition: all var(--transition-fast);
}
.backtest-tab:hover {
  color: var(--text-secondary);
  border-color: rgba(148, 163, 184, 0.3);
  transform: none;
  box-shadow: none;
}
.backtest-tab.active {
  background: var(--accent-bg);
  border-color: var(--border-hover);
  color: var(--accent);
}
.backtest-form-card {
  margin-bottom: 20px;
}
.backtest-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 24px;
}
.backtest-form-row .field-inline {
  flex: 0 0 auto;
  margin-bottom: 0;
}
.backtest-form-row .field-inline span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.backtest-form-row .field-inline select,
.backtest-form-row .field-inline input[type="number"] {
  min-width: 100px;
  padding: 8px 10px;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  color: #e2e8f0;
}
.backtest-form-row .field-inline select {
  min-width: 120px;
}
.backtest-form-row .btn-apply {
  flex-shrink: 0;
}
.backtest-vix-row {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.backtest-vix-row .vix-row-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.vix-filter-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}
.vix-filter-wrap .vix-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-weight: normal;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 0.25em 0.5em 0.25em 0.6em;
  border-radius: 4px;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.vix-filter-wrap .vix-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}
.vix-checkbox-label.vix-band-calm { border-left: 3px solid #22c55e; }
.vix-checkbox-label.vix-band-avg { border-left: 3px solid #4ade80; }
.vix-checkbox-label.vix-band-elevated { border-left: 3px solid #eab308; }
.vix-checkbox-label.vix-band-fear { border-left: 3px solid #f59e0b; }
.vix-checkbox-label.vix-band-high_fear { border-left: 3px solid #f97316; }
.vix-checkbox-label.vix-band-panic { border-left: 3px solid #ef4444; }
.vix-cell {
  white-space: nowrap;
  font-size: 0.9rem;
}
.backtest-capital-walkthrough .col-num,
.table .col-num {
  width: 2.25rem;
  min-width: 2.25rem;
  max-width: 2.25rem;
  text-align: right;
}
.vix-cell .vix-tag {
  font-size: 0.75rem;
  opacity: 0.9;
}
.vix-cell.vix-calm { background: rgba(74, 222, 128, 0.15); }
.vix-cell.vix-avg { background: rgba(134, 239, 172, 0.2); }
.vix-cell.vix-elevated { background: rgba(253, 224, 71, 0.2); }
.vix-cell.vix-fear { background: rgba(251, 191, 36, 0.25); }
.vix-cell.vix-high_fear { background: rgba(249, 115, 22, 0.2); }
.vix-cell.vix-panic { background: rgba(239, 68, 68, 0.2); }
.vix-filter-hint {
  flex-basis: 100%;
  margin-top: 0.25rem;
  font-size: 0.8rem;
}
.recent-alerts-why {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #64748b;
}
.table-recent-alerts .table-row.signal-oversold_bounce {
  background: rgba(34, 197, 94, 0.12);
}
.table-recent-alerts .table-row.signal-oversold_bounce:hover {
  background: rgba(34, 197, 94, 0.2);
}
.table-recent-alerts .table-row.signal-overbought_drop {
  background: rgba(239, 68, 68, 0.12);
}
.table-recent-alerts .table-row.signal-overbought_drop:hover {
  background: rgba(239, 68, 68, 0.2);
}
.table-recent-alerts .table-row:not(.signal-oversold_bounce):not(.signal-overbought_drop) {
  background: rgba(148, 163, 184, 0.08);
}

/* Buy probability alert table */
.buy-prob-badge {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.82rem;
}
.buy-prob-badge.bp-high {
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
}
.buy-prob-badge.bp-med {
  background: rgba(250, 204, 21, 0.2);
  color: #fbbf24;
}
.buy-prob-badge.bp-low {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}
.bp-notes-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bp-strat-tag {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.bp-labels-text {
  font-size: 0.78rem;
  color: #64748b;
}
.table-buy-prob .cols-7 {
  grid-template-columns: 100px 70px 90px 65px 1fr 90px 85px;
}
.table-buy-prob .table-row:not(.header) {
  font-size: 0.88rem;
}
.table-buy-prob-ext {
  min-width: 900px;
}
.table-buy-prob-ext .cols-11 {
  grid-template-columns: 95px 65px 80px 58px 1fr 95px 78px 140px 80px 80px 90px;
}
.table-buy-prob-ext .table-row:not(.header) {
  font-size: 0.85rem;
}
.bp-exit-reason {
  font-size: 0.78rem;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}
.exit-stop  { color: #f87171; background: rgba(248,113,113,.12); }
.exit-ob    { color: #34d399; background: rgba(52,211,153,.12); }
.exit-max   { color: var(--text-muted); background: rgba(148,163,184,.10); }
.exit-open  { color: var(--accent); background: rgba(56,189,248,.10); }
.backtest-main {
  min-width: 0;
}
.backtest-chart {
  width: 100%;
  min-height: 500px;
}
.backtest-metrics .metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.backtest-metrics .metric-box {
  flex: 1 1 120px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}
.backtest-metrics .metric-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.backtest-metrics .metric-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #e2e8f0;
}

.backtest-summary-risk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}
.backtest-summary-risk-row .backtest-summary-stats,
.backtest-summary-risk-row .backtest-risk-card {
  flex: 1 1 320px;
  min-width: 0;
}

.backtest-summary-stats .backtest-summary-source {
  margin: -4px 0 12px 0;
  font-size: 0.9rem;
}

.backtest-summary-stats .summary-stats-table {
  max-width: 420px;
}
.backtest-summary-stats .table-row.cols-2 > div:first-child {
  color: var(--text-muted);
  padding-right: 24px;
}
.backtest-summary-stats .table-row.cols-2 > div:last-child {
  font-weight: 600;
  text-align: right;
}

.backtest-risk-card .risk-guidance {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.95rem;
  color: #cbd5e1;
}
.backtest-risk-card .risk-guidance-compact {
  margin-top: 12px;
  padding-top: 12px;
  font-size: 0.9rem;
}
.backtest-risk-card .risk-guidance-compact p {
  margin: 0 0 6px 0;
}
.backtest-risk-card .risk-tips-hover {
  cursor: help;
  color: var(--text-muted);
  margin-bottom: 0;
}
.backtest-risk-card .risk-guidance p {
  margin: 0 0 10px 0;
}
.backtest-risk-card .risk-guidance ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}
.backtest-risk-card .risk-guidance li {
  margin-bottom: 8px;
}
.backtest-summary-risk-row .backtest-risk-card .summary-stats-table {
  max-width: 420px;
}

.backtest-capital-walkthrough .table-row {
  font-size: 0.82rem;
}
.exit-reason-cell {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.85);
  white-space: normal;
  word-break: break-word;
  min-width: 100px;
}
.backtest-capital-walkthrough .capital-walkthrough-summary {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 1.05rem;
}
.backtest-capital-walkthrough .capital-walkthrough-summary p {
  margin: 6px 0;
}

@media (max-width: 768px) {
  .backtest-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .backtest-form-row .field-inline select,
  .backtest-form-row .field-inline input[type="number"] {
    min-width: 0;
  }
}

/* ═══════════════════════════════════════════════════════
   PAGE HERO
   ═══════════════════════════════════════════════════════ */
.page-hero {
  --hero-color: var(--accent);
  --hero-rgb: 34, 197, 94;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--hero-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: radial-gradient(ellipse at 85% 50%, rgba(var(--hero-rgb), 0.18), transparent 70%);
  pointer-events: none;
}

.page-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(var(--hero-rgb), 0.14);
  border: 1px solid rgba(var(--hero-rgb), 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hero-color);
  flex-shrink: 0;
}

.page-hero-icon svg {
  width: 24px;
  height: 24px;
}

.page-hero-content {
  flex: 1;
  min-width: 0;
}

.page-hero-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-hero-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Page hero color variants — restrained slate / blue / semantic */
.page-hero--dashboard  { --hero-color: var(--accent); --hero-rgb: 34, 197, 94; }
.page-hero--journal    { --hero-color: #64748b; --hero-rgb: 100, 116, 139; }
.page-hero--summary    { --hero-color: #52525b; --hero-rgb: 82, 82, 91; }
.page-hero--psychology { --hero-color: #71717a; --hero-rgb: 113, 113, 122; }
.page-hero--alerts     { --hero-color: #b45309; --hero-rgb: 180, 83, 9; }
.page-hero--backtest   { --hero-color: #166534; --hero-rgb: 22, 101, 52; }
.page-hero--sniper     { --hero-color: #b91c1c; --hero-rgb: 185, 28, 28; }
.page-hero--resources  { --hero-color: #475569; --hero-rgb: 71, 85, 105; }
.page-hero--blog       { --hero-color: #64748b; --hero-rgb: 100, 116, 139; }
.page-hero--bills      { --hero-color: #15803d; --hero-rgb: 21, 128, 61; }
.page-hero--brokerage  { --hero-color: #0d9488; --hero-rgb: 13, 148, 136; }
.page-hero--targets    { --hero-color: #ca8a04; --hero-rgb: 202, 138, 4; }
.page-hero--config     { --hero-color: #71717a; --hero-rgb: 113, 113, 122; }
.page-hero--trades     { --hero-color: #a16207; --hero-rgb: 161, 98, 7; }

@media (max-width: 600px) {
  .page-hero {
    padding: 16px 18px;
    gap: 14px;
  }
  .page-hero-icon {
    width: 42px;
    height: 42px;
  }
  .page-hero-icon svg {
    width: 20px;
    height: 20px;
  }
  .page-hero-title {
    font-size: 1.2rem;
  }
}

/* ═══════════════════════════════════════════════════════
   NAV LUCIDE & SVG — inherit zinc-200 / emerald-400 (2026_plan.html)
   ═══════════════════════════════════════════════════════ */
.nav-link i[data-lucide],
.nav-link svg.lucide,
.nav-link > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 1;
  color: inherit;
  stroke: currentColor;
  stroke-width: 2px;
  transition: color var(--transition-fast);
}

/* ── Strategy Guide Tab ─────────────────────────────────────── */
.sg-wrap {
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sg-hero {
  margin-bottom: 28px;
}
.sg-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}
.sg-hero-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 16px 0;
}
.sg-hero-tldr {
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.sg-tldr-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  margin-right: 6px;
}
.sg-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 14px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
/* Strategy comparison cards */
.sg-strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.sg-strat-card {
  position: relative;
  padding: 18px 20px;
}
.sg-strat-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px 0;
}
.sg-strat-best {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56,189,248,.25), 0 4px 16px rgba(56,189,248,.08);
}
.sg-strat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(56,189,248,.15);
  color: var(--accent);
}
.sg-strat-badge--aggressive {
  background: rgba(251,191,36,.12);
  color: #fbbf24;
}
.sg-strat-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.sg-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sg-metric span {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sg-metric strong {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 700;
}
.sg-strat-peryear {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.sg-strat-note {
  font-size: 0.78rem;
  margin: 4px 0 10px 0;
}
.sg-pros-cons {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sg-pro { color: #34d399; margin-right: 4px; }
.sg-con { color: #f87171; margin-right: 4px; }
/* Allocation */
.sg-alloc-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sg-alloc-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}
.sg-alloc-best {
  border-color: var(--accent);
}
.sg-alloc-bc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .sg-alloc-bc-row { grid-template-columns: 1fr; }
}
.sg-alloc-table-row {
  grid-template-columns: 120px 130px 200px 1fr;
}
.sg-alloc-table-row-3 {
  grid-template-columns: 100px 130px 1fr;
}
.sg-badge-rec {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(56,189,248,.15);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 6px;
}
/* Risk section */
.sg-risk-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.sg-rule-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
/* Strategy performance table */
.sg-top-strat-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.sg-strat-row-top {
  background: rgba(56,189,248,.04);
}
.sg-pf {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}
.sg-pf-excellent { background: rgba(52,211,153,.15); color: #34d399; }
.sg-pf-good      { background: rgba(56,189,248,.12); color: var(--accent); }
.sg-pf-ok        { background: rgba(148,163,184,.12); color: var(--text-muted); }
/* Priority list */
.sg-priority-list {
  margin: 0;
  padding: 0 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.sg-priority-list li::marker {
  color: var(--accent);
  font-weight: 700;
}
/* Exit signal tags */
.sg-exit-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.sg-exit-stop   { background: rgba(248,113,113,.14); color: #f87171; }
.sg-exit-ob     { background: rgba(52,211,153,.12);  color: #34d399; }
.sg-exit-signal { background: rgba(251,191,36,.10);  color: #fbbf24; }
.sg-exit-trend  { background: rgba(148,163,184,.12); color: var(--text-muted); }
.sg-exit-max    { background: rgba(99,102,241,.12);  color: #818cf8; }

/* ── View Data Tab ──────────────────────────────────────────────────────── */
.vd-filter-form {
  padding: 14px 18px;
}
.vd-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
}
.vd-filter-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vd-input {
  background: var(--input-bg, #1e2535);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 6px 10px;
  min-width: 130px;
  height: 34px;
  outline: none;
  transition: border-color var(--transition-fast);
}
.vd-input:focus { border-color: var(--accent); }
.vd-input--short { min-width: 80px; }
.vd-submit-btn {
  height: 34px;
  padding: 0 18px;
  font-size: 0.85rem;
  align-self: flex-end;
}
.vd-reset-link {
  align-self: flex-end;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 4px;
  line-height: 1;
}
.vd-reset-link:hover { color: var(--text-primary); }

/* Preset bar */
.vd-preset-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  flex-wrap: wrap;
}
.vd-preset-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  white-space: nowrap;
}
.vd-preset-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vd-preset-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 12px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.vd-preset-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.vd-preset-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.vd-row-count {
  font-size: 0.78rem;
  margin-left: auto;
  white-space: nowrap;
}

/* Table */
.vd-table-card {
  padding: 0;
  overflow: hidden;
}
.vd-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 72vh;
}
.vd-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.8rem;
}
.vd-table th,
.vd-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  text-align: left;
  vertical-align: middle;
}
.vd-table thead th {
  position: sticky;
  top: 0;
  background: var(--card-bg-raised, #1a2133);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.vd-table tbody tr:hover td {
  background: var(--row-hover, rgba(255,255,255,.03));
}
/* Sticky first two columns */
.vd-sticky {
  position: sticky;
  background: var(--card-bg, #151d2e);
  z-index: 1;
}
.vd-sticky-1 { left: 0; min-width: 72px; }
.vd-sticky-2 { left: 72px; min-width: 96px; }
.vd-table thead .vd-sticky {
  background: var(--card-bg-raised, #1a2133);
  z-index: 3;
}
/* Strategy cell — allow a little wrap */
.vd-strategy-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Inline tags */
.vd-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
/* Cloud status */
.vd-cloud-above_cloud   { background: rgba(52,211,153,.12); color: #34d399; }
.vd-cloud-below_cloud   { background: rgba(248,113,113,.12); color: #f87171; }
.vd-cloud-inside_cloud  { background: rgba(251,191,36,.10);  color: #fbbf24; }
.vd-cloud-none          { color: var(--text-dim); }
/* RSI trend */
.vd-rsitrend-up   { background: rgba(52,211,153,.12); color: #34d399; }
.vd-rsitrend-down { background: rgba(248,113,113,.12); color: #f87171; }
/* Cross signals */
.vd-cross-cross_up,
.vd-cross-bullish { background: rgba(52,211,153,.12); color: #34d399; }
.vd-cross-cross_dn,
.vd-cross-bearish { background: rgba(248,113,113,.12); color: #f87171; }
.vd-cross-none    { color: var(--text-dim); }
/* BB signal */
.vd-bb-buy  { background: rgba(52,211,153,.12); color: #34d399; }
.vd-bb-sell { background: rgba(248,113,113,.12); color: #f87171; }
.vd-bb-none { color: var(--text-dim); }
/* EMA44 interaction */
.vd-ema44-above { background: rgba(52,211,153,.10); color: #34d399; }
.vd-ema44-below { background: rgba(248,113,113,.10); color: #f87171; }

/* Empty state */
.vd-empty-state {
  padding: 28px 24px;
  text-align: center;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════
   JOURNAL HUB — Tab bar (Dashboard / Journal / Summary)
   ═══════════════════════════════════════════════════════ */
.journal-hub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 8px 16px 0;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.journal-hub-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.journal-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #e4e4e7;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.journal-tab svg {
  flex-shrink: 0;
  opacity: 1;
  color: inherit;
  transition: color var(--transition-fast);
}

.journal-tab:hover {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.08);
  text-decoration: none;
}

.journal-tab--active {
  color: #4ade80;
  border-bottom-color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  font-weight: 600;
}

.journal-tab--active svg {
  color: inherit;
}

.journal-hub-account {
  display: inline-flex;
  align-items: center;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.journal-hub-account select {
  padding: 7px 11px;
  font-size: 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text-field);
  cursor: pointer;
  min-width: 155px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.journal-hub-account select:hover,
.journal-hub-account select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

@media (max-width: 640px) {
  .journal-hub-bar {
    padding: 6px 12px 0;
  }
  .journal-hub-tabs {
    gap: 2px;
  }
  .journal-tab {
    padding: 9px 14px 11px;
    font-size: 0.85rem;
  }
  .journal-hub-account {
    width: 100%;
    padding: 6px 0 10px;
  }
  .journal-hub-account select {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════
   2026 TRADING PLAN PAGE (/2026)
   ═══════════════════════════════════════════════════════ */
.plan26 {
  margin-left: calc(-1 * var(--space-xl));
  margin-right: calc(-1 * var(--space-xl));
  margin-top: -8px;
  color: #d4d4d8;
}

.plan26 a {
  color: var(--accent-light);
}

.plan26 a:hover {
  color: var(--accent);
}

.plan26-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0 var(--space-lg);
  border-bottom: 1px solid var(--border-default);
  margin-bottom: var(--space-lg);
}

.plan26-subnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
}

.plan26-subnav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e4e4e7;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.plan26-subnav-links a:hover {
  color: #4ade80;
  text-decoration: none;
}

.plan26-subnav-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.plan26-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: var(--radius-full);
}

.plan26-btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-inverse);
  background: #fafafa;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.plan26-btn-print:hover {
  background: var(--accent);
  color: #fff;
}

.plan26-hero {
  position: relative;
  padding: 48px 32px 56px;
  margin-bottom: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 8, 10, 0.96) 0%, rgba(12, 22, 16, 0.92) 55%, rgba(10, 12, 11, 0.94) 100%),
    url("https://images.unsplash.com/photo-1642790106117-e80e870dfb6b?auto=format&fit=crop&w=1800&q=75") center/cover no-repeat;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.plan26-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 52rem;
}

.plan26-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.plan26-kicker-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.plan26-hero h2.plan26-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 var(--space-lg);
}

.plan26-hero-title span.accent {
  color: var(--accent-light);
}

.plan26-lead {
  font-size: 1.125rem;
  color: #a1a1aa;
  max-width: 36rem;
  line-height: 1.65;
  margin: 0 0 var(--space-xl);
}

.plan26-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.plan26-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.plan26-btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.plan26-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 500;
  color: #e4e4e7;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.plan26-btn-secondary:hover {
  border-color: #71717a;
  color: #fff;
}

.plan26-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  font-size: 0.7rem;
  color: #71717a;
}

.plan26-hero-meta .highlight {
  color: var(--accent-light);
  font-weight: 600;
}

.plan26-section {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.plan26-section:last-of-type {
  border-bottom: none;
}

.plan26-section-head {
  margin-bottom: var(--space-xl);
}

.plan26-section-head.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: end;
}

.plan26-display-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.plan26-overview-layout {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

@media (max-width: 960px) {
  .plan26-overview-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .plan26-section-head.grid-2 {
    grid-template-columns: 1fr;
  }
}

.plan26-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin: 0 0 8px;
}

.plan26-section-head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.plan26-section-head .aside {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 22rem;
}

.plan26-goals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 960px) {
  .plan26-goals {
    grid-template-columns: 1fr;
  }
}

.plan26-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.plan26-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.plan26-card .emoji {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.plan26-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 var(--space-sm);
  color: var(--text-primary);
}

.plan26-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.55;
}

.plan26-card-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 0.75rem;
}

.plan26-tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-light);
  border-radius: var(--radius-full);
}

.plan26-routine-wrap {
  padding: var(--space-2xl) var(--space-xl);
  margin-left: calc(-1 * var(--space-xl));
  margin-right: calc(-1 * var(--space-xl));
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
  background:
    linear-gradient(180deg, rgba(18, 18, 20, 0.97) 0%, rgba(12, 14, 13, 0.99) 100%),
    url("https://images.unsplash.com/photo-1639762681485-074b7f938ba0?auto=format&fit=crop&w=1600&q=70") center/cover no-repeat fixed;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.plan26-routine-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.plan26-badge-new {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-inverse);
  background: var(--accent-light);
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.plan26-routine-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0;
  color: var(--text-primary);
}

.plan26-routine-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 1100px) {
  .plan26-routine-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .plan26-routine-grid {
    grid-template-columns: 1fr;
  }
}

.plan26-daybox {
  background: #000;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

.plan26-daybox h5 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  margin: 0 0 4px;
  letter-spacing: 0.06em;
}

.plan26-daybox .time {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.plan26-daybox ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan26-daybox li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  color: #d4d4d8;
}

.plan26-daybox li svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.plan26-daybox--accent {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.12) 0%, transparent 55%);
  border-color: rgba(34, 197, 94, 0.25);
}

.plan26-daybox--muted {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.plan26-daybox--checkin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.plan26-daybox--checkin .emoji {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.plan26-phases-intro {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.plan26-phases-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
}

.plan26-phases-intro p {
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 28rem;
}

.plan26-phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1100px) {
  .plan26-phases {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .plan26-phases {
    grid-template-columns: 1fr;
  }
}

.plan26-phase .phase-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.plan26-phase .phase-label {
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-inverse);
  background: var(--accent-light);
  border-radius: var(--radius-full);
}

.plan26-phase .phase-dates {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.plan26-phase h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 var(--space-lg);
  color: var(--text-primary);
}

.plan26-phase ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan26-phase li {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  color: #d4d4d8;
}

.plan26-phase li span.check {
  color: var(--accent);
  font-weight: 700;
}

.plan26-phase .milestone {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-md);
}

.plan26-phase-final .milestone-strong {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-inverse);
  background: var(--accent-light);
  border-radius: var(--radius-md);
}

.plan26-phase-final .final-tag {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  padding: 4px 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-light);
  background: rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-full);
}

.plan26-phase.plan26-phase-final {
  position: relative;
}

.plan26-ira {
  margin-left: calc(-1 * var(--space-xl));
  margin-right: calc(-1 * var(--space-xl));
  padding: var(--space-2xl) var(--space-xl);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(8, 12, 10, 0.95) 50%),
    url("https://images.unsplash.com/photo-1579621970563-ebec7560ff3e?auto=format&fit=crop&w=1400&q=70") right center/cover no-repeat;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.plan26-ira-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
  max-width: var(--container-max);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .plan26-ira-grid {
    grid-template-columns: 1fr;
  }
}

.plan26-ira h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 var(--space-md);
}

.plan26-ira-lead {
  color: var(--text-muted);
  margin: 0 0 var(--space-xl);
}

.plan26-ira-rows .row {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.plan26-ira-rows .icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(34, 197, 94, 0.12);
  border-radius: var(--radius-md);
}

.plan26-ira-rows strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.plan26-ira-rows span.sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.plan26-ira-highlight {
  margin-top: var(--space-lg);
  font-weight: 600;
  color: var(--accent-light);
}

.plan26-rules-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.plan26-rules-panel h4 {
  margin: 0 0 var(--space-lg);
  font-size: 1.05rem;
}

.plan26-rule-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-default);
}

.plan26-rule-row:last-child {
  border-bottom: none;
}

.plan26-rule-row span.val {
  color: var(--accent-light);
  font-weight: 600;
  text-align: right;
}

.plan26-tools {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-xl);
}

@media (max-width: 900px) {
  .plan26-tools {
    grid-template-columns: 1fr;
  }
}

.plan26-tools-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan26-tools-list li {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

.plan26-tools-list svg {
  flex-shrink: 0;
  color: var(--accent);
}

.plan26-tools-quote {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
}

.plan26-tools-quote h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 var(--space-lg);
}

.plan26-tools-quote p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.plan26-divider-line {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan26-divider-line::before,
.plan26-divider-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent));
}

.plan26-divider-line::after {
  background: linear-gradient(90deg, var(--accent), var(--accent), transparent);
}

.plan26-footer-note {
  font-size: 0.7rem;
  color: var(--accent-light);
  margin-top: var(--space-lg);
}

.plan26-generated {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: var(--space-md);
}

.plan26-page-footer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: var(--space-xl) 0 0;
  margin-top: var(--space-xl);
  border-top: 1px solid var(--border-subtle);
}

/* Target Portfolio tab (resources) */
.target-portfolio-wrap {
  margin-top: 4px;
}

.target-portfolio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 20px;
}

.target-portfolio-refresh {
  font-weight: 500;
  color: var(--accent-cyan);
  text-decoration: none;
}

.target-portfolio-refresh:hover {
  text-decoration: underline;
}

.target-portfolio-hint {
  font-size: 0.85rem;
}

.target-portfolio-hint code {
  font-size: 0.8em;
}

.target-portfolio-msg {
  margin: 0 0 16px 0;
}

.target-portfolio-heading {
  margin: 0 0 6px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #f1f5f9;
}

.target-portfolio-sub {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
}

.target-portfolio-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.target-portfolio-badge--dim {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.25);
}

.target-portfolio-inner-tabs {
  margin-top: 8px;
}

.target-portfolio-tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.target-portfolio-tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.target-portfolio-tab-btn:hover {
  background: rgba(51, 65, 85, 0.75);
  border-color: rgba(148, 163, 184, 0.4);
}

.target-portfolio-tab-btn.active {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}

.target-portfolio-tab-panel {
  display: none;
}

.target-portfolio-tab-panel.active {
  display: block;
}

.target-portfolio-card {
  padding: var(--space-lg) var(--space-xl);
}

.target-portfolio-card-title {
  margin: 0 0 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}

.target-portfolio-section {
  margin-bottom: 28px;
}

.target-portfolio-section-title {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
}

.target-portfolio-table th.numeric,
.target-portfolio-table td.numeric {
  text-align: right;
}

.target-portfolio-total {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  font-weight: 600;
  color: #86efac;
  font-size: 0.95rem;
}

.target-portfolio-scenario {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.target-portfolio-wide-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
}

.target-portfolio-table--wide {
  min-width: 720px;
  font-size: 0.8125rem;
}

.target-portfolio-pos {
  color: #4ade80;
  font-weight: 600;
}

.target-portfolio-value-row {
  background: rgba(234, 179, 8, 0.08);
  font-weight: 600;
}

.target-portfolio-value-row td {
  border-bottom-color: rgba(148, 163, 184, 0.15);
}

@media print {
  .site-header,
  .site-footer,
  .plan26-subnav,
  .plan26-btn-print,
  .plan26-hero-actions .plan26-btn-secondary {
    display: none !important;
  }
  .plan26-hero {
    break-inside: avoid;
  }
}
