/* ================================================================
   Calitate Aer — Școala Dumbravița  ·  v3
   style.css  ·  Light + Dark themes, flexible layout
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ================================================================
   THEME VARIABLES
   ================================================================ */
:root,
[data-theme="light"] {
  --font:       'DM Sans', system-ui, sans-serif;
  --mono:       'DM Mono', monospace;

  --ink:        #1a1918;
  --ink-2:      #4f4d4a;
  --ink-3:      #95928d;
  --surface:    #ffffff;
  --surface-2:  #f5f3ee;
  --surface-3:  #ece9e2;
  --border:     rgba(0,0,0,0.08);
  --border-md:  rgba(0,0,0,0.14);

  --ok:         #2e7d41;
  --ok-bg:      #d4edda;
  --ok-mid:     #6dba84;
  --ok-text:    #1a4a28;
  --warn:       #a85800;
  --warn-bg:    #fce4be;
  --warn-mid:   #f0a030;
  --warn-text:  #5c3000;
  --bad:        #b52b2b;
  --bad-bg:     #fad5d5;
  --bad-mid:    #e06060;
  --bad-text:   #5a1010;
  --na:         #999;
  --na-bg:      #e8e6e0;
  --na-text:    #666;

  --shadow:     0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:  0 4px 18px rgba(0,0,0,0.09);
  --radius:     10px;
  --radius-lg:  15px;

  /* Chart colors */
  --cc-co2:   #d94f4f;
  --cc-voc:   #1a7abf;
  --cc-ch2o:  #8e44ad;
  --cc-o3:    #16a085;
  --cc-noise: #d4820a;
  --cc-temp:  #0d7a6a;
  --cc-hum:   #2471a3;
  --cc-pm25:  #7d6e5e;
  --cc-hol:   #bbb;
}

[data-theme="dark"] {
  --ink:        #e4e1da;
  --ink-2:      #a09d97;
  --ink-3:      #6a6762;
  --surface:    #1c1b19;
  --surface-2:  #232220;
  --surface-3:  #2c2b28;
  --border:     rgba(255,255,255,0.07);
  --border-md:  rgba(255,255,255,0.13);

  --ok:         #4caf65;
  --ok-bg:      #1a3d26;
  --ok-mid:     #4caf65;
  --ok-text:    #a8dbb4;
  --warn:       #d4920a;
  --warn-bg:    #3d2800;
  --warn-mid:   #d4920a;
  --warn-text:  #f5c870;
  --bad:        #e05555;
  --bad-bg:     #3d1a1a;
  --bad-mid:    #e05555;
  --bad-text:   #f5aaaa;
  --na:         #666;
  --na-bg:      #2a2927;
  --na-text:    #888;

  --shadow:     0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 18px rgba(0,0,0,0.4);
}

html, body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface-2);
  line-height: 1.55;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

.mono { font-family: var(--mono); font-size: 0.85em; letter-spacing: -0.01em; }

/* ================================================================
   HEADER
   ================================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.2s;
}

.header-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.brand-icon {
  width: 34px; height: 34px;
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-title { font-size: 14px; font-weight: 600; }
.brand-sub   { font-size: 11px; color: var(--ink-3); }

.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 5px 10px;
}

.month-display {
  font-size: 13px;
  font-weight: 500;
  min-width: 130px;
  text-align: center;
  text-transform: capitalize;
}

.nav-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-size: 16px; padding: 2px 6px;
  border-radius: 5px; line-height: 1; transition: background 0.12s;
}
.nav-btn:hover    { background: var(--surface-3); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--font);
  display: flex; align-items: center; gap: 4px;
  transition: background 0.12s;
}
.ctrl-btn:hover { background: var(--surface-3); }

.export-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--ink);
  color: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.15s;
}
.export-btn:hover { opacity: 0.8; }

/* ================================================================
   STATUS BAR
   ================================================================ */
.status-bar {
  max-width: 1060px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  gap: 0;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
  flex: 1;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--na);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.status-dot.online  { background: var(--ok);  box-shadow: 0 0 0 3px var(--ok-bg); }
.status-dot.offline { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }

.status-label { color: var(--ink-2); }
.status-val   { font-weight: 500; color: var(--ink); margin-left: auto; font-size: 11px; }
.status-divider { width: 1px; height: 22px; background: var(--border-md); margin: 0 16px; }

/* ================================================================
   LAYOUT
   ================================================================ */
.main-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 18px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px 20px;
  transition: background 0.2s;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.section-hint { font-size: 11px; color: var(--ink-3); }

/* ================================================================
   LOADING
   ================================================================ */
.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
  padding: 20px 0;
}

.loader {
  width: 15px; height: 15px;
  border: 2px solid var(--border-md);
  border-top-color: var(--ink-3);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   WEEKLY
   ================================================================ */
.week-block    { margin-bottom: 14px; }
.week-block:last-child { margin-bottom: 0; }
.week-label    { font-size: 10px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.week-row      { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.day-card {
  border-radius: 9px;
  padding: 9px 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  position: relative;
  border: 2px solid transparent;
  min-height: 86px;
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: center;
}
.day-card:hover:not(.na-card) { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.day-card.selected             { border-color: var(--ink) !important; }
.day-card.na-card              { cursor: default; opacity: 0.4; }
.day-card.na-card:hover        { transform: none; box-shadow: none; }
.day-card.ok-card   { background: var(--ok-bg); }
.day-card.warn-card { background: var(--warn-bg); }
.day-card.bad-card  { background: var(--bad-bg); }
.day-card.na-card   { background: var(--na-bg); }

.dc-weekday { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.6; width: 100%; }
.dc-day     { font-size: 20px; font-weight: 300; line-height: 1.1; }
.dc-score   { font-size: 11px; font-weight: 600; }
.dc-label   { font-size: 9px; opacity: 0.75; }
.dc-flags   { font-size: 11px; min-height: 16px; line-height: 1; }

.ok-card   .dc-weekday, .ok-card   .dc-score { color: var(--ok); }
.warn-card .dc-weekday, .warn-card .dc-score { color: var(--warn); }
.bad-card  .dc-weekday, .bad-card  .dc-score { color: var(--bad); }

.today-ring { position: absolute; inset: -2px; border-radius: 10px; border: 2px solid var(--ink-3); pointer-events: none; }

/* ================================================================
   TABS
   ================================================================ */
.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-3);
  font-family: var(--font);
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.tab-btn:hover  { color: var(--ink); }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }

.tab-pane { animation: fadein 0.15s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ================================================================
   DETAIL HEADER
   ================================================================ */
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.detail-score-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.score-pill.ok   { background: var(--ok-bg);   color: var(--ok-text);  }
.score-pill.warn { background: var(--warn-bg);  color: var(--warn-text);}
.score-pill.bad  { background: var(--bad-bg);   color: var(--bad-text); }
.score-pill.na   { background: var(--na-bg);    color: var(--na-text);  }

.close-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  padding: 6px 13px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
  font-family: var(--font);
  white-space: nowrap;
}
.close-btn:hover { background: var(--surface-3); }

/* ================================================================
   PARAM CARDS
   ================================================================ */
.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.param-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 11px 13px;
  border-left: 3px solid transparent;
}
.param-card.ok-b   { border-left-color: var(--ok-mid);  }
.param-card.warn-b { border-left-color: var(--warn-mid);}
.param-card.bad-b  { border-left-color: var(--bad-mid); }
.param-card.na-b   { border-left-color: var(--na); opacity: 0.6; }

.param-name  { font-size: 10px; color: var(--ink-3); margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.param-val   { font-size: 19px; font-weight: 500; line-height: 1; color: var(--ink); }
.param-unit  { font-size: 11px; font-weight: 400; color: var(--ink-2); margin-left: 2px; }
.param-ref   { font-size: 10px; color: var(--ink-3); margin-top: 3px; }
.param-diff  { font-size: 10px; font-weight: 500; margin-top: 2px; }
.param-diff.w { color: var(--bad); }
.param-diff.b { color: var(--ok); }
.offline-tag { display: inline-block; background: var(--na-bg); color: var(--na-text); border-radius: 3px; font-size: 9px; padding: 1px 4px; font-weight: 500; margin-left: 3px; }

/* VOC AQI bar */
.voc-bar-wrap { margin-top: 5px; }
.voc-bar-bg   { height: 5px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
.voc-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.voc-bar-label{ font-size: 9px; color: var(--ink-3); margin-top: 2px; display: flex; justify-content: space-between; }

/* ================================================================
   ISSUES
   ================================================================ */
.issues-list { margin-bottom: 16px; }

.issue-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.issue-item:first-child { padding-top: 0; }
.issue-item:last-child  { border-bottom: none; padding-bottom: 0; }

.issue-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  font-weight: 600;
}
.issue-icon.bad  { background: var(--bad-bg);  color: var(--bad); }
.issue-icon.warn { background: var(--warn-bg); color: var(--warn); }
.issue-icon.ok   { background: var(--ok-bg);   color: var(--ok); }
.issue-icon.info { background: var(--surface-3); color: var(--ink-2); }

.issue-text   { font-size: 12px; color: var(--ink); line-height: 1.5; flex: 1; }
.issue-label  { font-weight: 500; display: block; margin-bottom: 1px; }
.issue-detail { font-size: 11px; color: var(--ink-2); }
.issue-time   { font-size: 10px; font-family: var(--mono); color: var(--ink-3); margin-top: 2px; display: block; }

.event-cat {
  display: inline-block;
  background: var(--surface-3);
  border-radius: 3px;
  font-size: 9px;
  padding: 1px 5px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

/* ================================================================
   CHARTS
   ================================================================ */
.chart-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cleg { display: flex; align-items: center; gap: 4px; }
.cleg-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.detail-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 580px) { .detail-charts { grid-template-columns: 1fr; } }

.detail-chart-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.detail-chart-card h4 { font-size: 10px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

.chart-wrap  { position: relative; height: 110px; }
.chart-tooltip-bar {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ink-2);
  opacity: 0.4;
  pointer-events: none;
  display: none;
}

/* ================================================================
   CALENDAR
   ================================================================ */
.cal-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.leg-item { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px; }
.leg-ok   { background: var(--ok-bg);   color: var(--ok-text); }
.leg-warn { background: var(--warn-bg); color: var(--warn-text); }
.leg-bad  { background: var(--bad-bg);  color: var(--bad-text); }
.leg-na   { background: var(--na-bg);   color: var(--na-text); }

.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 4px; }
.cal-weekdays span { font-size: 9px; font-weight: 600; color: var(--ink-3); text-align: center; text-transform: uppercase; letter-spacing: 0.05em; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-cell {
  border-radius: 7px;
  padding: 6px 3px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s;
  min-height: 50px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 2px;
}
.cal-cell:hover:not(.cal-na) { transform: scale(1.06); }
.cal-cell.cal-ok   { background: var(--ok-bg);  }
.cal-cell.cal-warn { background: var(--warn-bg); }
.cal-cell.cal-bad  { background: var(--bad-bg);  }
.cal-cell.cal-na   { background: var(--na-bg); opacity: 0.4; cursor: default; }
.cal-cell.cal-selected { box-shadow: 0 0 0 2px var(--ink); }

.cal-num   { font-size: 14px; font-weight: 400; color: var(--ink); }
.cal-score { font-size: 9px; font-weight: 600; }
.cal-cell.cal-ok   .cal-score { color: var(--ok); }
.cal-cell.cal-warn .cal-score { color: var(--warn); }
.cal-cell.cal-bad  .cal-score { color: var(--bad); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 560px) {
  .week-row { gap: 3px; }
  .day-card { padding: 7px 3px; min-height: 70px; }
  .dc-day   { font-size: 16px; }
  .dc-label, .dc-flags { display: none; }
  .param-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { gap: 8px; }
}

@media (max-width: 400px) {
  .month-display { min-width: 100px; font-size: 12px; }
}

/* ── Additions v4 ── */
.chart-hint {
  font-size: 10px;
  color: var(--ink-3);
  margin-left: auto;
  font-style: italic;
}
.cc-hol { color: var(--cc-hol); }

/* ================================================================
   INFO MODAL
   ================================================================ */
.info-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.info-modal-box {
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 22px 22px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.info-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px; height: 28px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.info-modal-close:hover { background: var(--surface-2); }

.info-modal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
  padding-right: 30px;
  line-height: 1.3;
}

.info-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  margin-top: 14px;
}
.info-section-label:first-of-type { margin-top: 0; }

.info-text {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-bottom: 2px;
}

.info-tip {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px 12px;
  border-left: 3px solid var(--ok-mid);
  color: var(--ink);
}

/* Limits table */
.info-limits { display: flex; flex-direction: column; gap: 4px; }

.info-limit-row {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}
@media (max-width: 460px) {
  .info-limit-row { grid-template-columns: 1fr; }
}

.info-limit-range { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.info-limit-label { font-weight: 600; font-size: 12px; }
.info-limit-desc  { color: var(--ink-2); }

/* VAQI box */
.info-vaqi-box {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 4px;
}
.info-vaqi-text { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin-bottom: 4px; }
.info-vaqi-step { font-size: 12px; color: var(--ink); padding: 3px 0 3px 12px; border-left: 2px solid var(--border-md); margin: 4px 0; }
.info-formula   { font-family: var(--mono); font-size: 11px; color: var(--ink); background: var(--surface-3); border-radius: 5px; padding: 6px 10px; margin: 6px 0; }
.info-vaqi-result { font-size: 12px; font-weight: 500; color: var(--ink); margin-top: 6px; padding: 6px 10px; border-radius: 5px; background: var(--ok-bg); color: var(--ok-text); }

/* ================================================================
   INFO BUTTON (?)
   ================================================================ */
.info-q-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-md);
  background: var(--surface-3);
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--mono);
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
  padding: 0;
}
.info-q-btn:hover {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}

/* Param card name row */
.param-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 4px;
}
.param-name-row .param-name { flex: 1; }

/* Event cat row (with ? button) */
.event-cat-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}
.event-cat-row .event-cat { margin-right: 0; }

/* ================================================================
   TAB: IMPACT
   ================================================================ */
.impact-intro-box { margin-bottom: 12px; }

.impact-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.impact-intro {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 12px;
}

.impact-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.impact-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.impact-icon {
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  width: 18px;
  text-align: center;
}

.impact-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.impact-desc {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.65;
  padding-left: 26px;
}

/* Recommendation cards */
.rec-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 11px 14px;
  margin-bottom: 8px;
  border-left: 4px solid var(--border-md);
}

.rec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.rec-icon { font-size: 14px; flex-shrink: 0; }

.rec-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
}

.rec-text {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.65;
  padding-left: 22px;
}

/* ================================================================
   WEEKEND MARKING
   ================================================================ */

/* Weekly view — contur fin pe carduri weekend */
.day-card.weekend-card {
  box-shadow: inset 0 0 0 1.5px var(--border-md);
}
.day-card.weekend-card.na-card {
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Weekend label discret */
.day-card.weekend-card .dc-weekday {
  opacity: 0.45;
}

/* Calendar lunar — celule weekend cu contur subtil */
.cal-cell.cal-weekend {
  box-shadow: inset 0 0 0 1.5px var(--border-md);
  position: relative;
}
.cal-cell.cal-na.cal-weekend {
  box-shadow: inset 0 0 0 1px var(--border);
}

/* Weekend header in cal-weekdays (Sâm, Dum = coloanele 6,7) */
.cal-weekdays span:nth-child(6),
.cal-weekdays span:nth-child(7) {
  opacity: 0.45;
}

/* ================================================================
   SPIKE SUMMARY BOX
   ================================================================ */
.spike-summary-box {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px 13px;
  margin-bottom: 14px;
  border-left: 3px solid var(--border-md);
}

.spike-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 0.5px solid var(--border);
}
.spike-row:last-child { border-bottom: none; }

.spike-label {
  font-weight: 500;
  color: var(--ink);
  min-width: 160px;
}

.spike-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 4px;
  padding: 1px 6px;
}

.spike-max {
  font-size: 11px;
  color: var(--ink-2);
}

.spike-times {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  flex: 1;
  text-align: right;
}

/* ================================================================
   SCORE INFO BUTTON + MODAL CONTENT
   ================================================================ */

/* Section header cu buton aliniat */
.section-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.score-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border-md);
  border-radius: 20px;
  padding: 4px 11px 4px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.score-info-btn svg {
  color: var(--ink-3);
  flex-shrink: 0;
}
.score-info-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--border-md);
}

/* Score bands (culori explicative) */
.score-bands {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 4px;
}

.score-band-row {
  border-radius: 6px;
  padding: 8px 11px;
}

.score-band-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
}

.score-band-range {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  min-width: 60px;
}

.score-band-label {
  font-size: 12px;
  font-weight: 600;
}

.score-band-desc {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Score examples */
.score-examples {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}

.score-example-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}
.score-example-row:last-child { border-bottom: none; }

.score-ex-pts {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--bad);
  min-width: 52px;
  flex-shrink: 0;
}

.score-ex-text {
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
}

@media (max-width: 480px) {
  .section-header-right { align-items: flex-start; }
  .score-info-btn span { display: none; }
  .score-info-btn { padding: 5px 8px; border-radius: 50%; }
}
