:root{
  --ink:#17191E; --ink-2:#3D4048; --muted:#4A4E57; --soft:#6A6E78;
  --ground:#F3F3EF; --paper:#FFFFFF; --line:#E2E2DC; --field:#BFC0B8;
  --rust:#C2410C; --rust-text:#B4410A; --rust-hover:#A0380A;
  --navy:#1D5F8A; --teal:#2F7A6B; --peach:#F3B48A;
  --ok-bg:#E4F1EC; --ok-fg:#1E5246; --warn-bg:#FBEFD2; --warn-fg:#6E4700; --bad-bg:#FBE4DE; --bad-fg:#8E2208;
  --display:'Space Grotesk', system-ui, sans-serif;
  --body:'IBM Plex Sans', system-ui, sans-serif;
}
*{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--rust-text)}a:hover{color:var(--rust-hover)}
h1,h2,h3{font-family:var(--display);letter-spacing:-0.02em;margin:0}
:focus-visible{outline:3px solid var(--navy);outline-offset:2px;border-radius:4px}
[hidden]{display:none !important}

.bar{background:var(--ink);color:#fff}
.bar .in{max-width:1200px;margin:0 auto;padding:12px 20px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;min-height:64px}
.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none}
.brand:hover{color:#fff}
.brand .chips{display:flex;gap:3px}.brand .chips i{width:8px;height:22px;border-radius:2px}
.brand b{font-family:'Inter',var(--display);font-weight:900;font-size:21px;letter-spacing:-0.045em}
.brand b i{font-style:normal;color:#2E9BEB}
.brand .appn{font-family:var(--display);font-weight:700;font-size:18px;letter-spacing:-0.02em;color:#F3B48A;margin-left:-4px}
.box .brand b{color:#0D1B2A}
.box .brand .appn{color:var(--rust-text)}
.brand small{font-size:13px;color:var(--peach);font-weight:600;margin-left:4px}
.who{display:flex;align-items:center;gap:14px;font-size:14px;color:#C9CBD1;flex-wrap:wrap}

.wrap{max-width:1200px;margin:0 auto;padding:28px 20px 64px}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:24px}
.tab{font:600 15px var(--body);border:0;background:transparent;color:var(--ink);padding:12px 16px;border-radius:10px;cursor:pointer;min-height:46px;display:inline-flex;gap:8px;align-items:center}
.tab[aria-selected="true"]{background:var(--paper);box-shadow:0 1px 0 var(--line)}
.count{background:var(--rust);color:#fff;font-size:12px;border-radius:999px;padding:2px 8px}

.panel{background:var(--paper);border-radius:14px;padding:22px;box-shadow:0 1px 0 var(--line)}
.head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.head h1{font-size:28px}
.list{display:flex;flex-direction:column;gap:14px}
.item{background:var(--paper);border-radius:14px;padding:20px 22px;box-shadow:0 1px 0 var(--line);display:flex;flex-wrap:wrap;gap:16px 24px;align-items:flex-start}
.item .main{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:6px}
.item .t{font-family:var(--display);font-size:20px;font-weight:700}
.item .m{color:var(--muted);font-size:15px}
.item .act{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.empty{background:var(--paper);border-radius:14px;padding:36px;text-align:center;color:var(--muted)}

.pill{display:inline-block;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;padding:3px 9px;border-radius:6px}
.p-new{background:var(--warn-bg);color:var(--warn-fg)}
.p-ok{background:var(--ok-bg);color:var(--ok-fg)}
.p-bad{background:var(--bad-bg);color:var(--bad-fg)}
.p-gray{background:#ECECE6;color:var(--muted)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border-radius:8px;font:600 15px/1.2 var(--body);text-decoration:none;cursor:pointer;border:0}
.btn:disabled{opacity:.6;cursor:default}
.b-rust{background:var(--rust);color:#fff}.b-rust:hover{background:var(--rust-hover);color:#fff}
.b-dark{background:var(--ink);color:#fff}.b-dark:hover{background:#2C2F37;color:#fff}
.b-soft{background:var(--ground);color:var(--ink)}.b-soft:hover{background:#E6E6E0}
.b-line{background:transparent;color:#fff;border:1.5px solid #5A5D66}.b-line:hover{border-color:#fff;color:#fff}
.b-danger{background:transparent;color:var(--bad-fg);border:1.5px solid #E3B8AC}.b-danger:hover{background:var(--bad-bg)}

label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
input,select,textarea{font:400 16px/1.4 var(--body);padding:12px 13px;border:1.5px solid var(--field);border-radius:8px;background:var(--paper);color:var(--ink);width:100%}
input:focus,select:focus,textarea:focus{border-color:var(--navy);outline:none;box-shadow:0 0 0 3px rgba(29,95,138,.2)}
.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.full{grid-column:1/-1}
.msg{font-size:14px;font-weight:500;min-height:1.2em}
.msg.err{color:var(--bad-fg)}.msg.ok{color:var(--ok-fg)}

dialog{border:0;border-radius:16px;padding:0;max-width:520px;width:calc(100% - 32px);box-shadow:0 24px 60px rgba(0,0,0,.25)}
dialog::backdrop{background:rgba(23,25,30,.45)}
.dlg{padding:26px;display:flex;flex-direction:column;gap:16px}
.dlg h2{font-size:22px}
.dlg .row{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.secret{background:var(--ground);border-radius:10px;padding:14px 16px;font:600 18px/1.4 ui-monospace,Menlo,Consolas,monospace;word-break:break-all}
.quick{display:flex;flex-wrap:wrap;gap:6px}
.quick .btn{min-height:38px;padding:8px 12px;font-size:14px}

/* login */
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.box{background:var(--paper);border-radius:18px;padding:34px;width:100%;max-width:420px;box-shadow:0 1px 0 var(--line),0 18px 50px rgba(23,25,30,.08);display:flex;flex-direction:column;gap:18px}
.box .brand{color:var(--ink)}.box .brand:hover{color:var(--ink)}
.box h1{font-size:28px}
.item .main > .pill{align-self:flex-start}
.msg{margin:0}.dlg .msg:empty{display:none}

/* telefon: antet compact */
@media (max-width: 760px){
  .bar .in{min-height:56px;padding:8px 16px;gap:8px}
  .brand b{font-size:18px}
  .brand .appn{font-size:16px}
  .brand small{display:none}
  .who{gap:8px;font-size:13px}
  .who .btn{min-height:40px;padding:8px 12px;font-size:14px}
  .wrap{padding:18px 16px 48px}
  .tabs .tab{padding:10px 12px;font-size:14px;min-height:42px}
  .head h1{font-size:24px}
}
@media (max-width: 420px){
  .who > span{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* ───────── aplicația pe telefon (mobil.js) ───────── */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-tap-highlight-color:transparent}
a,button,.btn,label,summary{touch-action:manipulation}
.bar{padding-top:env(safe-area-inset-top)}
.bar .in{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
.muted{color:var(--muted)}

/* bara de jos – doar pe ecrane mici */
.tabbar{display:none}
@media (max-width: 760px){
  html.has-tabbar .bar{position:sticky;top:0;z-index:30}
  html.has-tabbar .bar .in{flex-wrap:nowrap;min-height:54px;padding-top:6px;padding-bottom:6px}
  html.has-tabbar .who > :not([data-langsel]){display:none !important}
  html.has-tabbar .side,html.has-tabbar .tabs{display:none !important}
  html.has-tabbar body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
  html.has-tabbar .shell,html.has-tabbar .wrap{padding-top:16px}
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:rgba(255,255,255,.96);
    -webkit-backdrop-filter:saturate(1.6) blur(14px);backdrop-filter:saturate(1.6) blur(14px);
    border-top:1px solid var(--line);padding:4px max(4px,env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-right))}
  .tb{flex:1 1 0;min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    min-height:56px;padding:4px 2px;border:0;background:none;color:#5E626B;text-decoration:none;font:600 11.5px/1.15 var(--body);cursor:pointer;border-radius:12px}
  .tb[hidden]{display:none}
  .tb svg{width:25px;height:25px}
  .tb .tb-l{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tb.on{color:var(--rust-text)}
  .tb.on svg{stroke-width:2.3}
  .tb:active{background:#F0F0EB}
  .tb-n{position:absolute;top:3px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--rust);color:#fff;
    font:700 11px/18px var(--body);text-align:center;box-shadow:0 0 0 2px #fff}
  .tb-dot{min-width:10px;width:10px;height:10px;padding:0;top:7px;left:calc(50% + 8px);font-size:0}
  /* dialoguri ca foi care urcă de jos */
  html.has-tabbar dialog{margin:auto auto 0;width:100%;max-width:none;border-radius:20px 20px 0 0;max-height:92dvh;
    padding-bottom:env(safe-area-inset-bottom);animation:hp-up .22s ease-out}
  html.has-tabbar dialog .dlg{padding:22px 18px 18px}
  html.has-tabbar dialog .dlg .row .btn{flex:1 1 auto}
}
@keyframes hp-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
dialog{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}

/* foaia „Meniu” */
.msheet{position:fixed;inset:0;z-index:60}
.ms-back{position:absolute;inset:0;background:rgba(23,25,30,.42);opacity:0;transition:opacity .2s}
.ms-card{position:absolute;left:0;right:0;bottom:0;max-height:88dvh;overflow:auto;background:var(--paper);border-radius:22px 22px 0 0;
  padding:6px 16px calc(16px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .22s cubic-bezier(.2,.8,.2,1);overscroll-behavior:contain}
.msheet.on .ms-back{opacity:1}.msheet.on .ms-card{transform:none}
@media (min-width: 761px){.ms-card{left:50%;right:auto;bottom:auto;top:50%;width:440px;border-radius:20px;transform:translate(-50%,-46%);opacity:0;transition:.2s}
  .msheet.on .ms-card{transform:translate(-50%,-50%);opacity:1}.ms-grip{display:none}}
.ms-grip{width:44px;height:5px;border-radius:3px;background:#D5D5CE;margin:6px auto 12px;cursor:pointer}
.ms-body h2{font-size:21px;margin:4px 0 14px}
.ms-who{display:flex;align-items:center;gap:12px;padding:6px 4px 14px;border-bottom:1px solid var(--line);margin-bottom:6px}
.ms-who b{font-family:var(--display);font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ms-av{width:40px;height:40px;border-radius:50%;background:var(--ground);display:grid;place-items:center;flex:none}
.ms-av svg{width:22px;height:22px}
.ms-list{display:flex;flex-direction:column}
.ms-it{display:flex;align-items:center;gap:14px;min-height:52px;padding:8px 6px;border:0;background:none;font:500 16px var(--body);color:var(--ink);
  text-decoration:none;text-align:start;cursor:pointer;border-radius:10px;width:100%}
.ms-it:active,.ms-it:hover{background:var(--ground);color:var(--ink)}
.ms-it svg{width:23px;height:23px;flex:none;color:#5E626B}
.ms-it .count{margin-inline-start:auto}
.ms-out{color:var(--bad-fg);margin-top:6px;border-top:1px solid var(--line);border-radius:0}
.ms-out svg{color:var(--bad-fg)}
.ms-full{width:100%;margin-top:16px}
.ios-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px}
.ios-steps li{display:flex;gap:14px;align-items:center;font-size:16px}
.st-ic{width:42px;height:42px;border-radius:12px;background:var(--ground);display:grid;place-items:center;flex:none;font:700 22px var(--body);color:var(--navy)}
.st-ic svg{width:22px;height:22px;color:var(--navy)}

/* îndemn (instalare / notificări) și mesaj scurt */
.hp-nudge,.hp-toast{position:fixed;z-index:50;left:12px;right:12px;bottom:calc(14px + env(safe-area-inset-bottom));
  background:var(--ink);color:#fff;border-radius:16px;box-shadow:0 14px 40px rgba(0,0,0,.28);
  transform:translateY(140%);opacity:0;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .2s;pointer-events:none}
html.has-tabbar .hp-nudge,html.has-tabbar .hp-toast{bottom:calc(80px + env(safe-area-inset-bottom))}
@media (min-width: 761px){.hp-nudge,.hp-toast{left:auto;right:24px;bottom:24px;width:400px}}
.hp-nudge.on,.hp-toast.on{transform:none;opacity:1;pointer-events:auto}
.hp-nudge{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;padding:14px 14px 12px}
.nd-ic{width:40px;height:40px;border-radius:12px;background:#2C2F37;display:grid;place-items:center;color:var(--peach)}
.nd-ic svg{width:22px;height:22px}
.nd-t{display:flex;flex-direction:column;gap:2px;font-size:14px;color:#C9CBD1}
.nd-t b{font-family:var(--display);font-size:16px;color:#fff}
.nd-a{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end;margin-top:8px}
.nd-a .btn{min-height:42px}
.nd-x{background:none;border:0;color:#C9CBD1;font:600 14px var(--body);padding:8px 12px;cursor:pointer;min-height:42px}
.hp-toast{display:flex;align-items:center;gap:12px;padding:12px 12px 12px 18px;font-size:15px}
.hp-toast span{flex:1}
.hp-toast .btn{min-height:40px;padding:8px 14px}

/* cardul Notificări din Contul meu */
.push-card{gap:14px !important}
.pc-head{display:flex;gap:14px;align-items:flex-start}
.pc-head h2{font-size:20px}
.pc-head p{margin:2px 0 0}
.pc-ic{width:44px;height:44px;border-radius:12px;background:#FFF1E8;color:var(--rust-text);display:grid;place-items:center;flex:none}
.pc-ic svg{width:24px;height:24px}
.pc-state{display:flex;flex-direction:column;gap:10px}
.pc-state p[data-s]{margin:0;padding:10px 14px;border-radius:10px;font-weight:500;background:var(--ground)}
.pc-state .pc-pornit{background:var(--ok-bg);color:var(--ok-fg)}
.pc-state .pc-blocat,.pc-state .pc-nesuportat{background:var(--warn-bg);color:var(--warn-fg)}
.pc-state .pc-ios{background:#E8F0F6;color:#173F5C}
.pc-acts{display:flex;flex-wrap:wrap;gap:8px}
.pc-acts:empty{display:none}
.pc-cats{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}
.pc-cats legend{font-family:var(--display);font-weight:700;font-size:16px;padding:0;margin-bottom:6px}
.pc-cat{flex-direction:row !important;align-items:center;gap:12px !important;font-weight:500 !important;font-size:15px !important;min-height:46px;
  padding:6px 4px;border-bottom:1px solid var(--line);cursor:pointer}
.pc-cat input{width:22px;height:22px;flex:none;accent-color:var(--rust);margin:0}
.pc-cats .hint{font-size:13px;color:var(--muted);margin:8px 0 0}
.push-card{background:var(--paper);border-radius:14px;padding:22px;box-shadow:0 1px 0 var(--line);display:flex;flex-direction:column}
.center{padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom))}
.boot{display:flex;align-items:center;justify-content:center;min-height:50vh}
.boot .chips{display:flex;gap:5px}.boot .chips i{width:12px;height:34px;border-radius:3px;animation:hp-pulse 1s ease-in-out infinite}
.boot .chips i:nth-child(2){animation-delay:.12s}.boot .chips i:nth-child(3){animation-delay:.24s}
@keyframes hp-pulse{0%,100%{transform:scaleY(.6);opacity:.5}50%{transform:none;opacity:1}}
@media (prefers-reduced-motion: reduce){.boot .chips i,.ms-card,.hp-nudge,.hp-toast,html.has-tabbar dialog{animation:none !important;transition:none !important}}
