/* Componente comune pentru site și CRM. Totul trece prin token-urile din tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
a { color: var(--peacock); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--plume); outline-offset: 2px; }
.num, .mono { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.eyebrow {
  font: 600 11px/1.2 var(--f-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.muted { color: var(--ink-2); }

/* Bara de comutare a mock-up-ului */
.mock-bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 8px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  background: var(--peacock-deep);
  color: var(--paper);
  font-size: 13px;
}
:root[data-theme="dark"] .mock-bar { color: var(--paper); }
.mock-bar__label { font-family: var(--f-data); font-size: 11px; letter-spacing: .08em; opacity: .75; }
.mock-bar__tabs { display: flex; gap: 4px; margin-left: auto; }
.mock-bar__tabs a {
  color: inherit;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.mock-bar__tabs a[aria-current="true"] { background: var(--paper); color: var(--peacock-deep); }
.mock-bar__tabs a:not([aria-current="true"]):hover { border-color: currentColor; }

/* Butoane */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn--primary { background: var(--peacock); border-color: var(--peacock); color: var(--on-accent); }
.btn--primary:hover { background: var(--peacock-deep); border-color: var(--peacock-deep); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--on-accent); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--sm { padding: 5px 10px; font-size: 13px; }

/* Câmpuri */
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.textarea { min-height: 96px; resize: vertical; }

/* Pastile de stare */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--mute-bg);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }
.pill--info { background: var(--info-bg); color: var(--info); }
.pill--gold { background: var(--gold-soft); color: var(--gold); }

/* Tabele */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font: 600 11px/1.2 var(--f-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .r { text-align: right; }

/* Fotografii placeholder (mock-up: fără imagini reale) */
.photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--t1), var(--t2));
  color: rgb(255 255 255 / .85);
}
.photo svg { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; }
.photo__tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font: 600 11px/1.3 var(--f-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgb(255 255 255 / .92);
  color: #10262b;
}

/* Toast */
.toast {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font: 700 11px/1 var(--f-body);
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.mock-bar__reset { border: 1px solid currentColor; border-radius: 999px; background: none; color: inherit; font: 12px/1 var(--f-body); padding: 5px 10px; opacity: .75; cursor: pointer; }
.mock-bar__reset:hover { opacity: 1; }
