/* Stratul 1: browserul Firma OS. Rama ferestrei, bara albastra din stanga, bara de comunicare din dreapta, panoul "Desktop View".
   Asezarea si culorile sunt citite din capturile ownerului (analiza-poze/crop). */
body { overflow-x: hidden; }
.browser { display: flex; flex-direction: column; min-height: 100vh; }
.chrome { position: sticky; top: 0; z-index: 40; background: #e9edf3; border-bottom: 1px solid #d3d9e2; }
[data-theme="dark"] .chrome { background: #26282c; border-color: #3a3c41; }
.tabsrow { display: flex; align-items: flex-end; gap: 4px; height: 34px; padding: 0 10px; }
.btab { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 10px 10px 0 0; background: #fff; font-size: 12px; font-weight: 600; color: #2b2f36; max-width: 240px; }
[data-theme="dark"] .btab { background: #3a3b3f; color: #eceef2; }
.btab .fav { width: 16px; height: 16px; border-radius: 4px; background: var(--cyan); color: #fff; font-size: 9px; font-weight: 800; display: grid; place-items: center; }
.newtab { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #5d6470; margin-bottom: 1px; }
.winbtns { margin-left: auto; display: flex; gap: 8px; align-self: center; }
.winbtns i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.navrow { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; background: #fff; }
[data-theme="dark"] .navrow { background: #303236; }
.navrow button, .navrow a.nb { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #4b5563; }
[data-theme="dark"] .navrow button, [data-theme="dark"] .navrow a.nb { color: #c3c7cf; }
.navrow button:hover { background: #eef0f3; }
.addr { flex: 1; display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 15px; background: #f1f3f6; font-size: 13px; color: #374151; }
[data-theme="dark"] .addr { background: #3a3b3f; color: #e5e7eb; }
.addr .ic { width: 14px; height: 14px; color: #22b24c; }
.win { flex: 1; display: flex; min-height: 0; }
/* bara albastra din stanga (browser) */
.lbar { position: sticky; top: 74px; height: calc(100vh - 74px); width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; background: linear-gradient(180deg, #5aa8f0, #3d8ee6); z-index: 30; transition: width 320ms var(--ease); }
.lbar a, .lbar button { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #fff; }
.lbar a:hover, .lbar button:hover, .lbar .on { background: rgba(255, 255, 255, .22); }
.lbar .ic { width: 20px; height: 20px; }
.lbar .txt { font-weight: 800; font-size: 15px; letter-spacing: -.02em; }
.lbar img { width: 20px; height: 20px; }
.lbar .gwhite { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.lbar hr, .rbar hr { width: 26px; border: 0; border-top: 1px solid rgba(255, 255, 255, .5); margin: 4px 0; }
.rbar hr { border-color: #d6dae1; }
.lbar .push, .rbar .push { margin-top: auto; }
.lbar.closed, .rbar.closed { width: 14px; padding: 0; gap: 0; overflow: hidden; }
.lbar.closed > :not(.collapse), .rbar.closed > :not(.collapse) { display: none; }
.collapse { width: 22px !important; height: 22px !important; border-radius: 6px !important; opacity: .85; }
.lbar.closed .collapse, .rbar.closed .collapse { width: 14px !important; height: 44px !important; margin-top: 40vh; border-radius: 0 !important; }
.rbar.closed .collapse { background: #e5e8ec; }
.lbar.closed .collapse { background: #3d8ee6; }
.custom-tip { position: absolute; left: 44px; white-space: nowrap; font-size: 11px; background: #1f2329; color: #fff; padding: 3px 8px; border-radius: 6px; display: none; z-index: 50; }
.lbar a:hover .custom-tip, .lbar button:hover .custom-tip { display: block; }
/* stratul 2 in fereastra */
.app { flex: 1; min-width: 0; display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - 74px); }
.app .menu { top: 74px; height: calc(100vh - 74px); }
.app .topbar { top: 74px; }
.mi { width: 100%; text-align: left; }
.mi .ini2 { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 800; }
.mi.sub-open .chev { transform: rotate(90deg); }
.submenu { padding: 2px 0 6px 46px; display: grid; }
.submenu a { padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.submenu a:hover { background: var(--bg); }
.menu-sep { margin: 12px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
/* bara de comunicare din dreapta (browser) */
.rbar { position: sticky; top: 74px; height: calc(100vh - 74px); width: 50px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; background: #f6f7f9; box-shadow: -1px 0 0 #d6dae1; z-index: 30; transition: width 320ms var(--ease); }
[data-theme="dark"] .rbar { background: #2b2d31; box-shadow: -1px 0 0 #3a3c41; }
.rbar a, .rbar button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #4b5563; }
.rbar button:hover, .rbar .on { background: #e3e7ee; }
.rbar img { width: 21px; height: 21px; }
.rbar .gpt { width: 24px; height: 24px; border-radius: 50%; background: #10a37f; color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.rbar .lin { width: 21px; height: 21px; border-radius: 4px; background: #0a66c2; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
/* panoul lateral "Desktop View" lipit de marginea dreapta (ca ChatGPT in captura Agent AI) */
.spanel { position: sticky; top: 74px; height: calc(100vh - 74px); width: 360px; flex: none; display: flex; flex-direction: column; background: #1f2023; color: #e9eaee; border-left: 1px solid #34363b; z-index: 29; }
.spanel.mini { height: 46px; align-self: flex-start; }
.spanel.mini .sp-body { display: none; }
.sp-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid #34363b; }
.sp-head .t { flex: 1; min-width: 0; font-size: 12px; line-height: 1.25; }
.sp-head .t b { display: block; font-size: 13px; }
.sp-head .t span { color: #a1a5ad; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.sp-head a, .sp-head button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: #c9ccd2; }
.sp-head .on { background: #3a3c41; color: #fff; }
.sp-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.sp-body .m { padding: 10px 12px; border-radius: 12px; background: #2c2e33; color: #d9dbe0; }
.sp-body .m.me { align-self: flex-end; background: #3a3c41; }
.sp-body .ln { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #2f3136; }
.sp-body .ln i { width: 30px; height: 30px; border-radius: 50%; background: #3a3c41; flex: none; }
.sp-body .ln span { flex: 1; height: 8px; border-radius: 4px; background: #3a3c41; }
.sp-foot { padding: 10px; border-top: 1px solid #34363b; display: flex; gap: 8px; }
.sp-foot input { flex: 1; min-width: 0; height: 34px; border-radius: 17px; border: 1px solid #3a3c41; background: #2a2c30; color: #e9eaee; padding: 0 14px; font: inherit; font-size: 13px; }
.sp-open { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 8px 14px; border-radius: 10px; background: var(--cyan); color: #fff; font-weight: 700; font-size: 13px; }
/* bara de sus: comanda + meniul pozei */
.cmd { position: relative; display: flex; align-items: center; gap: 8px; flex: 1; max-width: 560px; margin: 0 auto; }
.cmd .pillb { height: 32px; padding: 0 16px; border: 1px solid var(--cyan); border-radius: 6px; color: var(--cyan-ink); font-size: 13px; display: inline-flex; align-items: center; background: var(--white); }
.cmd input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); }
.cmd-res { position: absolute; left: 0; right: 0; top: 38px; background: var(--white); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); padding: 6px; z-index: 50; max-height: 360px; overflow-y: auto; }
.cmd-res a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.cmd-res a:hover { background: var(--bg); }
.cmd-res .k { font-size: 11px; color: var(--ink-3); width: 54px; flex: none; text-transform: uppercase; font-weight: 700; }
.me-btn { position: relative; display: flex; align-items: center; gap: 2px; }
.me-menu { position: absolute; right: 0; top: 46px; background: var(--white); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); padding: 6px; z-index: 50; min-width: 180px; display: grid; }
.me-menu button, .me-menu a { text-align: left; padding: 9px 12px; border-radius: 8px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.me-menu button:hover, .me-menu a:hover { background: var(--bg); }
.notes-panel textarea { width: 100%; min-height: 220px; border-radius: 10px; border: 1px solid #3a3c41; background: #2a2c30; color: #f3f4f6; padding: 10px; font: inherit; font-size: 14px; resize: vertical; }
.post { border-style: dashed !important; border-color: #b9bdc5 !important; background: #f7f8fa !important; }
.post .nm { color: var(--ink-2) !important; }
.hist { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: #3b3d42; color: #ffd28a; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.years input[type=range] { width: 100%; accent-color: #2f80ed; margin: 0; height: 14px; }
.tcard p[contenteditable] { outline: none; cursor: text; }
.tcard p[contenteditable]:focus { background: rgba(255, 255, 255, .55); border-radius: 4px; }
.unsaved { position: absolute; top: 34px; right: 8px; font-size: 9px; font-weight: 800; color: #b45309; background: #fff4e5; padding: 1px 6px; border-radius: 6px; }
.hosted-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; background: var(--white); border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; }
.hosted-top .lang { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 14px; background: var(--bg); }
.mob-sec { margin: 14px 8px 4px; font-size: 11px; font-weight: 800; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.mob-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; font-weight: 600; width: 100%; text-align: left; }
.mob-row img { width: 22px; height: 22px; }
/* telefon: aplicatia singura, fara straturile browserului (B9) */
@media (max-width: 899px) {
  .chrome, .lbar, .rbar { display: none; }
  .win { display: block; }
  .app { display: block; min-height: auto; }
  .spanel { position: fixed; inset: 0; width: auto; height: auto; z-index: 80; }
}
@media (min-width: 900px) {
  .opanel { top: 138px; max-height: calc(100vh - 138px); }
  .org { min-height: calc(100vh - 138px); }
}
.tile { cursor: pointer; }
.years { min-width: 230px; }
.org-bar2 .dpill { white-space: nowrap; }
@media (max-width: 899px) {
  .lvl, .kids, .branch-kids { grid-template-columns: minmax(0, 1fr); }
  .ocard { max-width: 100%; }
}
/* V1: meniul alb strans (Organigrama porneste asa, ca in poza) */
.app.menu-closed { grid-template-columns: 0 minmax(0, 1fr); }
.app.menu-closed .menu { overflow: hidden; padding: 0; visibility: hidden; }
.mtog { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); margin-right: -6px; }
.mtog:hover { background: var(--bg); }
/* imaginile de brand din bara dreapta */
.rbar img { width: 21px; height: 21px; object-fit: contain; }
/* V2: biletele de sarcini la marimea din poza: inalte, cam doua pe rand la 1440, text sus, oameni jos */
.tasks { grid-template-columns: repeat(auto-fill, minmax(330px, 380px)); gap: 22px; }
.tcard { min-height: 400px; padding: 12px 14px 12px; }
.tcard p { flex: 1; text-align: center; font-size: 14px; line-height: 1.5; padding: 10px 18px; }
.tcard .ppl { margin-top: auto; }
.tcard .ppl .ph { width: 26px; height: 26px; }
.tcard .tb button { height: 22px; font-size: 10px; }
@media (max-width: 899px) { .tasks { grid-template-columns: minmax(0, 1fr); } .tcard { min-height: 260px; } }
/* V1: linia de sus a organigramei pe un singur rand, ca in poza */
@media (min-width: 900px) { .org-bar { flex-wrap: nowrap; } .org-bar .years { min-width: 200px; } .org-bar .dsearch { min-width: 140px; } .org-bar .dpill { white-space: nowrap; } }

#login{display:grid;gap:14px;margin-top:20px}#login label,#sheet label{display:grid;gap:6px;margin:10px 0}#login input,#sheet input,#sheet textarea,#sheet select{box-sizing:border-box;width:100%;max-width:100%;padding:10px;border:1px solid #ccd1da;border-radius:6px;background:white;color:#17212f;font:inherit}
/* Imported titles can contain long paths; shrink the existing flex/grid cells on mobile. */
.dash > .card,.drow > div { min-width:0; }
.drow .t,.drow .s { overflow-wrap:anywhere; }
.acc > div { min-width:0; }
@media(max-width:899px){ .inv-tbl{display:block;max-width:100%;overflow-x:auto} .stepper{grid-template-columns:minmax(0,1fr)} .hosted-top{flex-wrap:wrap} }

/* punctul 3: cardurile organigramei la marimea din poza (mai mari; trei pe rand cu panoul deschis) */
@media (min-width: 900px) {
  .ocard { width: 236px; padding: 18px 14px 12px; }
  .ocard .ph { width: 86px; height: 86px; }
  .ocard .nm { font-size: 16px; }
  .ocard .msg { min-height: 32px; font-size: 13px; }
  .ocard.grp { width: 236px; }
  .branch-kids { max-width: 800px; margin: 0 auto; gap: 26px 36px; }
}
