/* ============================================================================
 * base — reset, tipografie, icoane, utilitare (skin "Operations desk")
 * ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--fw-semibold); line-height: 1.25; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: none; border-top: 1px solid var(--line); margin: var(--s-4) 0; }

/* Cifre tabulare pentru date numerice */
.mono, .amount, .tnum, .num, td.amount, .data-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
/* Coduri reale (plăcuțe, IBAN, ID) — singurul loc unde folosim mono */
.code, .plate, .iban, .mono-code, .form-input-mono {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* ---- Icoane: Material Symbols Rounded pe clasa legacy .material-icons ---- */
.material-icons {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}

/* ---- Focus vizibil (accesibilitate) ---- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-input); }

/* ---- Scrollbar discret ---- */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---- Etichete discrete (sentence case, nu ALL-CAPS) ---- */
.eyebrow, .field-label, .kpi-label, .stat-label, .section-label {
  font-size: var(--fs-12);
  font-weight: var(--fw-medium);
  color: var(--ink-3);
  letter-spacing: 0;
  text-transform: none;
}

/* ---- Spinner ---- */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Stare goală ---- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--s-7) var(--s-5); color: var(--ink-3); gap: var(--s-3);
}
.empty-state .material-icons, .dt-empty-icon, .empty-state-icon { font-size: 40px; color: var(--line-strong); }
.empty-state-title { font-size: var(--fs-15); font-weight: var(--fw-semibold); color: var(--ink-2); }
.empty-state-text { font-size: var(--fs-13); color: var(--ink-3); max-width: 44ch; }

/* ---- Intrare de pagină (o singură mișcare, discretă) ---- */
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-in, #main-content > *, #app-content > * { animation: page-in var(--t-med) both; }

/* ---- Utilitare ---- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); }
.text-muted { color: var(--ink-3); }
.text-secondary { color: var(--ink-2); }
.text-success { color: var(--success); } .text-danger { color: var(--danger); }
.text-warning { color: var(--warning); } .text-info { color: var(--info); }
.text-right { text-align: right; } .text-center { text-align: center; }
.fw-medium { font-weight: var(--fw-medium); } .fw-semibold { font-weight: var(--fw-semibold); }
.w-full { width: 100%; }
.hidden, [hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
