:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --border: #dde3e9;
  --border-strong: #c4ced8;
  --text: #16202a;
  --muted: #5d6b79;
  --accent: #0f7fa6;
  --accent-strong: #0b6787;
  --accent-soft: #e2f2f8;
  --ok: #1d8a52;
  --ok-soft: #e3f4ea;
  --warn: #b26a00;
  --warn-soft: #fdf1dc;
  --bad: #c0392b;
  --bad-soft: #fbe5e2;
  --row-start: #faf6e8;
  --row-total: #eef2f5;
  --shadow: 0 1px 2px rgba(16, 32, 48, .06), 0 4px 16px rgba(16, 32, 48, .05);
  --m1: #0f7fa6; --m2: #e0892b; --m3: #4a9d5b; --m4: #8b5cc4; --m5: #c94f6d;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b; --surface: #17202a; --surface-2: #1c2632; --border: #2a3644; --border-strong: #3a4858;
    --text: #e4eaf0; --muted: #93a2b2; --accent: #3fb3dc; --accent-strong: #67c6e8; --accent-soft: #15344a;
    --ok: #4cc283; --ok-soft: #173a29; --warn: #f0b04a; --warn-soft: #3d2f15; --bad: #f07b6c; --bad-soft: #43201c;
    --row-start: #262619; --row-total: #202b37; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --m1: #3fb3dc; --m2: #f0a050; --m3: #6cc47f; --m4: #b08ae6; --m5: #ef7f9a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151b; --surface: #17202a; --surface-2: #1c2632; --border: #2a3644; --border-strong: #3a4858;
  --text: #e4eaf0; --muted: #93a2b2; --accent: #3fb3dc; --accent-strong: #67c6e8; --accent-soft: #15344a;
  --ok: #4cc283; --ok-soft: #173a29; --warn: #f0b04a; --warn-soft: #3d2f15; --bad: #f07b6c; --bad-soft: #43201c;
  --row-start: #262619; --row-total: #202b37; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --m1: #3fb3dc; --m2: #f0a050; --m3: #6cc47f; --m4: #b08ae6; --m5: #ef7f9a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
a { color: var(--accent); }
.num, td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.brand.big { font-size: 22px; justify-content: center; margin-bottom: 8px; }
.drop { width: 15px; height: 20px; flex: 0 0 auto; fill: var(--picatura); display: block; }
#apSel { max-width: 260px; }
.tabs { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  border: 0; background: transparent; color: var(--muted); padding: 8px 12px; border-radius: 8px;
  font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--text); background: var(--surface-2); }
.tabs button.active { color: var(--accent-strong); background: var(--accent-soft); }
.top-actions { margin-left: auto; display: flex; gap: 6px; }

main { max-width: 1280px; margin: 0 auto; padding: 20px; }

/* ---------- controls ---------- */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 7px 10px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type="number"] { font-variant-numeric: tabular-nums; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.chk { flex-direction: row; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #06202b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #06202b; } }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 16px;
}
.icon-btn:hover { border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-right: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 12px; font: inherit; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* ---------- layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi .lbl { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.kpi .val { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 14px; font-weight: 500; color: var(--muted); }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.two { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.export-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.export-bar .lbl { color: var(--muted); font-size: 12px; margin-right: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data thead th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; position: sticky; top: 0; }
table.data thead tr.grp th { color: var(--text); font-size: 13px; border-left: 1px solid var(--border); }
table.data td.sep, table.data th.sep { border-left: 1px solid var(--border); }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tr.clickable { cursor: pointer; }
table.data tr.start td { background: var(--row-start); font-style: italic; color: var(--muted); }
table.data tr.total td { background: var(--row-total); font-weight: 700; border-bottom: 0; }
table.data td.empty { color: var(--border-strong); }
table.data tr.sel td { background: var(--accent-soft) !important; }
.neg { color: var(--bad); font-weight: 600; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.info { background: var(--accent-soft); color: var(--accent-strong); }
.diff-up { color: var(--warn); } .diff-down { color: var(--ok); }

/* ---------- chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: var(--border); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bars-list .row { display: grid; grid-template-columns: 48px 1fr 70px; align-items: center; gap: 8px; margin: 6px 0; }
.bars-list .bar { height: 10px; background: var(--accent); border-radius: 5px; opacity: .85; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 14px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 14px; margin: 0 0 12px; }
legend { padding: 0 6px; font-weight: 600; font-size: 13px; color: var(--text); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.form-actions .spacer { flex: 1; }
.checks { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
input.flag { border-color: var(--warn); background: var(--warn-soft); }
.reading-row { display: grid; grid-template-columns: 1fr 120px 90px; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.reading-row:last-child { border-bottom: 0; }
.reading-row .prev { font-size: 12px; color: var(--muted); }
.reading-row .cons { font-weight: 700; text-align: right; padding-bottom: 8px; font-variant-numeric: tabular-nums; }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; background: rgba(8, 14, 20, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 14px; width: min(860px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid var(--border); }
.modal-box.narrow { width: min(520px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px 18px; overflow: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--bad); color: #fff; }

/* ---------- import ---------- */
.drop-zone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 28px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background .15s;
}
.drop-zone.over, .drop-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone .big { font-size: 15px; font-weight: 600; }
.import-layout { display: grid; grid-template-columns: minmax(280px, 1fr) 1.4fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .import-layout { grid-template-columns: 1fr; } }
.photo-box { position: sticky; top: 72px; }
.photo-box .viewport { overflow: auto; max-height: 70vh; border-radius: 8px; border: 1px solid var(--border); background: #000; }
.photo-box img { display: block; width: 100%; cursor: zoom-in; }
.photo-box.zoom img { width: 240%; max-width: none; cursor: zoom-out; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.thumb { width: 34px; height: 26px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); vertical-align: middle; cursor: pointer; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; }
.err { color: var(--bad); min-height: 1em; margin: 0; }
.empty-state { text-align: center; padding: 36px 16px; color: var(--muted); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  #apSel { flex: 1; max-width: none; }
  main { padding: 12px; }
  .kpi .val { font-size: 22px; }
  .reading-row { grid-template-columns: 1fr 110px 70px; }
}

@media print {
  .topbar, .page-head .toolbar, .export-bar, .btn, .icon-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { box-shadow: none; border-color: #999; }
}

/* ===================== v2: utilizatori, ceas, IBAN, date ===================== */
.brand .app-name { font-size: 14px; line-height: 1.2; max-width: 250px; }
.brand.big .app-name { font-size: 19px; max-width: none; text-align: center; }
.login-title { font-size: 16px; text-align: center; margin: 0 0 4px; }
.ceas { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; align-self: center; margin-right: 4px; }
.top-actions { align-items: center; }
.user-menu { position: relative; }
.user-btn { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 230px; z-index: 40; padding: 6px; }
.dropdown .dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 13px; }
.dropdown button { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.dropdown button:hover { background: var(--surface-2); }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; letter-spacing: .5px; }
.iban-card .iban-main { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.iban-card .iban-text { flex: 1; min-width: 260px; }
.iban-card .lbl { color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.iban-asoc { font-weight: 600; margin-top: 4px; }
.iban-nr { font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: 22px; font-weight: 700; letter-spacing: 1px; margin: 6px 0 2px; overflow-wrap: anywhere; word-break: normal; }
.iban-nr.neval { color: var(--muted); }
.iban-warn { color: var(--bad); font-weight: 600; margin: 8px 0 4px; }
.iban-ok { color: var(--ok); font-weight: 500; margin: 8px 0 4px; font-size: 13px; }
.iban-card .toolbar { margin-top: 10px; }
.qr-box { text-align: center; }
.qr-box svg { width: 150px; height: 150px; display: block; border-radius: 6px; border: 1px solid var(--border); }
.iban-import { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.9; }

.date-field { display: flex; align-items: stretch; position: relative; }
.date-field input[data-date], .date-field input[name="parola"] { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.date-field .date-btn { border: 1px solid var(--border-strong); border-left: 0; background: var(--surface-2); border-radius: 0 8px 8px 0; padding: 0 9px; cursor: pointer; font-size: 14px; }
.date-field .date-btn:disabled { opacity: .5; cursor: default; }
.date-field .date-pick { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
input.invalid { border-color: var(--bad) !important; background: var(--bad-soft); }

.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 6px 16px; }
.rights-grid label.chk { font-size: 13px; }
.temp-pw { font-size: 24px; font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; text-align: center; user-select: all; }
.danger-zone { border-color: var(--bad-soft); }
.danger-zone h2 { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.file-ico { font-size: 18px; text-decoration: none; }
.file-box { display: flex; gap: 14px; align-items: center; padding: 14px; }
.file-big { font-size: 44px; }
.pw-meter { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s; }
.pw-meter span[data-s="2"] { background: var(--warn); }
.pw-meter span[data-s="3"], .pw-meter span[data-s="4"] { background: var(--ok); }
input:disabled, select:disabled, textarea:disabled { opacity: .85; background: var(--surface-2); }

@media (max-width: 1250px) { .ceas { font-size: 12px; } .brand .app-name { max-width: 190px; } }
@media (max-width: 760px) {
  .brand .app-name { max-width: 170px; font-size: 12px; }
  .user-btn { max-width: 110px; }
  .iban-nr { font-size: 18px; }
}
@media print { .ceas, .user-menu { display: none !important; } }
@media (max-width: 1500px) and (min-width: 761px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
}
label.chk > span { flex: 1; }
@media (max-width: 760px) { .iban-nr { font-size: 16px; letter-spacing: .3px; } }

/* ---------- autentificare: numele aplicației într-un chenar, sus, centrat, pe un rând ---------- */
.login { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 28px; padding: 48px 16px 24px; }
.login-brand {
  display: inline-flex; align-items: center; gap: 12px; width: max-content; max-width: 100%;
  padding: 12px 22px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
  font-weight: 700; font-size: 20px; white-space: nowrap; line-height: 1.2;
}
.login-brand.wrap { white-space: normal; text-align: center; }
.login-brand .drop { width: 1.05em; height: 1.4em; }
.login-card { margin-top: 4vh; }
.seg .cnt { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; }
.seg button.active .cnt { background: var(--surface); color: var(--accent-strong); }

.gen-prev p { margin: 6px 0; }

/* ===================== v3: ștergeri programate, import, citiri blocate ===================== */
.banner-sterg { background: var(--warn-soft); color: var(--text); border: 1px solid var(--warn); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner-sterg .btn { margin-left: auto; }
.mesaj-import { background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
table.data tr.blocat td { color: var(--muted); }
.lacat { font-size: 11px; opacity: .7; }
details summary { cursor: pointer; color: var(--muted); }
label > .muted.small { font-weight: 400; }

/* ===================== v4 ===================== */
.field-msg { font-size: 12px; font-weight: 500; min-height: 1em; }
.field-msg.ok { color: var(--ok); }
.field-msg.bad { color: var(--bad); }
/* câmpuri aliniate: eticheta ocupă aceeași înălțime chiar dacă textul e mai scurt */
.lbl-al .lbl-t { min-height: 2.9em; display: flex; align-items: flex-end; }
.inline-lbl { flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.inline-lbl select { min-width: 150px; }

/* ===================== v5 ===================== */
.btn { justify-content: center; text-align: center; }
/* casetele dintr-un rând se aliniază jos, chiar dacă etichetele au lungimi diferite */
.form-grid > label:not(.chk) { justify-content: flex-end; }
.form-grid > label.lbl-al { justify-content: flex-start; }
label.req:has(:is(input, select, textarea):invalid) .lt::after { content: " *"; color: var(--bad); font-weight: 700; }
.cuv-sterge { color: var(--bad); letter-spacing: 1px; }
label .muted { font-weight: 400; }
/* mesajul de sub nume utilizator nu modifică alinierea casetei */
label:has(> .field-msg) { position: relative; }
label > .field-msg { position: absolute; left: 0; top: calc(100% + 1px); font-size: 11.5px; line-height: 1.1; white-space: nowrap; }
#fUser > .form-grid, #fCont { row-gap: 18px; }

.cv-opt { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.cv-opt input { margin-top: 3px; }
.cv-opt.dezactivat { opacity: .65; cursor: help; }

/* bifele și butoanele radio au aceeași mărime peste tot, chiar dacă eticheta e lungă și se rupe pe mai multe rânduri */
input[type="checkbox"], input[type="radio"] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
label.chk { align-items: flex-start; }
label.chk > input[type="checkbox"], label.chk > input[type="radio"] { margin-top: 2px; }
.rights-grid label.chk { line-height: 1.35; }

/* ===================== program de plată ===================== */
.info-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: stretch; }
.info-row > div { flex: 1 1 420px; min-width: 0; }
.info-row > #programBox { flex: 0 1 380px; }
.info-row > div:empty { display: none; }
.info-row > div > .card { height: 100%; }
/* coloana zilelor = lățimea celei mai lungi zile → toate chenarele au aceeași mărime */
.zp-grid { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; align-items: center; }
.zp-grid:has(button) { grid-template-columns: max-content 1fr auto; }
.zp-zi { display: block; text-align: center; padding: 6px 12px; border: 1px solid var(--accent); border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.zp-zi.azi { background: var(--accent); color: #fff; }
.zp-ora { font-variant-numeric: tabular-nums; font-weight: 500; }
.zp-zi.trecut, .zp-ora.trecut { opacity: .45; }

.modal-box.wide { width: min(980px, 100%); }

/* Panou / Asociații: „Zile de plată” și „Citire apometre” pe același rând */
.anunt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.anunt-row > div:empty { display: none; }
.anunt-row > div > .card { height: 100%; }
/* editorul de zile (fereastra modală) */
#fZile { grid-template-columns: minmax(0,1.2fr) minmax(0,1.6fr) auto; }
#fZile.cu-bloc { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,1.6fr) auto; }
#fZile.zile-plata { grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr) minmax(0,.7fr) minmax(0,1.5fr) auto; }
#fZile.zile-plata.cu-bloc { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,.6fr) minmax(0,.6fr) minmax(0,1.3fr) auto; }
#zileEd input, #zileEd select, #zileEd .date-field { min-width: 0; width: 100%; }
@media (max-width: 700px) {
  #fZile, #fZile.cu-bloc, #fZile.zile-plata, #fZile.zile-plata.cu-bloc { grid-template-columns: 1fr 1fr; }
  #fZile > label:first-child, #fZile > label:has([name=nota]), #fZile > label:has([name=bloc]), #fZile > div { grid-column: 1 / -1; }
}
/* Ștergere ani: parola pe rândul următor, urmată de buton */
.an-parola { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.an-parola label { flex: 0 1 320px; }

/* Mesaj de întâmpinare (ecranul de autentificare) */
.mesaj-login { width: min(360px, 100%); margin-top: -12px; }
.mesaj-login-box { border: 2px solid; border-radius: 12px; padding: 12px 14px; line-height: 1.45; font-size: 14px; background: var(--surface); }
.mesaj-login-box.c-rosu { border-color: #d33a3a; background: color-mix(in srgb, #d33a3a 9%, var(--surface)); }
.mesaj-login-box.c-galben { border-color: #e0a800; background: color-mix(in srgb, #e0a800 12%, var(--surface)); }
.mesaj-login-box.c-albastru { border-color: #2b7fd1; background: color-mix(in srgb, #2b7fd1 9%, var(--surface)); }
.mesaj-login-box.c-verde { border-color: #2e9e5b; background: color-mix(in srgb, #2e9e5b 10%, var(--surface)); }
.mesaj-opt { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.buline { display: flex; gap: 10px; }
.bulina { cursor: pointer; display: inline-flex; }
.bulina input { position: absolute; opacity: 0; pointer-events: none; }
.bulina span { width: 26px; height: 26px; border-radius: 50%; display: block; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); transition: box-shadow .15s; }
.bulina.c-rosu span { background: #d33a3a; } .bulina.c-galben span { background: #e0a800; }
.bulina.c-albastru span { background: #2b7fd1; } .bulina.c-verde span { background: #2e9e5b; }
.bulina input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.bulina input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Panou Administrare → „Zona periculoasă” */
.seg button.pericol { color: var(--neg, #d33a3a); font-weight: 600; }
.seg button.pericol.active { background: color-mix(in srgb, #d33a3a 14%, var(--surface)); color: #d33a3a; }
/* Valoare facturi / baza de calcul */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.ch-grid h3 { margin: 0 0 6px; }
.ch-tab td { padding: 6px 10px; }
.ch-det { font-size: 12px; color: var(--muted, #6b7785); padding-left: 10px; }
.ch-campuri { display: grid; gap: 8px; }
.ch-campuri .lbl-al { display: grid; grid-template-columns: 1fr 140px; align-items: center; gap: 10px; }
.ch-campuri .lbl-al .lbl-t { min-height: 0; align-items: center; }
.ch-det-ed { display: grid; gap: 6px; }
.ch-det-rand { display: grid; grid-template-columns: 1fr 110px auto; gap: 6px; padding-left: 14px; }
.btn.ghost { background: transparent; }
.ch-campuri .lbl-t .muted { margin-left: 4px; }
.ch-det-rand input { font-size: 13px; padding: 6px 8px; }
.ch-campuri [data-adddet] { justify-self: start; margin-left: 14px; }
.col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Panou / Asociații: „Zile de plată” și „Citire apometre” — scris mai mare */
.program-card h2 { font-size: 20px; }
.program-card .zp-grid { gap: 10px 14px; }
.program-card .zp-zi { font-size: 16px; padding: 8px 16px; }
.program-card .zp-ora { font-size: 17px; }
.program-card .zp-ora .small { font-size: 13px; }
.program-card .zp-ora .pill { font-size: 12px; }
/* editor facturi / baza de calcul: rânduri reordonabile */
.ch-lista { display: grid; gap: 8px; margin-bottom: 10px; }
.ch-rand { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 6px; align-items: center; }
#chB .ch-rand:not(.ch-rand-det) { grid-template-columns: minmax(0, 1fr) 100px 92px auto; }
.ch-rand input { min-width: 0; width: 100%; font-size: 13px; padding: 6px 8px; }
.ch-rand-det { padding-left: 18px; }
.ch-rand-det [data-den] { font-size: 12px; }
.ch-ctl { display: inline-flex; gap: 4px; }
.ch-ctl .btn { padding: 4px 8px; min-width: 30px; }
.ch-grup { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.ch-detalii { display: grid; gap: 6px; }
.ch-add-det { justify-self: start; margin-left: 18px; }
@media (max-width: 640px) { .ch-rand, #chB .ch-rand:not(.ch-rand-det) { grid-template-columns: 1fr 1fr; } .ch-rand [data-den] { grid-column: 1 / -1; } }
#fCh .ch-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
#chB .ch-rand:not(.ch-rand-det) { grid-template-columns: minmax(0, 1fr) 78px 74px auto; }
.ch-rand { grid-template-columns: minmax(0, 1fr) 86px auto; }
.ch-ctl .btn { padding: 4px 6px; min-width: 26px; }
@media (max-width: 760px) { #fCh .ch-grid { grid-template-columns: 1fr; } }
#chB .ch-rand:not(.ch-rand-det) { grid-template-columns: minmax(0, 1fr) 72px 92px auto; }
/* Panou Administrare → Utilizatori: fiecare apartament pe rândul lui, fără suprapunerea etichetelor */
.u-ap { line-height: 1.5; padding: 3px 0; }
.u-ap + .u-ap { border-top: 1px dashed var(--border); }
.u-ap .pill { display: inline-block; margin: 1px 0 1px 4px; vertical-align: middle; }

/* Despre */
.despre { max-width: 720px; margin-left: auto; margin-right: auto; }
.despre-cap { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.despre-nume { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.despre-cap .drop { width: 40px; height: 54px; fill: var(--picatura); flex: none; }
.despre-cap h2 { font-size: 21px; margin: 0; line-height: 1.25; }
.despre-v { font-size: 15px; font-weight: 400; color: var(--muted, #6b7785); white-space: nowrap; }
.despre-text { line-height: 1.6; margin: 0 0 16px; text-align: justify; hyphens: auto; }
.despre-copy { text-align: center; color: var(--muted, #6b7785); margin: 0; font-size: 13px; }
/* Panou: „Citire apometre de către proprietari” — scris mai mare */
.citire-card h2 { font-size: 22px; }
.citire-card .zp-zi { font-size: 18px; padding: 9px 18px; }
.citire-card .zp-ora { font-size: 20px; }
.citire-card .zp-ora .small { font-size: 14px; }

/* ===================== Mesagerie ===================== */
:root { --rol-admin: #7c3aed; --rol-asoc: #c2410c; --rol-presedinte: #1d4ed8; --rol-cenzor: #a16207; }
:root[data-theme="dark"] { --rol-admin: #c4a5ff; --rol-asoc: #fb923c; --rol-presedinte: #7cb2ff; --rol-cenzor: #facc15; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rol-admin: #c4a5ff; --rol-asoc: #fb923c; --rol-presedinte: #7cb2ff; --rol-cenzor: #facc15; } }
.rol-admin { color: var(--rol-admin); font-weight: 700; } .rol-asoc { color: var(--rol-asoc); font-weight: 700; }
.rol-presedinte { color: var(--rol-presedinte); font-weight: 700; } .rol-cenzor { color: var(--rol-cenzor); font-weight: 700; }
.rol-proprietar { font-weight: 600; }
.rol-tag { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; border: 1px solid currentColor; }
.rol-bg-admin { color: var(--rol-admin); } .rol-bg-asoc { color: var(--rol-asoc); } .rol-bg-presedinte { color: var(--rol-presedinte); } .rol-bg-cenzor { color: var(--rol-cenzor); }
.msg-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.msg-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.msg-tabs { flex-wrap: wrap; }
.msg-tabs .tab-anunt { font-weight: 700; }
/* alegerea blocului (asociații cu mai multe blocuri): buton cu altă culoare care deschide lista blocurilor */
.msg-tabs button.tab-bloc-alege { background: color-mix(in srgb, #0d9488 14%, var(--surface)); color: #0f766e; font-weight: 600; }
.msg-tabs button.tab-bloc-alege:hover { background: color-mix(in srgb, #0d9488 24%, var(--surface)); }
[data-theme="dark"] .msg-tabs button.tab-bloc-alege { color: #5eead4; }
.msg-tabs .tab-bloc-alege .chev { font-size: 11px; margin-left: 2px; }
.msg-bloc-meniu { position: fixed; z-index: 60; padding: 4px; display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.msg-bloc-meniu[hidden] { display: none; }
.msg-bloc-meniu button { border: 0; background: none; text-align: left; padding: 7px 12px; border-radius: 6px; font: inherit; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; gap: 14px; }
.msg-bloc-meniu button:hover { background: var(--surface-2); }
.msg-bloc-meniu button.sel { color: #0f766e; font-weight: 600; background: color-mix(in srgb, #0d9488 10%, var(--surface)); }
.msg-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; }
.msg-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.msg-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.msg.al-meu { align-self: flex-end; background: var(--accent-soft); }
.msg-anunt, .msg-anunt.al-meu { max-width: 100%; align-self: stretch; background: var(--surface); border-left: 4px solid var(--rol-asoc); }
.msg-cap { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.msg-act { margin-left: auto; display: inline-flex; gap: 4px; }
.msg-act .lnk { background: none; border: 0; cursor: pointer; padding: 0 2px; opacity: .65; font-size: 14px; color: inherit; }
.msg-act .lnk:hover { opacity: 1; }
.msg-text { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.msg-gol { margin: auto; }
.msg-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.msg-form textarea { flex: 1; resize: none; min-height: 44px; }
.msg-nota { margin: 0; padding: 0 12px 8px; }
.msg-membri { overflow-y: auto; min-height: 0; }
.msg-membri h3 { margin: 0 0 8px; }
.msg-membri ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.msg-membri li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 30%, transparent); }
.dot.off { background: #9aa3ad; }
.msg-membri-btn { display: none; }
@media (max-width: 820px) {
  .msg-body { grid-template-columns: 1fr; }
  .msg-membri { display: none; position: fixed; right: 12px; top: 120px; bottom: 16px; width: min(300px, calc(100vw - 24px)); z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .msg-membri.deschis { display: block; }
  .msg-membri-btn { display: inline-flex; }
  .msg { max-width: 92%; }
}
@media (max-width: 820px) {
  .msg-top { flex-wrap: nowrap; overflow: hidden; }
  .msg-top select { max-width: 40vw; }
  .msg-tabs { flex-wrap: nowrap; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: thin; }
  .msg-tabs button { white-space: nowrap; flex: none; }
}
/* Mesagerie: anunțuri (chenar galben pe meniu, icon care pulsează), legendă */
#tabs button.are-anunturi { box-shadow: inset 0 -3px 0 #eab308; }   /* linie galbenă sub „Mesagerie”: anunțuri necitite */
#msgTabs button.pulseaza .ic-anunt { display: inline-block; animation: pulsAnunt 1.1s ease-in-out infinite; }
@keyframes pulsAnunt { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.35); filter: drop-shadow(0 0 4px #eab308); } }
.msg-membri { display: flex; flex-direction: column; }
.msg-lista-membri { flex: 1; overflow-y: auto; min-height: 0; }
.msg-legenda { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 4px; font-size: 13px; }
.leg-pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bg-admin { background: var(--rol-admin); } .bg-asoc { background: var(--rol-asoc); } .bg-presedinte { background: var(--rol-presedinte); }
.bg-cenzor { background: var(--rol-cenzor); } .bg-proprietar { background: var(--text); }
.msg-legenda .dot { display: inline-block; vertical-align: -1px; }
@media (max-width: 820px) { .msg-membri.deschis { display: flex; } }
@media (prefers-reduced-motion: reduce) { #msgTabs button.pulseaza .ic-anunt { animation: none; } }
.msg-lista-membri { align-content: start; }
/* legenda Mesageriei se poate ascunde (săgeata din dreapta) */
.leg-cap { display: flex; align-items: center; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.leg-sageata { margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted, #6b7785); border-bottom: 2px solid var(--muted, #6b7785);
  transform: rotate(45deg); transition: transform .15s; margin-right: 4px; margin-top: -4px; }
.msg-legenda.ascunsa .leg-sageata { transform: rotate(-135deg); margin-top: 4px; }
.msg-legenda.ascunsa > :not(.leg-cap) { display: none; }
/* previzualizarea fișierelor încărcate („ca poză”) */
.previz-pagini { display: grid; gap: 10px; }
.previz-pagini img { width: 100%; height: auto; background: #fff; border: 1px solid var(--border); border-radius: 6px; cursor: zoom-in; display: block; }
.photo-box.zoom .previz-pagini img { width: 180%; max-width: none; cursor: zoom-out; }
.previz-html { font-size: 12px; } .previz-html p { margin: 2px 0; }
.previz-html table td { padding: 2px 6px; white-space: nowrap; }
.thumb-doc { object-fit: cover; object-position: top; background: #fff; width: 40px; height: 30px; }

/* ---------- poze de profil generate, profil, mențiuni, iconuri intrare / ieșire ---------- */
.avatar { border-radius: 50%; flex: none; display: inline-block; vertical-align: middle; box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 12%, transparent); }
.avatar-hdr { margin-right: 4px; }
.avatar-msg { margin-right: 6px; vertical-align: -5px; }
.ico-btn { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; margin-right: 6px; flex: none; }
.omulet { width: 14px; height: 14px; flex: none; }
.omulet.on { fill: #22c55e; }
.omulet.off { fill: #9aa3ad; }
.msg-legenda .omulet { display: inline-block; vertical-align: -2px; }
.msg-lista-membri li { cursor: pointer; gap: 7px; border-radius: 6px; }
.msg-lista-membri li:hover, .msg-lista-membri li:focus-visible { background: var(--surface-2); outline: none; }
.mentiune { color: var(--accent); font-weight: 600; }
.mentiune.mie { background: color-mix(in srgb, #eab308 25%, transparent); color: inherit; border-radius: 4px; padding: 0 3px; }
.profil-card { position: fixed; z-index: 80; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.22); pointer-events: none; }
.profil-card[hidden] { display: none; }
.profil-card .pc-cap { display: flex; gap: 12px; align-items: center; }
.profil-card .pc-rol { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 3px; }
.profil-card .dot { display: inline-block; vertical-align: -1px; }
.profil-cap { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.profil-cap .profil-info { flex: 1; min-width: 180px; }
.profil-id code { font-size: 11px; }
.indicator-opt { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.indicator-opt .ind-prev { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }

.stare-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.user-menu button .ico-btn, [data-act] .ico-btn { width: 16px; height: 16px; }
.u-act { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; width: 150px; margin-left: auto; }
.u-act .btn { flex: 1 1 auto; justify-content: center; }
.tabel-grupe tr.grup td { background: var(--surface-2); font-weight: 600; padding-top: 10px; border-top: 2px solid var(--border-strong); }
.tabel-grupe td.n { width: 48px; }

.avatar.offline { filter: grayscale(1); opacity: .55; }
.profil-card .pc-vazut { margin: 2px 0 0 16px; }
table.tabel-fix { table-layout: fixed; }
td.c-data { text-align: center !important; white-space: nowrap; }

/* link cu icon: sublinierea doar sub text */
a.lnk-ico { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; }
a.lnk-ico span { text-decoration: underline; text-underline-offset: 3px; }
a.lnk-ico:hover span { text-decoration-thickness: 2px; }
.ico-utiliz { width: 20px; height: 20px; fill: currentColor; flex: none; }
/* mesagerie: emoticoane + stil text */
.msg-unelte { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.unealta { width: 34px; height: 30px; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; cursor: pointer; font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text); padding: 0;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.unealta:hover { background: var(--surface-2); border-color: var(--border-strong); }
.unealta-t span { width: 21px; height: 21px; border: 2px solid currentColor; border-radius: 50%; font: 800 13px/17px Georgia, "Times New Roman", serif; text-align: center; }
.msg-pop { position: fixed; z-index: 70; padding: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.msg-pop[hidden] { display: none; }
#popEmoji { display: grid; grid-template-columns: repeat(8, 34px); gap: 2px; }
#popEmoji[hidden] { display: none; }
#popEmoji button { border: 0; background: none; font-size: 21px; width: 34px; height: 34px; border-radius: 6px; cursor: pointer;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
#popEmoji button:hover { background: var(--surface-2); transform: scale(1.15); }
.msg-pop-stil { display: flex; flex-direction: column; gap: 2px; width: 160px; }
.msg-pop-stil[hidden] { display: none; }
.msg-pop-stil button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--text); }
.msg-pop-stil button:hover { background: var(--surface-2); }
.msg-pop-stil p { margin: 4px 8px 2px; }

/* bara de derulare verticală are loc rezervat: conținutul nu se mai mută la apariția / dispariția ei */
html { scrollbar-gutter: stable; }
.modal-body, .msg-list, .msg-lista-membri { scrollbar-gutter: stable; }

/* drepturi pe grupuri (Editează utilizator) */
.rol-rapid { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 12px; }
.rol-btn.activ { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
[data-theme="dark"] .rol-btn.activ { color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.dr-grupuri { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 10px; align-items: start; }
.dr-col { display: flex; flex-direction: column; gap: 10px; }
.dr-grup { border: 1px solid var(--border); border-left: 4px solid var(--text); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.dr-grup h4 { margin: 0; font-size: 14px; display: flex; align-items: center; }
.dr-grup p { margin: 0 0 4px; }
.dr-grup label.chk { font-size: 13px; line-height: 1.35; }
.dr-grup.dr-presedinte { border-left-color: var(--rol-presedinte); }
.dr-grup.dr-asoc { border-left-color: var(--rol-asoc); }
.dr-grup.dr-cenzor { border-left-color: var(--rol-cenzor); }
.dr-grup.dr-admin { border-left-color: var(--rol-admin); }
.lista-stare { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 4px; }
.lista-stare li { padding-left: 14px; position: relative; }
.lista-stare li::before { content: '·'; position: absolute; left: 3px; color: var(--muted); font-weight: 700; }

.form-grid.u-lat { grid-template-columns: 1fr 1.25fr; }
@media (max-width: 640px) { .form-grid.u-lat { grid-template-columns: 1fr; } }
/* Mesagerie: canalul selectat subliniat (culoarea aplicației; galbenul rămâne pentru anunțuri necitite) */
#msgTabs button.active { box-shadow: inset 0 -3px 0 var(--accent); }

/* contacte (Telegram / WhatsApp) */
.ico-ct { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; flex: none; }
.form-contacte h3 { margin: 0 0 6px; }
.contact-rand { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-bottom: 8px; }
.contact-rand label.chk { padding-bottom: 9px; white-space: nowrap; }
.profil-card.interactiv { pointer-events: auto; }
.pc-contacte { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.pc-contacte a { display: inline-flex; align-items: center; font-size: 13px; text-decoration: none; color: var(--text); }
.pc-contacte a:hover { color: var(--accent); text-decoration: underline; }
.sect-sep { border-top: 1px dashed var(--border-strong); margin-top: 18px; padding-top: 14px; }
.sect-sep h2 { margin: 0; }
#afisNume { display: flex; flex-direction: column; width: 100%; }
#afisNume button { text-align: left; border-left: 0; }
#afisNume button + button { border-top: 1px solid var(--border); }

/* culoarea aplicației (Setări → Temă → Culoare): luminos / întunecat */
.acc-pt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
:root[data-accent="galben"] { --accent: #a16207; --accent-strong: #854d0e; --accent-soft: #fef3c7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="galben"] { --accent: #facc15; --accent-strong: #fde047; --accent-soft: #3a300a; } }
:root[data-theme="dark"][data-accent="galben"] { --accent: #facc15; --accent-strong: #fde047; --accent-soft: #3a300a; }
:root[data-accent="portocaliu"] { --accent: #c2410c; --accent-strong: #9a3412; --accent-soft: #ffedd5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="portocaliu"] { --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #3b2112; } }
:root[data-theme="dark"][data-accent="portocaliu"] { --accent: #fb923c; --accent-strong: #fdba74; --accent-soft: #3b2112; }
:root[data-accent="rosu"] { --accent: #b4534f; --accent-strong: #8f3e3b; --accent-soft: #fbe6e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="rosu"] { --accent: #f09a96; --accent-strong: #f6b9b6; --accent-soft: #3a2020; } }
:root[data-theme="dark"][data-accent="rosu"] { --accent: #f09a96; --accent-strong: #f6b9b6; --accent-soft: #3a2020; }
#accentSeg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
#accentSeg button { text-align: left; }

/* conversații cu mesaje necitite */
#msgTabs button.necitit, #msgBlocMeniu button.necitit { font-weight: 700; }
.nr-necitite { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
:root[data-theme="dark"] .nr-necitite { color: #06202b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nr-necitite { color: #06202b; } }
:root[data-accent="verde"] { --accent: #15803d; --accent-strong: #166534; --accent-soft: #dcfce7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="verde"] { --accent: #4ade80; --accent-strong: #86efac; --accent-soft: #12301d; } }
:root[data-theme="dark"][data-accent="verde"] { --accent: #4ade80; --accent-strong: #86efac; --accent-soft: #12301d; }
:root[data-accent="violet"] { --accent: #7c3aed; --accent-strong: #6d28d9; --accent-soft: #ede9fe; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="violet"] { --accent: #a78bfa; --accent-strong: #c4b5fd; --accent-soft: #2a2145; } }
:root[data-theme="dark"][data-accent="violet"] { --accent: #a78bfa; --accent-strong: #c4b5fd; --accent-soft: #2a2145; }
#accentSeg { grid-template-columns: 1fr 1fr 1fr; }

/* picătura din logo rămâne albastră, oricare ar fi culoarea aleasă */
:root { --picatura: #0f7fa6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --picatura: #3fb3dc; } }
:root[data-theme="dark"] { --picatura: #3fb3dc; }
.contact-email { display: block; margin-bottom: 8px; }
.contact-email input { width: 100%; }

/* Utilizatori: căutare în centru */
.u-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.u-cauta { flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px; min-width: 220px; }
.u-cauta input { width: min(420px, 100%); }
/* Setări → Mesagerie: indicator + sunete */
.seg-vert { display: flex; flex-direction: column; width: 100%; }
.seg-vert button { text-align: left; display: flex; align-items: center; gap: 8px; }
.seg-vert button + button { border-top: 1px solid var(--border); }
.seg-vert .ind-prev { display: inline-flex; gap: 4px; align-items: center; min-width: 40px; margin: 0; }
.sunete { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sunet-rand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sunet-rand > span:first-child { min-width: 70px; }
.ico-inline { width: 14px; height: 14px; vertical-align: -2px; margin: 0 2px; }
.msg-sunet .ico-btn { margin: 0; }
.msg-sunet.oprit { color: var(--muted); }

.gol-citiri { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 0; padding: 9px 12px; border: 1px dashed var(--warn, #d97706);
  border-radius: 8px; background: color-mix(in srgb, #f59e0b 10%, transparent); font-size: 14px; }
#fImp input.n { width: 100px; text-align: right; }
/* Setări → Mesagerie: aliniere iconuri de stare și butoane ▶ */
.seg-vert .ind-prev { width: 42px; min-width: 42px; justify-content: center; }
.sunete { display: grid; grid-template-columns: auto auto auto; justify-content: start; align-items: center; column-gap: 12px; row-gap: 8px; }
.sunete .sunet-rand { display: contents; }
.sunete .sunet-rand > span:first-child { min-width: 0; }
.sunete > p { grid-column: 1 / -1; }
.sunete .sunet-rand > .muted { padding-left: 2px; }
.sunete .sunet-rand > * { justify-self: start; }
/* Împarte consumul: fiecare coloană centrată sub capul ei (prima coloană la stânga) */
.tabel-imp th, .tabel-imp td { text-align: center !important; }
.tabel-imp th:first-child, .tabel-imp td:first-child { text-align: left !important; }
.tabel-imp input.n { margin: 0 auto; display: block; }
.gol-citiri.info-montaj { border-color: var(--accent); background: var(--accent-soft); }
.gol-citiri select { width: auto; }

/* Citiri: lacătul la dreapta în celula lunii; ⚠ la lunile fără citire */
td.c-luna { position: relative; }
td.c-luna .lacat { float: right; margin-left: 6px; }
.lipsa-luna { color: #d97706; font-size: 13px; cursor: help; }
td.c-luna .lipsa-luna { float: right; margin-left: 6px; }
.date-mele-rand { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.date-mele-rand label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.date-mele-rand select { width: auto; }
/* setări numerice: casetele de pe același rând aliniate, oricâte rânduri ar avea eticheta (subgrid) */
.form-grid > label.lbl-al { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 4px; align-content: start; }
.form-grid > label.lbl-al > .lbl-t { min-height: 0; align-self: end; }
.form-grid > label.lbl-al > input { align-self: start; }
/* picătura din bara de meniu: cât butoanele */
.brand .drop { height: 36px; width: 27px; }
.opt-msg { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.opt-msg label.chk { align-items: flex-start; }
.opt-msg label.chk input { margin-top: 3px; }

/* buton de salvare cu modificări nesalvate */
button.nesalvat { border-color: var(--bad) !important; box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); animation: pulsNesalvat 1.8s ease-in-out infinite; }
@keyframes pulsNesalvat { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 50%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent); } }
@media (prefers-reduced-motion: reduce) { button.nesalvat { animation: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 35%, transparent); } }

/* mesaje fixate */
.msg-fixate { border-bottom: 1px solid var(--border); padding: 8px 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; max-height: 40%; overflow-y: auto; }
.msg-fixate .fx-cap { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.msg-fixate .fx-cap .lnk { margin-left: auto; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; }
.fx-rand { display: flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; border-radius: 6px; padding: 2px 4px; min-width: 0; }
.fx-rand.ascuns { display: none; }
.fx-rand:hover, .fx-rand:focus-visible { background: var(--accent-soft); outline: none; }
.fx-rand > .rol-admin, .fx-rand > [class^="rol-"] { font-weight: 600; flex: none; }
.fx-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.fx-scoate { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0 4px; flex: none; }
.fx-scoate:hover { color: var(--bad); }
.msg.fixat { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.pin-semn { font-size: 12px; }
.msg-act .lnk[data-fix] { filter: grayscale(1); }
.msg-act .lnk[data-fix].activ { filter: none; opacity: 1; }
.msg.evidentiat { animation: evidMsg 1.6s ease-out; }
@keyframes evidMsg { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* descrierea încărcării listei de plată */
.up-info { margin-top: 10px; }
.up-info summary { cursor: pointer; font-size: 13px; color: var(--accent); width: fit-content; }
.up-info ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 3px; }


/* săgeata de după @mențiune: îngroșată, în culoarea de accent, „împunge” ușor spre nume */
.sageata-mentiune { display: inline-block; margin-left: 2px; font-weight: 800; line-height: 1; color: var(--accent); animation: sageataMent 1.6s ease-in-out infinite; }
@keyframes sageataMent { 0%, 100% { transform: translateX(1px); } 50% { transform: translateX(-3px); } }
@media (prefers-reduced-motion: reduce) { .sageata-mentiune { animation: none; } }

/* Despre → README */
.despre-link { text-align: center; margin: 0 0 12px; }
.readme-bara { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.readme { line-height: 1.6; font-size: 14px; }
.readme h2 { font-size: 21px; margin: 0 0 10px; }
.readme h3 { font-size: 17px; margin: 22px 0 8px; padding-top: 10px; border-top: 1px solid var(--border); scroll-margin-top: 8px; }
.readme h4 { font-size: 15px; margin: 16px 0 6px; scroll-margin-top: 8px; }
.readme p { margin: 0 0 10px; text-align: justify; }
.readme ul, .readme ol { margin: 0 0 10px; padding-left: 22px; }
.readme li { margin: 2px 0; }
.readme code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.readme pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 0 0 12px; }
.readme pre code { background: none; border: 0; padding: 0; white-space: pre; }
.readme blockquote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.readme table { margin: 0 0 12px; font-size: 13px; }
.readme-cuprins { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 13px; padding: 8px 10px; margin-bottom: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; }
.readme-cuprins a { color: var(--accent); text-decoration: none; padding: 1px 6px; border-radius: 5px; }
.readme-cuprins a:hover { background: var(--accent-soft); }

/* moderator mesagerie: un pătrat mic, plin, în colțul din stânga-jos (spre chat); colțul lui din dreapta-sus atinge cercul pozei
   (latura = r − r·cos45° + 3px ieșire în afara pozei), deci nu intră peste poză */
.av-mod { --av: 22px; --o: 3px; position: relative; display: inline-flex; flex: none; vertical-align: middle; }
.av-mod.s16 { --av: 16px; }
.av-mod::after { content: ""; position: absolute; left: calc(-1 * var(--o)); bottom: calc(-1 * var(--o));
  width: calc(var(--av) / 2 * 0.2929 + var(--o)); aspect-ratio: 1;
  pointer-events: none; background: #06b6d4; border-radius: 1px; }
:root[data-theme="dark"] .av-mod::after { background: #22d3ee; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-mod::after { background: #22d3ee; } }

/* Administrare → Backup */
.bk-acum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-prog { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.nowrap { white-space: nowrap; }
/* restaurare backup */
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nota-galben, .nota-rosu { border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.5; margin: 8px 0; }
.nota-galben { background: var(--warn-soft); border: 1px solid var(--warn); }
.nota-rosu { background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid var(--bad); color: var(--bad); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.08); }
.btn.danger-solid:disabled { opacity: .55; cursor: not-allowed; filter: none; }

table.data td.bk-nume { white-space: normal; word-break: break-all; min-width: 160px; max-width: 280px; }
table.data td.bk-cont { white-space: normal; min-width: 200px; }
.bk-act { display: flex; gap: 4px; justify-content: flex-end; }
.bk-act .btn { min-width: 34px; justify-content: center; }
.msg-legenda .av-mod { margin: 0 4px 3px 3px; }
/* fără omuleț / bulină poza e prima în rând: loc pentru pătratul de moderator, ca să nu fie tăiat de marginea listei */
.msg-lista-membri li > .av-mod:first-child { margin-left: var(--o); }

/* acord GDPR în Contul meu */
.gdpr-chk { font-size: 13px; gap: 6px; margin-left: auto; }
.gdpr-chk a { font-weight: 700; color: var(--accent); }
.blocat-gdpr { opacity: .55; }
#gdprNota { margin: 6px 0 10px; }
/* telefon: Setări fără depășire pe orizontală */
.grid > .card { min-width: 0; }
@media (max-width: 560px) {
  #fCont { grid-template-columns: 1fr !important; }
  #accentSeg { grid-template-columns: 1fr 1fr; }
  .card-head .gdpr-chk { margin-left: 0; flex-basis: 100%; }
  .contact-rand { grid-template-columns: 1fr !important; }
  .contact-rand .chk { justify-self: start; }
}

.mono-ta { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.5; width: 100%; resize: vertical; }
.despre-link .btn { margin: 2px 3px; }
.gdpr-chk { max-width: 62%; line-height: 1.35; }
.gdpr-chk > span { white-space: normal; }
@media (max-width: 560px) { .gdpr-chk { max-width: none; } }
.card-head .spacer { flex: 1; }

.gdpr-gen { margin-top: 12px; padding-top: 12px; }
.gdpr-gen .chk { align-items: flex-start; font-size: 13px; line-height: 1.45; }
.gdpr-gen .chk input { margin-top: 2px; }

/* Panou → Cine are acces */
.lnk-acces { margin-left: 14px; white-space: nowrap; align-self: center; }
.acces-gr { font-size: 14px; margin: 14px 0 6px; color: var(--muted); }
.acces-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acces-rand { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.acces-drepturi { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }

.acces-info { flex: 1; min-width: 0; }
.acces-rand > .btn, .acces-rand .del-btns { align-self: center; flex: none; }
.del-btns { display: flex; gap: 6px; }
.del-opt { cursor: pointer; display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px !important; font-size: 14px; color: var(--text); }
.del-opt input { margin: 0; }
.del-cand { max-height: 320px; overflow-y: auto; }

.ico-scut { width: 20px; height: 20px; vertical-align: middle; fill: #9aa3ad; opacity: .55; }
.ico-scut.ok { fill: #16a34a; opacity: 1; }
td.c, th.c { text-align: center; }

.demo-opt { margin-top: 8px; display: grid; gap: 6px; }
.demo-opt select { max-width: 100%; }

/* cont demo: mesajele nu se văd în clar */
.msg-demo .msg-text, .msg-fixate .fx-text { }
.msg-demo .msg-text { filter: blur(4px); user-select: none; pointer-events: none; }
.msg-demo ~ * .fx-text, .msg-fixate:has(+ .msg-demo) .fx-text { filter: blur(3px); user-select: none; }
#demoCeas.bad { background: var(--bad-soft); color: var(--bad); }
.user-btn:has(#demoCeas) { max-width: 240px; }
#demoCeas { font-variant-numeric: tabular-nums; }

/* Editează utilizator: asociațiile administrate */
.asoc-carduri { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; }
.asoc-card { display: flex !important; flex-direction: row !important; align-items: flex-start !important; gap: 10px !important; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text); }
.asoc-card input { margin-top: 3px; }
.asoc-card > span:nth-of-type(1) { flex: 1; }
.asoc-card.activ { border-color: var(--accent); background: var(--accent-soft); }
.asoc-auto { align-self: center; }
.asoc-card:has(input:disabled) { cursor: default; }

/* contul demo în Mesagerie */
.rol-demo { color: #0d9488; font-weight: 600; }
.bg-demo { background: #0d9488; }
:root[data-theme="dark"] .rol-demo { color: #2dd4bf; } :root[data-theme="dark"] .bg-demo { background: #2dd4bf; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rol-demo { color: #2dd4bf; } :root:not([data-theme="light"]) .bg-demo { background: #2dd4bf; } }

/* Panou: apartament primit prin delegare */
.pill-delegat { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 45%, transparent); white-space: nowrap; align-self: center; }
.pill-delegat svg { width: 16px; height: 16px; }
:root[data-theme="dark"] .pill-delegat { color: #fbbf24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-delegat { color: #fbbf24; } }

/* Citiri → butonul Apometre, în culoarea rândului de index inițial */
.btn.btn-apometre { background: var(--row-start); border-color: color-mix(in srgb, var(--warn) 40%, var(--border)); color: var(--text); font-weight: 600; }
.btn.btn-apometre:hover { border-color: var(--warn); filter: brightness(.98); }
.btn.btn-apometre { margin-left: auto; }
#mNou { margin-left: auto; }

/* Contacte pe 2 coloane, cu bifa în dreapta pe rândul tipului */
.contacte-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-bottom: 4px; }
.contacte-col { display: flex; flex-direction: column; gap: 10px; }
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-cap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.contact-cap > span { display: inline-flex; align-items: center; gap: 6px; }
.contact-cap .chk { margin-left: auto; font-size: 12px; white-space: nowrap; color: var(--muted); }
.contact-item input:not([type=checkbox]) { width: 100%; }
@media (max-width: 700px) { .contacte-grid { grid-template-columns: 1fr; } .contacte-col + .contacte-col { margin-top: 10px; } }
/* pătratul de moderator: gri când utilizatorul este offline (ca poza) */
.av-mod:has(.avatar.offline)::after { background: #9aa3ad; }

.tine-minte { font-size: 13px; margin: 2px 0 4px; }
.tm-rand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.tm-rand input { margin: 0 4px; }

.msg-form.demo-dezactivat { opacity: .6; }
.msg-form.demo-dezactivat textarea, .msg-form.demo-dezactivat button { cursor: not-allowed; }
/* Setări → indicator de stare: bulinele puțin mai depărtate */
.seg-vert .ind-prev .dot + .dot { margin-left: 6px; }
.seg-vert .ind-prev { gap: 7px; }
.cale2-rand { display: flex; gap: 6px; margin-top: 4px; } .cale2-rand input { flex: 1; min-width: 0; }

/* ---------- Email: „Am uitat parola”, configurare server, notificări ---------- */
.uitat-rand { margin: 6px 0 0; text-align: center; font-size: 13.5px; }
.ok-msg { color: var(--ok); font-size: 13.5px; margin: 10px 0 0; line-height: 1.45; }
#uitatForm .btn, #resetForm .btn { width: 100%; margin-top: 8px; }
.em-furn { flex-wrap: wrap; margin-bottom: 10px; }
.em-nota { margin: 0 0 12px; line-height: 1.45; }
.em-grid { grid-template-columns: 1fr 110px 150px; }
.em-grid .em-host { grid-column: 1; }
.em-grid .em-lat { grid-column: span 3; }
@media (min-width: 1100px) { .em-grid .em-lat { grid-column: span 3; } }
.em-act { margin-top: 12px; }
.email-adm .chk { margin: 3px 0; }
.em-test { display: flex; gap: 8px; }
.em-test input { flex: 1; min-width: 0; }
.em-coada td { vertical-align: top; }
.notif-email .chk { margin: 3px 0; }
@media (max-width: 640px) { .em-grid { grid-template-columns: 1fr 1fr; } .em-grid .em-host, .em-grid .em-lat { grid-column: 1 / -1; } }
.em-coada-act { display: flex; gap: 8px; margin: 0 0 8px; }
.em-coada td:last-child { white-space: nowrap; }
.em-coada td:first-child { white-space: normal; overflow-wrap: anywhere; }
.em-coada { width: 100%; table-layout: auto; }
#uitatErr:empty, #resetErr:empty { display: none; }
.notif-u-wrap { position: relative; display: inline-block; margin-left: 6px; }
.notif-u-wrap .btn.sm { padding: 2px 8px; font-size: 12px; }
.notif-pop { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: min(380px, 86vw); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 12px 14px; font-weight: 400; color: var(--text); text-align: left; white-space: normal; }
.notif-pop .chk { margin: 3px 0; }
.email-cel { position: relative; }
.email-cel .notif-u-wrap { position: absolute; top: -3px; right: 0; margin: 0; }

/* ---------- telefon: ferestrele (modal) nu mai depășesc ecranul; participanții din Mesagerie apar doar la apăsarea 👥 ---------- */
.modal { grid-template-columns: minmax(0, 1fr); }
.modal-box { min-width: 0; justify-self: center; max-height: calc(100dvh - 32px); }
.modal-head { gap: 10px; }
.modal-head > :first-child { min-width: 0; overflow-wrap: anywhere; }
.modal-body { min-width: 0; overflow-x: auto; }
@media (max-width: 560px) {
  .modal { padding: 8px; }
  .modal-box { max-height: calc(100dvh - 16px); }
  .modal-head { padding: 10px 12px; }
  .modal-head h2, .modal-head h3, #modalTitle { font-size: 16px; }
  .modal-body { padding: 12px; }
}
@media (max-width: 820px) { .msg-membri:not(.deschis) { display: none; } }
.cit-cap { grid-template-columns: 1fr 1fr 1.3fr; }
@media (max-width: 560px) { .cit-cap { grid-template-columns: 1fr 1fr; } .cit-cap > label:last-child { grid-column: 1 / -1; } }
.ch-tab td:first-child { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .modal-body table.data td { white-space: normal; }
  .ch-tab td { padding: 6px 6px; }
}
@media (max-width: 380px) {
  .top-actions { gap: 6px; }
  .ceas { font-size: 11px; }
  .user-btn { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 1000px) { .import-layout { grid-template-columns: minmax(0, 1fr); } .import-layout > * { min-width: 0; } .photo-box { position: static; } }
@media (max-width: 560px) { .info-row > * { min-width: 0; max-width: 100%; } .program-card .zp-zi { padding: 6px 10px; } }
@media (max-width: 560px) { .info-row > #programBox, .info-row > #citireBox { flex: 1 1 100%; } .program-card .zp-grid { min-width: 0; } .program-card * { min-width: 0; } }
fieldset { min-width: 0; }
select { max-width: 100%; }
@media (max-width: 560px) { .inline-lbl { flex-wrap: wrap; } .inline-lbl select { min-width: 0; flex: 1 1 150px; } #fBloc { grid-template-columns: 1fr !important; } }
@media (max-width: 560px) { .inline-lbl { max-width: 100%; min-width: 0; } .toolbar { flex-wrap: wrap; } .inline-lbl select { width: 100%; } .form-grid > * { min-width: 0; } }
.form-grid > * { min-width: 0; } .date-field { max-width: 100%; } .date-field input { min-width: 0; }
