/* Horisont Design System & CSS Styles */

:root {
  /* Premium Nordic Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --glass-bg: rgba(17, 24, 39, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  
  /* Aurora Accents */
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-mint: #34d399;
  --accent-copper: #f59e0b;
  --accent-copper-glow: rgba(245, 158, 11, 0.15);
  
  /* System States */
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-danger-glow: rgba(239, 68, 68, 0.15);
  --color-warning: #f59e0b;
  
  /* Text colors */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Typography & Spacing */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-body);
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* APP LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR styling */
.sidebar {
  width: 280px;
  background-color: rgba(11, 15, 25, 0.85);
  border-right: 1px solid var(--glass-border);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(20px);
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-mint));
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 15px var(--accent-emerald-glow);
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
}

.bankid-status {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.avatar {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-label {
  font-size: 0.65rem;
  color: var(--accent-emerald);
  font-weight: 600;
  text-transform: uppercase;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.scenario-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.scenario-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

.scenario-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.scenario-btn.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--text-primary);
}

.btn-icon {
  font-size: 1.25rem;
}

.btn-text {
  display: flex;
  flex-direction: column;
}

.btn-text strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.05);
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.self-host-badge {
  color: var(--accent-mint);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* MAIN CONTENT AREA */
.main-content {
  flex-grow: 1;
  margin-left: 280px;
  padding: 2.5rem;
  width: calc(100% - 280px);
}

/* APP HEADER */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.header-titles h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 0.25rem;
}

.badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.networth-widget {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--glass-border);
  padding: 1rem 1.75rem;
  border-radius: 16px;
  text-align: right;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.networth-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-mint);
}

.networth-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* TABS */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* GLASS CARD PANELS */
.glass-card {
  background-color: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px var(--glass-shadow);
  padding: 1.75rem;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.panel-header {
  margin-bottom: 1.5rem;
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
}

.panel-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.separator-line {
  height: 1px;
  background: var(--glass-border);
  margin: 1.5rem 0;
}

/* DASHBOARD GRID */
.dashboard-grid {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* CONTROLS PANEL (LEFT) */
.controls-panel {
  display: flex;
  flex-direction: column;
}

.control-group {
  margin-bottom: 1.25rem;
}

.control-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.control-value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Styled Range Sliders */
.styled-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  outline: none;
  transition: background 0.3s ease;
}

.styled-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-emerald);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-emerald-glow);
  transition: transform 0.1s ease, background-color 0.2s ease;
}

.styled-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-mint);
}

.styled-number {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.5rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.styled-number:focus {
  border-color: var(--accent-emerald);
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* CHART PANEL (CENTER) */
.chart-panel {
  display: flex;
  flex-direction: column;
}

.header-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-toggles {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.25rem;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: var(--glass-border);
  color: var(--text-primary);
}

.chart-wrapper {
  position: relative;
  height: 350px;
  width: 100%;
  margin-top: 1rem;
}

/* TIMELINE & LIFE EVENTS */
.timeline-container {
  margin-top: 0.5rem;
}

.life-events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.event-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.event-card.active {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.04);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.event-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.event-icon {
  font-size: 1.25rem;
}

.event-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.event-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.event-toggle-btn {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-toggle-btn:hover {
  background: var(--glass-border);
  color: #fff;
}

.event-card.active .event-toggle-btn {
  background: var(--accent-emerald);
  color: #000;
  border-color: var(--accent-emerald);
  font-weight: 600;
}

/* STATS PANEL (RIGHT) */
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.metric-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

.metric-value.credit {
  color: var(--color-success);
}

.metric-value.debit {
  color: var(--color-danger);
}

.metric-value.highlighted {
  color: var(--accent-mint);
  font-size: 1.05rem;
}

/* SUBSCRIPTION TRIMMER */
.section-intro-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.subscriptions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sub-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.sub-item.trimmed {
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.02);
  text-decoration: line-through;
}

.sub-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-icon {
  font-size: 1.1rem;
}

.sub-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
}

.sub-cost {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.trim-btn {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trim-btn:hover {
  background: var(--color-danger);
  color: #fff;
}

.sub-item.trimmed .trim-btn {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border-color: rgba(16, 185, 129, 0.2);
}

.sub-item.trimmed .trim-btn::after {
  content: "Ångra";
}

.sub-item.trimmed .trim-btn span {
  display: none;
}

.trimmer-saving-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.saving-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-copper);
}

.saving-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ==================================================== */
/* TAB 2: HISTORIK & VANOR (USER FEEDBACK STYLE) */
/* ==================================================== */

.history-grid {
  grid-template-columns: 1fr 400px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.insight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all 0.3s ease;
}

.insight-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.insight-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vacation-accent {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.service-accent {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.winter-accent {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.inflation-accent {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.insight-content {
  display: flex;
  flex-direction: column;
}

.insight-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}

.insight-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.insight-stat {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-mint);
}

.seasonality-chart-container {
  margin-top: 1rem;
}

.seasonality-chart-container h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  margin-bottom: 1rem;
}

/* TRANSACTIONS PANEL */
.transactions-panel {
  display: flex;
  flex-direction: column;
  max-height: 600px;
}

.transactions-table-wrapper {
  overflow-y: auto;
  flex-grow: 1;
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.transactions-table th {
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
}

.transactions-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
}

.transactions-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
  color: #fff;
}

/* ==================================================== */
/* TAB 3: STRESS TEST & SWEDISH RECS */
/* ==================================================== */

.stresstest-hero-panel {
  margin-bottom: 1.5rem;
}

.stresstest-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.stress-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.stress-card:hover {
  background: rgba(255, 255, 255, 0.02);
}

.stress-card.active {
  background: rgba(239, 68, 68, 0.03);
  border-color: var(--color-danger);
  box-shadow: 0 4px 20px var(--color-danger-glow);
}

.stress-header {
  margin-bottom: 1rem;
}

.stress-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.warning-bg {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
}

.danger-bg {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
}

.stress-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
}

.stress-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.stress-effect-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.stress-card.active .stress-effect-text {
  color: var(--color-danger);
}

.stress-toggle-btn {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.6rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stress-toggle-btn:hover {
  background: var(--glass-border);
  color: #fff;
}

.stress-card.active .stress-toggle-btn {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}

/* RECOMMENDATIONS LIST */
.rec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.rec-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all 0.3s ease;
}

.rec-card:hover {
  border-color: var(--accent-emerald);
}

.rec-badge {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-mint);
  border: 1px solid rgba(16, 185, 129, 0.2);
  height: max-content;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  text-transform: uppercase;
}

.rec-content {
  display: flex;
  flex-direction: column;
}

.rec-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.rec-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* SCROLLBAR CUSTOMIZATION */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1400px) {
  .dashboard-grid {
    grid-template-columns: 300px 1fr;
  }
  .stats-panel {
    grid-column: span 2;
  }
  .history-grid {
    grid-template-columns: 1fr;
  }
  .transactions-panel {
    max-height: 400px;
  }
}

@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1.5rem;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .stats-panel {
    grid-column: auto;
  }
  .stresstest-cards {
    grid-template-columns: 1fr;
  }
  .rec-list {
    grid-template-columns: 1fr;
  }
}

/* ==================================================== */
/* RICH INTERACTIVE UPGRADES STYLING */
/* ==================================================== */

.hidden {
  display: none !important;
}

/* Timeline sliders in event cards */
.event-year-control {
  background: rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.event-year-control label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.event-year-control label strong {
  color: var(--accent-mint);
}

.event-year-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}

.event-year-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-copper);
  cursor: pointer;
  box-shadow: 0 0 5px var(--accent-copper-glow);
  transition: transform 0.1s ease;
}

.event-year-range::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Year Inspector Sektion */
.inspector-container {
  margin-top: 1rem;
}

.inspector-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  animation: pulse-slow 2s infinite ease-in-out;
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.inspector-placeholder p {
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 500px;
}

.inspector-card-details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 1.25rem;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.inspector-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.inspector-details-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
}

.inspector-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.inspect-sub-panel h5 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.inspect-ledger {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ledger-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.01);
  color: var(--text-secondary);
}

.ledger-item span:first-child {
  color: var(--text-secondary);
}

.ledger-item span:last-child {
  font-weight: 600;
  font-family: var(--font-display);
}

/* Stress test glow screen alerts */
.app-container {
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.stress-glow-active {
  box-shadow: inset 0 0 40px rgba(239, 68, 68, 0.25), 0 0 30px rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
}

.stress-glow-warning {
  box-shadow: inset 0 0 40px rgba(245, 158, 11, 0.2), 0 0 30px rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.15) !important;
}

/* Subscription Trim celebration effects */
@keyframes gold-flash {
  0% { box-shadow: 0 0 0px var(--accent-copper-glow); }
  50% { box-shadow: 0 0 25px var(--accent-copper); }
  100% { box-shadow: 0 0 15px var(--accent-copper-glow); }
}

.gold-glow {
  animation: gold-flash 0.8s ease;
}

@media (max-width: 768px) {
  .inspector-split {
    grid-template-columns: 1fr;
  }
}

/* Unified bottom row layout */
.unified-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-top: 2rem;
}

/* Horizon toggles and double wrappers */
.horizon-toggles {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 0.25rem;
  gap: 0.25rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  border: 1px solid var(--glass-border);
}

.horizon-toggles .toggle-btn.active {
  background: var(--accent-emerald);
  color: #000;
  font-weight: 600;
}

/* Accrual and Lead controls styling */
.seasonal-planning-controls {
  background: rgba(255, 255, 255, 0.01);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

.accrual-switches-panel label {
  transition: color 0.2s ease;
}

.accrual-switches-panel label:hover {
  color: var(--accent-mint);
}

.accrual-switches-panel input[type="checkbox"]:checked + span {
  color: var(--accent-mint);
  font-weight: 500;
}

@media (max-width: 1200px) {
  .unified-bottom-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Sparmål Cards & Progress */
.goal-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.goal-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.goal-item.completed {
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.03);
}

.goal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.goal-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.goal-label-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.goal-year-badge {
  font-size: 0.65rem;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-copper);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
}

.goal-amount-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-display);
}

.goal-progress-container {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  margin-top: 0.25rem;
}

.goal-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-copper), var(--accent-mint));
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-status-text {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 0.1rem;
}


