/* MedCheck · css/5-dashboard.css · T3-c: Dashboard: carduri, programările zilei, heatmap, sumar lună, donuturi. T4-b: zona de atingere a săgeților din „Programări azi” pe telefon. T5: mărimile pictogramelor din Dashboard; pe telefon butonul de pornire primește pictograma în locul „▶” din CSS.
   Regulile sunt în ordinea cascadei dinainte de regrupare; cele de telefon (≤600/≤900 px) în @media proprii, după cele de desktop.
   Fișierele CSS se încarcă în ordinea numerelor — ordinea contează (cascada). */
/* ─── DASHBOARD ─── */

/* ─── ROW GENERIC + PANELS ─── */
.dash-row.r-1-1 { grid-template-columns: 1fr 1fr; }
.dash-row.r-1-1-1 { grid-template-columns: 1fr 1fr 1fr; }
/* ─── Heatmap activitate (Dashboard) — mini-calendar lunar cu cifre ─── */
.heatmap-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
  padding: 2px 0;
}
.heatmap-day-label {
  font-size: 11px;
  color: var(--gray);
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}
.heatmap-cell {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 1px solid rgba(27,31,35,0.06);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.heatmap-cell:hover {
  transform: scale(1.08);
  border-color: var(--teal);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.heatmap-cell-empty {
  visibility: hidden;
  cursor: default;
}
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  justify-content: center;
  font-size: 11px;
}
.heatmap-legend-lbl {
  color: var(--gray);
}
.heatmap-legend .heatmap-cell {
  width: 13px;
  height: 13px;
  min-height: 13px;
  aspect-ratio: unset;
  font-size: 0;
  cursor: default;
}
.heatmap-legend .heatmap-cell:hover {
  transform: none;
  border-color: rgba(27,31,35,0.06);
  box-shadow: none;
}
/* ─── Selector lună (reutilizabil în header de panel) ─── */
.month-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 2px;
}
.month-picker-nav {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  color: var(--gray);
  line-height: 1;
  padding: 0;
}
.month-picker-nav:hover:not(:disabled) {
  background: rgba(0,0,0,0.08);
  color: var(--body);
}
.month-picker-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.month-picker-text {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  min-width: 88px;
  text-align: center;
  user-select: none;
  color: var(--body);
}
.month-picker-text:hover {
  background: rgba(0,0,0,0.06);
}
.month-picker-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
}
/* ─── Sumar lună (Dashboard) ─── */
/* Panel-ul header gestionează spațierea pt month picker */
.panel-hd .month-picker {
  margin-left: auto;
}
/* ─── V5: Cards Grid (8 carduri principale) ─── */
.dash-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.dash-card-body { flex: 1; min-width: 0; }
.dash-card-title {
  font-weight: 700;
  color: var(--head);
  margin-bottom: 2px;
}
.dash-card-sub {
  color: var(--gray);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-card.primary .dash-card-title { color: #fff; }
.dash-card.primary .dash-card-sub { color: #fff; opacity: .85; }
/* ─── V5: Mini-lista programări pe Dashboard ─── */
.dash-mini-prg-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.dash-mini-prg-title-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
}
.dash-mini-prg-title-btn:hover .dash-mini-prg-title { color: var(--teal); }
.dash-mini-prg-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--head);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.dash-mini-prg-chev {
  font-size: 16px;
  color: var(--gray);
  font-weight: 700;
}
.dash-mini-prg-datepicker {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-mini-prg-nav {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--head);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-mini-prg-nav:hover { background: var(--gray-l); border-color: var(--teal); }
.dash-mini-prg-date-display {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: var(--white);
  min-width: 130px;
  justify-content: center;
}
.dash-mini-prg-date-display:hover { border-color: var(--teal); }
.dash-mini-prg-date-display #dash-mini-prg-main {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--head);
}
.dash-mini-prg-sub {
  font-size: 10.5px;
  color: var(--gray);
  font-weight: 500;
}
.dash-mini-prg-date-display input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}
.dash-mini-prg-today {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--head);
  border-radius: 6px;
  cursor: pointer;
}
.dash-mini-prg-today:hover { background: var(--gray-l); border-color: var(--teal); }
.dash-mini-prg-manual-btn {
  font-size: 12px;
  padding: 6px 12px;
}
.dash-mini-prg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-mini-prg-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--gray);
  font-style: italic;
}
.dash-mini-prg-card.menu-open {
  z-index: 200;
  position: relative;
}
.dash-mini-prg-card.fup { background: rgba(253, 216, 53, .08); }
.dash-mini-prg-match.matched { background: var(--st-green-bg); color: var(--st-green); }
.dash-mini-prg-match.new { background: var(--st-orange-bg); color: var(--st-orange); }
.dash-mini-prg-match.in-progress { background: var(--st-amber-bg); color: var(--st-amber); border: 1px solid var(--st-amber-dot); animation: prg-pulse 1.8s ease-in-out infinite; }
.dash-mini-prg-match.consultat { background: var(--st-green-bg); color: var(--st-green); border: 1px solid var(--st-green-dot); }
.dash-mini-prg-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.dash-mini-prg-start:hover { background: var(--teal-d); border-color: var(--teal-d); }
.dash-mini-prg-icon:hover { border-color: var(--teal); color: var(--head); }
.dash-mini-prg-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 180px;
  z-index: 9999;
  overflow: hidden;
}
.dash-mini-prg-menu.open { display: block; }
.dash-mini-prg-menu-item {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.dash-mini-prg-menu-item:hover { background: var(--gray-l); }
.dash-mini-prg-menu-item.danger { color: var(--st-red); }
.dash-mini-prg-menu-item.danger:hover { background: var(--st-red-bg); }
.panel-sub {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
}
/* ─── HEATMAP ─── */

/* ─── DELTA PANEL ─── */

/* ─── DONUT ─── */
.dl-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.dl-lbl { flex: 1; font-weight: 600; color: var(--body); }
.dl-val { font-weight: 800; color: var(--head); }
.dl-pct {
  font-size: 11px;
  color: var(--gray);
  font-weight: 700;
  min-width: 38px;
  text-align: right;
}
/* ═══════════════════════════════════════════════════════════════════════
DASHBOARD — suprascrieri premium
Aplică polish premium pe: carduri quick-action, mini-listă programări,
heatmap, sumar lună. Panel + donut sunt deja OK, ajustări minore.
═══════════════════════════════════════════════════════════════════════ */

/* ─── 1. Card-uri quick-action (8 butoane) ─── */
.dash-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  background: var(--teal-l);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--teal) 10%, transparent);
}
.dash-card.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-d) 100%);
  border-color: var(--teal-d);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--teal) 25%, transparent);
}
.dash-card.primary:hover {
  border-color: var(--teal-d);
  background: linear-gradient(135deg, var(--teal-d) 0%, var(--teal-d) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--teal) 35%, transparent);
}
.dash-card-ic {
  background: var(--teal-l);
  color: var(--teal-d);
}
.dash-card.primary .dash-card-ic {
  background: rgba(255,255,255,.20);
  color: #fff;
}
/* ─── 2. Mini-listă programări (card programare) ─── */
.dash-mini-prg-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 10px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.dash-mini-prg-card:hover {
  border-color: var(--teal);
  background: var(--gray-l);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
}
.dash-mini-prg-time {
  font-weight: 800;
  color: var(--head);
  font-size: 15.5px;
  min-width: 56px;
  font-variant-numeric: tabular-nums;
}
.dash-mini-prg-time-none {
  color: var(--gray);
  font-style: italic;
  min-width: 56px;
  font-size: 11px;
}
/* Info devine coloană cu name-row sus, meta jos (telefon) */
.dash-mini-prg-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  min-width: 0;
}
.dash-mini-prg-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-mini-prg-name {
  color: var(--head);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14.5px;
  font-weight: 700;
}
.dash-mini-prg-match {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-mini-prg-meta {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.dash-mini-prg-start {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  font-size: 12.5px;
  padding: 8px 13px;
  border-radius: 7px;
  font-weight: 700;
}
.dash-mini-prg-icon {
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  font-size: 14px;
}
/* ─── 3. Heatmap — nuanțe teal premium (înlocuiesc verde GitHub) ─── */
.heatmap-level-0 { background: var(--teal-c); color: var(--label); border-color: color-mix(in srgb, var(--teal) 6%, transparent); }
.heatmap-level-1 { background: var(--teal-l); color: var(--head);    border-color: var(--teal-m); }
.heatmap-level-2 { background: var(--teal-m); color: var(--head);    border-color: var(--teal); }
.heatmap-level-3 { background: var(--teal);   color: #fff;            border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.heatmap-level-4 { background: var(--teal-d); color: #fff;            border-color: color-mix(in srgb, var(--teal) 40%, transparent); }
.heatmap-cell.today {
  outline: 2px solid var(--st-amber-dot);
  outline-offset: 1px;
}
/* ─── 4. Sumar lună — accent border-left teal + valoare în teal-d ─── */
.sumar-luna-lbl {
  font-size: 12.5px;
  color: var(--body);
  font-weight: 600;
}
/* ─── 5. Polish minor pe panel-title ─── */
.panel-title {
  font-weight: 800;
  color: var(--head);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.04em;
}
/* ╔════════════════════════════════════════════════════════════════════╗
║  PRO DENS · DASHBOARD (varianta A — compact uniform)                 ║
║  Nu mută markup; țintește clasele existente ale Dashboard-ului.      ║
╚════════════════════════════════════════════════════════════════════╝ */

/* ── densitate de bază (ecran mare) ── */
/* Lățime: pe tot ecranul ca restul ecranelor (anulează max-width:1400px din baza) */
.dash-body{padding:0 24px 26px;max-width:none}
/* Padding: anulează stratul exterior #dashboard-content (avea 24px inline) ca să
rămână un singur padding de 24px lateral, identic cu Programări (era dublu = 48px). */
/* carduri quick-action */
.dash-cards-grid{display: grid;
  grid-template-columns: repeat(4, 1fr);gap:10px;margin-bottom:12px}
.dash-card{transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;min-height:58px;padding:11px 13px;border-radius:10px;border-width:1px}
.dash-card-ic{display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;width:38px;height:38px;font-size:18px;border-radius:9px}
.dash-card-title{font-size:13.5px}
.dash-card-sub{font-size:11px}
/* panou programări */
.dash-mini-prg-panel{background: var(--white);
  border: 1px solid var(--border);padding:12px 16px;border-radius:12px;margin-bottom:12px}
.dash-mini-prg-hd{display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;margin-bottom:9px}
/* rânduri + panouri generice */
.dash-row{display: grid;gap:12px;margin-bottom:12px}
.panel{background: var(--white);
  border: 1px solid var(--border);padding:14px 16px;border-radius:12px}
.panel-hd{display: flex;
  align-items: center;
  justify-content: space-between;margin-bottom:10px}
/* donut + legendă */
.donut-wrap{display: flex;
  align-items: center;gap:18px}
.donut-svg{flex: 0 0 auto;width:120px;height:120px}
.donut-legend{flex: 1;
  display: flex;
  flex-direction: column;gap:7px}
.dl-item{display: flex;
  align-items: center;font-size:12px;gap:9px}
/* heatmap */
.heatmap-container{display: flex;
  flex-direction: column;
  gap: 6px;padding:8px 14px 12px}
.heatmap-cell{min-height:30px;font-size:11.5px}
/* sumar lună */
.sumar-luna-body{display: flex;
  flex-direction: column;padding:10px 14px 14px;gap:8px}
.sumar-luna-item{display: flex;
  align-items: center;
  justify-content: space-between;background: var(--gray-l);
  border-left: 3px solid var(--teal);padding:9px 14px;border-radius:9px}
.sumar-luna-val{line-height: 1;font-weight: 800;
  color: var(--teal-d);
  font-variant-numeric: tabular-nums;font-size:20px}
/* ── pragul compact 1440×820 (clinica, laptopul): bloc copiat neatins ── */
@media (max-width:1440px), (max-height:820px){
  .dash-body{padding:0 18px 16px}

  .prg5-hero{padding:10px 18px;margin:10px 0 8px;gap:16px}
  .prg5-hero-left{min-width:220px}
  .prg5-hero-title{font-size:16px}
  .prg5-hero-subtitle{font-size:11.5px;margin-top:3px}
  .prg5-hero-stat{padding:0 16px;min-width:70px}
  .prg5-hero-stat-val{font-size:23px}
  .prg5-hero-stat-lbl{font-size:9.5px;margin-top:4px}
  .prg5-hero-stat-sep{height:34px}

  .dash-cards-grid{gap:8px;margin-bottom:9px}
  .dash-card{min-height:48px;padding:7px 10px;gap:9px}
  .dash-card-ic{width:30px;height:30px;font-size:15px;border-radius:8px}
  .dash-card-title{font-size:12.5px}
  .dash-card-sub{font-size:10px}

  .dash-mini-prg-panel{padding:9px 12px;margin-bottom:9px}
  .dash-mini-prg-hd{margin-bottom:7px}
  .dash-mini-prg-list{gap:6px}
  .dash-mini-prg-card{padding:7px 11px}
  .dash-mini-prg-time{font-size:13.5px;min-width:48px}

  .dash-row{gap:9px;margin-bottom:9px}
  .panel{padding:10px 12px}
  .panel-hd{margin-bottom:8px}

  .donut-wrap{gap:12px}
  .donut-svg{width:94px;height:94px}
  .donut-legend{gap:5px}
  .dl-item{font-size:11px;gap:7px}
  .dl-dot{width:8px;height:8px}

  .heatmap-container{padding:6px 12px 10px}
  .heatmap-cell{min-height:24px;font-size:10.5px}

  .sumar-luna-body{padding:8px 12px 10px;gap:6px}
  .sumar-luna-item{padding:6px 12px}
  .sumar-luna-lbl{font-size:12px}
  .sumar-luna-val{font-size:17px}
}
/* ── Donut click pe Dashboard ── */
.donut-legend .dl-item.dl-click{cursor:pointer;padding:3px 6px;border-radius:6px;margin:-3px -6px}
.donut-legend .dl-item.dl-click:hover{background:var(--teal-l)}
/* containerele cu scroll propriu (erau stiluri inline) */
#dashboard-content{padding:0;flex:1;overflow-y:auto;}
@media (max-width: 900px) {
  .dash-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-mini-prg-hd { flex-direction: column; align-items: stretch; }
  .dash-mini-prg-title-wrap { justify-content: space-between; }
  .dash-mini-prg-manual-btn { width: 100%; }
}
@media (max-width: 500px) {
  .dash-cards-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  /* ─── TOP PACIENȚI ─── */

  /* ─── NOTA FINALĂ ─── */

  /* Responsive */
  .dash-row.r-1-1, .dash-row.r-1-1-1 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  /* ═══════════════════════════════════════════════════════════════
  MOBILE PASS · PACHET B — Dashboard + Programări (doar ≤600px)
  ═══════════════════════════════════════════════════════════════ */

  /* Dashboard: carduri-acțiune pe O SINGURĂ coloană pe telefon.
  (2 coloane ieșeau din ecran — cardurile reale sunt prea late pentru jumătate de lățime.) */
  .dash-cards-grid{grid-template-columns:1fr;gap:9px}
  .dash-card{min-height:60px;min-width:0}
  .dash-card-body{min-width:0}
  /* Pe telefon pagina e deja plină: ascund secțiunea de analitice
  (heatmap + sumar + donut-uri, inclusiv „Mix status fișe"). */
  .dash-row{display:none}
  /* ── HERO DASHBOARD pe telefon: icon + salut pe un rând, fără cele 3 cifre (doar pe Dashboard) ── */
  .dash-body .prg5-hero{ flex-direction:row; align-items:center; gap:12px; }
  .dash-body .prg5-hero-left{ min-width:0; }
  .dash-body .prg5-hero-stats{ display:none; }
  /* — Dashboard preview: buton start → pătrat rotunjit doar cu pictograma player-play — */
  .dash-mini-prg-start{ width:30px; height:30px; padding:0; flex:0 0 auto;
      border-radius:7px; border:1.5px solid var(--teal); background:var(--white);
      color:transparent; font-size:0; display:inline-flex; align-items:center; justify-content:center; }
  .dash-mini-prg-actions .dash-mini-prg-start .pic{ display:inline-block; width:15px; height:15px; color:var(--teal-d); }   /* T5: pictograma în locul „▶” din CSS */
}

/* ── T4-b · D1 · zona de atingere pe telefon: iconița rămâne cât e, zona invizibilă (::after) ajunge la 40 px, fără să intre în jumătatea vecinului ── */
@media (max-width:600px){
  .dash-mini-prg-nav{position:relative}
  .dash-mini-prg-nav::after{content:'';position:absolute;top:-7px;right:-3px;bottom:-7px;left:-3.5px}   /* zona: 23.5×40 px */
}

/* ── T5 · pictogramele din Dashboard ── */
.dash-card-ic .pic{width:22px;height:22px}
.prg5-hero-title .pic{width:22px;height:22px}
.dash-mini-prg-match .pic{width:17px;height:17px}
.dash-mini-prg-meta .pic{width:18px;height:18px}
.dash-mini-prg-start .pic{width:19px;height:19px}
.dash-mini-prg-icon .pic{width:21px;height:21px}
/* „Deschide vizita” are pictograma doar pe telefon (butonul pătrat) */
.dash-mini-prg-start .pic--tel{display:none}
