/* ============================================================
   CTL CRM — Componente
   Butoane, carduri, tabele, formulare, pastile, modale, taburi
   ============================================================ */

/* ---------- BUTOANE ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  user-select: none;
  transition: background var(--tr), border-color var(--tr), color var(--tr), box-shadow var(--tr);
}
.btn i { font-size: 12px; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-primary:active:not(:disabled) { background: var(--brand-active); }

.btn-default {
  background: var(--surface);
  border-color: var(--border-hard);
  color: var(--ink);
  box-shadow: var(--sh-sm);
}
.btn-default:hover:not(:disabled) { background: var(--n-50); border-color: var(--n-400); }
[data-theme="dark"] .btn-default:hover:not(:disabled) { background: var(--surface-3); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }

.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }

.btn-danger-soft { background: var(--err-soft); border-color: var(--err-brd); color: var(--err); }
.btn-danger-soft:hover:not(:disabled) { background: var(--err); border-color: var(--err); color: #fff; }

.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover:not(:disabled) { filter: brightness(1.08); }

.btn-sm { height: 28px; padding: 0 9px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-sm i { font-size: 11px; }
.btn-lg { height: 40px; padding: 0 18px; font-size: var(--fs-md); }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 28px; }

/* Grup de butoane lipite */
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.btn-group .btn:last-child  { border-radius: 0 var(--r-md) var(--r-md) 0; }
.btn-group .btn.is-active { background: var(--brand-soft); border-color: var(--brand-soft-brd); color: var(--brand-ink); z-index: 1; }
[data-theme="dark"] .btn-group .btn.is-active { color: var(--brand); }

/* Buton-iconiță din bara de sus */
.ibtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  position: relative;
  transition: background var(--tr), color var(--tr);
}
.ibtn:hover { background: var(--surface-3); color: var(--ink); }
.ibtn i { font-size: 14px; }

/* ---------- CARDURI ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 13px var(--s4);
  border-bottom: 1px solid var(--border-soft);
  min-height: 48px;
}
.card-head h3 { font-size: var(--fs-md); font-weight: 600; }
.card-head .sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.card-body { padding: var(--s4); }
.card-body.tight { padding: 0; }
.card-foot {
  padding: 11px var(--s4);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* ---------- KPI / STATISTICI ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px var(--s4) 15px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: var(--border-hard);
}
.stat.is-brand::before { background: var(--brand); }
.stat.is-ok::before    { background: var(--ok); }
.stat.is-warn::before  { background: var(--warn); }
.stat.is-err::before   { background: var(--err); }
.stat.is-info::before  { background: var(--info); }

.stat-label {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.stat-value {
  font-size: var(--fs-3xl);
  font-weight: 660;
  letter-spacing: -.028em;
  line-height: 1.1;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
.stat-value small { font-size: var(--fs-md); font-weight: 500; color: var(--ink-3); margin-left: 2px; }
.stat-foot {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.delta.up   { color: var(--ok); }
.delta.down { color: var(--err); }
.delta.flat { color: var(--ink-4); }

/* Bară de progres subțire */
.bar {
  height: 5px;
  background: var(--n-150);
  border-radius: var(--r-pill);
  overflow: hidden;
}
[data-theme="dark"] .bar { background: var(--surface-3); }
.bar > span {
  display: block; height: 100%;
  background: var(--brand);
  border-radius: var(--r-pill);
  transition: width var(--tr-slow);
}
.bar.ok   > span { background: var(--ok); }
.bar.warn > span { background: var(--warn); }
.bar.err  > span { background: var(--err); }
.bar-lg { height: 8px; }

/* ---------- PASTILE DE STATUS ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px;
  padding: 0 7px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid;
  border-radius: var(--r-sm);
  vertical-align: middle;
}
.pill i { font-size: 9px; }
.pill-gray   { background: var(--n-100);     border-color: var(--n-200);      color: var(--n-600); }
.pill-blue   { background: var(--info-soft); border-color: var(--info-brd);   color: var(--info); }
.pill-cyan   { background: #e6f6fa;          border-color: #b3e2ee;           color: #04627d; }
.pill-green  { background: var(--ok-soft);   border-color: var(--ok-brd);     color: var(--ok); }
.pill-orange { background: var(--warn-soft); border-color: var(--warn-brd);   color: var(--warn); }
.pill-red    { background: var(--err-soft);  border-color: var(--err-brd);    color: var(--err); }
.pill-purple { background: var(--alt-soft);  border-color: var(--alt-brd);    color: var(--alt); }
.pill-brand  { background: var(--brand-soft);border-color: var(--brand-soft-brd); color: var(--brand-ink); }
[data-theme="dark"] .pill-gray { background: var(--surface-3); border-color: var(--border); color: var(--ink-2); }
[data-theme="dark"] .pill-cyan { background: #0d2129; border-color: #17414f; color: #4dd0e8; }
[data-theme="dark"] .pill-brand{ color: var(--brand); }

.pill-lg { height: 25px; padding: 0 9px; font-size: var(--fs-xs); }

/* Punct de status */
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); }
.dot-err { background: var(--err); } .dot-gray { background: var(--n-400); }
.dot-live {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(15, 123, 63, .5);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(15, 123, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 123, 63, 0); }
}

/* ---------- TABELE ---------- */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tbl {
  width: 100%;
  font-size: var(--fs-sm);
  border-collapse: separate;
  border-spacing: 0;
}
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2);
  padding: 9px var(--s3);
  text-align: left;
  font-size: var(--fs-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .055em;
  color: var(--ink-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { color: var(--ink); }
.tbl thead th .sort-i { margin-left: 4px; opacity: .35; font-size: 9px; }
.tbl thead th.is-sorted .sort-i { opacity: 1; color: var(--brand); }

.tbl tbody td {
  padding: 9px var(--s3);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.tbl tbody tr { transition: background var(--tr); }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.is-selected { background: var(--brand-soft); }
[data-theme="dark"] .tbl tbody tr.is-selected { background: rgba(255,106,36,.09); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.clickable { cursor: pointer; }

.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.actions { text-align: right; white-space: nowrap; width: 1%; }
.tbl .cell-main { font-weight: 550; color: var(--ink); }
.tbl .cell-sub  { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }

.tbl-compact tbody td { padding: 6px var(--s3); }
.tbl-fixed { table-layout: fixed; }

/* Rând cu accent lateral (întârziat / blocat) */
.tbl tbody tr.flag-err td:first-child  { box-shadow: inset 3px 0 0 var(--err); }
.tbl tbody tr.flag-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tbl tbody tr.flag-ok td:first-child   { box-shadow: inset 3px 0 0 var(--ok); }

/* Miniatură produs în tabel */
.thumb {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  object-fit: contain;
  padding: 2px;
  flex: none;
}
.thumb-lg { width: 46px; height: 46px; }
.thumb-ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4); font-size: 13px;
}

/* Avatar */
.av {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: var(--fs-2xs);
  font-weight: 650;
  color: var(--ink-2);
  letter-spacing: .01em;
  flex: none;
  overflow: hidden;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-sm { width: 22px; height: 22px; font-size: 9px; }
.av-lg { width: 38px; height: 38px; font-size: var(--fs-sm); }
.av-xl { width: 56px; height: 56px; font-size: var(--fs-lg); }
.av-stack { display: flex; }
.av-stack .av { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.av-stack .av:first-child { margin-left: 0; }

/* ---------- FORMULARE ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label,
.lbl {
  font-size: var(--fs-xs);
  font-weight: 550;
  color: var(--ink-2);
  display: flex; align-items: center; gap: 4px;
}
.lbl .req { color: var(--err); }
.hint { font-size: var(--fs-xs); color: var(--ink-4); }
.err-msg { font-size: var(--fs-xs); color: var(--err); display: flex; align-items: center; gap: 4px; }

.inp, .sel, .txa {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-hard);
  border-radius: var(--r-md);
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
  appearance: none;
}
.txa { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.inp::placeholder, .txa::placeholder { color: var(--ink-4); }
.inp:hover, .sel:hover, .txa:hover { border-color: var(--n-400); }
.inp:focus, .sel:focus, .txa:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 75, 3, .12);
}
.inp:disabled, .sel:disabled, .txa:disabled {
  background: var(--surface-3);
  color: var(--ink-3);
  cursor: not-allowed;
}
.inp.is-err, .sel.is-err, .txa.is-err { border-color: var(--err); }
.inp.is-err:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.inp[readonly] { background: var(--surface-2); }

.sel {
  padding-right: 28px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7684' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
[data-theme="dark"] .sel {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238590a1' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.inp-sm { height: 28px; font-size: var(--fs-xs); padding: 0 8px; }
.inp.num-inp { text-align: right; font-variant-numeric: tabular-nums; }

/* Input cu iconiță / sufix */
.inp-grp { position: relative; display: flex; align-items: center; }
.inp-grp > i:first-child {
  position: absolute; left: 10px;
  font-size: 12px; color: var(--ink-4); pointer-events: none;
}
.inp-grp > i:first-child ~ .inp { padding-left: 30px; }
.inp-grp .suffix {
  position: absolute; right: 10px;
  font-size: var(--fs-xs); color: var(--ink-3); pointer-events: none;
  font-weight: 500;
}
.inp-grp .suffix ~ .inp,
.inp-grp .inp:has(~ .suffix) { padding-right: 40px; }

/* Checkbox & radio */
.chk, .rad {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; user-select: none;
  font-size: var(--fs-sm);
}
.chk input, .rad input {
  appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-hard);
  background: var(--surface);
  flex: none;
  cursor: pointer;
  transition: background var(--tr), border-color var(--tr);
  position: relative;
}
.chk input { border-radius: var(--r-xs); }
.rad input { border-radius: 50%; }
.chk input:checked, .rad input:checked { background: var(--brand); border-color: var(--brand); }
.chk input:checked::after {
  content: ''; position: absolute;
  left: 4.5px; top: 1.5px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.rad input:checked::after {
  content: ''; position: absolute;
  inset: 3.5px; border-radius: 50%; background: #fff;
}
.chk input:focus-visible, .rad input:focus-visible { box-shadow: 0 0 0 3px rgba(225,75,3,.15); }

/* Comutator */
.sw { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.sw input { appearance: none; position: absolute; opacity: 0; }
.sw .track {
  width: 34px; height: 19px;
  background: var(--n-300);
  border-radius: var(--r-pill);
  position: relative;
  transition: background var(--tr);
  flex: none;
}
.sw .track::after {
  content: ''; position: absolute;
  left: 2px; top: 2px;
  width: 15px; height: 15px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform var(--tr);
}
.sw input:checked + .track { background: var(--brand); }
.sw input:checked + .track::after { transform: translateX(15px); }
.sw input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(225,75,3,.18); }

/* ---------- TABURI ---------- */
.tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  font-size: var(--fs-sm);
  font-weight: 520;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--tr), border-color var(--tr);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab .count {
  min-width: 18px; height: 17px;
  padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: 650;
  color: var(--ink-2);
}
.tab.is-active .count { background: var(--brand-soft); color: var(--brand-ink); }
[data-theme="dark"] .tab.is-active .count { color: var(--brand); }

/* ---------- MODALE ---------- */
.mroot {
  position: fixed; inset: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s4);
}
.mbackdrop {
  position: absolute; inset: 0;
  background: rgba(11, 15, 20, .5);
  backdrop-filter: blur(2px);
  animation: fadeIn .14s ease;
}
.mbox {
  position: relative;
  width: 100%; max-width: 620px;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  animation: modalIn .17s cubic-bezier(.2,.8,.3,1);
}
.mbox-sm { max-width: 420px; }
.mbox-lg { max-width: 900px; }
.mbox-xl { max-width: 1200px; }
.mhead {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 14px var(--s5);
  border-bottom: 1px solid var(--border-soft);
  flex: none;
}
.mhead h3 { font-size: var(--fs-lg); }
.mbody { padding: var(--s5); overflow-y: auto; flex: 1 1 auto; }
.mfoot {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s2);
  padding: 13px var(--s5);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  flex: none;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }

@media (max-width: 640px) {
  .mroot { padding: 0; align-items: flex-end; }
  .mbox {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: 0;
    animation: sheetIn .22s cubic-bezier(.2,.8,.3,1);
  }
  .mfoot { border-radius: 0; padding-bottom: calc(13px + env(safe-area-inset-bottom)); }
  .mfoot .btn { flex: 1; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }

/* ---------- MENIU CONTEXTUAL ---------- */
.pop {
  position: absolute;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  padding: 4px;
  z-index: 800;
  animation: popIn .11s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-3px); } }
.pop-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 7px 9px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  text-align: left;
  transition: background var(--tr), color var(--tr);
}
.pop-item:hover { background: var(--surface-3); color: var(--ink); }
.pop-item i { width: 14px; font-size: 12px; color: var(--ink-4); }
.pop-item:hover i { color: var(--ink-2); }
.pop-item.danger { color: var(--err); }
.pop-item.danger i { color: var(--err); }
.pop-item.danger:hover { background: var(--err-soft); }
.pop-sep { height: 1px; background: var(--border-soft); margin: 4px 0; }
.pop-title {
  padding: 6px 9px 4px;
  font-size: var(--fs-2xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-4);
}

/* ---------- NOTIFICĂRI TOAST ---------- */
.toasts {
  position: fixed;
  right: var(--s4); bottom: var(--s4);
  z-index: 1000;
  display: flex; flex-direction: column-reverse; gap: var(--s2);
  pointer-events: none;
  max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  border-radius: var(--r-md);
  box-shadow: var(--sh-md);
  pointer-events: auto;
  animation: toastIn .2s cubic-bezier(.2,.8,.3,1);
  font-size: var(--fs-sm);
}
.toast.ok   { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.err  { border-left-color: var(--err); }
.toast > i:first-child { font-size: 14px; margin-top: 1px; }
.toast.ok > i:first-child   { color: var(--ok); }
.toast.warn > i:first-child { color: var(--warn); }
.toast.err > i:first-child  { color: var(--err); }
.toast.info > i:first-child { color: var(--info); }
.toast strong { display: block; font-weight: 600; margin-bottom: 1px; }
.toast p { color: var(--ink-3); font-size: var(--fs-xs); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }

@media (max-width: 640px) {
  .toasts {
    left: var(--s3); right: var(--s3);
    bottom: calc(var(--bottombar-h) + var(--s3) + env(safe-area-inset-bottom));
    max-width: none;
  }
}

/* ---------- ALERTE ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.alert i:first-child { font-size: 14px; margin-top: 1px; flex: none; }
.alert strong { font-weight: 600; }
.alert-info { background: var(--info-soft); border-color: var(--info-brd); color: var(--info); }
.alert-ok   { background: var(--ok-soft);   border-color: var(--ok-brd);   color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-brd); color: var(--warn); }
.alert-err  { background: var(--err-soft);  border-color: var(--err-brd);  color: var(--err); }

/* ---------- STARE GOALĂ ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--s12) var(--s5);
  text-align: center;
}
.empty i {
  font-size: 30px;
  color: var(--ink-4);
  opacity: .5;
  margin-bottom: var(--s3);
}
.empty h4 { font-size: var(--fs-md); margin-bottom: 4px; }
.empty p { font-size: var(--fs-sm); color: var(--ink-3); max-width: 340px; margin-bottom: var(--s4); }

/* ---------- SCHELET DE ÎNCĂRCARE ---------- */
.skel {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--n-150) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: var(--r-sm);
}
[data-theme="dark"] .skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- SEPARATOR ---------- */
.sep { height: 1px; background: var(--border-soft); margin: var(--s4) 0; }
.sep-v { width: 1px; align-self: stretch; background: var(--border); margin: 0 var(--s2); }
.sep-txt {
  display: flex; align-items: center; gap: var(--s3);
  font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-4);
  margin: var(--s4) 0 var(--s3);
}
.sep-txt::after { content: ''; flex: 1; height: 1px; background: var(--border-soft); }

/* ---------- BADGE NUMERIC ---------- */
.badge-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  background: var(--err);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-pill);
  line-height: 1;
}
.ibtn .badge-n {
  position: absolute; top: 1px; right: 0;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- BARĂ DE INSTRUMENTE / FILTRE ---------- */
.toolbar {
  display: flex; align-items: center; gap: var(--s2);
  flex-wrap: wrap;
  padding: 11px var(--s4);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}
.toolbar .search {
  position: relative;
  flex: 1 1 200px;
  max-width: 320px;
}
.toolbar .search i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--ink-4); pointer-events: none;
}
.toolbar .search .inp { padding-left: 30px; }

.chip-filter {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 9px;
  font-size: var(--fs-xs); font-weight: 550;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  transition: all var(--tr);
}
.chip-filter:hover { border-color: var(--border-hard); color: var(--ink); }
.chip-filter.is-active { background: var(--brand-soft); border-color: var(--brand-soft-brd); color: var(--brand-ink); }
[data-theme="dark"] .chip-filter.is-active { color: var(--brand); }
.chip-filter .x { opacity: .5; font-size: 10px; }
.chip-filter .x:hover { opacity: 1; }

/* ---------- PAGINARE ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 11px var(--s4);
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-xs);
  color: var(--ink-3);
  flex-wrap: wrap;
}
.pager nav { display: flex; gap: 2px; }
.pager nav a, .pager nav span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 550;
  color: var(--ink-2);
  transition: background var(--tr);
}
.pager nav a:hover { background: var(--surface-3); color: var(--ink); }
.pager nav .is-current { background: var(--brand); color: #fff; }
.pager nav .is-disabled { opacity: .35; pointer-events: none; }
