/* ═══════════════ CRMContabil — Design System ═══════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --accent: #3B82F6; --accent2: #6366F1; --accent-rgb: 59, 130, 246;
  --bg: #090D16; --bg2: #0E131F;
  --surface: rgba(255,255,255,.035); --surface2: rgba(255,255,255,.065); --surface-solid: #111625;
  --border: rgba(255,255,255,.07); --border2: rgba(255,255,255,.13);
  --text: #F1F5F9; --muted: #94A3B8; --dim: #64748B;
  --green: #10B981; --amber: #F59E0B; --red: #EF4444; --blue: #3B82F6;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.6);
  --radius: 16px; --ease: cubic-bezier(.2,.8,.2,1);
  --grad: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
  --mono: 'Space Grotesk', 'Inter', sans-serif;
}
[data-theme="light"] {
  --bg: #F8FAFC; --bg2: #F1F5F9; --surface: rgba(255,255,255,.8); --surface2: #FFFFFF; --surface-solid: #FFFFFF;
  --border: rgba(15,23,42,.08); --border2: rgba(15,23,42,.15); --text: #0F172A; --muted: #64748B; --dim: #94A3B8;
  --shadow: 0 20px 45px -20px rgba(15,23,42,.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Soft Ambient Background (Calm & Non-Intrusive) ── */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(140px); opacity: .08; animation: float 28s ease-in-out infinite; }
.aurora i:nth-child(1) { width: 620px; height: 620px; background: #3B82F6; top: -200px; left: -140px; }
.aurora i:nth-child(2) { width: 540px; height: 540px; background: #6366F1; bottom: -180px; right: -120px; animation-delay: -9s; }
.aurora i:nth-child(3) { width: 400px; height: 400px; background: #0EA5E9; top: 35%; left: 50%; opacity: .04; animation-delay: -16s; }
[data-theme="light"] .aurora i { opacity: .05; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(50px,-30px) scale(1.08); } 66% { transform: translate(-30px,40px) scale(.96); } }
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); opacity: .35; }

/* ── Layout ── */
.app { position: relative; z-index: 1; display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 256px; flex-shrink: 0; display: flex; flex-direction: column; padding: 10px 8px; height: 100vh; overflow: hidden; background: var(--surface); backdrop-filter: blur(26px) saturate(1.2); border-right: 1px solid var(--border); transition: width .35s var(--ease); z-index: 5; }
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 8px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 4px 14px -3px rgba(var(--accent-rgb),.4); }
.brand-logo svg { width: 17px; height: 17px; }
.brand-name { font-family: var(--mono); font-weight: 700; font-size: 14.5px; letter-spacing: -.3px; line-height: 1.1; }
.brand-name small { display: block; font-family: 'Inter'; font-weight: 500; font-size: 9px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-top: 1px; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 0; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; width: 0; }
.nav-sec { font-size: 9px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--dim); font-weight: 700; padding: 6px 8px 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 8px; padding: 5.5px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 500; cursor: pointer; transition: all .2s var(--ease); margin-bottom: 1px; white-space: nowrap; }
.nav a svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav a:hover { background: var(--surface2); color: var(--text); transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, rgba(var(--accent-rgb),.15), rgba(var(--accent-rgb),.03)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb),.25); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -8px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--grad); }
.nav a.active svg { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 10px; background: var(--red); color: #fff; }
.nav .count.soft { background: rgba(var(--accent-rgb),.18); color: var(--text); }
.me-card { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--border); cursor: pointer; transition: .2s; margin-top: 4px; flex-shrink: 0; }
.me-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 11px; background: var(--grad); flex-shrink: 0; }
.me-card b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me-card small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.logout-btn { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: transparent; border: none; color: var(--muted); cursor: pointer; transition: .2s; margin-left: auto; flex-shrink: 0; padding: 0; }
.logout-btn svg { width: 14px; height: 14px; }
.logout-btn:hover { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.collapsed .sidebar { width: 68px; padding: 10px 6px; } .collapsed .brand-name, .collapsed .nav a span, .collapsed .nav-sec, .collapsed .nav .count, .collapsed .me-card div, .collapsed .logout-btn { display: none; } .collapsed .nav a { justify-content: center; padding: 7px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; border-bottom: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(22px); z-index: 4; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--muted); transition: .25s var(--ease); position: relative; }
.icon-btn:hover { color: var(--text); border-color: var(--border2); transform: translateY(-2px); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--bg); }
.switcher { position: relative; }
.switch-btn { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); cursor: pointer; min-width: 240px; transition: .25s; }
.switch-btn:hover { border-color: var(--border2); }
.switch-btn .co-dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
.switch-btn .t { flex: 1; text-align: left; line-height: 1.2; } .switch-btn .t b { font-size: 13px; display: block; } .switch-btn .t small { color: var(--muted); font-size: 11px; }
.menu { position: absolute; top: calc(100% + 10px); left: 0; width: 330px; max-height: 420px; overflow-y: auto; background: var(--surface-solid); border: 1px solid var(--border2); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none; transition: .25s var(--ease); z-index: 30; }
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu.right { left: auto; right: 0; width: 260px; }
.menu .it { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 11px; cursor: pointer; transition: .15s; }
.menu .it:hover, .menu .it.sel { background: var(--surface2); }
.menu .it .co-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; }
.menu .it small { display: block; color: var(--muted); font-size: 11px; } .menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }
.search-btn { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: .25s; margin-left: auto; }
.search-btn:hover { border-color: var(--border2); color: var(--text); }
.kbd { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border2); font-family: var(--mono); color: var(--muted); }

/* ── Selector de Limbă Global (Header Topbar) ── */
.lang-switcher-wrap { position: relative; z-index: 100; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; user-select: none;
}
.lang-trigger:hover, .lang-trigger.open {
  background: var(--surface2); border-color: var(--accent); color: #fff;
  transform: translateY(-2px); box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.25);
}
.lang-code { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--text); min-width: 18px; text-align: center; }
.lang-chevron { width: 13px; height: 13px; opacity: 0.65; transition: transform 0.2s ease; }
.lang-trigger.open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  z-index: 9999; min-width: 210px; padding: 6px; border-radius: 14px;
  background: var(--surface-solid, #0f172a); border: 1px solid var(--border2, rgba(255, 255, 255, 0.14));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(99, 102, 241, 0.2);
  animation: langMenuIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-menu.open { display: block; }
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-menu-title {
  padding: 6px 12px 8px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.lang-option {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
  border: none; border-radius: 9px; background: transparent; color: var(--text);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; text-align: left;
}
.lang-option:hover {
  background: rgba(255, 255, 255, 0.08); color: #fff; transform: translateX(2px);
}
.lang-option.active {
  background: rgba(var(--accent-rgb), 0.16); color: var(--accent); font-weight: 700;
}
.lang-opt-short {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--muted); min-width: 22px;
}
.lang-opt-name { flex: 1; }
.lang-check { width: 14px; height: 14px; color: var(--accent); }

.view { flex: 1; overflow-y: auto; padding: 28px 32px 60px; }
.view > * { animation: rise .55s var(--ease) both; } .view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; } .view > *:nth-child(4) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -.8px; line-height: 1.15; }
.page-head p { color: var(--muted); margin-top: 4px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Primitives ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(18px); position: relative; transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; }
.card.hover:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; } .card-h h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 9px; } .card-h h3 svg { color: var(--accent); }
.card-h small { color: var(--muted); font-size: 12px; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); } .g-main { grid-template-columns: 1.7fr 1fr; }
@media (max-width: 1300px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g-main, .g3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .sidebar { position: fixed; left: -280px; height: 100%; } .app.mobile-open .sidebar { left: 0; } .g2, .g4 { grid-template-columns: 1fr; } .view { padding: 20px 16px 60px; } .switch-btn { min-width: 0; } }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface2); cursor: pointer; font-weight: 600; font-size: 13px; transition: all .25s var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -6px rgba(var(--accent-rgb),.45); } .btn.primary:hover { box-shadow: 0 12px 26px -6px rgba(var(--accent-rgb),.6); }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 9px; } .btn.danger:hover { border-color: var(--red); color: var(--red); } .btn.ok:hover { border-color: var(--green); color: var(--green); }
.btn.ghost { background: transparent; } .btn:disabled { opacity: .5; pointer-events: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 650; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.badge.green { color: var(--green); background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.25); } .badge.red { color: var(--red); background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25); }
.badge.amber { color: var(--amber); background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.25); } .badge.blue { color: var(--blue); background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.25); }
.badge.violet { color: #A5B4FC; background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.25); }
.co-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; } .co-chip i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.input, select.input, textarea.input, .inp, select.inp, textarea.inp { width: 100%; padding: 10px 14px; border-radius: 10px; background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border) !important; outline: none; transition: .2s; color-scheme: dark; font-size: 13px; }
.input:focus, .inp:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 4px rgba(var(--accent-rgb),.18); }
select.input option, select.inp option { background: #131722 !important; color: #ffffff !important; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar .input { max-width: 300px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { padding: 7px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: .2s; }
.chip:hover { color: var(--text); border-color: var(--border2); } .chip.on { background: rgba(var(--accent-rgb),.2); color: var(--text); border-color: rgba(var(--accent-rgb),.5); }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; } .empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: 10px; }

/* ── KPI ── */
.kpi { padding: 20px 22px; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--kc, var(--accent)); opacity: .08; filter: blur(12px); transition: .5s var(--ease); }
.kpi:hover::after { transform: scale(1.4); opacity: .15; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .kpi .lbl svg { color: var(--kc, var(--accent)); width: 17px; }
.kpi .val { font-family: var(--mono); font-size: 29px; font-weight: 700; letter-spacing: -1px; margin: 10px 0 4px; } .kpi .val small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi .sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; } .up { color: var(--green); } .down { color: var(--red); }

/* ── Table ── */
.tbl-wrap { overflow-x: auto; border-radius: 14px; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .9px; color: var(--dim); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-solid); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; transition: background .15s; }
.tbl tr { animation: rowIn .45s var(--ease) both; } @keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.tbl tbody tr:hover td { background: var(--surface2); } .tbl .num { text-align: right; font-family: var(--mono); font-weight: 600; white-space: nowrap; } .tbl .mut { color: var(--muted); font-size: 12px; }
.tbl .acts { text-align: right; white-space: nowrap; } .tbl .acts .btn { margin-left: 4px; } .tbl tr.sel td { background: rgba(var(--accent-rgb),.08); }
.tfoot { display: flex; gap: 30px; justify-content: flex-end; padding: 16px 14px 0; font-size: 13px; color: var(--muted); } .tfoot b { font-family: var(--mono); color: var(--text); font-size: 15px; margin-left: 6px; }

/* ── Charts ── */
.chart { height: 250px; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; position: relative; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; position: relative; cursor: default; }
.chart .bars { display: flex; gap: 4px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.chart .bar { width: 38%; max-width: 22px; border-radius: 7px 7px 3px 3px; height: 0; transition: height 1s var(--ease); } .chart .bar.rev { background: var(--grad); } .chart .bar.exp { background: linear-gradient(180deg, #F87171, #DC262688); }
.chart .lab { font-size: 11px; color: var(--muted); font-weight: 600; }
.chart .tip { position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translate(-50%, 6px); background: var(--surface-solid); border: 1px solid var(--border2); border-radius: 10px; padding: 8px 12px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s; z-index: 5; box-shadow: var(--shadow); }
.chart .col:hover .tip { opacity: 1; transform: translate(-50%, 0); } .chart .col:hover .bar { filter: brightness(1.15); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.donut-wrap { display: flex; align-items: center; gap: 22px; } .donut { width: 150px; height: 150px; flex-shrink: 0; transform: rotate(-90deg); } .donut circle { fill: none; stroke-width: 15; transition: stroke-dasharray 1.2s var(--ease); stroke-linecap: butt; }
.donut-legend { flex: 1; display: grid; gap: 9px; } .donut-legend div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; } .donut-legend i { width: 10px; height: 10px; border-radius: 3px; } .donut-legend span { margin-left: auto; font-family: var(--mono); font-weight: 600; }
.ring { position: relative; width: 62px; height: 62px; flex-shrink: 0; } .ring svg { transform: rotate(-90deg); width: 100%; height: 100%; } .ring circle { fill: none; stroke-width: 6; stroke-linecap: round; } .ring .bg { stroke: var(--border); } .ring .fg { transition: stroke-dashoffset 1.3s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 15px; }
.spark { width: 100%; height: 38px; } .spark path.l { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s var(--ease) forwards; } @keyframes draw { to { stroke-dashoffset: 0; } }

/* ── Lists ── */
.list { display: grid; gap: 4px; } .row { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 13px; transition: .2s; cursor: default; } .row:hover { background: var(--surface2); }
.row .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(var(--accent-rgb),.1); color: var(--accent); flex-shrink: 0; } .row .tx { flex: 1; min-width: 0; } .row .tx b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .row .tx small { color: var(--muted); font-size: 12px; }
.days { text-align: center; min-width: 52px; padding: 6px 8px; border-radius: 11px; font-family: var(--mono); font-weight: 700; line-height: 1.1; background: var(--surface2); } .days small { display: block; font-family: 'Inter'; font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; opacity: .75; font-weight: 600; }
.days.late { background: rgba(239,68,68,.14); color: var(--red); } .days.soon { background: rgba(245,158,11,.14); color: var(--amber); } .days.ok { background: rgba(16,185,129,.12); color: var(--green); }
.prio { width: 4px; align-self: stretch; border-radius: 4px; } .prio.high { background: var(--red); } .prio.medium { background: var(--amber); } .prio.low { background: var(--green); }
.check { width: 22px; height: 22px; border-radius: 8px; border: 2px solid var(--border2); display: grid; place-items: center; cursor: pointer; transition: .25s var(--ease); flex-shrink: 0; color: transparent; } .check:hover { border-color: var(--accent); transform: scale(1.08); }
.check.on { background: var(--grad); border-color: transparent; color: #fff; } .check svg { width: 14px; height: 14px; stroke-width: 3; }
.done-text { text-decoration: line-through; opacity: .5; }

/* ── Portfolio cards ── */
.pf-card { cursor: pointer; overflow: hidden; } .pf-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cc); } .pf-card::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0%, var(--cc), transparent 60%); opacity: .05; pointer-events: none; transition: .3s; } .pf-card:hover::after { opacity: .12; }
.pf-top { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; } .pf-top .av { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; background: var(--cc); }
.pf-top h4 { font-size: 15px; line-height: 1.2; } .pf-top small { color: var(--muted); font-size: 12px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; } .pf-stats div { background: var(--surface2); border-radius: 12px; padding: 10px 12px; } .pf-stats small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; } .pf-stats b { font-family: var(--mono); font-size: 15px; }
.pf-flags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 26px; }

/* ── Modal / Toast / Palette ── */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(5,7,14,.7); backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px; overflow-y: auto; animation: fade .25s; } @keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 640px; background: var(--surface-solid); border: 1px solid var(--border2); border-radius: 20px; box-shadow: var(--shadow); animation: pop .35s var(--ease); } @keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); } .modal-h h3 { font-family: var(--mono); font-size: 18px; } .modal-b { padding: 22px 24px; } .modal-f { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; } .form .full { grid-column: 1 / -1; } .form label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.form .sw { display: flex; align-items: center; gap: 10px; padding-top: 24px; cursor: pointer; }
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 380px; display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border2); box-shadow: var(--shadow); animation: toastIn .4s var(--ease); } .toast.out { animation: toastOut .3s forwards; } .toast.ok svg { color: var(--green); } .toast.err svg { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(.95); } } @keyframes toastOut { to { opacity: 0; transform: translateX(50px); } }
.palette { width: 100%; max-width: 620px; margin-top: 8vh; background: var(--surface-solid); border: 1px solid var(--border2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; animation: pop .3s var(--ease); }
.palette input { width: 100%; padding: 18px 22px; background: transparent; border: 0; border-bottom: 1px solid var(--border); outline: none; font-size: 15px; } .palette .res { max-height: 380px; overflow-y: auto; padding: 8px; }
.palette .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); padding: 10px 14px 5px; font-weight: 700; } .palette .it { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 11px; cursor: pointer; } .palette .it.sel { background: rgba(var(--accent-rgb),.15); } .palette .it small { margin-left: auto; color: var(--muted); }

/* ── Specials ── */
.hero { background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(79, 70, 229, 0.06)); border: 1px solid var(--border2); border-radius: 20px; padding: 26px 30px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; width: 340px; height: 340px; right: -80px; top: -140px; border-radius: 50%; background: var(--grad); opacity: .12; filter: blur(70px); }
.hero h2 { font-family: var(--mono); font-size: 24px; letter-spacing: -.5px; position: relative; } .hero p { color: var(--muted); margin-top: 6px; position: relative; max-width: 520px; font-size: 13.5px; } .hero .stats { display: flex; gap: 26px; position: relative; } .hero .stats div { text-align: center; } .hero .stats b { display: block; font-family: var(--mono); font-size: 26px; } .hero .stats small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.dropzone { border: 2px dashed var(--border2); border-radius: 18px; padding: 32px; text-align: center; color: var(--muted); transition: .25s var(--ease); cursor: pointer; margin-bottom: 18px; position: relative; overflow: hidden; } .dropzone:hover, .dropzone.drag { border-color: var(--accent); background: rgba(var(--accent-rgb),.06); color: var(--text); } .dropzone svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: 8px; }
.cl-item { display: flex; gap: 14px; align-items: center; padding: 15px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 10px; transition: .2s var(--ease); } .cl-item.done { border-color: rgba(16,185,129,.3); background: rgba(16,185,129,.05); } .cl-item:hover { transform: translateX(3px); }
.progress { height: 8px; background: var(--border); border-radius: 8px; overflow: hidden; } .progress i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 8px; transition: width 1s var(--ease); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: fit-content; margin-bottom: 20px; flex-wrap: wrap; } .tabs a { padding: 7px 16px; border-radius: 9px; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: .2s; } .tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -3px rgba(var(--accent-rgb),.5); }
.calc-out { padding: 16px; border-radius: 14px; background: rgba(var(--accent-rgb),.07); border: 1px solid rgba(var(--accent-rgb),.2); margin-top: 14px; } .calc-out .ln { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13px; } .calc-out .ln:last-child { border: 0; font-weight: 700; font-size: 15px; padding-top: 10px; } .calc-out .ln b { font-family: var(--mono); }
.chat { display: grid; gap: 14px; } .bubble { max-width: 74%; padding: 12px 16px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--border); animation: rise .35s var(--ease); } .bubble.me { margin-left: auto; background: rgba(var(--accent-rgb),.16); border-color: rgba(var(--accent-rgb),.3); border-bottom-right-radius: 4px; } .bubble:not(.me) { border-bottom-left-radius: 4px; } .bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; font-size: 13px; } .kv dt { color: var(--muted); } .kv dd { font-weight: 600; word-break: break-all; }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 14px; } @keyframes shimmer { to { background-position: -200% 0; } }
.confetti { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 300; animation: fall 2.2s linear forwards; pointer-events: none; } @keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }

/* ── CRM Sync Button ── */
.icon-btn.sync-btn { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); color: #34D399; position: relative; transition: all 0.25s ease; }
.icon-btn.sync-btn:hover { border-color: #10B981; color: #fff; background: rgba(16, 185, 129, 0.28); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
.icon-btn.sync-btn.spinning svg { animation: crmSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes crmSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── AI Copilot & Assistant (Clean Executive Slate) ── */
.icon-btn.ai-btn { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.3); color: #60A5FA; position: relative; }
.icon-btn.ai-btn:hover { border-color: #3B82F6; color: #fff; background: rgba(59, 130, 246, 0.25); }
.ai-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; font-size: 10.5px; font-weight: 700; background: rgba(59, 130, 246, 0.14); border: 1px solid rgba(59, 130, 246, 0.3); color: #93C5FD; font-family: var(--mono); }
.ai-badge.admin-default { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.3); color: #6EE7B7; }
.ai-prompts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.ai-prompt-btn { padding: 5px 10px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border2); color: var(--text); font-size: 11px; cursor: pointer; transition: .2s; display: inline-flex; align-items: center; gap: 5px; }
.ai-prompt-btn:hover { background: rgba(var(--accent-rgb), 0.14); border-color: var(--accent); transform: translateY(-1px); }
.ai-msg { padding: 12px 15px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--border); line-height: 1.55; font-size: 13px; animation: rise .35s var(--ease); }
.ai-msg h3 { font-size: 14px; margin: 6px 0 4px; color: var(--accent); }
.ai-msg ul, .ai-msg ol { padding-left: 18px; margin: 6px 0; }
.ai-msg blockquote { border-left: 3px solid var(--accent); padding-left: 10px; margin: 8px 0; color: var(--muted); background: rgba(var(--accent-rgb), 0.05); padding: 6px 10px; border-radius: 0 6px 6px 0; }
.ai-msg p { margin: 5px 0; }
.ai-config-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 20px; margin-top: 18px; }
.ai-radio-box { display: flex; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; transition: .2s; background: var(--surface2); margin-bottom: 10px; }
.ai-radio-box.active { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }

/* ── Floating AI Copilot Widget (Bottom-Right) ── */
.ai-fab-container { position: fixed; bottom: 22px; right: 22px; z-index: 95; }
.ai-fab-btn { display: flex; align-items: center; gap: 9px; padding: 10px 18px; border-radius: 28px; background: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.12); cursor: pointer; box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.4); transition: all 0.25s var(--ease); font-family: var(--mono); font-weight: 700; font-size: 13px; letter-spacing: 0.2px; position: relative; }
.ai-fab-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.6); }
.ai-fab-btn svg { width: 16px; height: 16px; }
.ai-fab-ping { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: #10B981; border: 2px solid var(--surface-solid); }

/* ── Docked Bottom-Right Chat Window ── */
.ai-chat-dock { position: fixed; bottom: 78px; right: 22px; width: 420px; max-width: calc(100vw - 36px); height: 560px; max-height: calc(100vh - 100px); background: var(--surface-solid); border: 1px solid var(--border2); border-radius: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; z-index: 96; opacity: 0; transform: translateY(16px) scale(0.97); pointer-events: none; transition: all 0.25s var(--ease); }
.ai-chat-dock.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ai-dock-header { padding: 12px 16px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.ai-dock-header h4 { font-family: var(--mono); font-size: 13.5px; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); }
.ai-dock-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-dock-footer { padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }

/* ─── Modal Factură Originală A4 (Format 100% Identic cu CRM) ─── */
.invoice-view-wrapper { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.invoice-lang-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface2); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); width: 820px; max-width: 100%; box-sizing: border-box; flex-wrap: wrap; }
.invoice-lang-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s ease; }
.inv-lang-btn:hover { background: rgba(var(--accent-rgb), 0.15); border-color: var(--accent); }
.inv-lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3); }
.invoice-actions-bar { display: flex; gap: 8px; }

/* Foaia A4 Originală CRM */
.sheetWrapper {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 12px;
  padding: 40px 44px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  position: relative;
  width: 820px;
  max-width: 820px;
  box-sizing: border-box;
}
.sheetAccentBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #10b981;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.sheetHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  gap: 24px;
}
.sheetCompanyLogo {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a !important;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheetCompanyInfo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sheetLegalName {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a !important;
}
.sheetLegalMeta {
  font-size: 11px;
  color: #475569 !important;
  line-height: 1.5;
}
.sheetDocRightWrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.sheetQrBox {
  padding: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.sheetQrImg {
  width: 60px;
  height: 60px;
  display: block;
}
.sheetQrBox span {
  font-size: 7.5px;
  font-weight: 700;
  color: #64748b !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}
.sheetDocTitle {
  text-align: right;
}
.sheetDocMain {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #0f172a !important;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.sheetMetaLine {
  font-size: 11.5px;
  color: #334155 !important;
  margin-bottom: 2px;
}
.sheetFiscalNote {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 600;
  color: #334155 !important;
}
.sheetFiscalIcon {
  color: #059669;
  flex-shrink: 0;
}

/* Parties */
.sheetParties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  padding: 0 0 16px 0;
  margin-bottom: 18px;
}
.sheetPartyCol {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sheetPartyRole {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b !important;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid #f1f5f9;
}
.sheetPartyName {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a !important;
  margin-bottom: 3px;
}
.sheetPartyDetails {
  font-size: 11px;
  color: #475569 !important;
  line-height: 1.6;
}
.sheetPartyDetails div {
  display: flex;
  gap: 6px;
}
.sheetPartyDetails span {
  color: #64748b !important;
  min-width: 65px;
}
.sheetPartyDetails strong {
  color: #0f172a !important;
  font-weight: 600;
}
.ibanText {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
}

/* Reference / Project Metadata */
.sheetRefBanner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 9px 14px;
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 1.5fr;
  gap: 12px;
  align-items: start;
}
.sheetRefCell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sheetRefLabel {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b !important;
}
.sheetRefVal {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a !important;
  line-height: 1.4;
}

/* Lines Table */
.sheetTable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}
.sheetTable thead th {
  background: #f8fafc;
  color: #0f172a !important;
  padding: 8px 10px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1.5px solid #0f172a;
  border-bottom: 1.5px solid #0f172a;
  border-left: none;
  border-right: none;
  text-align: left;
}
.sheetTable thead th:nth-child(1) { width: 32px; text-align: center; }
.sheetTable thead th:nth-child(3) { width: 50px; text-align: center; }
.sheetTable thead th:nth-child(4) { width: 68px; text-align: right; }
.sheetTable thead th:nth-child(5) { width: 110px; text-align: right; }
.sheetTable thead th:nth-child(6) { width: 120px; text-align: right; }
.sheetTable thead th:nth-child(7) { width: 90px; text-align: center; }
.sheetTable tbody td {
  padding: 8px 10px;
  font-size: 11px;
  border-bottom: 1px solid #f1f5f9;
  border-top: none;
  border-left: none;
  border-right: none;
  color: #334155 !important;
  vertical-align: top;
}
.sheetTable tbody tr:last-child td {
  border-bottom: 1.5px solid #0f172a;
}
.sheetItemTitle {
  font-weight: 600;
  color: #0f172a !important;
  line-height: 1.4;
}
.sheetItemSub {
  font-size: 10px;
  color: #64748b !important;
  margin-top: 2px;
  line-height: 1.35;
}

/* Totals Section */
.sheetClosingBlock {
  page-break-inside: avoid;
  break-inside: avoid;
}
.sheetTotalsWrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}
.sheetTotalsTable {
  width: 350px;
  border-collapse: collapse;
  font-size: 11.5px;
}
.sheetTotalsTable td {
  padding: 4px 8px;
  color: #475569 !important;
}
.sheetTotalsTable td:last-child {
  text-align: right;
  font-weight: 600;
  color: #0f172a !important;
}
.sheetTotalsGrand {
  background: #f8fafc;
  border-top: 1.5px solid #0f172a;
  border-bottom: 2px solid #0f172a;
}
.sheetTotalsGrand td {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  padding: 8px 8px !important;
}
.sheetTotalsGrand td:last-child {
  font-size: 14.5px !important;
  color: #0f172a !important;
}

/* Validation, Stamp & Signature Box */
.sheetValidationGrid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 14px;
  margin-top: 4px;
}
.sheetValidationCol {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10.5px;
  color: #475569 !important;
}
.sheetValidationTitle {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f172a !important;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.stampSignatureContainer {
  position: relative;
  min-height: 180px;
  height: 190px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
.stampImg {
  height: 175px;
  width: 175px;
  max-width: 185px;
  max-height: 185px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
}
.signatureOverlay {
  position: absolute;
  height: 85px;
  width: 210px;
  object-fit: contain;
  top: 45px;
  left: calc(50% - 95px);
  transform: rotate(-5deg) scale(1.05);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}
.sheetFooterLegal {
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  font-size: 9.5px;
  color: #64748b !important;
  line-height: 1.45;
}

/* ─── Media Print (Tipărire A4 Impecabilă) ─── */
@page {
  margin: 0;
  size: auto;
}

#lpPrintContainer {
  display: none;
}

@media print {
  @page {
    margin: 0;
    size: auto;
  }

  body { background: #ffffff !important; color: #000000 !important; margin: 0 !important; padding: 0 !important; }
  .aurora, .grid-bg, .sidebar, .topbar, .toasts, .ai-fab-container, .ai-chat-dock, .modal-h, .modal-f, .invoice-lang-bar, [data-close], button, .btn { display: none !important; }

  /* Modul 1: Printare din container dedicat (#lpPrintContainer) */
  #lpPrintContainer {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12mm 16mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-sizing: border-box !important;
    z-index: 999999 !important;
  }
  #lpPrintContainer * {
    visibility: visible !important;
    color: #000000 !important;
  }
  #lpPrintContainer #printableDecont,
  #lpPrintContainer #printableDoc,
  #lpPrintContainer #companyDossierPrintable,
  #lpPrintContainer .thermal-receipt {
    box-shadow: none !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Modul 2: Printare din modal factură (.overlay) */
  .overlay { position: static !important; background: none !important; padding: 0 !important; display: block !important; }
  .modal { box-shadow: none !important; border: none !important; max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; background: #ffffff !important; }
  .sheetWrapper {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Ascunde restul aplicației dacă tipărim din modal sau prin #lpPrintContainer */
  body:has(#lpPrintContainer) .app,
  body:has(.overlay) .app {
    display: none !important;
  }

  /* Dacă se apelează direct fără #lpPrintContainer */
  body:not(:has(#lpPrintContainer)):not(:has(.overlay)) .app {
    display: block !important;
  }
  body:not(:has(#lpPrintContainer)):not(:has(.overlay)) .sidebar,
  body:not(:has(#lpPrintContainer)):not(:has(.overlay)) .topbar,
  body:not(:has(#lpPrintContainer)):not(:has(.overlay)) .card:not(:has(#printableDecont)):not(:has(#printableDoc)) {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   CRM INVOICE MODAL & STUDIO STYLES
   ══════════════════════════════════════════════════════════════ */
.clientSelectorBox {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(14, 165, 233, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.clientSelectorHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clientSelectorTitle {
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.btnQuickNewClient {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.3) 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btnQuickNewClient:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #ffffff;
  border-color: #34d399;
}

.clientSelectControl {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 8px;
  font-size: 13px;
  color: #f8fafc;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.clientSelectControl:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.clientAutoBadge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #34d399;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.accountingToggleGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .accountingToggleGrid {
    grid-template-columns: 1fr;
  }
}

.accountingOptionCard {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.accountingOptionCard:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.accountingOptionActive {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.accountingOptionActiveWarning {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4);
}

.accountingOptionTitle {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.accountingOptionDesc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

/* Lines Table */
.crmLinesTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 8px;
}
.crmLinesTable th {
  padding: 8px 10px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 700;
}
.crmLinesTable td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.crmLinesTable tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.crmLineInput {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  color: #fff !important;
  font-size: 12.5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.crmLineInput:focus {
  border-color: #60a5fa !important;
}
.crmBtnAddLine {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px dashed rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}
.crmBtnAddLine:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: #3b82f6;
  color: #93c5fd;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVIDENȚĂ CONTABILĂ, STATISTICI & RAPOARTE FISCALE (Dashboard & Audit)
   ═══════════════════════════════════════════════════════════════════════════ */
.rep-dash { display: flex; flex-direction: column; gap: 16px; max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
.rep-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 2px; }
.rep-header-title { display: flex; flex-direction: column; gap: 4px; }
.rep-breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rep-title { font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.rep-title svg { width: 22px; height: 22px; color: #38bdf8; }

.rep-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-month-sel { background: rgba(15, 23, 42, 0.8) !important; border: 1px solid rgba(255, 255, 255, 0.12) !important; color: #f1f5f9 !important; padding: 6px 11px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; outline: none; transition: .2s; }
.rep-month-sel:hover { border-color: rgba(255,255,255,0.25) !important; }

.rep-filter-grp { display: inline-flex; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; padding: 2px; gap: 2px; }
.rep-filter-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer; transition: all .2s; }
.rep-filter-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.rep-filter-btn.active { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); box-shadow: 0 0 14px rgba(16, 185, 129, 0.15); }
.rep-filter-btn.active.undeclared { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 0 14px rgba(245, 158, 11, 0.15); }
.rep-filter-btn.active.all { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); box-shadow: 0 0 14px rgba(59, 130, 246, 0.15); }

.rep-btn-pdf { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 8px; background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: #fff; font-size: 12px; font-weight: 700; border: 0; cursor: pointer; transition: all .2s; box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35); }
.rep-btn-pdf:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5); }

/* KPI Cards */
.rep-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1350px) { .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .rep-kpis { grid-template-columns: 1fr; } }

.rep-card { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 13px 15px; backdrop-filter: blur(14px); position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; min-width: 0; transition: border-color .2s, transform .2s; }
.rep-card:hover { border-color: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }

.rep-card-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #94a3b8; gap: 6px; }
.rep-trend-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 10px; font-size: 10.5px; font-weight: 750; background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); white-space: nowrap; }
.rep-trend-pill.down { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }

.rep-card-val-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 1px 0; }
.rep-card-val { font-family: var(--mono); font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-audit-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); color: #cbd5e1; font-size: 10.5px; font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .2s; }
.rep-audit-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: #38bdf8; color: #fff; transform: translateY(-1px); }

.rep-card-sub { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; line-height: 1.35; }
.rep-card-sub strong { color: #f1f5f9; }

/* Sub-tabs */
.rep-nav-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; flex-wrap: wrap; max-width: 100%; box-sizing: border-box; }
.rep-nav-tab { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; border: 0; background: transparent; white-space: nowrap; transition: all .2s; }
.rep-nav-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.rep-nav-tab.active { background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(59, 130, 246, 0.25) 100%); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.4); box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2); }

/* Chart View Grid */
.rep-charts-row { display: grid; grid-template-columns: 1.7fr 1.3fr; gap: 16px; }
@media (max-width: 1180px) { .rep-charts-row { grid-template-columns: 1fr; } }

.rep-box { background: rgba(15, 23, 42, 0.65); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 18px 20px; backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); min-width: 0; }
.rep-box-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.rep-box-title { font-size: 15px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.rep-box-subtitle { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rep-box-pill { padding: 3px 8px; border-radius: 16px; font-size: 10.5px; font-weight: 600; background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }

/* Spline Area Chart */
.rep-spline-wrap { position: relative; width: 100%; height: 260px; max-width: 100%; }
.rep-spline-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.rep-chart-point { transition: r .25s cubic-bezier(0.34, 1.56, 0.64, 1), stroke-width .2s, fill .2s; cursor: pointer; }
.rep-chart-point:hover, .rep-chart-point.active { r: 7.5; stroke-width: 3.5; fill: #34d399; }

@keyframes repDrawLine {
  from { stroke-dashoffset: 2500; }
  to { stroke-dashoffset: 0; }
}
@keyframes repFadeArea {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.rep-line-anim {
  stroke-dasharray: 2500;
  stroke-dashoffset: 0;
  animation: repDrawLine 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.rep-area-anim {
  animation: repFadeArea 1.4s ease-out forwards;
}

/* Floating Chart Tooltip */
.rep-chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(11, 17, 32, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.2);
  border-radius: 11px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: #f1f5f9;
  z-index: 100;
  backdrop-filter: blur(14px);
  transition: opacity .15s ease, transform .12s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-12px);
}
.rep-chart-tooltip.visible {
  opacity: 1;
}

/* Donut Chart & Legend */
.rep-donut-content { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.rep-donut-svg-wrap { position: relative; width: 180px; height: 180px; }
.rep-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; transition: all .25s ease; text-align: center; padding: 10px; }
.rep-donut-center-num { font-family: var(--mono); font-size: 17px; font-weight: 800; color: #fff; transition: all .2s; }
.rep-donut-center-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; transition: all .2s; }
.rep-donut-center-pct { font-size: 11px; font-weight: 700; color: #38bdf8; transition: all .2s; }

.rep-donut-slice {
  cursor: pointer;
  stroke-linecap: butt;
  transition: stroke-width 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s, opacity 0.25s;
  transform-origin: 95px 95px;
}
.rep-donut-slice:hover, .rep-donut-slice.highlight {
  stroke-width: 27px !important;
  filter: drop-shadow(0 0 10px currentColor) brightness(1.25);
}
.rep-donut-slice.dimmed {
  opacity: 0.3;
}

.rep-donut-legend { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rep-legend-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 5px 8px; border-radius: 8px; transition: all 0.2s ease; cursor: pointer; }
.rep-legend-item:hover, .rep-legend-item.highlight { background: rgba(255, 255, 255, 0.08); transform: translateX(3px); }
.rep-legend-left { display: flex; align-items: center; gap: 7px; max-width: 60%; }
.rep-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; transition: transform .2s; }
.rep-legend-item:hover .rep-legend-dot, .rep-legend-item.highlight .rep-legend-dot { transform: scale(1.4); }
.rep-legend-name { color: #f1f5f9; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-legend-right { display: flex; align-items: center; gap: 8px; font-family: var(--mono); }
.rep-legend-val { color: #cbd5e1; font-weight: 600; font-size: 11.5px; }
.rep-legend-pct { font-size: 11px; color: #94a3b8; min-width: 32px; text-align: right; }

/* Audit Modal Specifics */
.rep-audit-wrap { display: flex; flex-direction: column; gap: 18px; }
.rep-audit-banner { background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%); border: 1px solid rgba(56, 189, 248, 0.3); border-radius: 12px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.rep-audit-total-lbl { font-size: 12px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; }
.rep-audit-total-val { font-family: var(--mono); font-size: 28px; font-weight: 800; color: #38bdf8; }
.rep-audit-formula-box { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.rep-audit-formula-title { font-size: 11.5px; font-weight: 700; color: #94a3b8; text-transform: uppercase; display: flex; align-items: center; justify-content: space-between; }
.rep-audit-formula-code { font-family: var(--mono); font-size: 13px; color: #f8fafc; background: rgba(0,0,0,0.3); padding: 8px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.06); word-break: break-all; }
.rep-audit-note { font-size: 11.5px; color: #64748b; line-height: 1.5; }




