/* CATCHWAVE ERP: bară de aplicație închisă, meniu lateral cu pictograme, bară de comenzi, carduri cu umbră discretă. Culorile sunt variabile,
   cu temă întunecată automată. Stratul „Design 2.88” de la final rafinează ritmul, ierarhia și stările interactive. */
:root {
  /* Paleta (2.88): neutri cu o tentă rece, din albastrul brandului, ca interfața să pară unitară și calmă; albastrul de încredere pentru
     acțiunea principală; o singură culoare de atenție (chihlimbar); verde și roșu doar pentru stări, cu fundaluri estompate. */
  --bg: #f4f6fa; --card: #ffffff; --surface-2: #f8fafc; --line: #e2e7ef; --line-soft: #eef1f6; --line-strong: #cfd6e2; --text: #1a2233; --muted: #5d6779;
  --hover: #f1f4f9; --pressed: #e6ebf3;
  --appbar: #0e1b33; --appbar-2: #13264a; --appbar-text: #ffffff; --appbar-hover: rgba(255, 255, 255, .12);
  --side: #fbfcfe; --side-text: #1f2a3d; --side-hover: #eef2f8; --side-current: #e5eefc;
  --primary: #1f63d6; --primary-dark: #1953b8; --primary-darker: #133f8c; --primary-soft: #eaf1fd;
  --accent: #b45309; --accent-bg: #fff7ea;
  --ok: #157347; --ok-bg: #eaf7f0; --warn: #a15c07; --warn-bg: #fdf5e7; --bad: #c4314b; --bad-bg: #fdeef1; --info: #1f63d6; --info-bg: #eaf1fd;
  --ring: 0 0 0 3px rgba(31, 99, 214, .28);
  --radius: 10px; --radius-s: 7px; --radius-l: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 8px 20px rgba(16, 24, 40, .09);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  --za: 1; --zu: 1; --z: calc(var(--za) * var(--zu));  /* mărirea interfeței: automată pe 2K/4K (--za), aleasă de om (--zu) */
}
@media (prefers-color-scheme: dark) {
  /* Tema închisă: straturi de adâncime (fundal, meniu, carduri, carduri ridicate), nu negru plat; culori mai puțin saturate, ca să nu obosească ochii. */
  :root { --bg: #0d1220; --card: #151c2c; --surface-2: #1a2235; --line: #263049; --line-soft: #1e2739; --line-strong: #34405c; --text: #e6ebf3; --muted: #97a3b7;
    --hover: #1c2538; --pressed: #232e45; --appbar: #0a1020; --appbar-2: #0f1a33; --side: #10172a; --side-text: #dde4ef; --side-hover: #1a2338; --side-current: #1b2c4f;
    --primary: #5b9cf5; --primary-dark: #79aff8; --primary-darker: #a5c8fb; --primary-soft: #182a4a;
    --accent: #f2b25c; --accent-bg: #2e2412;
    --ok: #5cc28e; --ok-bg: #11291f; --warn: #f0b45c; --warn-bg: #2e2412; --bad: #f2788d; --bad-bg: #331820; --info: #79aff8; --info-bg: #15264a;
    --ring: 0 0 0 3px rgba(91, 156, 245, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .03); --shadow-hover: 0 4px 16px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .05);
    color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
code { background: var(--line-soft); padding: 1px 5px; border-radius: 3px; font-size: 12.5px; word-break: break-all; }
h1 { font-size: 20px; font-weight: 600; margin: 0; line-height: 28px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; line-height: 22px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.pad { padding: 12px 16px; margin: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.late { color: var(--bad); font-weight: 600; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* Bara de aplicație */
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px 0 4px;
  background: var(--appbar); color: var(--appbar-text); }
.appbar-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-s);
  background: transparent; color: var(--appbar-text); cursor: pointer; }
.appbar-btn:hover { background: var(--appbar-hover); color: var(--appbar-text); }
.wordmark { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .14em; padding: 0 8px 0 4px; }
.wordmark:hover { color: #fff; text-decoration: none; }
.appbar-area { color: rgba(255, 255, 255, .78); font-size: 14px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .3); line-height: 20px; }
.appbar-search { position: relative; flex: 0 1 460px; margin: 0 auto; }
.appbar-search input[type=search] { width: 100%; height: 32px; border: 0; border-radius: var(--radius-s); padding: 0 12px 0 36px;
  background: rgba(255, 255, 255, .14); color: #fff; font: inherit; }
.appbar-search input::placeholder { color: rgba(255, 255, 255, .72); }
.appbar-search input:focus { background: #fff; color: #242424; outline: none; box-shadow: none; }
.appbar-search input:focus::placeholder { color: #707070; }
.appbar-search .search-ico { position: absolute; left: 9px; top: 6px; color: rgba(255, 255, 255, .8); pointer-events: none; }
.appbar-search:focus-within .search-ico { color: #616161; }
.appbar-right { display: flex; align-items: center; gap: 4px; }
.brand-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255, 255, 255, .8); margin-right: 4px; }
.brand-switch select { min-width: 170px; height: 32px; min-height: 32px; border: 0; border-radius: var(--radius-s); padding: 0 8px;
  background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-size: 13px; }
.brand-switch select option { color: #242424; background: #fff; }
.brand-switch select:focus { outline: 2px solid #fff; outline-offset: 0; }
html.js .nojs { display: none; }

/* Meniul lateral */
.frame { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh / var(--z) - 48px); }
.side { position: sticky; top: 48px; height: calc(100vh / var(--z) - 48px); display: flex; flex-direction: column; background: var(--side);
  border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.nav { padding: 8px 0 16px; flex: 1; }
.nav-group { padding: 4px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line-soft); }
.nav-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 16px 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; margin: 1px 8px; padding: 6px 8px; border-radius: var(--radius-s);
  color: var(--side-text); font-size: 14px; line-height: 20px; white-space: nowrap; }
.nav a .ico { color: var(--muted); }
.nav a .lbl { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: var(--side-hover); text-decoration: none; color: var(--side-text); }
.nav a.current { background: var(--side-current); font-weight: 600; }
.nav a.current .ico { color: var(--primary); }
.nav a.current::before { content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--primary); }
.nav-count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; line-height: 18px; padding: 0 6px; font-weight: 600; }
.side-foot { font-size: 11px; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--line-soft); }
html.nav-collapsed .frame { grid-template-columns: 56px minmax(0, 1fr); }
html.nav-collapsed .nav a { justify-content: center; padding: 8px 0; }
html.nav-collapsed .nav a .lbl, html.nav-collapsed .nav-title, html.nav-collapsed .side-foot { display: none; }
html.nav-collapsed .nav-count { position: absolute; top: 2px; right: 4px; font-size: 10px; line-height: 15px; padding: 0 4px; }

/* Pagina: bara de comenzi, antetul, conținutul */
.main { min-width: 0; }
.commandbar { position: sticky; top: 48px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-height: 44px; padding: 4px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.commandbar form.inline { display: inline-flex; }
.commandbar .button { border-color: transparent; background: transparent; font-weight: 400; height: 36px; padding: 0 10px; }
.commandbar .button:hover { background: var(--hover); border-color: transparent; color: var(--text); }
.commandbar .button.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; height: 32px; margin: 0 6px 0 0; }
.commandbar .button.primary:hover { background: var(--primary-dark); color: #fff; }
.commandbar .button.danger { color: var(--bad); }
.page-head { padding: 16px 24px 4px; max-width: 1480px; }
.crumbs { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 2px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { color: var(--line-strong); }
.title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.title .badge { font-size: 12px; line-height: 22px; padding: 0 10px; }
.content { padding: 12px 24px 40px; max-width: 1480px; }
.content.wide { max-width: none; }
.brand-bar { margin: 0 0 14px; font-size: 13px; color: var(--muted); }

/* Butoane și formulare */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--card); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .1s, border-color .1s; }
.button:hover { background: var(--hover); border-color: #c7c7c7; color: var(--text); text-decoration: none; }
.button:active { background: var(--pressed); }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.button.danger { color: var(--bad); }
.button.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.button.small { min-height: 24px; padding: 0 8px; font-size: 12px; font-weight: 600; }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .appbar-btn:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 1px; }
form.inline { display: inline; margin: 0; }
.link { font-size: 14px; }
input[type=text], input[type=password], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date],
input[type=datetime-local], input[type=month], input[type=time], input[type=week], input:not([type]), select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-bottom-color: var(--muted);
  border-radius: var(--radius-s); padding: 5px 10px; min-height: 32px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--primary); box-shadow: inset 0 -1px 0 var(--primary); }
.content input:focus-visible, .content select:focus-visible, .content textarea:focus-visible { outline: none; }
textarea { width: 100%; resize: vertical; }
input.num { text-align: right; }
.form .row { display: flex; flex-direction: column; gap: 4px; }
.form .row > input, .form .row > select { width: 100%; }
.form label { font-weight: 600; font-size: 14px; }
.form .check, label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.grid-form .row-wide { grid-column: 1 / -1; }
.grid-form .row-check { justify-content: flex-end; }
.form.stack { display: flex; flex-direction: column; gap: 10px; }
.form-actions { display: flex; gap: 14px; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.hint { color: var(--muted); font-size: 12px; margin: 2px 0 0; font-weight: 400; line-height: 16px; }
.req { color: var(--bad); }

/* Carduri, tabele, etichete, mesaje */
.card { background: var(--card); border: 1px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.card-head h2 { margin: 0; }
.count { color: var(--muted); font-weight: 400; margin-left: 4px; }
.card.empty { text-align: center; padding: 40px; }
.danger-zone { border-color: var(--bad); }
.scroll { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.grid th { font-weight: 600; font-size: 12px; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th a { color: var(--muted); }
.grid th a:hover { color: var(--text); }
.grid th:first-child, .grid td:first-child { padding-left: 20px; }
.grid th:last-child, .grid td:last-child { padding-right: 20px; }
.grid th.num, .grid td.num { text-align: right; }
.grid tbody tr:hover { background: var(--hover); }
.grid tfoot td { font-weight: 600; border-top: 1px solid var(--line); border-bottom: 0; }
.grid.compact td { padding: 7px 12px; }
.grid.mini td { white-space: nowrap; }
.grid.mini td:first-child { width: 100%; white-space: normal; }
.grid td.empty { text-align: center; color: var(--muted); padding: 24px; }
.grid.compact td.empty { padding: 14px; font-size: 13px; }
.row-title { font-weight: 600; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { min-width: 260px; }
.toolbar .range { margin: 0 8px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; font-weight: 600; white-space: nowrap;
  background: var(--line-soft); color: var(--muted); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.notice { background: var(--info-bg); border: 1px solid transparent; border-left: 4px solid var(--primary); padding: 10px 14px; margin: 0 0 16px;
  border-radius: var(--radius-s); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice-ok { background: var(--ok-bg); border-left-color: var(--ok); }
.notice-warn { background: var(--warn-bg); border-left-color: #f7630c; }
.notice-bad { background: var(--bad-bg); border-left-color: var(--bad); }
.notice-info { background: var(--info-bg); border-left-color: var(--primary); }

/* Fișă */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 16px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 0; }
.dl.single { grid-template-columns: 1fr; gap: 6px; }
.dl-foot { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.dl-row, .col-main, .col-side { min-width: 0; }
.dl-row.wide { grid-column: 1 / -1; }
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl.single .dl-row { display: flex; justify-content: space-between; gap: 10px; }
.dl.single dd.num { white-space: nowrap; }
.totals .big { border-top: 1px solid var(--line); padding-top: 6px; font-size: 16px; font-weight: 600; }
.pre { white-space: pre-wrap; }
.history { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.history li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.line-add { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.line-add .row { display: flex; flex-direction: column; gap: 3px; }
.line-add label { font-size: 12px; font-weight: 600; }
.line-add .grow { flex: 1 1 200px; }
.line-add .grow input { width: 100%; }
.line-add .row.s input { width: 90px; }
.line-add select { max-width: 240px; }
details.edit summary { cursor: pointer; color: var(--primary); font-size: 13px; display: inline; }
details.edit[open] { background: var(--bg); padding: 10px; border-radius: 3px; margin: 4px 0; }
details.edit + form { margin-top: 6px; }
.grid.fields td { vertical-align: middle; }

/* Tablou */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.tile { display: block; background: var(--card); color: var(--text); }
a.tile:hover { border-color: var(--primary); text-decoration: none; color: var(--text); }
.tile.warn { border-left: 4px solid #dba617; }
.tile-label { font-size: 12.5px; color: var(--muted); }
.tile-value { font-size: 22px; font-weight: 600; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--muted); }

/* Calendar */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); min-height: 260px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.day.today { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.day-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.day-head strong { color: var(--text); }
.ev { display: block; border-left: 3px solid var(--primary); background: var(--bg); padding: 4px 6px; border-radius: 2px; color: var(--text); font-size: 12.5px; }
.ev:hover { text-decoration: none; background: var(--info-bg); color: var(--text); }
.ev.act { border-left-color: #8c8f94; border-left-style: dashed; }
.ev.done { opacity: .55; }
.ev-time { display: block; color: var(--muted); font-size: 11.5px; }
.ev-title { display: block; font-weight: 600; }
.ev-meta { display: block; color: var(--muted); font-size: 11.5px; }
.day-add { margin-top: auto; font-size: 12px; color: var(--muted); }

.error-page { max-width: 520px; margin: 80px auto; background: var(--card); box-shadow: var(--shadow); padding: 30px; border-radius: var(--radius); }

/* Tablou: plăci în stilul tablourilor Dynamics */
.tile { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); padding: 16px 20px; transition: box-shadow .15s; }
a.tile:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.tile.warn { border-left: 0; box-shadow: inset 4px 0 0 #f7630c, var(--shadow); }
.tile-value { font-size: 28px; line-height: 36px; font-weight: 600; margin: 6px 0 2px; }
.day { border: 0; box-shadow: var(--shadow); }
.day.today { box-shadow: inset 0 3px 0 var(--primary), var(--shadow); }
.ev { border-radius: var(--radius-s); }

@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols.even { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appbar-area, .brand-switch label { display: none; }
}
@media (max-width: 760px) {
  .frame, html.nav-collapsed .frame { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 48px; left: 0; bottom: 0; height: auto; width: 272px; z-index: 40; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: 0 8px 16px rgba(0, 0, 0, .2); }
  html.nav-open .side { transform: none; }
  html.nav-collapsed .nav a { justify-content: flex-start; padding: 6px 8px; }
  html.nav-collapsed .nav a .lbl, html.nav-collapsed .nav-title, html.nav-collapsed .side-foot { display: revert; }
  .appbar-search { display: none; }
  .brand-switch select { min-width: 0; max-width: 150px; }
  .commandbar { top: 48px; padding: 4px 8px; }
  .page-head, .content { padding-left: 16px; padding-right: 16px; }
  .grid-form, .dl { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; }
  .card.flush { overflow-x: auto; }
  .toolbar input[type=search] { min-width: 0; flex: 1; }
}

/* Azi de sunat */
/* Filele: aceeași bară peste tot, cu sublinierea filei curente; despărțitorii „·” din text nu se mai văd (font-size: 0) */
.tabs { display: flex; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--line); font-size: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { font-size: 14px; line-height: 20px; padding: 8px 12px; color: var(--muted); white-space: nowrap; border-radius: var(--radius-s) var(--radius-s) 0 0; }
.tabs a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.tabs a.current { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); }
.tabs .count { margin-left: 6px; }
.card-head .tabs { margin: 0; border-bottom: 0; }
.opps { list-style: none; margin: 0 0 16px; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.radar-card .opps { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.opp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.opp:last-child { border-bottom: 0; }
.opp.compact { padding: 9px 16px; gap: 2px 20px; }
.opp-main { min-width: 0; }
.opp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opp-brand { font-size: 12.5px; color: var(--muted); }
.opp-reason { margin: 4px 0 2px; }
.opp.compact .opp-reason { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.opp-contact { font-size: 12.5px; color: var(--muted); }
.opp-value { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opp-value small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.opp-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.opp-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.opp-call { display: flex; gap: 6px; flex: 1 1 280px; margin: 0; }
.opp-call input { flex: 1; min-width: 0; min-height: 24px; font-size: 13px; padding: 1px 8px; }
.opp-later { margin-left: auto; }
.firm-score { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.firm-name { font-size: 15px; }
.firm-contact { margin-top: 4px; font-size: 13.5px; }
.firm-contact a { margin-right: 2px; }
.firm-sources { grid-column: 1 / -1; width: 100%; font-size: 13px; }
.firm-sources summary { cursor: pointer; color: var(--muted); }
.firm-sources ul { margin: 4px 0 0; }
.firm-sources li { margin: 3px 0; }
.button-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.button-link:hover { color: var(--primary-dark); }
ul.plain { margin: 0 0 10px; padding-left: 18px; }
ul.plain li { margin: 0 0 5px; }
.settings .field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.settings label { font-size: 13px; }
.settings input { width: 110px; }
@media (max-width: 760px) {
  .opp { grid-template-columns: minmax(0, 1fr); }
  .opp-value { text-align: left; }
  .opp-later { margin-left: 0; }
}

/* Setări și email */
[hidden] { display: none !important; }
.lead { margin: 0 0 16px; color: var(--muted); }
.lead .badge { margin-right: 6px; }
.choices { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { font-weight: 600; font-size: 13px; margin-bottom: 8px; padding: 0; }
.choice { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; font-size: 13.5px; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--info-bg); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack .row { display: flex; flex-direction: column; gap: 4px; }
.stack .row > input[type=text], .stack textarea { width: 100%; }
.stack .label { font-weight: 600; font-size: 13px; }
.stack-form { display: flex; gap: 6px; flex-wrap: wrap; }
.stack-form input { flex: 1 1 180px; min-width: 0; }
ol.steps { margin: 0 0 10px; padding-left: 20px; }
ol.steps li { margin: 0 0 6px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.settings-grid .card { margin: 0; display: flex; flex-direction: column; }
.setting h2 { font-size: 15px; margin-bottom: 6px; }
.setting p { margin: 0 0 12px; color: var(--muted); }
.setting-status { margin-top: auto; font-size: 13px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }

/* Ofertă online */
.link-box { width: 100%; font-size: 12.5px; margin: 0 0 8px; color: var(--muted); }
.online-card .opp-buttons { margin-bottom: 10px; }
.timeline { list-style: none; margin: 0 0 10px; padding: 0; font-size: 12.5px; }
.timeline li { padding: 2px 0; }
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: 10px; }
.logo-preview { background: repeating-conic-gradient(#f0f0f1 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; text-align: center; }
.logo-preview img { max-width: 100%; max-height: 90px; }

/* Baza de organizații */
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checks .check { font-weight: 400; font-size: 13px; }
.toolbar.bulk { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 12px; }
.grid.orgs td { vertical-align: top; }
.grid.orgs td:first-child { width: 28px; }

.ai-note { margin: 2px 0 4px; font-size: 13px; background: var(--info-bg); border-radius: var(--radius); padding: 4px 8px; }

/* Cronologia clientului */
.timeline-360 { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline-360::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.timeline-360 li { position: relative; display: flex; gap: 12px; padding: 6px 0; font-size: 13px; line-height: 18px; }
.timeline-360 li .ico { position: relative; flex-shrink: 0; width: 20px; height: 20px; padding: 2px; background: var(--card); color: var(--primary); }
.timeline-360 li div { min-width: 0; }
.timeline-360 a { color: var(--text); }
.timeline-360 a:hover { color: var(--primary); }
.tl-date { display: block; font-size: 12px; color: var(--muted); }
.next-steps { box-shadow: inset 3px 0 0 var(--primary), var(--shadow); }
.next-steps .badge { margin-right: 4px; }

/* Echipa: omul conectat, intrarea în cont, repartizarea */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 4px; border-radius: 50%;
  background: #2f6fb3; color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .3px; }
.avatar:hover, .user-menu[open] .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.user-pop { position: absolute; right: 0; top: 42px; z-index: 50; min-width: 230px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 0 2px rgba(0, 0, 0, .14); }
.user-pop .muted { font-size: 12px; margin-bottom: 6px; }
.user-pop a { color: var(--text); }
.user-pop .button-link { font-size: 14px; color: var(--text); text-decoration: none; }
.user-pop a:hover, .user-pop .button-link:hover { color: var(--primary); }
.login { min-height: calc(100vh / var(--z)); display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--appbar); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: var(--radius); padding: 28px 28px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .3); }
.login-brand { font-weight: 700; letter-spacing: 2px; font-size: 15px; color: var(--text); margin-bottom: 18px; }
.login-brand span { font-weight: 400; color: var(--muted); letter-spacing: 1px; margin-left: 4px; }
.login-card h1 { font-size: 20px; margin: 0 0 16px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .row { display: flex; flex-direction: column; gap: 4px; }
.login-form .button { justify-content: center; height: 36px; margin-top: 4px; }
.login-card .hint { margin-top: 14px; }
.opp-owner { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; margin-left: 6px; }
.assign { display: inline-flex; gap: 4px; align-items: center; }
.assign select { height: 28px; font-size: 12.5px; padding: 0 6px; max-width: 160px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code.secret { font-size: 15px; padding: 2px 8px; letter-spacing: 1px; user-select: all; }
ol.steps { padding-left: 20px; margin: 6px 0 10px; }
ol.steps li { margin-bottom: 6px; line-height: 20px; }
.card h3 { font-size: 13px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.card h3:first-of-type { margin-top: 4px; }
html:has(.login), body:has(.login) { background: var(--appbar); }
.form .row-check + .row-check { margin-top: 10px; }
.form .row-check .hint { margin-top: 2px; }
.form .row-check:last-of-type { margin-bottom: 12px; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .inline { display: inline-block; }

/* Harta citirii ofertei și citirea emailurilor */
.reading-map .rm { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rm-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 4px; }
.rm-head strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rm-bar { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.rm-bar span { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.rm li:first-child .rm-bar span { background: #c4314b; }
.rm-acts { font-size: 13px; margin: 0 0 8px; }
.mail-reading summary { cursor: pointer; list-style: none; }
.mail-reading summary::-webkit-details-marker { display: none; }
.mail-reading .timeline { margin: 8px 0 0; font-size: 12.5px; min-width: 220px; }
.svc-metrics { font-size: 12px; color: var(--muted); }

/* WhatsApp */
.wa-list { list-style: none; margin: 0; padding: 0; }
.wa-conv a { display: block; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.wa-conv a:hover { background: var(--hover, var(--line-soft)); }
.wa-conv.unread strong { color: var(--primary); }
.wa-conv-head { display: flex; justify-content: space-between; gap: 12px; }
.wa-conv-last { color: var(--muted); font-size: 13px; margin-top: 2px; }
.wa-thread { background: #efeae2; }
.wa-msgs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: calc(62vh / var(--z)); overflow-y: auto; }
.wa-day { align-self: center; font-size: 12px; color: #54656f; background: #fff; border-radius: 8px; padding: 2px 10px; margin: 6px 0; }
.wa-msg { display: flex; }
.wa-msg.wa-out { justify-content: flex-end; }
.wa-bubble { max-width: 78%; padding: 7px 10px 5px; border-radius: 8px; background: #fff; color: #111b21; font-size: 14px; line-height: 19px;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, .13); overflow-wrap: anywhere; }
.wa-out .wa-bubble { background: #d9fdd3; }
.wa-meta { text-align: right; font-size: 11px; color: #667781; margin-top: 2px; }
.wa-st.wa-citit { color: #53bdeb; }
.wa-st.wa-eșuat { color: #c4314b; font-weight: 700; }
.wa-reply { display: flex; gap: 8px; align-items: flex-end; }
.wa-reply textarea { flex: 1; min-height: 44px; }
.wa-thread .hint { color: #54656f; }
.wa-preview { background: #d9fdd3; color: #111b21; border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; font-size: 14px; }
.wa-compose:has(input[name=mod][value=liber]:checked) .wa-mode[data-mode=sablon],
.wa-compose:has(input[name=mod][value=sablon]:checked) .wa-mode[data-mode=liber] { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wa-thread { background: #0b141a; }
  :root:not([data-theme="light"]) .wa-bubble { background: #202c33; color: #e9edef; }
  :root:not([data-theme="light"]) .wa-out .wa-bubble { background: #005c4b; } }

/* Magazine WooCommerce */
.shop-card details { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.shop-card summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--primary); }
.shop-card .settings { margin: 12px 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.inline-form label { font-size: 13px; }

/* Tabloul de control: canalele */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.channel { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.channel .ico { grid-row: 1 / span 3; color: var(--muted); margin-top: 2px; }
.channel-n { font-size: 22px; font-weight: 600; line-height: 26px; font-variant-numeric: tabular-nums; }
.channel-l { font-size: 13px; font-weight: 600; }
.channel-s { font-size: 12px; color: var(--muted); }
.channel.hot { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.channel.hot .ico, .channel.hot .channel-n { color: var(--primary); }
.channel:hover { background: var(--line-soft); }

/* Conversie */
.fn { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fn-head { display: flex; gap: 10px; align-items: baseline; font-size: 13px; margin-bottom: 4px; flex-wrap: wrap; }
.fn-head strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.fn-bar { height: 12px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.fn-bar span { display: block; height: 100%; border-radius: 6px; background: var(--primary); }
.fn-bar.goal-late span { background: #c4314b; }
.fn-bar.goal-ok span { background: #107c10; }
.fn-lost { font-size: 12px; color: #c4314b; margin-top: 3px; }
.chance { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--line-soft); vertical-align: middle; overflow: hidden; }
.chance span { display: block; height: 100%; }
.chance-ok span { background: #107c10; } .chance-warn span { background: #c19c00; } .chance-bad span { background: #c4314b; }
.opp-chance { display: block; margin-top: 2px; font-weight: 600; color: var(--primary); }
.insights { margin: 0; padding-left: 18px; } .insights li { margin-bottom: 8px; line-height: 20px; }
.recs { padding-left: 0; } .recs li { margin-bottom: 12px; } .recs p { margin: 4px 0 0; font-size: 13px; }
.goals input { width: 120px; }
.loss-card { box-shadow: inset 3px 0 0 #c4314b, var(--shadow); }
.grid.compact td.num { white-space: nowrap; }

/* Emailuri primite și răspunsuri propuse */
tr.unread td { font-weight: 600; }
.mail-body { white-space: normal; line-height: 1.55; font-size: 14px; }
.ai-reply { box-shadow: inset 3px 0 0 var(--primary), var(--shadow); }
.reply-text { background: var(--line-soft); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 12px; line-height: 1.55; font-size: 14px; }

/* Explorator web */
.opp-reason mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.opps li.unseen { box-shadow: inset 3px 0 0 #c19c00; }

/* 2.11: structură Dynamics 365: zone de lucru, Recente/Fixate, „Creează”, clopoțel, vizualizări, antet cu câmpuri cheie ---------- */
html:not(.js) .jsonly { display: none; }
.appbar-area { font-weight: 600; color: #fff; }
.appbar-menu, .area-switch, .view-pick { position: relative; }
.appbar-menu > summary, .area-switch > summary, .view-pick > summary, .nav-fly > summary { list-style: none; cursor: pointer; }
.appbar-menu > summary::-webkit-details-marker, .area-switch > summary::-webkit-details-marker, .view-pick > summary::-webkit-details-marker,
.nav-fly > summary::-webkit-details-marker { display: none; }
.appbar-pop, .area-pop, .view-pop { position: absolute; z-index: 60; min-width: 232px; padding: 4px; background: var(--card); color: var(--text);
  border-radius: var(--radius); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14); }
.appbar-pop { top: 44px; right: 0; }
.appbar-pop a, .area-pop a, .view-pop a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-s); color: var(--text);
  font-size: 14px; white-space: nowrap; }
.appbar-pop a:hover, .area-pop a:hover, .view-pop a:hover { background: var(--hover); text-decoration: none; color: var(--text); }
.appbar-pop .ico, .area-pop .ico { color: var(--primary); }
.area-pop a.current, .view-pop a.current { background: var(--side-current); font-weight: 600; }
.area-pop-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 4px; }
.bell { position: relative; }
.bell-count { position: absolute; top: 5px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #c50f1f; color: #fff;
  font-size: 10px; line-height: 16px; font-weight: 700; text-align: center; }

/* Meniul lateral: Recente / Fixate și comutatorul de zone */
.nav-fly > summary { position: relative; display: flex; align-items: center; gap: 12px; margin: 1px 8px; padding: 6px 8px; border-radius: var(--radius-s);
  color: var(--side-text); font-size: 14px; line-height: 20px; white-space: nowrap; }
.nav-fly > summary .ico { color: var(--muted); }
.nav-fly > summary:hover { background: var(--side-hover); }
.nav-fly .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .12s; }
.nav-fly[open] > summary .chev { transform: rotate(90deg); }
.nav-sub { padding: 2px 0 4px; }
.nav .nav-sub a { display: block; margin: 0 8px 0 40px; padding: 4px 8px; }
.nav-sub .sub-t { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.nav-sub .sub-k { display: block; font-size: 11px; line-height: 14px; color: var(--muted); }
.nav-empty { display: block; margin: 0 16px 4px 48px; font-size: 12px; color: var(--muted); white-space: normal; }
.area-switch { border-top: 1px solid var(--line); padding: 6px 8px; }
.area-switch > summary { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-s); font-weight: 600; }
.area-switch > summary:hover { background: var(--side-hover); }
.area-tile { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-s);
  background: var(--primary); color: #fff; flex-shrink: 0; }
.area-tile .ico { width: 18px; height: 18px; }
.area-switch .chev { margin-left: auto; width: 16px; height: 16px; color: var(--muted); }
.area-pop { bottom: 52px; left: 8px; right: 8px; }
html.nav-collapsed .nav-fly > summary { justify-content: center; padding: 8px 0; }
html.nav-collapsed .nav-fly .lbl, html.nav-collapsed .nav-fly .chev, html.nav-collapsed .nav-sub,
html.nav-collapsed .area-switch .lbl, html.nav-collapsed .area-switch .chev { display: none; }
html.nav-collapsed .area-switch > summary { justify-content: center; padding: 6px 0; }
html.nav-collapsed .area-pop { left: 8px; right: auto; min-width: 200px; }

/* Bara de comenzi plată, cu pictograme albastre */
.commandbar { gap: 0; min-height: 44px; }
.commandbar .button, .commandbar .button.primary { height: 36px; min-height: 36px; padding: 0 8px; margin: 0; gap: 6px; border: 0; border-radius: var(--radius-s);
  background: transparent; color: var(--text); font-weight: 400; }
.commandbar .button:hover, .commandbar .button.primary:hover { background: var(--hover); color: var(--text); }
.commandbar .button:active { background: var(--pressed); }
.commandbar .button.primary { font-weight: 600; }
.commandbar .cmd-ico { width: 16px; height: 16px; color: var(--primary); }
.commandbar .button.danger, .commandbar .button.danger .cmd-ico { color: var(--bad); }
.commandbar .button[aria-pressed="true"] .cmd-ico { fill: currentColor; }

/* Antetul paginii: titlu, tip, stare și câmpurile cheie */
.page-head { padding: 14px 24px 6px; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.head-main { min-width: 0; }
.kicker { font-size: 12px; color: var(--muted); margin-top: 2px; }
.head-fields { display: flex; flex-wrap: wrap; margin-left: auto; }
.hf { padding: 2px 20px; border-left: 1px solid var(--line); min-width: 110px; }
.hf:first-child { border-left: 0; }
.hf-v { font-size: 14px; font-weight: 600; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hf-l { font-size: 12px; color: var(--muted); line-height: 16px; }
.view-pick > summary { display: flex; align-items: center; gap: 8px; padding: 2px 6px 2px 0; border-radius: var(--radius-s); }
.view-pick > summary:hover { background: var(--hover); }
.view-pick .view-name { font-size: 20px; line-height: 28px; font-weight: 400; color: var(--muted); }
.view-pick .view-name::before { content: "·"; margin-right: 8px; }
.view-pick .chev { transform: rotate(90deg); width: 16px; height: 16px; color: var(--muted); }
.view-pop { top: 34px; left: 0; max-height: calc(60vh / var(--z)); overflow-y: auto; }

/* Grilă mai densă, ca în Dynamics */
.grid th, .grid td { padding: 9px 12px; }
.grid th { height: 40px; vertical-align: middle; }
.grid .row-title { font-weight: 600; }

@media (max-width: 760px) {
  .head-fields { margin-left: 0; width: 100%; }
  .hf { padding: 2px 12px; min-width: 0; }
  .hf:first-child { padding-left: 0; }
  .view-pick .view-name { font-size: 16px; }
  .appbar-menu .appbar-pop { right: -90px; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bell-count { background: #f1707b; color: #1f1f1f; } }
.area-switch { position: sticky; bottom: 0; z-index: 5; background: var(--side); }
@media (max-width: 520px) {
  .brand-switch select { min-width: 0; width: 112px; }
  .wordmark { letter-spacing: .06em; font-size: 15px; }
  .appbar-btn { width: 36px; }
}
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li { position: relative; padding: 4px 0 4px 26px; font-size: 13px; }
.checklist li::before { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; line-height: 18px;
  text-align: center; font-weight: 700; }
.checklist li.ok::before { content: "✓"; background: var(--ok-bg); color: var(--ok); }
.checklist li.todo::before { content: "!"; background: var(--warn-bg); color: var(--warn); }
.ai-prov { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; margin: 10px 0; }
.ai-prov > summary { cursor: pointer; padding: 10px 0; display: flex; align-items: center; gap: 8px; }
.ai-prov[open] > summary { border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.ai-prov-tools { display: flex; gap: 12px; align-items: center; padding: 8px 0 12px; }
.pair { display: flex; gap: 8px; }
.pair input { width: 100%; }
h2.mt { margin-top: 20px; }
.nav-count-info { background: var(--primary); }
.ap-list { list-style: none; margin: 0; padding: 0; }
.ap-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 12px; }
.ap-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-reason { margin: 6px 0 4px; color: var(--text); }
.ap-manual { margin: 8px 0; }
.ap-form { margin-top: 10px; }
.ap-form textarea { width: 100%; font: inherit; }
.ap-tools { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ap-result { margin: 6px 0 0; font-size: 13px; }
.ap-text pre { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--bg); padding: 10px; border-radius: var(--radius-s); }
.ap-level { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }
.ap-level select { min-width: 220px; }
@media (max-width: 760px) { .ap-level { flex-direction: column; align-items: stretch; } }
.ap-form .row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 10px; }
.ap-form input[type=text], .ap-form textarea { width: 100%; }
.grid-form .ap-level { display: flex; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
.ap-level > div { flex: 1; }
.ap-sum th, .ap-sum td { padding: 7px 8px; white-space: normal; font-size: 12.5px; }
.ap-sum th:first-child, .ap-sum td:first-child { padding-left: 16px; }
.form .row.ap-level > select { width: 240px; flex: 0 0 240px; }
.ap-level > div { min-width: 0; }

/* Asistentul (chat cu acțiuni) */
.cp { max-width: 900px; }
.cp-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cp-msg { display: flex; gap: 10px; align-items: flex-start; }
.cp-user { justify-content: flex-end; }
.cp-user .cp-bubble { background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; max-width: 75%; }
.cp-ai .cp-bubble { background: var(--card); box-shadow: var(--shadow); border-radius: 12px 12px 12px 2px; max-width: 85%; }
.cp-bubble { padding: 10px 14px; line-height: 1.5; overflow-wrap: anywhere; }
.cp-bubble p { margin: 0 0 6px; }
.cp-bubble p:last-child { margin-bottom: 0; }
.cp-bubble ul { margin: 4px 0 6px; padding-left: 20px; }
.cp-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f6cbd, #8a3ffc); color: #fff; }
.cp-error .cp-bubble { border-left: 3px solid var(--bad); }
.cp-tool { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-left: 42px; }
.cp-tico { width: 14px; height: 14px; }
.cp-err { color: var(--bad); }
.cp-proposal { margin-left: 42px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: var(--radius);
  padding: 10px 14px; max-width: 80%; }
.cp-proposal.cp-wait { border-left-color: var(--warn); box-shadow: var(--shadow); }
.cp-ptitle { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.cp-proposal p { margin: 6px 0 8px; }
.cp-ptools { display: flex; gap: 8px; align-items: center; }
.cp-empty { text-align: center; padding: 30px 20px; color: var(--muted); }
.cp-empty h2 { color: var(--text); }
.cp-big { width: 40px; height: 40px; color: var(--primary); }
.cp-context { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cp-chip .button { font-weight: 400; border-radius: 14px; }
.cp-form { display: flex; gap: 8px; align-items: flex-end; background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 10px; }
.cp-form textarea { flex: 1; border: 0; resize: vertical; min-height: 44px; box-shadow: none; }
.cp-typing { color: var(--muted); font-size: 13px; padding-left: 42px; }
.copilot-btn .ico { color: #c7b8ff; }
@media (max-width: 760px) { .cp-proposal, .cp-tool, .cp-typing { margin-left: 0; padding-left: 0; } .cp-proposal { max-width: none; } }

/* Fișa de apel și curățenia datelor */
.card-head-inline { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-head-inline h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.call-brief h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 4px; text-transform: none; }
.call-who { font-size: 15px; margin: 10px 0 6px; }
.call-reason { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 3px 0; }
.call-phone .button { font-size: 15px; }

/* Autocompletare și ANAF */
.combo { position: relative; }
.combo-input { width: 100%; }
.combo-list { position: absolute; z-index: 70; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto;
  background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .16); }
.combo-list li { display: flex; flex-direction: column; padding: 6px 10px; border-radius: var(--radius-s); cursor: pointer; }
.combo-list li small { color: var(--muted); font-size: 12px; }
.combo-list li.active, .combo-list li:hover { background: var(--hover); }
.combo-list li.combo-empty { color: var(--muted); cursor: default; }
.appbar-search { position: relative; }
.appbar-search .combo-list { top: 36px; }
.cui-box { display: flex; gap: 6px; }
.cui-box input { flex: 1; min-width: 0; }
.anaf-status { font-size: 12.5px; margin-top: 4px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.anaf-status.ok { color: var(--ok); }
.anaf-status.bad { color: var(--bad); }
.anaf-status strong { color: var(--text); }

/* Import și export cu șabloane */
.io-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 16px; margin: 8px 0; }
.io-col { font-weight: 400; }
.io-list { list-style: none; margin: 0; padding: 0; }
.io-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.io-list li:last-child { border-bottom: 0; }
.io-list li > a:first-child { flex: 1; }
.io-scroll { overflow-x: auto; }
.io-map th { vertical-align: top; min-width: 150px; }
.io-head { font-weight: 600; color: var(--text); margin-bottom: 4px; white-space: normal; }
.io-map select { width: 100%; font-size: 12.5px; }

/* Ollama */
.ol-prog { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.ol-prog progress { width: 100%; height: 10px; }
.ol-prog small { color: var(--muted); }
h3.mt { font-size: 14px; margin: 16px 0 6px; }
.stack-form.mt { margin-top: 12px; }

/* Conexiuni */
.conn-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.conn-group td:first-child { width: 34%; }
.conn-group td:nth-child(2) { width: 120px; }
.conn-detail { font-size: 12.5px; }
.detect-note { font-size: 12.5px; }
.detect-note.ok { color: var(--ok); }
.detect-note.bad { color: var(--bad); }
.quick-connect .stack-form input { flex: 1 1 320px; }

/* Asistent AI simplificat */
.ai-page { max-width: 1000px; }
.ai-connect-form { display: flex; gap: 8px; }
.ai-connect-form input { flex: 1; min-width: 0; font-size: 15px; height: 40px; }
.ai-connect-form .button { height: 40px; }
.ai-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 8px 12px; border-radius: var(--radius);
  background: var(--ok-bg); font-size: 13px; }
.ai-chip span { display: flex; align-items: center; gap: 6px; flex: 1; }
.ai-services td { vertical-align: middle; }
.ai-model select { min-width: 220px; }
.ai-rec { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 4px; color: var(--muted); }
.ai-tasks { margin: 8px 0 0 26px; }
.ai-tasks summary { cursor: pointer; color: var(--primary); font-size: 13px; }
details.ai-more > summary { cursor: pointer; padding: 4px 0; }
details.ai-more[open] > summary { margin-bottom: 12px; }
details.ai-more .card { box-shadow: none; border: 1px solid var(--line); }
.choice { display: block; margin: 6px 0; }
@media (max-width: 760px) { .ai-connect-form { flex-direction: column; } .ai-model select { min-width: 0; width: 100%; } }
.ai-services td.nowrap { display: flex; gap: 12px; align-items: center; border-bottom: 0; }
.ai-tasks { margin-bottom: 10px; }

/* Cazuri */
.case-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.case-kpis div { background: var(--card); box-shadow: var(--shadow); border-radius: var(--radius); padding: 12px 16px; }
.case-kpis strong { display: block; font-size: 24px; line-height: 30px; }
.case-kpis span { color: var(--muted); font-size: 13px; }
.case-funnel { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.case-col { background: var(--card); border-radius: var(--radius-s); padding: 8px 10px; border-top: 3px solid var(--primary); }
.case-col strong { display: block; font-size: 18px; }
.case-col span { font-size: 12px; color: var(--muted); }
.case-steps { display: flex; align-items: center; gap: 4px; }
.case-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.case-dot.done { background: var(--ok); }
.case-dot.now { background: var(--primary); box-shadow: 0 0 0 3px var(--info-bg); }
.case-stage { margin-left: 8px; font-size: 13px; font-weight: 600; }
.case-table td { vertical-align: middle; }
@media (max-width: 760px) { .case-kpis { grid-template-columns: 1fr; } .case-funnel { grid-template-columns: repeat(2, 1fr); } }
.legal-public{max-width:860px;margin:24px auto;padding:0 16px}.legal-public h1{margin:0 0 16px}
.card.legal ul{margin:.4em 0 .4em 1.2em;padding:0}.card.legal li{margin:.25em 0}.side-foot a{color:inherit}
.onboarding .progress{height:6px;border-radius:3px;background:var(--line,#dcdcde);overflow:hidden;margin:4px 0 12px}
.onboarding .progress span{display:block;height:100%;background:var(--accent,#2271b1)}
.onboarding-steps{list-style:decimal;margin:0;padding-left:1.4em}.onboarding-steps li{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line,#dcdcde)}
.onboarding-steps li:last-child{border-bottom:0}.onboarding-steps li.done strong{opacity:.75}.onboarding-steps .hint{margin:2px 0 0}
.license-bar{margin:0 0 12px}
/* Zonele de lucru, la vedere în bara de sus */
.area-tabs { display: flex; gap: 2px; margin-left: 8px; }
.area-tabs a { color: rgba(255, 255, 255, .82); font-size: 14px; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }
.area-tabs a:hover { background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; }
.area-tabs a.current { color: #fff; font-weight: 600; background: rgba(255, 255, 255, .16); }
.area-tabs ~ .appbar-search { margin-left: 12px; }
.appbar-area { display: none; }
@media (max-width: 1100px) { .area-tabs { display: none; } .appbar-area { display: inline; } }
.appbar-search { position: relative; }
.appbar-search .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.kbd { font: 11px/1 ui-monospace, Consolas, monospace; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 2px 4px; background: var(--card); }
@media (max-width: 700px) { .appbar-search .kbd { display: none; } }
/* Ce ai de făcut */
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0 10px 12px; border-top: 1px solid var(--line-soft); border-left: 3px solid var(--line); }
.todo-list li:first-child { border-top: 0; }
.todo-list li.todo-bad { border-left-color: #c50f1f; } .todo-list li.todo-warn { border-left-color: #f7630c; } .todo-list li.todo-info { border-left-color: var(--primary); }
.todo-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-text span { color: var(--muted); font-size: 13px; }
.todo-empty p { color: var(--muted); margin: 0; }
@media (max-width: 600px) { .todo-list li { flex-direction: column; align-items: flex-start; } }
/* Paleta de comenzi (Ctrl+K) */
.palette-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .35); display: flex; justify-content: center; align-items: flex-start; padding: calc(10vh / var(--z)) 16px 16px; }
.palette-backdrop[hidden] { display: none; }
.palette { width: 100%; max-width: 640px; background: var(--card); color: var(--text); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0, 0, 0, .28); overflow: hidden; display: flex; flex-direction: column; max-height: calc(70vh / var(--z)); }
.palette-input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 16px; padding: 14px 16px; width: 100%; background: var(--card); color: var(--text); }
.palette-input:focus { outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; }
.palette-list li[data-i] { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; cursor: pointer; }
.palette-list li.sel, .palette-list li[data-i]:hover { background: var(--line-soft); }
.palette-list li.sel { box-shadow: inset 3px 0 0 var(--primary); }
.palette-group { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px 4px; }
.palette-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.palette-empty { padding: 16px; color: var(--muted); }
.palette-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
body.palette-open { overflow: hidden; }
@media (max-width: 600px) { .palette-backdrop { padding-top: 8px; } .palette-sub { display: none; } .palette-foot { display: none; } }

/* Ce știm despre client (memoria clientului) */
.card.memory > p:first-of-type { margin-top: 0; }
.card.memory .dl-row { display: block; padding: 6px 0; }
.card.memory .dl-row dt { font-size: .8rem; margin-bottom: 2px; }
.card.memory .dl-row dd { margin: 0; text-align: left; }
.card.memory .dl-row dd .plain-list { margin: 0; padding-left: 1.1em; list-style: disc; }
.memory-notes { margin: .75rem 0; }
.memory-notes summary { cursor: pointer; font-weight: 600; }
.memory-notes textarea { width: 100%; }

/* Cunoștințele firmei */
.kb-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.kb-stat { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line, #ddd); border-radius: 8px; }
.kb-stat strong { font-size: 1.3rem; }
.kb-stat span { font-size: .8rem; opacity: .8; }
.kb-list, .kb-results { list-style: none; margin: 0; padding: 0; }
.kb-list > li, .kb-results > li { padding: 8px 0; border-bottom: 1px solid var(--line, #ddd); }
.kb-list summary { cursor: pointer; }
.kb-results li strong { display: block; }
.kb-text { white-space: normal; margin: 6px 0; overflow-wrap: anywhere; }
.kb-add { margin-top: 10px; }
.kb-form .wide { grid-column: 1 / -1; }
.kb-form textarea, .kb-form input[type=text] { width: 100%; }

/* Obiective */
.goal-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0; }
.goal-bar span { display: block; height: 100%; background: var(--primary); }
.goal-list { list-style: none; margin: 0; padding: 0; }
.goal-list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.goal-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 6px; }
.goal-nums div { display: flex; flex-direction: column; }
.goal-nums strong { font-size: 1.25rem; }

/* Rezoluții și ecrane ------------------------------------------------------------------------------------------------------------------
   Telefon (până la 760 px): meniul peste pagină, căutarea ca buton, brandul în meniu, bara de comenzi derulabilă, ținte de atingere mari.
   Tabletă (761–1023 px): meniul lateral se deschide peste pagină, ca să rămână tot ecranul pentru conținut.
   Full HD (1920): conținutul folosește toată lățimea, formularele și detaliile pe mai multe coloane.
   2K (2560 la scalare 100%): interfața se mărește puțin (1,125). 4K (3840 la scalare 100%): se mărește de 1,5 ori, ca textul să rămână
   lizibil. Cu scalarea Windows (125–200%), browserul vede deja 1920–2560 px și se aplică regulile de mai sus.
   Peste toate, omul alege mărimea textului (A−, A, A+, A++) din subsolul meniului. */
html { zoom: var(--z); }
.search-btn, .side-brand { display: none; }
.ui-scale { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; }
.ui-scale span { margin-right: 4px; }
.ui-scale button { font: inherit; font-size: 11px; line-height: 18px; min-width: 28px; padding: 0 4px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--card); color: var(--text); cursor: pointer; }
.ui-scale button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
.appbar-right { margin-left: auto; flex-shrink: 0; }

@media (min-width: 1600px) {
  .page-head, .content { max-width: 1640px; }
  .cols { grid-template-columns: minmax(0, 1fr) 360px; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .grid-form { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .dl { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .settings-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}
@media (min-width: 1880px) {
  .page-head, .content { max-width: 1840px; }
  .page-head { padding-left: 28px; padding-right: 28px; }
  .content { padding-left: 28px; padding-right: 28px; }
  .cols { grid-template-columns: minmax(0, 1fr) 380px; gap: 0 20px; }
}
@media (min-width: 2400px) {
  :root { --za: 1.125; }
  .page-head, .content { max-width: 2040px; }
  .cols { grid-template-columns: minmax(0, 1fr) 400px; }
}
@media (min-width: 3200px) {
  :root { --za: 1.5; }
}

@media (max-width: 1023px) {
  .frame, html.nav-collapsed .frame { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 48px; left: 0; bottom: 0; height: auto; width: 272px; z-index: 40; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: 0 8px 16px rgba(0, 0, 0, .2); }
  html.nav-open .side { transform: none; }
  html.nav-collapsed .nav a { justify-content: flex-start; padding: 6px 8px; }
  html.nav-collapsed .nav a .lbl, html.nav-collapsed .nav-title, html.nav-collapsed .side-foot { display: revert; }
}
@media (max-width: 760px) {
  .search-btn { display: inline-flex; }
  .appbar .brand-switch { display: none; }
  .side-brand { display: block; padding: 10px 16px; border-top: 1px solid var(--line-soft); }
  .side-brand .brand-switch { color: var(--muted); margin: 0; }
  .side-brand .brand-switch label { display: inline; }
  .side-brand .brand-switch select { flex: 1; max-width: none; width: auto; background: var(--card); color: var(--text); border: 1px solid var(--line-strong); }
  .appbar { padding-right: 4px; gap: 0; }
  .appbar-right { gap: 0; }
  .wordmark { font-size: 14px; letter-spacing: .04em; padding: 0 4px; }
  .commandbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .commandbar::-webkit-scrollbar { display: none; }
  .commandbar > * { flex-shrink: 0; }
  .head-row { gap: 8px 16px; }
  h1 { font-size: 18px; line-height: 24px; }
  .card { padding: 14px 16px; }
  .card-head { padding: 10px 16px; }
  .grid th:first-child, .grid td:first-child { padding-left: 16px; }
  .grid th:last-child, .grid td:last-child { padding-right: 16px; }
  .form-actions { flex-wrap: wrap; }
  .cols > .col-side { order: 2; }
}
@media (max-width: 380px) {
  .appbar-btn { width: 34px; }
  .wordmark { font-size: 13px; letter-spacing: .02em; }
}
/* Ecrane tactile: ținte de cel puțin 40 px și text de 16 px în câmpuri (altfel telefonul mărește pagina la fiecare câmp). */
@media (pointer: coarse) {
  .button { min-height: 40px; }
  .button.small { min-height: 34px; }
  input[type=text], input[type=password], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date],
  input[type=datetime-local], input:not([type]), select, textarea { font-size: 16px; min-height: 40px; }
  .nav a { padding: 10px 8px; }
  .button-link { padding: 6px 0; }
  .commandbar .button, .commandbar .button.primary { height: 40px; min-height: 40px; }
}
@media print {
  html { zoom: 1; }
}

/* Unde iau cheia API (Setări → Asistent AI) */
.ai-guide { border-top: 1px solid var(--line-soft); padding: 2px 0; }
.ai-guide > summary { cursor: pointer; padding: 9px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-guide[open] > summary { padding-bottom: 4px; }
.ai-guide ol { margin: 6px 0 8px; padding-left: 22px; }
.ai-guide ol li { margin: 0 0 4px; }
.ai-guide > p { margin: 6px 0; }
.ai-guide.retired > summary strong { text-decoration: line-through; color: var(--muted); }

/* Bara de comenzi ordonată: meniurile „Creează” și „Mai multe”, despărțitorul dinaintea comenzilor care șterg sau anulează */
.cmd-menu { position: relative; display: inline-flex; }
.cmd-menu > summary { list-style: none; cursor: pointer; }
.cmd-menu > summary::-webkit-details-marker { display: none; }
.commandbar .cmd-chev { width: 12px; height: 12px; margin-left: -2px; transform: rotate(90deg); color: var(--muted); }
.cmd-menu[open] > summary { background: var(--pressed); }
.cmd-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; display: flex; flex-direction: column; min-width: 220px; padding: 4px;
  background: var(--card); border-radius: var(--radius); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .14); }
.cmd-pop form, .cmd-pop form.inline { display: flex; }
.commandbar .cmd-pop .button { width: 100%; justify-content: flex-start; white-space: nowrap; }
.cmd-sep { align-self: center; width: 1px; height: 22px; margin: 0 6px; background: var(--line); }
.commandbar .cmd-sep ~ .button:not([data-pin]), .commandbar .cmd-sep ~ form .button, .commandbar .cmd-sep ~ form .button .cmd-ico,
.commandbar .cmd-sep ~ .button:not([data-pin]) .cmd-ico { color: var(--bad); }
@media (max-width: 640px) { .cmd-pop { position: fixed; left: 8px; right: 8px; top: 100px; } }

/* Căutări propuse, pe branduri */
.suggest-brand h3 { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.suggest-brand h3 form, .suggest-brand h3 .button { margin-left: auto; }
.suggest-brand ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }

/* Dosarul licitației: pașii, cu bifa în stânga */
.dossier li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.dossier li form { display: inline-flex; }
.dossier li.late strong { color: var(--bad); }

/* 3.0: aceleași componente pe toate paginile -------------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }  /* orice tabel se derulează pe orizontală pe ecranele înguste, nu lățește pagina */
.lead { max-width: 92ch; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list .ck { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 0 8px 12px; border-left: 3px solid var(--line-strong); }
.check-list .ck + .ck { margin-top: 6px; }
.check-list .ck-bad { border-left-color: var(--bad); }
.check-list .ck-warn { border-left-color: #f7630c; }
.check-list .ck-info { border-left-color: var(--primary); }
.check-list .badge { flex-shrink: 0; }
.check-list .ck-text { flex: 1 1 260px; min-width: 0; }
.check-list .ck-go { white-space: nowrap; font-weight: 600; }
.check-empty { margin: 0; }
.check-empty .badge { margin-right: 6px; }
.toolbar[data-autosubmit] { margin-bottom: 12px; }
.card > h2:first-child .badge, .card-head h2 .badge { margin-left: 6px; vertical-align: 1px; }
/* Bara de sus cu 7 zone: numele aplicației nu se taie; se strâng întâi căutarea și spațiile dintre zone */
.wordmark { flex-shrink: 0; }
.area-tabs { flex-shrink: 0; }
.area-tabs ~ .appbar-search { flex: 1 1 360px; min-width: 180px; }
@media (max-width: 1440px) { .area-tabs a { padding: 6px 8px; } .area-tabs ~ .appbar-search { margin-left: 8px; } }
@media (max-width: 1240px) { .area-tabs { display: none; } .appbar-area { display: inline; } }
/* Formularele din coloana laterală (320-400 px) au un singur câmp pe rând: etichetele și listele nu se mai taie */
.col-side .grid-form { grid-template-columns: minmax(0, 1fr); }
.col-side .grid-form .row > input, .col-side .grid-form .row > select, .col-side .form .row > input, .col-side .form .row > select { width: 100%; }
/* Pe telefon, numele zonei din bara de sus se scurtează („Contabil…”), iar butoanele din dreapta rămân în ecran */
@media (max-width: 760px) {
  .appbar-area { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .appbar-right { flex-shrink: 0; margin-left: auto; }
}
@media (max-width: 760px) { .badge { white-space: normal; max-width: 100%; } }  /* o insignă lungă se rupe pe rânduri, nu lățește pagina */
/* Lucrarea pe telefon: pozele și semnătura pe fișa lucrării */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin: 4px 0 10px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-s); border: 1px solid var(--line); display: block; }
img.signature { max-width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); }

/* Rapoarte și exporturi (2.64): filtrul de perioadă, cardurile rapoartelor, graficul cu bare, variația față de perioada anterioară */
.report-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 0 0 4px; }
.report-filter label { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--muted); }
.report-filter select, .report-filter input { min-width: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.report-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-card strong { display: block; margin: 4px 0; color: var(--text); }
.tile-sub.up { color: var(--ok); }
.tile-sub.down { color: var(--bad); }
.tile-value small { font-size: 14px; font-weight: 400; color: var(--muted); }
.report-chart { margin: 0; padding: 12px 16px 4px; border-bottom: 1px solid var(--line-soft); }
.report-chart svg { display: block; width: 100%; height: auto; max-height: 280px; }
.report-chart rect.s0, .legend i.s0 { fill: var(--primary); background: var(--primary); }
.report-chart rect.s1, .legend i.s1 { fill: #8a8886; background: #8a8886; }
.report-chart rect.s2, .legend i.s2 { fill: var(--ok); background: var(--ok); }
.report-chart rect.s3, .legend i.s3 { fill: var(--warn); background: var(--warn); }
.report-chart rect:hover { opacity: .8; }
.report-chart text { fill: var(--muted); font-size: 11px; }
.report-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--muted); padding: 4px 0 6px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.report-table td .neg, td.num .neg { color: var(--bad); }
.report-table tfoot td { font-weight: 600; border-top: 2px solid var(--line-strong); }
@media (max-width: 900px) { .report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .report-cards { grid-template-columns: 1fr; }
  .report-filter label { flex: 1 1 140px; }
  .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .report-kpis .tile { padding: 10px 12px; }
  .report-kpis .tile-value { font-size: 18px; line-height: 24px; }
}
@media print {
  .side, .appbar, .area-tabs, .commandbar, .report-filter, .report-tabs, .tabs, .report-actions, .crumbs { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .card, .tile { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  .table-wrap { overflow: visible; }
  body { background: #fff; color: #000; }
}

/* Experiența (2.65): ritualul zilei pe Acasă, liniștirea înaintea acțiunilor cu bani, „Anulează” după acțiuni, meniul fără zgomot */
.today-card .card-head { align-items: flex-start; }
.today-card .card-head > div { flex: 1; min-width: 0; }
.today-progress { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; margin: 8px 0 4px; max-width: 360px; }
.today-progress span { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .4s; }
.today-head { margin: 0; font-size: 13px; color: var(--muted); }
.today-wins { margin: 0; padding: 10px 16px 14px; color: var(--ok); display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line-soft); }
.today-done { padding: 12px 16px; margin: 0; display: flex; gap: 8px; align-items: center; }
.reassure { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--info-bg); color: var(--text); font-size: 13px; line-height: 19px;
  border-left: 3px solid var(--info); }
.notice .undo { margin-left: 12px; vertical-align: baseline; }
.notice form.inline { display: inline; }
.nav-more a { color: var(--muted); font-size: 12.5px; }
.opp-quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.opp-quick form.inline { display: inline-flex; }
/* Asistentul de configurare (2.66): pașii deasupra, cu starea fiecăruia; pe telefon rămâne doar titlul pasului curent */
.wizard-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.wizard-steps li { flex: 1 1 0; min-width: 0; }
.wizard-steps a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  color: var(--text); text-decoration: none; font-size: 13px; line-height: 1.25; height: 100%; }
.wizard-steps a:hover { background: var(--hover); }
.wizard-steps .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--text); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.wizard-steps .done .n { background: var(--ok); color: #fff; }
.wizard-steps .skipped .t { color: var(--muted); }
.wizard-steps .current a { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.wizard-steps .current .n { background: var(--primary); color: #fff; }
.wizard .kicker { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.wizard h2 { margin-top: 2px; }
.wizard h3 { margin: 18px 0 8px; }
.wizard-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--line-soft); }
.wizard-summary { list-style: none; padding: 0; margin: 0; }
.wizard-summary li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.wizard-summary li span:first-child { flex: 1; }
.wizard input[type="color"] { width: 48px; height: 32px; padding: 2px; }
@media (max-width: 700px) {
  .wizard-steps a { justify-content: center; padding: 6px; }
  .wizard-steps .t { display: none; }
  .wizard-steps .current { flex: 3 1 0; }
  .wizard-steps .current .t { display: inline; }
}

/* Mutarea datelor (2.71): formularul de citire pe un rând, cu anii aleși */
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.inline-form select { width: auto; }
.checks li { list-style: none; padding: 6px 0 6px 10px; border-left: 3px solid var(--warn); margin: 4px 0; }
.checks li.check-bad { border-left-color: var(--bad); }

/* Mai multe firme (2.72): alegerea firmei în paginile de birou */
.company-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.company-bar .company-switch { margin: 0; }

/* Module (2.74): bifele cu explicația fiecărui modul */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; margin: 10px 0; }
.module-check { align-items: flex-start; }
.module-check span { display: flex; flex-direction: column; gap: 2px; }
.module-check small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.brand-list .brand-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.brand-list .brand-row > span { flex: 1; }
.card.inactive { opacity: .72; }
.card-tools { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Conexiuni: catalogul de carduri și ferestrele de conectare */
.int-summary { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 0 0 18px; font-size: 15px; }
.int-group { margin-bottom: 26px; }
.int-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.int-group-head h2 { font-size: 16px; margin: 0; }
.int-group-head p { margin: 0; font-size: 13px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.int-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.int-card:hover { border-color: var(--line-strong); }
.int-card.on { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.int-card.bad { border-color: var(--bad); }
.int-card.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.int-head { display: flex; gap: 12px; align-items: center; }
.int-title { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.int-title strong { font-size: 14.5px; line-height: 1.25; }
.int-tile { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #fff; font-weight: 700;
  font-size: 14px; letter-spacing: -.02em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.int-tile.big { width: 48px; height: 48px; font-size: 17px; border-radius: 12px; }
.int-desc { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.int-detail { margin: 0; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.int-advice { margin: 0; font-size: 13px; padding: 6px 8px; border-radius: var(--radius-s); background: var(--warn-bg); color: var(--warn); }
.int-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.int-actions form.inline { display: inline-flex; }
.int-problems ul { margin: 0; }
.int-tech summary { cursor: pointer; font-weight: 600; }
.int-dev { margin-top: 8px; }
.int-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; background: var(--card); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.int-dialog::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
html:not(.js) .int-dialog:target { display: block; position: fixed; inset: 24px; margin: auto; z-index: 50; }
.int-dialog-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.int-dialog-head h2 { margin: 0 0 2px; font-size: 18px; }
.int-dialog-head p { margin: 0; font-size: 13px; }
.int-close { margin-left: auto; font-size: 24px; line-height: 1; color: var(--muted); text-decoration: none; padding: 0 4px; }
.int-close:hover { color: var(--text); }
.int-steps { margin: 0 0 14px; padding-left: 22px; }
.int-steps li { margin: 7px 0; line-height: 1.45; }
.int-steps a { font-weight: 600; white-space: nowrap; }
.int-form { margin: 0; }
.int-form .grid-form { grid-template-columns: 1fr; }
.int-oauth { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.int-oauth p { margin: 0 0 8px; }
.int-or { text-align: center; color: var(--muted); font-size: 12.5px; margin: 6px 0 10px; }
.int-dialog-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; margin-top: 14px;
  padding-top: 10px; border-top: 1px solid var(--line-soft); }
@media (max-width: 600px) { .int-grid { grid-template-columns: 1fr; } .int-dialog { padding: 16px; } }

/* Licitații care vin: cele din următoarele 120 de zile, evidențiate */
.grid tr.row-soon td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.flags li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.flags li:last-child { border-bottom: 0; }
textarea.letter { width: 100%; font: 13.5px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
pre.code { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; overflow-x: auto; font-size: 12.5px; white-space: pre; }
.login-or { text-align: center; color: var(--muted); font-size: 12.5px; margin: 12px 0 8px; }
.plan-list { display: grid; gap: 6px; margin: 4px 0 12px; }
.plan-pick { display: flex; gap: 8px; align-items: baseline; }

/* Inteligența pieței (licitații) */
.mi-scope { margin: 0 0 12px; color: var(--muted); }
.mi-sub { margin-bottom: 10px; }
.mi-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.mi-kpi { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.mi-kpi-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.mi-kpi-l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mi-insights ul { margin: 0; padding-left: 20px; }
.mi-insights li { margin: 5px 0; }
.mi-bars { display: grid; gap: 7px; }
.mi-bar { display: grid; grid-template-columns: minmax(70px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.mi-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-track { height: 10px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.mi-fill { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.mi-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 130px; }
.mi-month { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.mi-col { width: 70%; min-height: 2px; background: var(--line-strong); border-radius: 3px 3px 0 0; }
.mi-month.peak .mi-col { background: var(--primary); }
.mi-m { font-size: 11px; color: var(--muted); }
@media (max-width: 600px) { .mi-bar { grid-template-columns: 1fr; gap: 2px; } }

/* Oportunități */
.op-total { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 14px; }
.op-total-v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ok); }
.op-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.op-chip { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none; }
.op-chip:hover, .op-chip.current { border-color: var(--primary); }
.op-chip strong { font-variant-numeric: tabular-nums; }


/* ==== Design 2.88: armonie și claritate =========================================================================================
   Principii: un ritm de spațiere pe 4/8 px; ierarhie prin mărime și greutate, nu prin culoare; o singură acțiune principală pe ecran;
   culorile de stare doar unde contează; contrast AA pentru text; focus vizibil; mișcare scurtă și discretă (oprită la cererea sistemului). */
body { font-size: 14px; line-height: 1.55; letter-spacing: .005em; text-rendering: optimizeLegibility; }
h1 { font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -.012em; }
h2 { font-size: 16px; line-height: 22px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-weight: 650; }
::selection { background: var(--primary-soft); color: var(--text); }

/* Bara de aplicație: adâncime discretă, căutarea ca element central */
.appbar { background: linear-gradient(180deg, var(--appbar-2), var(--appbar)); box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 2px 8px rgba(5, 12, 30, .18); }
.appbar-search input[type=search] { border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .15s var(--ease), box-shadow .15s var(--ease); }
.appbar-search input[type=search]:hover { background: rgba(255, 255, 255, .18); }
.appbar-search input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.appbar-btn { border-radius: 10px; transition: background .12s var(--ease); }
.brand-switch select { border-radius: 8px; }

/* Meniul lateral: grupuri aerisite, elementul curent clar */
.side { border-right: 1px solid var(--line-soft); }
.nav a { border-radius: 8px; padding: 7px 10px; transition: background .12s var(--ease), color .12s var(--ease); }
.nav a.current { background: var(--side-current); color: var(--primary-darker); }
@media (prefers-color-scheme: dark) { .nav a.current { color: var(--text); } }

/* Bara de comenzi și antetul paginii */
.commandbar { background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line-soft); }
.page-head { padding: 22px 28px 6px; }
.content { padding: 14px 28px 48px; }

/* Butoane: aceeași înălțime, colțuri prietenoase, acțiunea principală se distinge fără să țipe */
.button { min-height: 34px; border-radius: 8px; font-weight: 600; border-color: var(--line-strong); background: var(--card);
  transition: background .12s var(--ease), border-color .12s var(--ease), box-shadow .12s var(--ease), transform .06s var(--ease); }
.button:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--text)); background: var(--hover); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--primary); border-color: var(--primary); box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
@media (prefers-color-scheme: dark) { .button.primary, .button.primary:hover { color: #0b1324; } .commandbar .button.primary, .commandbar .button.primary:hover { color: var(--text); } }
.button.small { min-height: 28px; border-radius: 7px; padding: 0 10px; }
.button.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.commandbar .button { border-radius: 8px; }
.commandbar .button.primary { box-shadow: none; }

/* Focus: inel vizibil, doar la tastatură */
.button:focus-visible, a:focus-visible, .appbar-btn:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--ring); }

/* Câmpuri: chenar complet și inel la focus (mai ușor de citit decât o linie dedesubt) */
input[type=text], input[type=password], input[type=search], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date],
input[type=datetime-local], input[type=month], input[type=time], input[type=week], input:not([type]), select, textarea {
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); min-height: 36px;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease); }
.content input:hover, .content select:hover, .content textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--text)); }
.content input:focus, .content select:focus, .content textarea:focus, .content input:focus-visible, .content select:focus-visible,
.content textarea:focus-visible { border-color: var(--primary); box-shadow: var(--ring); outline: none; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

/* Carduri: suprafețe calme, separate prin spațiu și umbră fină */
.card { border-radius: var(--radius-l); border: 1px solid var(--line-soft); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
@media (prefers-color-scheme: dark) { .card { border-color: var(--line); } }

/* Tabele: rânduri aerisite, antet discret, rândul sub cursor evidențiat */
.grid th, .grid td { padding: 12px 14px; }
.grid th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); letter-spacing: .01em; }
.grid tbody tr { transition: background .1s var(--ease); }
.grid tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.grid tbody tr:last-child td { border-bottom: 0; }

/* Insigne: pastilă cu fundal estompat și text lizibil */
.badge { border-radius: 999px; padding: 1px 9px; font-weight: 600; font-size: 12px; line-height: 18px; border: 1px solid transparent; }
.badge-ok { border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.badge-warn { border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge-bad { border-color: color-mix(in srgb, var(--bad) 22%, transparent); }
.badge-info { border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.badge-muted { background: var(--line-soft); color: var(--muted); }

/* Mesaje: colț rotunjit, bară de culoare, fără stridență */
.notice { border-radius: 10px; border: 1px solid color-mix(in srgb, var(--info) 18%, transparent); border-left-width: 4px; padding: 11px 16px; }
.notice-ok { border-color: color-mix(in srgb, var(--ok) 25%, transparent); border-left-color: var(--ok); }
.notice-warn { border-color: color-mix(in srgb, var(--warn) 25%, transparent); border-left-color: var(--warn); }
.notice-bad { border-color: color-mix(in srgb, var(--bad) 25%, transparent); border-left-color: var(--bad); }

/* Valoare necompletată: o linie fină, nu un caracter (mai puțin zgomot în tabele) */
.empty-val { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--line-strong); vertical-align: middle; }

/* Mișcare: scurtă și discretă; oprită când sistemul cere mai puțină mișcare */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
