/* Firma OS - INTERFATA APROBATA: fidel capturilor ownerului (jarvis-redesign/referinte). Finisaj nou, aceeasi asezare.
   Culorile sunt luate din capturi: meniu alb, continut gri deschis, cyan pe titluri si actiuni, panza organigramei inchisa,
   carduri albe cu contur gros mov (selectat: galben). */
:root {
  --bg: #eef0f3; --white: #fff; --ink: #2b2f36; --ink-2: #5d6470; --ink-3: #9198a3; --line: #e3e6ea;
  --cyan: #19bfe3; --cyan-ink: #0a9ec2; --purple: #9b3fa6; --yellow: #f3e600; --lilac: #ebe9fb; --violet: #6a5ad8;
  --canvas: #2c2d30; --canvas-2: #222326; --panel: #3a3b3f; --panel-ink: #f2f3f5; --panel-ink-2: #b9bdc5; --canvas-line: #8b8e94;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 6px 18px rgba(20, 30, 50, .07);
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  /* stari: inelul din jurul pozei + punctul din randul de stare */
  --s-work: #22b24c; --s-unav: #e5322d; --s-meet: #f2c200; --s-wait: #f08a1c; --s-free: #19bfe3; --s-done: #22b24c; --s-full: #6b21a8; --s-nodata: #a3a9b3;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #3b3c40; --white: #4a4b50; --ink: #eceef2; --ink-2: #c3c7cf; --ink-3: #9a9fa8; --line: #5a5c62; --lilac: #4c4866;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.empty { color: var(--ink-3); padding: 8px 0; }
.small { font-size: 12px; color: var(--ink-3); }
.mostra { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; background: #ede9fe; color: #4c1d95; font-size: 11px; font-weight: 700; letter-spacing: .03em; vertical-align: middle; }

/* ---------- cadru: meniu stanga, bara sus, bara dreapta ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr) 46px; min-height: 100vh; }
.menu { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--white); box-shadow: 1px 0 0 var(--line); padding: 14px 10px 24px; z-index: 20; }
.logo { display: flex; align-items: center; justify-content: center; height: 64px; margin-bottom: 8px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: #1d6fe0; }
.logo span { color: var(--cyan); }
.mi { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink); }
.mi:hover { background: var(--bg); }
.mi.on { background: #e6f8fc; color: var(--cyan-ink); }
.mi .dot { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; flex: none; }
.mi .dot .ic { width: 16px; height: 16px; }
.mi .chev { margin-left: auto; width: 14px; height: 14px; color: var(--ink-3); }
.mid { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 22px; background: var(--white); box-shadow: 0 1px 0 var(--line), 0 4px 12px rgba(20, 30, 50, .04); }
.scan { display: flex; flex-direction: column; align-items: center; color: var(--cyan-ink); font-size: 13px; font-weight: 600; line-height: 1.1; min-height: 44px; justify-content: center; }
.scan .ic { width: 18px; height: 18px; margin-top: 2px; }
.notes { width: 30px; height: 26px; border-radius: 6px; background: linear-gradient(#f6c900 0 34%, #fff7d1 34% 100%); box-shadow: inset 0 0 0 1px #e9d68a; }
.site-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 520px; margin: 0 auto; }
.site-search .pillb { height: 32px; padding: 0 18px; border: 1px solid var(--cyan); border-radius: 6px; color: var(--cyan-ink); font-size: 13px; display: inline-flex; align-items: center; }
.site-search input { flex: 1; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; background: var(--bg); color: var(--ink); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.login { color: var(--cyan-ink); font-weight: 600; font-size: 14px; }
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink-2); }
.bell b { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: #ff3355; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 3px; }
.me { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: #dfe3ea; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 76px 0 12px; background: var(--white); box-shadow: -1px 0 0 var(--line); }
.rail a, .rail button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.rail a:hover { background: var(--bg); }
.rail img { width: 20px; height: 20px; }
.rail .mono-brand { width: 22px; height: 22px; border-radius: 4px; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
main { padding: 22px 26px 40px; min-width: 0; flex: 1; }
.page-title { color: var(--cyan); font-size: 22px; font-weight: 600; }
.page-title.center { text-align: center; }
.title-bar { height: 7px; border-radius: 4px; background: #c9cdd3; margin: 8px 0 18px; }
.card { background: var(--white); border-radius: 14px; box-shadow: var(--shadow); padding: 18px; }
.grid { display: grid; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-line { border: 1.5px solid var(--cyan); color: var(--cyan-ink); background: var(--white); }
.btn-green { background: #22b24c; color: #fff; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; background: #1f2329; color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.banner { display: flex; align-items: center; gap: 8px; padding: 9px 22px; font-weight: 700; font-size: 13px; background: #fff4e5; color: #8a3b00; border-bottom: 1px solid #ffd8a8; }

/* ---------- poza (contur de portret neutru) + inelul de stare ---------- */
.ph { position: relative; display: inline-grid; place-items: center; border-radius: 50%; background: #e3e7ee; overflow: visible; flex: none; }
.ph svg.por { width: 100%; height: 100%; border-radius: 50%; }
.ph .ini { position: absolute; bottom: -2px; left: 50%; transform: translate(-50%, 50%); padding: 0 6px; border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 10px; font-weight: 700; box-shadow: 0 0 0 1px var(--line); }
.ph.ai { background: #f1e6f6; color: var(--purple); }
.ph.ai .ic { width: 46%; height: 46%; }
.ph::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid transparent; transition: border-color 320ms var(--ease); }
.r-work::after { border-color: var(--s-work); animation: breathe 2.4s ease-in-out infinite; }
.r-unav::after { border-color: var(--s-unav); border-width: 4px; }
.r-meet::after { border-color: var(--s-meet); }
.r-wait::after { border-color: var(--s-wait); animation: blink 4s linear infinite; }
.r-free::after { border-color: var(--s-free); }
.r-done::after { border-color: var(--s-done); animation: spark 900ms var(--ease) 1; }
.r-full::after { border-color: var(--s-full); }
.r-nodata::after { border: 2px dashed var(--s-nodata); }
@keyframes breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes blink { 0%, 85%, 100% { opacity: .35; } 92% { opacity: 1; } }
@keyframes spark { 0% { box-shadow: 0 0 0 0 rgba(34, 178, 76, .6); } 100% { box-shadow: 0 0 0 14px rgba(34, 178, 76, 0); } }
.sl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); max-width: 100%; min-width: 0; }
.sl span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--s-nodata); transition: background 320ms var(--ease); }
.s-work .sd { background: var(--s-work); } .s-unav .sd { background: var(--s-unav); } .s-meet .sd { background: var(--s-meet); }
.s-wait .sd { background: var(--s-wait); } .s-free .sd { background: var(--s-free); } .s-done .sd { background: var(--s-done); }
.s-full .sd { background: var(--s-full); } .s-nodata .sd { background: transparent; border: 2px dashed var(--s-nodata); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- E1 organigrama: panza inchisa ---------- */
.org { position: relative; background: var(--canvas); border-radius: 0; margin: -22px -26px -40px; min-height: calc(100vh - 64px); color: #fff; display: flex; }
.org-main { flex: 1; min-width: 0; padding: 16px 18px 30px; }
.org-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.dpill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #6a6d73; background: var(--canvas-2); color: #fff; font-size: 14px; font-weight: 600; }
.dpill .ic { width: 15px; height: 15px; }
.years { display: inline-flex; flex-direction: column; justify-content: center; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid #6a6d73; background: var(--canvas-2); min-width: 190px; }
.years .track { position: relative; height: 4px; border-radius: 2px; background: #6f7278; }
.years .track i { position: absolute; left: 0; top: 0; bottom: 0; width: 92%; border-radius: 2px; background: #2f80ed; }
.years .track b { position: absolute; top: 50%; left: 92%; width: 12px; height: 12px; border-radius: 50%; background: #2f80ed; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(47, 128, 237, .3); }
.years .ylab { display: flex; justify-content: space-between; font-size: 10px; color: #cfd2d7; margin-top: 3px; }
.dsearch { display: inline-flex; align-items: center; gap: 8px; height: 36px; flex: 1; min-width: 180px; max-width: 280px; padding: 0 14px; border-radius: 18px; border: 1px solid #6a6d73; background: var(--canvas-2); color: #cfd2d7; }
.dsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; }
.org-bar2 { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.org-bar2 .right { margin-left: auto; display: flex; gap: 10px; }
.dpill select { background: transparent; color: #fff; border: 0; font: inherit; font-weight: 600; }
.dpill select option { color: #111; }
.export { height: 36px; padding: 0 20px; border-radius: 18px; background: #fff; color: #111; font-weight: 700; }
.tree { position: relative; padding: 12px 6px 40px; overflow-x: auto; }
.tree svg.links { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.lvl { display: flex; justify-content: center; gap: 36px; margin-bottom: 52px; position: relative; flex-wrap: wrap; }
.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.ocard { position: relative; width: 196px; padding: 16px 12px 12px; border-radius: 28px; background: #fff; border: 4px solid var(--purple); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: border-color 320ms var(--ease), transform 200ms var(--ease); }
.ocard.sel { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(243, 230, 0, .25), 0 8px 24px rgba(0, 0, 0, .3); }
.ocard .ph { width: 74px; height: 74px; margin-bottom: 4px; }
.ocard .nm { color: var(--cyan-ink); font-weight: 700; font-size: 15px; line-height: 1.2; }
.ocard .sl { color: #3c4148; }
.ocard .msg { width: 100%; min-height: 30px; margin-top: 6px; border: 1.5px solid var(--cyan); border-radius: 6px; color: var(--cyan-ink); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.ocard .msg.off, .ocard .ico.off { opacity: .38; }
.ocard .icos { display: flex; justify-content: space-around; width: 100%; margin-top: 6px; }
.ocard .ico { display: grid; place-items: center; width: 34px; height: 30px; color: var(--cyan-ink); }
.ocard .ico .ic { width: 19px; height: 19px; }
.ocard .open { position: absolute; inset: 0; border-radius: 24px; }
.ocard .msg, .ocard .icos { position: relative; z-index: 1; }
.ocard.grp { width: 210px; }
.ocard.grp .cnt { font-size: 12px; color: var(--ink-2); }
.tog { position: relative; z-index: 1; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 12px; border-radius: 13px; background: #f1f3f6; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.branch-kids { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
/* panou inchis in dreapta */
.opanel { width: 360px; flex: none; background: var(--panel); color: var(--panel-ink); padding: 16px 18px 30px; border-left: 1px solid #4a4b50; overflow-y: auto; max-height: calc(100vh - 64px); position: sticky; top: 64px; }
.opanel .ph-head { display: flex; justify-content: flex-end; gap: 6px; }
.opanel .ph-head button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--panel-ink-2); }
.opanel .who { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 14px; }
.opanel .who .ph { width: 92px; height: 92px; }
.opanel h2 { font-size: 21px; font-weight: 700; color: #fff; }
.opanel .role { color: var(--panel-ink-2); font-size: 13px; }
.opanel h3 { font-size: 14px; font-weight: 600; color: var(--panel-ink-2); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid #55575d; }
.opanel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.opanel td { padding: 6px 0; vertical-align: top; }
.opanel td:first-child { color: var(--panel-ink-2); width: 42%; }
.opanel .tagd { display: inline-flex; margin: 0 6px 6px 0; padding: 3px 10px; border-radius: 10px; background: #4a4c52; font-size: 12px; }
.opanel .warn { background: #5a3a17; color: #ffcf99; }
.opanel .bad { background: #5c2222; color: #fca5a5; }
.opanel .ok { background: #1f4d33; color: #86efac; }
.opanel .btn-line { background: transparent; }
.opanel .doc { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-top: 1px solid #4a4c52; font-size: 13px; }
.opanel .doc .s { grid-column: 1 / -1; color: var(--panel-ink-2); font-size: 12px; }
.opanel .sl { color: #e7e9ee; }
.opanel .prop { padding: 10px; border-radius: 12px; background: #45464b; margin-bottom: 8px; font-size: 13px; }
.opanel .steps { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.opanel .dots i { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #6a6d73; } .opanel .dots i.on { background: var(--cyan); width: 18px; border-radius: 4px; }

/* ---------- E2 agent AI ---------- */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.acard { position: relative; background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 10px 10px 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.acard .art { width: 100%; aspect-ratio: 1 / 1.08; border-radius: 6px; background: #f3f4f6; overflow: hidden; display: grid; place-items: center; }
.acard .art img { width: 100%; height: 100%; object-fit: cover; }
.acard .art .ic { width: 42%; height: 42%; color: var(--purple); }
.acard hr { width: 100%; border: 0; border-top: 1px solid #d9dce1; margin: 4px 0 2px; }
.acard .an { font-weight: 600; font-size: 14px; color: var(--ink); }
.acard .open { position: absolute; inset: 0; border-radius: 12px; }

/* ---------- E3 sarcini pe zile ---------- */
.day { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px 20px; margin-bottom: 18px; }
.day h2 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 196px)); gap: 18px; }
.tcard { position: relative; display: flex; flex-direction: column; min-height: 200px; padding: 8px 10px 8px; border-radius: 4px; background: var(--lilac); }
.tcard .tt { display: flex; justify-content: space-between; align-items: center; }
.tcard .chk { width: 22px; height: 22px; display: grid; place-items: center; }
.tcard .chk i { width: 12px; height: 12px; border: 1.5px solid #77727f; border-radius: 2px; background: #fff; display: grid; place-items: center; }
.tcard .chk.on i { background: #22b24c; border-color: #22b24c; }
.tcard .xx { width: 24px; height: 24px; display: grid; place-items: center; color: #4b4b55; font-size: 14px; }
.tcard p { flex: 1; text-align: center; font-style: italic; font-size: 13px; color: #2e2e36; padding: 6px 4px; overflow-wrap: anywhere; }
[data-theme="dark"] .tcard p { color: #ecebf5; }
.tcard .ppl { display: flex; gap: 4px; margin: 4px 0 6px; }
.tcard .ppl .ph { width: 22px; height: 22px; }
.tcard .ppl .ph::after { inset: -3px; border-width: 2px; }
.tcard .ppl .ph .ini { display: none; }
.tcard .tb { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tcard .tb button { height: 18px; border: 1px solid #c9c6d8; background: #fff; border-radius: 2px; font-size: 9px; color: #444; display: grid; place-items: center; }
.tcard .tb button.on { background: var(--cyan); color: #fff; border-color: var(--cyan); }
.tcard.late { box-shadow: inset 0 -4px 0 #e5322d; }
.tcard .late-t { font-size: 11px; color: #c22; font-weight: 700; text-align: center; }

/* ---------- E4 firma ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi { display: flex; justify-content: space-between; align-items: center; }
.kpi h4 { font-size: 13px; font-weight: 700; }
.kpi .v { color: var(--violet); font-size: 18px; font-weight: 700; margin-top: 2px; }
.kpi .d { color: #e5322d; font-size: 11px; }
.kpi .ki { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.info h3 { color: var(--violet); font-size: 17px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.info h3 .acts { margin-left: auto; display: flex; gap: 6px; }
.info h3 .acts .btn { min-height: 24px; padding: 0 10px; font-size: 11px; border-radius: 4px; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: 13px; margin: 0; }
.info dt { font-weight: 700; } .info dd { margin: 0; color: var(--ink-2); }
.info hr { border: 0; border-top: 2px solid var(--line); margin: 14px 0; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.charts h3 { color: var(--violet); font-size: 16px; font-weight: 700; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.charts svg { width: 100%; height: auto; }
.leg { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.list-firme .row { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-top: 1px solid var(--line); }
.list-firme .row:first-child { border-top: 0; }

/* ---------- E5 dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash h3 { color: var(--cyan); font-size: 18px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.dash h3 b { margin-left: auto; font-size: 13px; color: var(--ink-2); font-weight: 700; background: var(--bg); padding: 2px 10px; border-radius: 10px; }
.drow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.drow:first-of-type { border-top: 0; }
.drow .t { font-weight: 600; font-size: 14px; } .drow .s { font-size: 12px; color: var(--ink-2); }
.drow .ph { width: 36px; height: 36px; }
.drow .ph::after { inset: -4px; }
.drow .ph .ini { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 12px 2px 3px; border-radius: 18px; background: var(--bg); font-size: 13px; font-weight: 600; }
.chip .ph { width: 30px; height: 30px; } .chip .ph::after { inset: -3px; border-width: 2px; } .chip .ph .ini { display: none; }

/* ---------- E6 integrari ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 112px)); gap: 26px 30px; justify-content: center; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 104px; border-radius: 12px; background: var(--white); box-shadow: var(--shadow); font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px; color: var(--ink); }
.tile .lg { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.tile .lg img { width: 26px; height: 26px; }
.tile .lg b { font-family: var(--font); font-size: 15px; color: #fff; width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; }
.sub-title { color: var(--cyan); text-align: center; font-size: 19px; margin: 6px 0 16px; }

/* ---------- E8 erp / contabilitate ---------- */
.erp-list { font-weight: 700; font-size: 16px; line-height: 1.35; margin-bottom: 14px; }
.inst h2 { font-size: 20px; font-weight: 600; margin: 16px 0 6px; }
.inst a { display: flex; align-items: center; gap: 8px; color: var(--cyan-ink); font-weight: 700; font-size: 12px; text-transform: uppercase; padding: 3px 0; }
.inst a .badge { width: 18px; height: 18px; border-radius: 3px; background: #1d3f8f; color: #ffd400; font-size: 9px; display: grid; place-items: center; }
.acc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
.acc-nav { font-size: 13px; }
.acc-nav div { padding: 6px 10px; border-radius: 8px; }
.acc-nav .on { background: #111; color: #fff; font-weight: 700; }
.acc-nav .sub { padding-left: 24px; color: var(--ink-2); }
.acc-nav .sub2 { padding-left: 38px; color: var(--ink-2); }
.acc-nav .cur { font-weight: 700; color: var(--ink); }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; position: relative; }
.stepper::before { content: ""; position: absolute; left: 16%; right: 16%; top: 13px; border-top: 1px solid var(--line); }
.stepper div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; }
.stepper .ic { width: 22px; height: 22px; background: var(--white); }
.inv-tbl { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
.inv-tbl th { background: var(--bg); text-align: left; padding: 8px; font-weight: 600; }
.inv-tbl td { padding: 8px; border-top: 1px solid var(--line); }
.qr { width: 74px; height: 74px; }
.wip { max-width: 680px; }

/* ---------- foaie (Scan, meniu telefon) ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .35); }
.sheet { position: fixed; z-index: 70; left: 50%; top: 90px; transform: translateX(-50%); width: min(92vw, 340px); border-radius: 14px; overflow: hidden; background: rgba(48, 50, 55, .96); color: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.sheet h3 { padding: 14px 16px; font-size: 16px; text-align: center; background: #1f2124; }
.sheet button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 16px; }
.drawer { left: 0; top: 0; bottom: 0; transform: none; width: 280px; border-radius: 0; background: var(--white); color: var(--ink); overflow-y: auto; padding: 12px 10px; }

/* ---------- telefon (E7) ---------- */
.ptop { display: none; }
@media (max-width: 899px) {
  .app { display: block; }
  .menu, .rail { display: none; }
  .topbar { display: none; }
  .ptop { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 10px; height: 64px; padding: env(safe-area-inset-top) 10px 0; background: var(--white); box-shadow: 0 1px 0 var(--line); }
  .ptop .cm { color: var(--cyan-ink); font-weight: 700; font-size: 15px; line-height: 1.05; text-align: center; padding-right: 10px; border-right: 1px solid var(--line); min-height: 44px; display: grid; place-items: center; }
  .ptop .login { font-size: 12px; margin-left: auto; }
  main { padding: 14px 12px 30px; }
  .org { margin: -14px -12px -30px; background: var(--bg); color: var(--ink); min-height: auto; display: block; }
  .org-main { padding: 12px; }
  .org-bar, .org-bar2, .tree svg.links { display: none; }
  .tree { padding: 0; overflow: visible; }
  .lvl, .kids, .branch-kids { display: grid; gap: 14px; margin-bottom: 14px; justify-content: stretch; }
  .ocard { width: 100%; border-width: 0; border-radius: 16px; box-shadow: var(--shadow); padding: 18px 16px 14px; outline: 1px solid var(--line); outline-offset: -10px; }
  .ocard.sel { border-width: 0; outline: 3px solid var(--yellow); }
  .ocard .ph { width: 120px; height: 120px; }
  .ocard .nm { font-size: 20px; } .ocard .sl { font-size: 14px; }
  .ocard .msg { min-height: 40px; font-size: 15px; }
  .ocard.grp { width: 100%; min-height: 120px; justify-content: center; }
  .ocard.grp .ph { display: none; }
  .opanel { width: auto; position: static; max-height: none; border-left: 0; border-radius: 16px; margin-top: 14px; }
  .dash, .kpis, .charts { grid-template-columns: 1fr; }
  .acc { grid-template-columns: 1fr; } .acc-nav { display: none; }
  .tasks { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* N1 additions reuse the approved cards and buttons. */
.n1-company-search { display:grid; gap:8px; margin-bottom:8px; }
.n1-company-search input { width:100%; min-width:0; padding:10px; border:1px solid var(--line); border-radius:6px; font:inherit; }
.list-firme .row[hidden] { display:none; }
button:disabled { opacity:.65; cursor:default; }
#sheet:has(#scan-file) { max-height:calc(100dvh - 120px); overflow-y:auto; }
#scan-result,.n1-scan-hint { padding:10px 16px; overflow-wrap:anywhere; font-size:13px; }
#scan-result img { display:block; max-width:100%; max-height:240px; object-fit:contain; margin:8px auto; }

.mobile-command { display:none; }
.is-login .menu,.is-login .topbar,.is-login .ptop,.is-login .mobile-command,.is-login .lbar,.is-login .rbar { display:none!important; }
@media(max-width:899px){
 .mobile-command { display:block; padding:10px; background:var(--white); position:relative; z-index:16; }
 .mobile-command .cmd { width:100%; max-width:none; }
}
