/* Helion Contact Center — stiluri comune (formular, login, dashboard) */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/sora-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/sora-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0E1A2B;
  --navy-2: #172840;
  --navy-3: #22385A;
  --paper: #F7F4EF;
  --paper-2: #EFEAE2;
  --white: #FFFFFF;
  --slate: #5A6B7B;
  --slate-2: #8FA3B8;
  --line: rgba(14, 26, 43, .10);
  --line-2: rgba(14, 26, 43, .18);
  --gold: #FFD15C;
  --amber: #FF9F32;
  --coral: #FB5A2E;
  --solar: linear-gradient(135deg, #FFD15C 0%, #FF9F32 45%, #FB5A2E 100%);
  --ok: #2FA36A;
  --danger: #D24B3A;

  --st-deschis: #FB5A2E;
  --st-deschis-bg: #FFE8E0;
  --st-deschis-fg: #A8351A;
  --st-lucru: #FF9F32;
  --st-lucru-bg: #FFF0DA;
  --st-lucru-fg: #8A5005;
  --st-rezolvat: #2FA36A;
  --st-rezolvat-bg: #E2F3E9;
  --st-rezolvat-fg: #1D6B45;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .05), 0 8px 24px rgba(14, 26, 43, .06);
  --focus: 0 0 0 3px rgba(255, 159, 50, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--slate); }

/* ---------- Bara de sus ---------- */
.topbar {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 20px;
  max-width: 1440px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: 54px; width: auto; display: block; margin-left: -6px; }
.topbar-spacer { flex: 1; }
.topbar .clock { color: #C9D6E3; font-size: 14px; white-space: nowrap; }
.topbar .clock b { color: var(--white); font-weight: 600; }
.toplink {
  color: #C9D6E3;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
  white-space: nowrap;
}
.toplink:hover { background: var(--navy-2); color: var(--white); }
.toplink:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--solar);
  border-color: transparent;
  color: var(--navy);
  font-weight: 700;
}
.btn-primary:hover { background: var(--solar); filter: brightness(1.04) saturate(1.05); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-3); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--paper-2); }
.btn-danger { color: var(--danger); border-color: rgba(210, 75, 58, .35); }
.btn-danger:hover { background: #FCEDEA; }
.btn-ok { color: var(--st-rezolvat-fg); border-color: rgba(47, 163, 106, .4); }
.btn-ok:hover { background: var(--st-rezolvat-bg); }
.btn-lg { font-size: 16px; padding: 13px 24px; border-radius: 12px; }
.btn-sm { font-size: 13px; padding: 6px 11px; border-radius: 8px; }
kbd {
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(14, 26, 43, .1);
}

/* ---------- Câmpuri ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 6px; }
.field > label, .field > .label, .field > legend {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--navy);
}
.field .req { color: var(--coral); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--slate); }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--amber); box-shadow: var(--focus); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { resize: vertical; min-height: 88px; }
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%235A6B7B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input-sm, .select-sm { padding: 7px 10px; font-size: 14px; }
.select-sm { padding-right: 30px; background-position: right 10px center; }

/* ---------- Card ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.card-body { padding: 16px 20px 20px; }

/* ---------- Status ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-deschis { background: var(--st-deschis-bg); color: var(--st-deschis-fg); }
.st-in_lucru { background: var(--st-lucru-bg); color: var(--st-lucru-fg); }
.st-rezolvat { background: var(--st-rezolvat-bg); color: var(--st-rezolvat-fg); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot-deschis { background: var(--st-deschis); }
.dot-in_lucru { background: var(--st-lucru); }
.dot-rezolvat { background: var(--st-rezolvat); }

/* ---------- Mesaje ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert-error { background: #FCEDEA; border-color: rgba(210, 75, 58, .3); color: #8E2B1F; }
.alert-ok { background: var(--st-rezolvat-bg); border-color: rgba(47, 163, 106, .3); color: var(--st-rezolvat-fg); }

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 460px;
}
.toast {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(14, 26, 43, .3);
  animation: toast-in .2s ease-out;
  pointer-events: auto;
}
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Formular agenți
   ========================================================= */
.form-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.page-title { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.page-sub { margin: 0 0 18px; color: var(--slate); font-size: 14px; }
.ticket-form { padding: 22px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.form-grid .full { grid-column: 1 / -1; }

.stamp {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 6px 6px 6px 12px;
  min-height: 46px;
}
.stamp-value { font-weight: 700; font-size: 15px; flex: 1; white-space: nowrap; }
.stamp-state {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.stamp-state.live { background: var(--st-rezolvat-bg); color: var(--st-rezolvat-fg); }
.stamp-state.locked { background: var(--st-lucru-bg); color: var(--st-lucru-fg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  user-select: none;
}
.chip:hover span { border-color: var(--amber); }
.chip input:checked + span {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.chip input:focus-visible + span { box-shadow: var(--focus); }
.chips[aria-invalid="true"] .chip span { border-color: var(--danger); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.form-actions .grow { flex: 1; }
#formError { margin-bottom: 16px; }

.success {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  animation: toast-in .2s ease-out;
}
.success .mark {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--solar);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.success b { font-size: 16px; }
.success p { margin: 0; color: #C9D6E3; font-size: 13.5px; }

.recent { position: sticky; top: 88px; }
.recent ol { list-style: none; margin: 0; padding: 0; }
.recent li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.recent li:last-child { border-bottom: 0; }
.recent .r-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.recent .r-id { color: var(--coral); }
.recent .r-sub { color: var(--slate); }
.recent .empty { color: var(--slate); font-size: 13.5px; margin: 0; }

/* =========================================================
   Login
   ========================================================= */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(640px 360px at 84% -10%, rgba(255, 170, 60, .30), transparent 60%),
    radial-gradient(480px 320px at 6% 110%, rgba(251, 90, 46, .18), transparent 60%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: 22px;
  padding: 30px 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.auth-card .logo { display: block; height: 96px; width: auto; margin: 0 auto 10px; }
.auth-card h1 { margin: 0; text-align: center; font-size: 19px; font-weight: 700; }
.auth-card .lead { margin: 4px 0 22px; text-align: center; color: var(--slate); font-size: 14px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn { width: 100%; margin-top: 4px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; }
.auth-foot a { color: var(--slate); }

/* =========================================================
   Dashboard
   ========================================================= */
.tabs { display: flex; gap: 4px; }
.tab {
  border: 0;
  background: transparent;
  color: #C9D6E3;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
}
.tab:hover { background: var(--navy-2); color: var(--white); }
.tab:focus-visible { outline: none; box-shadow: var(--focus); }
.tab[aria-selected="true"] { background: var(--navy-3); color: var(--white); box-shadow: inset 0 -2px 0 var(--amber); }
.user-chip { display: flex; align-items: center; gap: 10px; color: #C9D6E3; font-size: 13.5px; }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--solar);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}
.menu { position: relative; }
.menu-btn {
  display: flex; align-items: center; gap: 10px; background: transparent; border: 0; cursor: pointer;
  color: #C9D6E3; padding: 4px 6px; border-radius: 10px;
}
.menu-btn:hover { background: var(--navy-2); }
.menu-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  color: var(--navy);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(14, 26, 43, .25);
  border: 1px solid var(--line);
  min-width: 200px;
  padding: 6px;
  z-index: 30;
}
.menu-list button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 12px;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.menu-list button:hover { background: var(--paper); }
.menu-list .menu-meta { padding: 8px 12px 10px; font-size: 12.5px; color: var(--slate); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

.dash { max-width: 1440px; margin: 0 auto; padding: 18px 20px 60px; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
}
.toolbar .grow { flex: 1; }
.range { display: flex; align-items: center; gap: 8px; }
.range .input { width: 150px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.filters .field > label { font-size: 11.5px; color: var(--slate); text-transform: uppercase; letter-spacing: .6px; }
.seg {
  display: inline-flex;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--slate);
  white-space: nowrap;
}
.seg button:hover { color: var(--navy); background: var(--paper); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.seg button:focus-visible { outline: none; box-shadow: var(--focus); }
.filters .grow { flex: 1; }
.f-search { min-width: 220px; flex: 1 1 260px; max-width: 420px; }
.f-narrow { width: 150px; }
.f-mid { width: 180px; }
.refresh-info { font-size: 12.5px; color: var(--slate); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(47, 163, 106, .18); }
.live-dot.stale { background: var(--danger); box-shadow: 0 0 0 3px rgba(210, 75, 58, .18); }

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .k-label { font-size: 12px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .6px; }
.kpi .k-value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; margin-top: 4px; }
.kpi .k-sub { font-size: 12.5px; color: var(--slate); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
.kpi.k-total::after { background: var(--solar); }
.kpi.k-deschis::after { background: var(--st-deschis); }
.kpi.k-lucru::after { background: var(--st-lucru); }
.kpi.k-rezolvat::after { background: var(--st-rezolvat); }
.kpi.k-loc::after { background: var(--navy); }

.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.side { display: grid; gap: 18px; }

/* Lista de localități */
.loc-head, .loc-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 60px 76px 76px 82px 92px 204px;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
}
.loc-head {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--line);
  padding-top: 14px;
  padding-bottom: 10px;
}
.loc-row { border-bottom: 1px solid var(--line); }
.loc-row:last-child { border-bottom: 0; }
.loc-row:hover { background: #FCFBF8; }
.loc-row.has-open { box-shadow: inset 3px 0 0 var(--st-deschis); }
.loc-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-name button {
  all: unset;
  cursor: pointer;
  border-radius: 4px;
}
.loc-name button:hover { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
.loc-name button:focus-visible { box-shadow: var(--focus); }
.stack {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-2);
  margin-top: 7px;
}
.stack i { display: block; height: 100%; }
.stack .s-deschis { background: var(--st-deschis); }
.stack .s-in_lucru { background: var(--st-lucru); }
.stack .s-rezolvat { background: var(--st-rezolvat); }
.loc-n { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.loc-n.zero { color: #B8C2CC; font-weight: 500; }
.loc-n.c-deschis { color: var(--st-deschis-fg); }
.loc-n.c-in_lucru { color: var(--st-lucru-fg); }
.loc-n.c-rezolvat { color: var(--st-rezolvat-fg); }
.loc-tipuri { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag b { font-weight: 700; margin-left: 3px; }
.loc-last { font-size: 13px; color: var(--slate); white-space: nowrap; }
.loc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--slate); }
.empty-state b { display: block; color: var(--navy); font-size: 16px; margin-bottom: 4px; }

/* Bare orizontale (tip defect, operatori) */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 13.5px; }
.bars .b-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .b-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.bars .b-track { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.bars .b-fill { height: 100%; border-radius: 999px; background: var(--solar); }
.bars.navy .b-fill { background: var(--navy); }
.bars-more { margin-top: 10px; font-size: 12.5px; color: var(--slate); }

/* Volum pe ore */
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 120px; }
.hours .h { position: relative; height: 100%; display: flex; align-items: flex-end; }
.hours .h i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--amber); min-height: 2px; }
.hours .h.zero i { background: var(--paper-2); }
.hours .h.now i { background: var(--coral); }
.hours-axis { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; margin-top: 6px; font-size: 10.5px; color: var(--slate); }
.hours-axis span { text-align: center; }

/* Tabel tickete */
.table-wrap { overflow-x: auto; }
table.tickets { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tickets th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: var(--white);
  position: sticky;
  top: 0;
}
table.tickets td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tickets tbody tr { cursor: pointer; }
table.tickets tbody tr:hover td { background: #FCFBF8; }
table.tickets tbody tr:focus-visible { outline: none; }
table.tickets tbody tr:focus-visible td { background: #FFF6EA; }
table.tickets .c-id { font-weight: 700; color: var(--coral); white-space: nowrap; }
table.tickets .c-date { white-space: nowrap; }
table.tickets .c-note { max-width: 280px; color: var(--slate); }
table.tickets .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.tickets .nowrap { white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; flex-wrap: wrap; }
.pager .muted { font-size: 13px; }

/* Setări */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list .meta { font-size: 12.5px; color: var(--slate); }
.list .row-actions { display: flex; gap: 6px; flex: none; }
.inline-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 180px; }
.user-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.user-form .full { grid-column: 1 / -1; }
.role-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 7px; border-radius: 6px; background: var(--paper-2); color: var(--slate); margin-left: 6px; }
.role-pill.admin { background: var(--navy); color: var(--white); }

/* Dialog */
dialog {
  border: 0;
  padding: 0;
  border-radius: 18px;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 40px);
  box-shadow: 0 30px 90px rgba(14, 26, 43, .4);
  color: var(--navy);
}
dialog.narrow { width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(14, 26, 43, .55); }
.dlg-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--navy);
  color: var(--white);
}
.dlg-head h2 { margin: 0; font-size: 17px; flex: 1; }
.dlg-head .sub { color: var(--slate-2); font-size: 13px; font-weight: 500; }
.dlg-close {
  background: transparent; border: 0; color: #C9D6E3; font-size: 22px; line-height: 1; cursor: pointer;
  width: 34px; height: 34px; border-radius: 9px;
}
.dlg-close:hover { background: var(--navy-2); color: var(--white); }
.dlg-body { padding: 20px 22px; overflow: auto; }
.dlg-foot {
  display: flex; gap: 10px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--paper);
}
.dlg-foot .grow { flex: 1; }
.dlg-meta { font-size: 12.5px; color: var(--slate); margin-top: 14px; }
.status-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pick label { position: relative; }
.status-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.status-pick span {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--white);
}
.status-pick input:checked + span.st-deschis { background: var(--st-deschis); color: var(--white); border-color: var(--st-deschis); }
.status-pick input:checked + span.st-in_lucru { background: var(--st-lucru); color: var(--navy); border-color: var(--st-lucru); }
.status-pick input:checked + span.st-rezolvat { background: var(--st-rezolvat); color: var(--white); border-color: var(--st-rezolvat); }
.status-pick span.st-deschis, .status-pick span.st-in_lucru, .status-pick span.st-rezolvat { background: var(--white); color: var(--navy); }
.status-pick input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Utilitare ---------- */
.m0 { margin: 0; }
.mb14 { margin-bottom: 14px; }
.mb16 { margin-bottom: 16px; }
.note-sm { margin-top: 0; font-size: 13.5px; }
.dlg-grid { display: grid; gap: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .loc-head, .loc-row { grid-template-columns: minmax(180px, 1fr) 52px 70px 70px 76px 84px 196px; gap: 10px; }
}
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 1000px) {
  .form-page { grid-template-columns: 1fr; }
  .recent { position: static; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings { grid-template-columns: 1fr; }
  .loc-head { display: none; }
  .loc-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "name name name last"
      "n1 n2 n3 n4"
      "act act act act";
    row-gap: 10px;
  }
  .loc-row > .c-name { grid-area: name; }
  .loc-row > .c-total { grid-area: n1; }
  .loc-row > .c-deschis { grid-area: n2; }
  .loc-row > .c-lucru { grid-area: n3; }
  .loc-row > .c-rez { grid-area: n4; }
  .loc-row > .loc-last { grid-area: last; text-align: right; }
  .loc-row > .loc-actions { grid-area: act; justify-content: flex-start; }
  .loc-row .loc-n::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: .4px;
  }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 0 16px; gap: 10px; flex-wrap: wrap; }
  .brand img { height: 46px; }
  .topbar .clock { display: none; }
  .form-page, .dash { padding-left: 16px; padding-right: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .ticket-form { padding: 18px 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .k-value { font-size: 26px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; padding-bottom: 8px; }
  .user-chip .u-name { display: none; }
  .f-search { max-width: none; }
  .filters .field { flex: 1 1 140px; }
  .f-narrow, .f-mid { width: auto; }
  .user-form { grid-template-columns: 1fr; }
  .dlg-foot { flex-wrap: wrap; }
  .kbd-hint { display: none; }
  .form-actions > .btn { flex: 1 1 100%; }
  .form-actions .grow { display: none; }
}
