/* Power Play Manager — identitate vizuală: verde + alb + gri discret */
:root {
  --sidebar: #0B3D2E;
  --sidebar-hover: #124F3C;
  --sidebar-active: #1A6B4F;
  --accent-line: #7BE0AE;
  --primary: #1E8E5A;
  --primary-hover: #177249;
  --light: #EAF6EF;
  --white: #FFFFFF;
  --bg: #F5F8F6;
  --text: #1F2A24;
  --muted: #6B7A72;
  --border: #D9E8DE;
  --danger: #C0392B;
  --danger-light: #FBEAE8;
  --warn: #B7791F;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 61, 46, .06), 0 4px 16px rgba(11, 61, 46, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(160deg, var(--sidebar) 0%, var(--sidebar-hover) 55%, var(--primary) 130%);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--white);
  border-radius: 14px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-logo img { width: 54px; height: 54px; object-fit: contain; }
.login-logo h1 { font-size: 20px; margin: 0; }
.login-logo p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100%; }
.sidebar {
  width: 236px; flex-shrink: 0;
  background: var(--sidebar);
  color: var(--side-text, #D6EFE1);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 16px; }
.brand-logo {
  width: 44px; height: 44px; background: transparent;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.brand-logo img { width: 44px; height: 44px; object-fit: contain; }
.brand-name { color: #fff; font-weight: 700; font-size: 15.5px; line-height: 1.15; }
.brand-sub { color: var(--side-muted, #9FD9BE); font-size: 11px; }

.nav { padding: 6px 0 16px; flex: 1; }
.nav-section { color: var(--side-muted2, #7FB39B); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 14px 18px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px;
  color: var(--side-text, #D6EFE1); text-decoration: none;
  border-left: 3px solid transparent;
  font-size: 13.5px;
}
.nav a:hover { background: var(--sidebar-hover); }
.nav a.active { background: var(--sidebar-active); color: #fff; font-weight: 600; border-left-color: var(--accent-line); }
.nav a.soon { color: var(--side-muted2, #88AE9C); cursor: default; }
.nav a.soon:hover { background: transparent; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.badge-soon { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.08); color: var(--side-muted, #9FD9BE); padding: 2px 7px; border-radius: 20px; }

.sidebar-user { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user .name { color: #fff; font-size: 13px; font-weight: 600; }
.sidebar-user .role { color: var(--side-muted, #9FD9BE); font-size: 11.5px; }
.sidebar-user a { color: var(--side-text, #D6EFE1); text-decoration: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: none;
  align-items: center; gap: 12px;
  background: var(--sidebar); color: #fff;
  padding: 10px 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .title { font-weight: 700; font-size: 15.5px; }
.icon-btn { background: transparent; border: none; color: inherit; padding: 6px; border-radius: 8px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.topbar .icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg { width: 22px; height: 22px; }

.content { padding: 26px 30px 40px; max-width: 1280px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 700; margin: 0; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }

/* ---------- Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 8px; padding: 9px 16px;
  font-weight: 600; font-size: 13.5px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  min-height: 40px;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--light); color: var(--text); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: 12.5px; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14.5px; }
.card-body { padding: 16px 18px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--primary); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--light); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat.muted .stat-value { color: var(--muted); font-size: 15px; font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search input { padding-left: 36px; }

.input, select.input, textarea.input {
  width: 100%;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; background: #fff;
  min-height: 40px; outline: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,142,90,.14); }
textarea.input { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field .req { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error { background: var(--danger-light); color: var(--danger); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }

/* Table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; background: var(--light); color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #FAFDFB; }
.table .actions { text-align: right; white-space: nowrap; }
.cell-main { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: var(--light); color: var(--primary); }
.pill.gray { background: #EEF1EF; color: var(--muted); }
.pill.red { background: var(--danger-light); color: var(--danger); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: #B9CFC2; margin-bottom: 8px; }
.empty p { margin: 4px 0 14px; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.activity li:first-child { border-top: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex-shrink: 0; }
.activity .when { color: var(--muted); font-size: 12px; }

.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px 20px; }
.detail-grid .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.detail-grid .v { margin-top: 2px; word-break: break-word; }

.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.roadmap .n { width: 22px; height: 22px; border-radius: 50%; background: var(--light); color: var(--primary); font-weight: 700; font-size: 11.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.roadmap li.done .n { background: var(--primary); color: #fff; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 30, 24, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; z-index: 100; overflow-y: auto;
}
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.small { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-body { padding: 18px 20px 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--sidebar); color: #fff;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 200;
  max-width: calc(100% - 32px);
}
.toast.error { background: var(--danger); }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.backdrop-nav { display: none; }

/* Mobile cards (tabel -> carduri) */
.m-list { display: none; }
.m-item { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 10px; color: inherit; text-decoration: none; }
.m-item .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.m-item .meta { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.m-item .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .app.nav-open .sidebar { transform: translateX(0); box-shadow: 10px 0 30px rgba(0,0,0,.2); }
  .card.list-card { background: transparent; border: 0; box-shadow: none; }
  .card.list-card .m-list { padding: 0 !important; }
  .app.nav-open .backdrop-nav { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
  .topbar { display: flex; }
  .content { padding: 16px 16px 90px; }
  .page-title { font-size: 19px; }
  .page-head { align-items: stretch; }
  .page-head .btn { width: 100%; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none !important; }
  .m-list { display: block; }
  .search { max-width: none; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 92vh; overflow-y: auto; }
  .modal-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding-top: 12px; }
  .modal-foot .btn { flex: 1; }
}
@media (max-width: 420px) {
  .stats { gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 22px; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ---------- Lucrări ---------- */
.muted { color: var(--muted); }
.overdue { color: var(--danger); font-weight: 600; }
.pill.amber { background: #FDF3E1; color: #9A6412; }
.pill.st-oferta { background: #EEF1EF; color: #56655D; }
.pill.st-programata { background: #E6F0FB; color: #2B64A8; }
.pill.st-in_lucru { background: #FDF3E1; color: #9A6412; }
.pill.st-verificare { background: #F1EAFB; color: #6B45A8; }
.pill.st-finalizata { background: var(--light); color: var(--primary); }
.stage-bar span.st-oferta { background: #A9B5AE; }
.stage-bar span.st-programata { background: #5B8FD0; }
.stage-bar span.st-in_lucru { background: #E0A43A; }
.stage-bar span.st-verificare { background: #9A77D0; }
.stage-bar span.st-finalizata { background: var(--primary); }

.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress { flex: 1; height: 10px; background: #E7EFEA; border-radius: 10px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #2FA56B, var(--primary)); border-radius: 10px; transition: width .3s ease; }
.progress-wrap .pct { font-weight: 700; font-size: 13px; min-width: 38px; text-align: right; }
.progress-wrap.small .progress { height: 7px; }
.progress-wrap.small .pct { font-size: 12px; font-weight: 600; color: var(--muted); }

.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-cols { align-items: start; grid-template-columns: 1fr 1fr; }
.detail-grid.two { grid-template-columns: 1fr 1fr; }

.stepper-card { padding: 14px 16px 10px; margin-bottom: 16px; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: 0; padding: 6px 2px; border-radius: 10px; cursor: pointer; position: relative;
}
.step:not(:disabled):hover { background: var(--light); }
.step:disabled { cursor: default; }
.step::before { content: ""; position: absolute; top: 20px; left: -50%; width: 100%; height: 3px; background: var(--border); z-index: 0; }
.step:first-child::before { display: none; }
.step.past::before, .step.current::before { background: var(--primary); }
.dot-n {
  position: relative; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.step.past .dot-n { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.current .dot-n { background: #fff; border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(30,142,90,.15); }
.step .lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; text-align: center; }
.step.current .lbl { color: var(--text); }
.stepper-hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: 4px; min-height: 16px; }

.tasks { list-style: none; margin: 14px 0 10px; padding: 0; }
.tasks li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); }
.tasks li:first-child { border-top: none; }
.tasks label { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; flex: 1; min-width: 0; }
.tasks input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--primary); flex-shrink: 0; margin: 0; cursor: pointer; }
.tasks .t-title { display: block; }
.tasks li.done .t-title { color: var(--muted); text-decoration: line-through; }
.icon-btn.small svg { width: 17px; height: 17px; }
.icon-btn.small { color: var(--muted); }
.add-task { display: flex; gap: 8px; }
.add-task .btn { padding: 9px 12px; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.photo {
  aspect-ratio: 1; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; padding: 0;
  background: var(--light); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .spinner { width: 18px; height: 18px; border-width: 2px; margin: 0; }

.lightbox { background: rgba(5, 15, 10, .92); padding: 0; align-items: stretch; }
.lb-inner { display: flex; flex-direction: column; width: 100%; height: 100%; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; }
.lb-cap { font-weight: 600; min-width: 0; }
.lb-img { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 12px 16px; min-height: 0; color: #fff; }
.lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }

.composer { margin-bottom: 14px; }
.composer textarea { min-height: 64px; }
.composer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { padding: 11px 0; border-top: 1px solid var(--border); }
.timeline > li.sys { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; padding: 8px 0; }
.timeline > li.sys .dot { background: #B9CFC2; margin-top: 5px; }
.timeline > li.q { background: #FFFBF3; border: 1px solid #F3DDB3; border-radius: 10px; padding: 11px 12px; margin: 8px 0; }
.timeline > li.q.resolved { background: #fff; border-color: var(--border); }
.n-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; }
.n-text { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.when { color: var(--muted); font-size: 12px; }
.answer { margin-top: 10px; padding: 9px 12px; background: var(--light); border-radius: 8px; border-left: 3px solid var(--primary); }
.n-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.quote { background: #FFFBF3; border-left: 3px solid #E0A43A; padding: 9px 12px; border-radius: 6px; margin-bottom: 14px; white-space: pre-wrap; }

.questions-card { margin-bottom: 16px; border-color: #F3DDB3; }
.questions-card .card-head { background: #FFFBF3; border-radius: var(--radius) var(--radius) 0 0; }
.dot.amber { background: #E0A43A; }
.q-link { text-decoration: none; color: var(--text); }
.q-link:hover { color: var(--primary); }
.stage-row { display: grid; grid-template-columns: 110px 1fr 28px; align-items: center; gap: 10px; padding: 6px 0; }
.stage-row b { text-align: right; }
.stage-bar { height: 8px; background: #EEF3F0; border-radius: 8px; overflow: hidden; }
.stage-bar span { display: block; height: 100%; border-radius: 8px; }

@media (max-width: 1100px) {
  .detail-cols { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .stepper { gap: 0; }
  .step .lbl { font-size: 11px; }
  .dot-n { width: 26px; height: 26px; font-size: 12px; }
  .step::before { top: 18px; }
  .detail-grid.two { grid-template-columns: 1fr 1fr; }
  .composer-actions .btn { flex: 1; }
  .tasks input[type=checkbox] { width: 24px; height: 24px; }
}

.w-compact .m-item { border: 0; border-top: 1px solid var(--border); border-radius: 0; margin: 0; padding: 13px 18px; }
.w-compact .m-item:first-child { border-top: 0; }
.w-compact .m-item:hover { background: #FAFDFB; }
.grid-2 { align-items: start; }

/* ---------- Echipă ---------- */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); margin: 1px 0 0; flex-shrink: 0; }
.check .cell-sub { display: block; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 14px;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; max-height: 180px; overflow-y: auto; }
.view-banner { background: #E6F0FB; color: #1F4E86; border-radius: var(--radius); padding: 11px 14px; margin-bottom: 14px; font-size: 13.5px; }
.ask-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-right: auto; }
.ask-group select { width: auto; min-width: 170px; }
.danger-text { color: var(--danger); }
.danger-text:hover { background: var(--danger-light); color: var(--danger); }
@media (max-width: 820px) {
  .ask-group { width: 100%; margin-right: 0; }
  .ask-group label { width: 100%; }
  .ask-group select { flex: 1; }
  .ask-group .btn { flex: 1; }
}
.field label.check { display: flex; color: var(--text); font-weight: 400; font-size: 14px; margin: 0; }
.field label.check .cell-sub { font-weight: 400; }

.logout-btn { color: var(--side-text, #D6EFE1); margin-left: auto; }
.logout-btn:hover { background: var(--sidebar-hover) !important; color: #fff; }
/* ---------- Calendar ---------- */
.dot.red { background: var(--danger); }
.cal-toolbar { align-items: center; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn { min-width: 40px; font-size: 15px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--primary); color: #fff; }
.seg button:not(.on):hover { background: var(--light); color: var(--text); }

.ev {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 0; border-left: 3px solid var(--primary); border-radius: 6px;
  background: var(--light); color: var(--text);
  padding: 4px 6px; margin: 0 0 4px; font-size: 12px; line-height: 1.3;
  overflow: hidden;
}
.ev:hover { filter: brightness(.96); }
.ev .ev-main { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.cal-month .ev .ev-main { display: block; white-space: nowrap; text-overflow: ellipsis; }
.ev .ev-sub { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-appointment { background: #E6F0FB; border-left-color: #2B64A8; }
.ev-deadline { background: #fff; border: 1px dashed #E3A59E; border-left: 3px solid var(--danger); color: var(--danger); }
.ev.urgent { border-left-color: var(--danger); }
.ev.done { opacity: .55; }
.ev.done .ev-main { text-decoration: line-through; }
.ev-who { float: right; margin-left: 4px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 5px; }

.cal-week-wrap { overflow-x: auto; }
.cal-week { display: grid; min-width: 980px; }
.cw-head { padding: 9px 8px; background: var(--light); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; border-bottom: 1px solid var(--border); }
.cw-head b { color: var(--text); font-size: 14px; }
.cw-head.today { background: var(--primary); color: var(--side-text, #D6EFE1); }
.cw-head.today b { color: #fff; }
.cw-corner { position: sticky; left: 0; z-index: 2; }
.cw-person {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-top: 1px solid var(--border); font-weight: 600; font-size: 13px;
  position: sticky; left: 0; background: #fff; z-index: 1;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.cw-cell { border-top: 1px solid var(--border); border-left: 1px solid var(--border); padding: 5px; min-height: 64px; }
.cw-cell.weekend { background: #FAFBFA; }
.cw-cell.today { background: #F3FBF6; }
.cw-cell.addable { cursor: copy; }
.cw-cell.addable:hover { box-shadow: inset 0 0 0 2px rgba(30,142,90,.25); }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; }
.cm-head { padding: 8px; background: var(--light); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.cm-cell { border-top: 1px solid var(--border); border-left: 1px solid var(--border); min-height: 104px; padding: 4px 5px; cursor: pointer; min-width: 0; }
.cm-cell:nth-child(7n+8) { border-left: 0; }
.cm-cell:hover { background: #FAFDFB; }
.cm-cell.other { background: #FAFBFA; }
.cm-cell.other .cm-num { color: #B5C2BB; }
.cm-cell.weekend:not(.other) { background: #FCFDFC; }
.cm-num { font-weight: 700; font-size: 12.5px; margin: 2px 2px 4px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cm-cell.today .cm-num { background: var(--primary); color: #fff; }
.cm-more { color: var(--primary); font-size: 11.5px; font-weight: 600; padding: 0 4px; }

.cal-agenda .ag-day { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.cal-agenda .ag-day.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ag-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--light); font-weight: 700; font-size: 13.5px; }
.ag-head .ag-add { margin-left: auto; color: var(--primary); }
.ag-empty { padding: 10px 14px; color: var(--muted); font-size: 12.5px; }
.ag-item {
  display: flex; gap: 12px; width: 100%; text-align: left; background: #fff; border: 0;
  border-top: 1px solid var(--border); padding: 11px 14px; cursor: pointer; color: inherit;
}
.ag-head + .ag-item { border-top: 0; }
.ag-item:hover { background: #FAFDFB; }
.ag-item.done { opacity: .6; }
.ag-item.done .cell-main { text-decoration: line-through; }
.ag-time { width: 86px; flex-shrink: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.ag-time b { color: var(--text); }
.ag-main { flex: 1; min-width: 0; }
.ag-main .row .pill { white-space: nowrap; flex-shrink: 0; }
.ag-main .row { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ag-main .meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 3px 12px; }
.ag-item.is-deadline .cell-main { color: var(--danger); }
.cal-agenda.in-modal .ag-item:first-child { border-top: 0; }
.cal-agenda.in-modal .ag-item { padding-left: 4px; padding-right: 4px; }
.appt-top { display: flex; gap: 6px; flex-wrap: wrap; }
.appt-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
@media (max-width: 820px) {
  .cal-toolbar .seg { flex: 1; }
  .cal-toolbar .seg button { flex: 1; }
  .cal-toolbar select.input { max-width: none !important; }
  .cal-nav { width: 100%; }
  .cal-nav .btn { flex: 1; }
  .cm-cell { min-height: 64px; padding: 2px; }
  .cal-month .ev { font-size: 10.5px; padding: 2px 3px; }
  .cal-month .ev-who { display: none; }
  .ag-time { width: 64px; }
  .appt-acts .btn { flex: 1; }
}
/* ---------- Plan pe zi ---------- */
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.plan-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--light); color: var(--text); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.me { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip.warn { background: #FDF3E1; color: #9A6412; border-color: #F3DDB3; }
.chip.leave { background: #EEF1EF; color: var(--muted); }
.chip small { font-weight: 500; opacity: .85; }
.plan-table td { vertical-align: top; }
.plan-table tr.mine td, .m-item.mine { background: #F3FBF6; }
.plan-table .actions { white-space: nowrap; }
.plan-table .icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn.small { font-size: 11px; min-width: 28px; justify-content: center; }
.plan-warn { background: #FFFBF3; border: 1px solid #F3DDB3; color: #7A5210; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.plan-warn ul { margin: 6px 0 0; padding-left: 18px; }
.plan-bottom { margin-top: 16px; grid-template-columns: 1fr 1fr; }
.my-plan { padding: 14px 16px; margin-bottom: 14px; border-color: var(--primary); }
.my-plan .k { color: var(--primary); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.my-plan.empty-plan { border-color: var(--border); }
.my-plan.empty-plan .k { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 13.5px; margin: 0; font-weight: 600; }
.mp-row { padding: 8px 0; border-top: 1px solid var(--border); font-size: 15px; }
.mp-row:first-of-type { border-top: 0; padding-top: 0; }
.mp-acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.leave-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow-y: auto; }
.leave-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.leave-list li:first-child { border-top: 0; }
.ev-plan { background: #EAF6EF; border-left-color: #0B3D2E; }
.ev-leave { background: #EEF1EF; border-left-color: #A9B5AE; color: var(--muted); font-style: italic; }
.print-only { display: none; }
@media (max-width: 820px) {
  .plan-tools { margin-left: 0; width: 100%; }
  .plan-tools .btn { flex: 1; }
  .plan-bottom { grid-template-columns: 1fr; }
  .head-acts { width: 100%; }
  .head-acts .btn { flex: 1; }
  #pDate { max-width: none !important; }
}
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .sidebar, .topbar, .toast, #page > *:not(.print-only) { display: none !important; }
  .print-only { display: block !important; }
  body, .content, .main { background: #fff !important; padding: 0 !important; margin: 0 !important; }
}
.print-only h2 { margin: 0 0 8px; font-size: 18px; }
.print-sheet { width: 100%; border-collapse: collapse; font-size: 13px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-sheet th { background: #0B3D2E; color: #fff; text-align: left; padding: 7px 9px; font-size: 13px; }
.print-sheet td { border: 1px solid #C9D6CE; padding: 6px 9px; vertical-align: top; }
.print-sheet tbody tr:nth-child(even) td { background: #EAF3EE; }
.print-sheet .ps-title div { font-size: 11.5px; color: #555; margin-top: 2px; }
.print-sheet .ps-gap td { border: 0; background: #fff !important; height: 12px; }
.print-sheet .ps-leave td { background: #F1F3F2 !important; color: #555; }

/* ---------- Intervenții + Mentenanță ---------- */
.pill.is-noua { background: #FBEAE8; color: var(--danger); }
.pill.is-alocata { background: #E6F0FB; color: #2B64A8; }
.pill.is-in_lucru { background: #FDF3E1; color: #9A6412; }
.pill.is-rezolvata { background: #F1EAFB; color: #6B45A8; }
.pill.is-inchisa { background: var(--light); color: var(--primary); }
.pill.is-anulata { background: #EEF1EF; color: var(--muted); }
.m-list.always { display: block; }
.ev-interv { background: #FBEAE8; border-left-color: var(--danger); }
.ev-maint { background: #F1EAFB; border-left-color: #6B45A8; }
.alerts-card { margin-bottom: 16px; border-color: #F3DDB3; }
.alerts-card .card-head { background: #FFFBF3; border-radius: var(--radius) var(--radius) 0 0; }
.pending-card { margin-bottom: 14px; border-color: #F3DDB3; }
.pending-card .card-head { background: #FFFBF3; border-radius: var(--radius) var(--radius) 0 0; }
.mini-list { list-style: none; margin: 0 0 12px; padding: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); }
.mini-list li:first-child { border-top: 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 120px; }
.chk-group { margin: 16px 0 6px; font-size: 13px; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.checks-list { list-style: none; margin: 0; padding: 0; }
.checks-list li { padding: 10px 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.checks-list li:first-child { border-top: 0; }
.checks-list .chk-note { grid-column: 1 / -1; min-height: 34px; padding: 6px 10px; font-size: 13px; }
.checks-list li.r-problema .chk-title { color: var(--danger); font-weight: 600; }
.chk-btns { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.chk-b { border: 0; border-left: 1px solid var(--border); background: #fff; padding: 7px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chk-b:first-child { border-left: 0; }
.chk-b:disabled { cursor: default; }
.chk-b.on.ok { background: var(--primary); color: #fff; }
.chk-b.on.problema { background: var(--danger); color: #fff; }
.chk-b.on.na { background: #A9B5AE; color: #fff; }
@media (max-width: 820px) {
  .checks-list li { grid-template-columns: 1fr; }
  .chk-btns { width: 100%; }
  .chk-b { flex: 1; padding: 10px 6px; }
}
.m-item .row .pill { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 820px) { .toolbar select.input { max-width: none !important; } }
/* ---------- Dată zz/ll/aaaa + „Adaugă nou” ---------- */
.date-field { position: relative; }
.date-field .input { padding-right: 42px; }
.date-pick { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--primary); padding: 6px; border-radius: 6px; cursor: pointer; display: inline-flex; }
.date-pick:hover { background: var(--light); }
.date-pick svg { width: 19px; height: 19px; }
.date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.add-check { margin-top: 6px; color: var(--primary); }
.add-check svg { width: 15px; height: 15px; }
@media (max-width: 820px) { .pdate-wrap { max-width: none !important; } }
/* ---------- Foaie de lucru ---------- */
.ws-label { color: #1F5C4A; font-weight: 700; font-size: 13.5px; margin: 14px 0 5px; }
.ws-box { border: 1px solid #555; border-radius: 4px; padding: 7px 9px; white-space: pre-wrap; min-height: 34px; background: #fff; }
.ws-types { margin: 12px 0 4px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #555; border-radius: 4px; }
.ws-grid > div { padding: 7px 9px; border-top: 1px solid #ccc; }
.ws-grid > div:nth-child(-n+2) { border-top: 0; }
.ws-grid > div:nth-child(odd) { border-right: 1px solid #ccc; }
.ws-grid .k { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.ws-mat { width: 100%; border-collapse: collapse; }
.ws-mat th { background: #E8E8E8; text-align: left; padding: 6px 9px; border: 1px solid #555; }
.ws-mat td { padding: 6px 9px; border: 1px solid #555; }
.ws-mat th:last-child, .ws-mat td:last-child { width: 90px; }
.ws-sigs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #555; border-radius: 4px; margin-top: 14px; }
.ws-sigs > div { padding: 10px; }
.ws-sigs > div:first-child { border-right: 1px solid #ccc; }
.ws-sig-title { text-align: center; font-weight: 700; margin-bottom: 6px; }
.ws-sigs img { display: block; max-width: 100%; height: 90px; object-fit: contain; margin: 6px auto 0; border-bottom: 1px dotted #999; }
.ws-sig-empty { height: 90px; border-bottom: 1px dotted #999; }
.ws-when { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ws-dt { display: flex; gap: 6px; align-items: center; }
.ws-dt .date-field { flex: 1.4; min-width: 130px; }
.ws-dt input[type=time] { flex: 1; min-width: 96px; }
.ws-mat-row { display: grid; grid-template-columns: 1fr 90px auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.sig-wrap { position: relative; }
.sig-pad { display: block; width: 100%; height: 190px; border: 2px dashed #9BB5A8; border-radius: 10px; background: #FBFDFC; touch-action: none; cursor: crosshair; }
.sig-clear { position: absolute; top: 6px; right: 6px; }
.sig-hint { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #A9B5AE; font-size: 12px; pointer-events: none; }
.sig-done { display: flex; align-items: center; gap: 10px; }
.sig-done img { height: 70px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.ws-sign-card { margin-top: 16px; border-color: var(--primary); }
.ws-sign-card .card-head { background: var(--light); border-radius: var(--radius) var(--radius) 0 0; }
.logo-prev { border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; margin-bottom: 10px; background: #fff; }
.logo-prev img { max-width: 220px; max-height: 110px; }
@media (max-width: 820px) {
  .ws-when { grid-template-columns: 1fr; }
  .ws-grid, .ws-sigs { grid-template-columns: 1fr; }
  .ws-grid > div:nth-child(odd), .ws-sigs > div:first-child { border-right: 0; }
  .ws-grid > div:nth-child(2) { border-top: 1px solid #ccc; }
  .ws-sigs > div:first-child { border-bottom: 1px solid #ccc; }
  .sig-pad { height: 220px; }
}
.time-in { max-width: 110px; }
@media (max-width: 820px) {
  .ws-dt { flex-wrap: wrap; }
  .ws-dt .date-field { flex: 1 1 100%; }
  .ws-dt .time-in { flex: 1; max-width: none; }
}
/* ---------- Rapoarte ---------- */
.rep-tabs { flex-wrap: wrap; }
.rep-filters { align-items: center; }
.rep-filters select.input { max-width: 220px; }
.rep-dates { display: flex; align-items: center; gap: 6px; }
.rep-dates .date-field { width: 160px; }
.rep-types { display: flex; gap: 14px; flex-wrap: wrap; }
.rep-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.rep-table th.sortable:hover { color: var(--primary); }
.rep-table .num { text-align: right; white-space: nowrap; }
.rep-table tfoot td { background: var(--light); border-top: 2px solid var(--border); }
.rep-table td { vertical-align: top; }
@media (max-width: 820px) {
  .rep-card { background: #fff !important; border: 1px solid var(--border) !important; }
  .rep-filters select.input { max-width: none; }
  .rep-dates { width: 100%; }
  .rep-dates .date-field { flex: 1; width: auto; }
  .rep-table { min-width: 720px; }
}

/* ---------- Oferte ---------- */
.ol-line { display: grid; grid-template-columns: 26px minmax(220px, 1fr) 70px 80px 110px 72px 110px; gap: 8px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--border); }
.ol-line.is-opt { background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.025) 8px, rgba(0,0,0,.025) 16px); }
.ol-line.is-opt .ol-n::after { content: "opț."; display: block; font-size: 10px; color: var(--muted); }
.ol-n { font-weight: 700; color: var(--muted); padding-top: 9px; text-align: center; }
.ol-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ol-desc { font-size: 12.5px; padding-top: 5px; padding-bottom: 5px; }
.ol-f { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.ol-f span { display: none; font-size: 11px; color: var(--muted); font-weight: 600; }
.ol-f .input { text-align: right; padding-left: 6px; padding-right: 6px; }
.ol-val { text-align: right; padding-top: 9px; display: flex; flex-direction: column; }
.ol-val .cell-sub { display: none; }
.ol-acts { grid-column: 2 / -1; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ol-chk { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; margin: 0; }
.ol-totals { margin-top: 14px; margin-left: auto; max-width: 360px; }
.tot-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.tot-row.strong { font-weight: 800; font-size: 16px; border-top: 2px solid var(--text); margin-top: 4px; padding-top: 6px; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin: 6px 0; cursor: pointer; font-weight: 400; }
.radio-row input { margin-top: 3px; }
.pick-list { max-height: 52vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.pick-row { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--border); cursor: pointer; margin: 0; font-weight: 400; }
.pick-row:last-child { border-bottom: 0; }
@media (max-width: 820px) {
  .ol-line { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 0; }
  .ol-n { grid-column: 1 / -1; text-align: left; padding-top: 0; }
  .ol-line.is-opt .ol-n::after { display: inline; margin-left: 6px; }
  .ol-name { grid-column: 1 / -1; }
  .ol-f span, .ol-val .cell-sub { display: block; }
  .ol-val { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding-top: 2px; }
  .ol-acts { grid-column: 1 / -1; }
  .ol-totals { max-width: none; }
}

/* ---------- Documente ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }
.doc-ic { flex: 0 0 42px; height: 42px; border-radius: 8px; background: var(--light); color: var(--primary); font-weight: 800; font-size: 11px;
  display: flex; align-items: center; justify-content: center; letter-spacing: .5px; }
.doc-main { flex: 1; min-width: 0; }
.doc-main .cell-main { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.doc-acts { display: flex; gap: 4px; align-items: center; }

/* ---------- Facturi ---------- */
.il-line { display: grid; grid-template-columns: 26px minmax(220px, 1fr) 70px 80px 120px 140px 110px 34px; gap: 8px; align-items: start;
  padding: 10px 0; border-bottom: 1px solid var(--border); }
.il-rm { padding-top: 4px; }
.anaf-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--light); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }
@media (max-width: 820px) {
  .il-line { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .il-line .ol-n, .il-line .ol-name, .il-line .ol-val { grid-column: 1 / -1; }
  .il-rm { grid-column: 1 / -1; text-align: right; }
}
.brand-firm { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 2px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Cine a creat / modificat ---------- */
.by-line { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.by-line:empty { display: none; }
.by-line b { font-weight: 600; color: var(--text); }
.author-line { margin: -6px 0 14px; font-size: 12.5px; }
@media print { .by-line { display: none; } }

/* ---------- Temă întunecată (Setări firmă → Aspect aplicație) ---------- */
:root[data-theme="dark"] {
  --white: #19211D; --bg: #0F1512; --text: #E2EBE6; --muted: #97A69E; --border: #2C3933;
  --light: #1E2B25; --danger-light: #3A201D;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}
:root[data-theme="dark"] .modal, :root[data-theme="dark"] .m-item, :root[data-theme="dark"] .input,
:root[data-theme="dark"] .modal-foot, :root[data-theme="dark"] .seg, :root[data-theme="dark"] .step .dot-n,
:root[data-theme="dark"] .timeline > li.q.resolved, :root[data-theme="dark"] .ev-deadline,
:root[data-theme="dark"] .login-card, :root[data-theme="dark"] .card { background: var(--white); color: var(--text); }
:root[data-theme="dark"] .table tr.clickable:hover td, :root[data-theme="dark"] .w-compact .m-item:hover { background: #202A25; }
:root[data-theme="dark"] .pill.gray, :root[data-theme="dark"] .pill.st-oferta { background: #26312C; color: var(--muted); }
:root[data-theme="dark"] .pill.amber, :root[data-theme="dark"] .pill.st-in_lucru { background: #3A2E17; color: #F0C36E; }
:root[data-theme="dark"] .pill.st-programata, :root[data-theme="dark"] .ev-appointment, :root[data-theme="dark"] .view-banner { background: #1B2A3D; color: #9CC3F0; }
:root[data-theme="dark"] .pill.st-verificare { background: #2C2240; color: #C4A8F0; }
:root[data-theme="dark"] .timeline > li.q, :root[data-theme="dark"] .quote, :root[data-theme="dark"] .questions-card .card-head { background: #2E2718; border-color: #5A4A28; }
:root[data-theme="dark"] .progress, :root[data-theme="dark"] .stage-bar { background: #26312C; }
:root[data-theme="dark"] .icon-btn:hover { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] .table th { color: var(--muted); }
:root[data-theme="dark"] img.sig, :root[data-theme="dark"] canvas { background: #fff; }

/* ---------- Text de jos (setat de dezvoltator) ---------- */
.app-footer { text-align: center; font-size: 11.5px; color: var(--muted); padding: 18px 12px 22px; }
.app-footer:empty { display: none; }
.login-footer { text-align: center; font-size: 11.5px; color: rgba(255,255,255,.75); margin-top: 16px; }
.login-footer:empty { display: none; }
.login-welcome { margin: -8px 0 16px; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatches button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
.color-swatches button.on { outline: 3px solid var(--text); outline-offset: 2px; }
.dev-wrap { max-width: 640px; margin: 30px auto; padding: 0 16px; }
.dev-img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 4px; }
.main > .content { flex: 1 0 auto; }

/* ---------- Notificări ---------- */
.nbadge { margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.bell-btn { position: relative; color: inherit; }
.bell-btn .nbadge { position: absolute; top: 2px; right: 0; margin: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-list li:last-child { border-bottom: none; }
.notif-list li:hover { background: var(--light); }
.notif-list .ndot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: transparent; }
.notif-list li.unread .ndot { background: var(--primary); }
.notif-list li.unread .cell-main { font-weight: 700; }
.notif-list li.urgent .ndot { background: var(--danger); }

/* ---------- Scanare cod de bare ---------- */
.scan-wrap { display: flex; gap: 6px; }
.scan-wrap .input { flex: 1; min-width: 0; }
.scan-btn { padding: 0 10px; flex-shrink: 0; }
.scan-btn svg { width: 22px; height: 22px; margin: 0; }
.scan-overlay { position: fixed; inset: 0; z-index: 400; background: #000; color: #fff; display: flex; flex-direction: column; }
.scan-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 16px; }
.scan-top .icon-btn { color: #fff; font-size: 20px; }
.scan-view { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; width: min(80vw, 420px); height: min(34vw, 180px); border: 3px solid var(--accent-line, #7BE0AE);
  border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); }
.scan-msg { text-align: center; padding: 12px 16px 4px; font-size: 14px; color: #e8f2ec; }
.scan-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
.scan-acts .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
