/* ==========================================================================
   BLIKVITT / SKULDFRIKASSA - DASHBOARD & KOMPONENT-STILAR
   Organiserad multi-kolumns layout för lån, strategimatris, grafer, tidslinje & tabell
   ========================================================================== */

/* ==========================================================================
   LÅNEKORT RUTNÄT (2-KOLUMN PÅ DESKTOP)
   ========================================================================== */

.loan-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 1rem;
}

.loan-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: all var(--transition-fast);
}

.loan-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
}

.loan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.loan-info-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.loan-type-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.loan-title-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.loan-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.badge-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.badge-tag.rate {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-tag.high-rate {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-400);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.badge-tag.cfi {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-400);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.loan-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
}

.loan-metric-item {
  display: flex;
  flex-direction: column;
}

.loan-metric-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.loan-metric-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   BUDGET- & AMORTERINGSKONTROLLER (2-KOLUMN)
   ========================================================================== */

.budget-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

@media (max-width: 720px) {
  .budget-control-grid {
    grid-template-columns: 1fr;
  }
}

.budget-summary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.budget-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.budget-stats-row.highlight {
  border-top: 1px dashed rgba(16, 185, 129, 0.3);
  padding-top: 0.45rem;
  margin-top: 0.25rem;
  color: var(--emerald-400);
  font-size: 0.85rem;
}

.extra-budget-box {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.extra-budget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
  margin-top: 0.25rem;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--emerald-400);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Engångsbetalningar */
.lumpsum-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  margin-top: 0.85rem;
}

.lumpsum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.lumpsum-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.lump-sum-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lump-sum-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  gap: 0.5rem;
}

/* ==========================================================================
   STRATEGI-MATRIS (4 HORISONTELLA KORT I EN RAD)
   ========================================================================== */

.objective-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.objective-pills-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.objective-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.objective-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.objective-pill.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan-400);
  color: var(--cyan-300);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}

.strategy-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1120px) {
  .strategy-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .strategy-matrix-grid {
    grid-template-columns: 1fr;
  }
}

.strategy-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.strategy-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.strategy-card.active {
  border-color: var(--emerald-400);
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.95) 70%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.strategy-badge-top {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, var(--emerald-500) 0%, var(--cyan-500) 100%);
  color: #041210;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-bottom-left-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.strategy-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.strategy-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.strategy-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.strategy-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.strategy-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

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

.strategy-metric-row .metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.strategy-metric-row .metric-val {
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.metric-val.green {
  color: var(--emerald-400);
}
.metric-val.amber {
  color: var(--amber-400);
}
.metric-val.cyan {
  color: var(--cyan-400);
}
.metric-val.neutral {
  color: var(--text-secondary);
}

.strategy-savings-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 600;
}

.strategy-savings-pill.green-border {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--emerald-300);
}

/* ==========================================================================
   BERÄKNINGSANALYS & MOTIVERINGS-BANNER
   ========================================================================== */

.reasoning-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(99, 102, 241, 0.06) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.reasoning-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan-300);
}

.reasoning-text {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.dynamic-phase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.phase-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: #e2e8f0;
}

.phase-num {
  color: var(--cyan-400);
  font-weight: 700;
}

/* ==========================================================================
   NYCKELTALSKORT (4-KOLUMN GRID)
   ========================================================================== */

.metrics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
  .metrics-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .metrics-summary-grid {
    grid-template-columns: 1fr;
  }
}

.metric-highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left-width: 4px;
}

.metric-highlight-card.emerald {
  border-left-color: var(--emerald-400);
}
.metric-highlight-card.cyan {
  border-left-color: var(--cyan-400);
}
.metric-highlight-card.amber {
  border-left-color: var(--amber-400);
}
.metric-highlight-card.indigo {
  border-left-color: var(--indigo-400);
}

.metric-highlight-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.metric-highlight-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
}

.metric-highlight-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   GRAFPANEL MED DIREKTA METODKNAPPAR
   ========================================================================== */

.chart-panel-card {
  margin-bottom: 1.5rem;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chart-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.chart-tab-btn {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chart-tab-btn.active {
  background: var(--emerald-500);
  color: #041210;
  font-weight: 700;
  border-color: var(--emerald-400);
}

.chart-strategy-toggles {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.strat-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.strat-toggle-btn:hover {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.strat-toggle-btn.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.strat-toggle-btn[data-strat="dynamic"].active {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
}

.strat-toggle-btn[data-strat="avalanche"].active {
  border-color: rgba(129, 140, 248, 0.6);
  background: rgba(129, 140, 248, 0.15);
  color: #c7d2fe;
}

.strat-toggle-btn[data-strat="snowball"].active {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
}

.strat-toggle-btn[data-strat="cashflow"].active {
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.15);
  color: #a5f3fc;
}

.strat-toggle-btn.action {
  margin-left: auto;
  background: transparent;
  border: 1px dashed var(--border-medium);
  color: var(--text-secondary);
}

.toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0.4;
  transition: opacity var(--transition-fast);
}

.strat-toggle-btn.active .toggle-dot {
  opacity: 1;
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 350px;
}

/* ==========================================================================
   2-KOLUMNS SPLIT FÖR TIDSLINJE OCH REVISIONSTABELL
   ========================================================================== */

.details-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

.timeline-card, .table-card {
  height: 100%;
}

.action-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  padding-left: 1.8rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.action-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-step {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.timeline-marker {
  position: absolute;
  left: -1.8rem;
  top: 0.85rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid var(--emerald-400);
  color: var(--emerald-400);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.timeline-marker.done {
  background: var(--emerald-400);
  color: #041210;
}

.timeline-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.timeline-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-period-badge {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.timeline-instruction {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.timeline-allocation-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.allocation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.allocation-loan-name {
  color: var(--text-primary);
}

.allocation-amount {
  font-weight: 700;
  color: var(--emerald-400);
}

.timeline-milestone-alert {
  margin-top: 0.45rem;
  padding: 0.35rem 0.6rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  color: var(--emerald-300);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Månadstabell */
.table-responsive {
  max-height: 480px;
  overflow-y: auto;
}

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

.schedule-table th {
  position: sticky;
  top: 0;
  background: #0f172a;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border-medium);
  z-index: 10;
}

.schedule-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.schedule-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.schedule-table tr.milestone-row {
  background: rgba(16, 185, 129, 0.07);
}

/* ==========================================================================
   MODAL DIALOGER
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  padding: 1rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #0f172a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

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

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-control:focus {
  border-color: var(--emerald-400);
}

.input-unit {
  position: absolute;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.interest-preview-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   COOKIE BANNER & GDPR MODAL STYLING (BLIKVITT.SE)
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-medium);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
  padding: 1rem 0;
  z-index: 900;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.cookie-banner-text p {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Cookie Settings Modal */
.cookie-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.cookie-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Custom Switch Toggle */
.custom-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.custom-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.custom-toggle input:checked + .toggle-slider {
  background-color: var(--emerald-500);
}

.custom-toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.footer-links-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
  flex-wrap: wrap;
  justify-content: center;
}

/* Legal Modals (Privacy Policy & Terms) */
.legal-modal-box {
  max-width: 680px;
}

.legal-modal-body {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.legal-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.legal-modal-body h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.25rem;
}

.legal-modal-body ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legal-modal-body code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan-300);
}

/* ==========================================================================
   TILLFÄLLIGT LÖSENORDSSKYDD (SITE LOCK OVERLAY)
   ========================================================================== */

.site-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  visibility: hidden;
  padding: 1.25rem;
}

.site-lock-overlay.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.lock-box {
  background: #0f172a;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.lock-box.success-unlock {
  transform: scale(0.96);
  opacity: 0;
}

.lock-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.lock-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.lock-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

.lock-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lock-input-group {
  width: 100%;
}

.lock-input-group .input-control {
  text-align: center;
  font-size: 1rem;
  padding: 0.65rem 1rem;
  letter-spacing: 0.08em;
}

.lock-error-msg {
  font-size: 0.76rem;
  color: var(--rose-400);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.lock-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1.25rem;
}

.lock-hint code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--emerald-300);
  font-family: 'JetBrains Mono', monospace;
}

@keyframes shakeAnimation {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.lock-box.shake {
  animation: shakeAnimation 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}



