/* =====================================================================
   Componente — echivalentul componentelor din Figma, în CSS.
   Fiecare clasă .c-* corespunde unei componente din design system.
   ===================================================================== */

.screen { width:100%; height:100%; display:flex; flex-direction:column;
  background: var(--bg-canvas); overflow:hidden; }
.screen--dark { background: var(--n-800); }

/* ---------- bare ---------- */
.c-topbar {
  display:flex; align-items:center; gap:var(--space-4);
  padding:12px var(--space-6); background:var(--bg-surface);
  border-bottom:1px solid var(--border-default); flex-shrink:0;
}
.c-topbar .who { display:flex; flex-direction:column; gap:2px; }
.c-topbar .who b { font-size:20px; line-height:26px; font-weight:600; }
.c-topbar .who span { font-size:15px; line-height:20px; color:var(--text-muted); }

.c-bottombar {
  display:flex; align-items:center; gap:var(--space-4);
  padding:14px var(--space-6); background:var(--bg-surface);
  border-top:1px solid var(--border-default); flex-shrink:0;
}
.c-body { flex:1; display:flex; gap:var(--space-5); padding:var(--space-5) var(--space-6);
  overflow:auto; min-height:0; }
.spacer { flex:1; }

/* ---------- buton ---------- */
.c-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  border-radius:var(--radius-md); font-weight:600; transition:background .12s;
  min-height:var(--touch-min);
}
.c-btn--lg { min-height:var(--touch-comfort); padding:0 var(--space-7); font-size:18px; }
.c-btn--md { min-height:var(--touch-min);     padding:0 var(--space-6); font-size:16px; }
.c-btn--primar    { background:var(--action-primary); color:var(--action-primary-text); }
.c-btn--primar:hover { background:var(--action-primary-hover); }
.c-btn--secundar  { background:var(--action-secondary-bg); color:var(--text-primary);
  border:1.5px solid var(--action-secondary-border); }
.c-btn--secundar:hover { background:var(--bg-subtle); }
.c-btn--pericol   { background:var(--action-danger); color:#fff; }
.c-btn:disabled { background:var(--action-disabled); color:var(--text-muted); cursor:not-allowed; }

.c-sos {
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  min-height:var(--touch-sos); padding:0 28px; border-radius:var(--radius-pill);
  background:var(--action-danger); color:#fff; font-weight:600; font-size:20px;
  box-shadow:0 4px 12px rgba(180,35,24,.35);
}

/* ---------- pastile / etichete ---------- */
.c-pill { display:inline-flex; align-items:center; gap:8px; border-radius:var(--radius-pill);
  padding:7px 14px; font-size:13px; font-weight:600; background:var(--bg-subtle);
  color:var(--text-secondary); }
.c-pill--ok    { background:var(--status-normal-bg);   color:var(--status-normal); }
.c-pill--warn  { background:var(--status-warning-bg);  color:var(--amber-600); }
.c-pill--crit  { background:var(--status-critical-bg); color:var(--status-critical); }
.c-pill--info  { background:var(--status-info-bg);     color:var(--status-info); }
.c-pill--teal  { background:var(--teal-50);            color:var(--teal-600); }

/* ---------- card ---------- */
.c-card { background:var(--bg-surface); border:1px solid var(--border-default);
  border-radius:var(--radius-lg); padding:var(--space-5); }
.c-card--crit { background:var(--status-critical-bg); border:2px solid var(--border-critical); }
.c-card--warn { background:var(--status-warning-bg);  border:2px solid var(--status-warning); }
.c-card--teal { background:var(--teal-50); border:none; }
.c-card h3 { font-size:var(--fs-h3); line-height:var(--lh-h3); font-weight:600;
  margin-bottom:var(--space-3); }
.c-card .eyebrow { font-size:13px; font-weight:600; letter-spacing:.4px;
  color:var(--text-muted); margin-bottom:8px; }

/* ---------- stepper ---------- */
.c-stepper { display:flex; align-items:center; gap:8px; padding:14px var(--space-6);
  background:var(--bg-surface); border-bottom:1px solid var(--border-default); flex-shrink:0; }
.c-step { display:inline-flex; align-items:center; gap:8px; border-radius:var(--radius-pill);
  padding:10px 18px; background:var(--bg-subtle); color:var(--text-secondary); font-size:16px; }
.c-step b { font-weight:600; color:var(--n-400); }
.c-step--done { background:var(--teal-50); }
.c-step--done b { color:var(--status-normal); }
.c-step--active { background:var(--action-primary); color:#fff; }
.c-step--active b { color:#fff; }
.c-step-sep { color:var(--border-strong); }

/* ---------- câmp valoare vitală ---------- */
.c-vital { display:flex; flex-direction:column; gap:8px; flex:1; min-width:0; }
.c-vital .lbl { display:flex; justify-content:space-between; font-size:15px;
  color:var(--text-secondary); }
.c-vital .lbl .unit { color:var(--text-muted); }
.c-vital .box { display:flex; align-items:center; gap:12px; border-radius:var(--radius-md);
  border:1.5px solid var(--border-strong); background:var(--bg-surface);
  padding:10px var(--space-5); min-height:var(--touch-comfort); }
.c-vital .box input {
  border:none; outline:none; background:transparent; width:100%;
  font-size:var(--fs-num-xl); line-height:var(--lh-num-xl); font-weight:600;
  font-variant-numeric:tabular-nums; letter-spacing:-.5px; color:var(--text-primary);
}
.c-vital .box input::placeholder { color:var(--n-300); }
.c-vital.is-warn .box { border-color:var(--status-warning); border-width:2px;
  background:var(--status-warning-bg); }
.c-vital.is-crit .box { border-color:var(--border-critical); border-width:2px;
  background:var(--status-critical-bg); }
.c-vital .msg { font-size:15px; font-weight:500; }
.c-vital.is-warn .msg { color:var(--amber-600); }
.c-vital.is-crit .msg { color:var(--status-critical); }
.c-vital .nm { border:1.5px dashed var(--border-strong); background:var(--bg-canvas);
  color:var(--text-muted); font-size:16px; display:flex; align-items:center;
  gap:12px; padding:0 var(--space-5); min-height:var(--touch-comfort);
  border-radius:var(--radius-md); }

/* ---------- alegere din butoane mari ---------- */
.c-choice { display:grid; gap:12px; }
.c-choice--2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.c-choice--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.c-choice button { min-height:var(--touch-min); border-radius:var(--radius-md);
  background:var(--bg-subtle); color:var(--text-secondary); font-size:16px;
  font-weight:500; padding:12px; }
.c-choice button:hover { background:var(--n-200); }
.c-choice button.on { background:var(--action-primary); color:#fff; }

/* ---------- banner ---------- */
.c-banner { display:flex; gap:var(--space-4); border-radius:var(--radius-md);
  padding:18px var(--space-5); border:2px solid; }
.c-banner .ic { width:36px; height:36px; border-radius:var(--radius-pill); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color:#fff;
  font-weight:600; font-size:18px; }
.c-banner b { display:block; font-size:18px; line-height:24px; margin-bottom:4px; }
.c-banner p { font-size:16px; line-height:24px; color:var(--text-secondary); }
.c-banner--crit { background:var(--status-critical-bg); border-color:var(--red-500); }
.c-banner--crit .ic { background:var(--red-500); } .c-banner--crit b { color:var(--red-600); }
.c-banner--warn { background:var(--status-warning-bg); border-color:var(--status-warning); }
.c-banner--warn .ic { background:var(--status-warning); } .c-banner--warn b { color:var(--amber-600); }
.c-banner--info { background:var(--status-info-bg); border-color:var(--status-info); }
.c-banner--info .ic { background:var(--status-info); } .c-banner--info b { color:var(--status-info); }

/* ---------- slot foto ---------- */
.c-photo { display:flex; flex-direction:column; gap:8px; }
.c-photo .zone { height:132px; border-radius:var(--radius-md); display:flex;
  flex-direction:column; align-items:center; justify-content:center; gap:6px;
  border:2px dashed var(--border-strong); background:var(--bg-canvas);
  color:var(--text-muted); font-size:14px; text-align:center; padding:8px; }
.c-photo .zone .big { font-size:34px; line-height:1; color:var(--n-400); }
.c-photo.is-done .zone { border:2px solid var(--status-normal); border-style:solid;
  background:var(--n-200); color:var(--status-normal); font-weight:600; }
.c-photo.is-err  .zone { border:2px solid var(--red-500); border-style:solid;
  background:var(--status-critical-bg); color:var(--status-critical); font-weight:600; }
.c-photo .cap { font-size:14px; color:var(--text-secondary); }

/* ---------- rând upload ---------- */
.c-upload { display:flex; align-items:center; gap:var(--space-4);
  border:1px solid var(--border-default); border-radius:var(--radius-md);
  background:var(--bg-surface); padding:14px var(--space-4); }
.c-upload .ic { width:44px; height:44px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:20px;
  background:var(--teal-50); color:var(--teal-600); }
.c-upload .col { flex:1; min-width:0; display:flex; flex-direction:column; gap:6px; }
.c-upload .row { display:flex; align-items:center; gap:8px; font-size:16px; }
.c-upload .row .sz { margin-left:auto; font-size:14px; color:var(--text-muted); }
.c-upload .bar { height:8px; border-radius:var(--radius-pill); background:var(--bg-subtle);
  overflow:hidden; }
.c-upload .bar i { display:block; height:100%; background:var(--teal-500);
  border-radius:var(--radius-pill); transition:width .3s; }
.c-upload .note { font-size:14px; color:var(--text-muted); }
.c-upload.is-done .ic { background:var(--status-normal-bg); color:var(--status-normal); }
.c-upload.is-done .bar i { background:var(--status-normal); }

/* ---------- odontogram ---------- */
.c-teeth { display:flex; flex-direction:column; gap:10px; }
.c-teeth .arch { display:flex; gap:4px; justify-content:center; flex-wrap:wrap; }
.c-tooth { width:52px; height:62px; border-radius:10px; border:1.5px solid var(--border-strong);
  background:var(--bg-surface); display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:2px; font-size:14px; font-weight:600; color:var(--text-primary); }
.c-tooth .g { font-size:19px; line-height:1; }
.c-tooth:hover { border-color:var(--teal-500); }
.c-tooth.st-marcat { background:var(--teal-50); border-color:var(--teal-600); color:var(--teal-600); }
.c-tooth.st-durere { background:var(--action-danger); border-color:var(--action-danger);
  color:#fff; border-width:2px; }
.c-tooth.st-lipsa  { background:var(--bg-canvas); border-color:var(--border-default);
  color:var(--n-300); }

/* ---------- listă cereri ---------- */
.c-req { display:flex; flex-direction:column; gap:10px; background:var(--bg-surface);
  border:1px solid var(--border-default); border-radius:var(--radius-lg); padding:18px; }
.c-req.is-urgent { border:2px solid var(--red-300); }
.c-req .head { display:flex; align-items:center; gap:12px; }
.c-req .head .dist { margin-left:auto; font-size:15px; color:var(--text-muted); font-weight:500; }
.c-req .who { font-size:20px; line-height:26px; font-weight:600; }
.c-req .motiv { font-size:17px; line-height:24px; color:var(--text-secondary); }
.c-req .foot { display:flex; align-items:center; gap:12px; font-size:15px; color:var(--text-muted); }

/* ---------- pad semnătură ---------- */
.c-sigpad { border:2px dashed var(--teal-500); border-radius:var(--radius-lg);
  background:var(--bg-surface); display:flex; flex-direction:column; overflow:hidden; }
.c-sigpad .head { display:flex; align-items:center; gap:8px; padding:14px 18px 6px;
  font-size:15px; color:var(--text-muted); }
.c-sigpad canvas { flex:1; width:100%; touch-action:none; cursor:crosshair; display:block; }
.c-sigpad.is-signed { border-style:solid; border-color:var(--status-normal); }

/* ---------- vizualizator media (medic) ---------- */
.c-viewer { flex:1; display:flex; flex-direction:column; background:var(--n-800);
  border-radius:var(--radius-lg); overflow:hidden; min-height:0; }
.c-viewer .vt { display:flex; align-items:center; gap:10px; padding:12px var(--space-4);
  background:#1B242A; color:#fff; font-size:16px; font-weight:600; }
.c-viewer .stage { flex:1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:14px; color:var(--n-500); font-size:14px; padding:16px; }
.c-viewer .tools { display:flex; align-items:center; gap:10px; padding:12px var(--space-4);
  background:#1B242A; flex-wrap:wrap; }
.c-viewer .tools button { background:#3A464D; color:#fff; border-radius:10px;
  padding:10px 16px; font-size:14px; font-weight:500; }
.c-viewer .tools button:hover { background:#52616A; }
.c-viewer .tools button.on { background:var(--teal-600); }

/* ---------- timeline pacient ---------- */
.c-timeline { display:flex; align-items:center; gap:0; }
.c-timeline .dot { width:14px; height:14px; border-radius:var(--radius-pill);
  background:var(--border-default); flex-shrink:0; }
.c-timeline .dot.on { background:var(--action-primary); }
.c-timeline .ln { flex:1; height:3px; background:var(--border-default); }
.c-timeline .ln.on { background:var(--action-primary); }
.c-timeline-lbl { display:flex; justify-content:space-between; font-size:13px;
  color:var(--text-muted); margin-top:6px; }

/* ---------- navigare jos (mobil) ---------- */
.c-tabbar { display:flex; justify-content:space-around; padding:14px 16px 22px;
  background:var(--bg-surface); border-top:1px solid var(--border-default);
  font-size:14px; color:var(--text-muted); flex-shrink:0; }
.c-tabbar b { color:var(--action-primary); font-weight:600; }

/* ---------- comentarii ---------- */
.cm-layer { position:absolute; inset:0; z-index:50; }
.cm-layer.off { pointer-events:none; }
.cm-layer.on { cursor:crosshair; background:rgba(21,112,207,.04); }
.cm-pin { position:absolute; width:28px; height:28px; border-radius:50%;
  background:var(--amber-500); color:#fff; font-size:13px; font-weight:600;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transform:translate(-50%,-50%); box-shadow:0 2px 8px rgba(0,0,0,.3);
  pointer-events:auto; border:2px solid #fff; }
.cm-pop { position:absolute; width:260px; background:#fff; border-radius:12px;
  box-shadow:0 8px 30px rgba(0,0,0,.25); padding:12px; transform:translate(-50%,12px);
  pointer-events:auto; z-index:60; }
.cm-pop textarea { width:100%; min-height:70px; border:1px solid var(--border-default);
  border-radius:8px; padding:8px; font-size:14px; resize:vertical; }
.cm-pop .acts { display:flex; gap:8px; margin-top:8px; }
.cm-pop .acts button { flex:1; padding:8px; border-radius:8px; font-size:13px; font-weight:500; }
.cm-pop .save { background:var(--action-primary); color:#fff; }
.cm-pop .del  { background:var(--status-critical-bg); color:var(--status-critical); }
