/* Seto — sistem vizual comun. Fisier IDENTIC in toate aplicatiile (sursa: _shared/seto.css).
   Se incarca DUPA styles.css-ul aplicatiei, deci suprascrie tokenii si componentele comune. */
:root {
  --bg: #0E1116; --bg-elev: #161A21; --bg-elev2: #1E2430;
  --text: #E8EAED; --muted: #9AA3AF; --accent: #8AB4FF; --accent-strong: #6F9EF5;
  --green: #7BD88F; --amber: #F5B454; --red: #FF7A6E; --border: #242A35;
  --line: #20262F; --on-accent: #0B1220;
  --app-comenzi: #F5B454; --app-bonuri: #4FD1C5; --app-sondaje: #B69CFF; --app-cumparaturi: #7BD88F; --app-buget: #F48FB1;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
}
html, body { background: var(--bg); color: var(--text); font-family: var(--font); }
button, input, select, textarea { font-family: inherit; }
button { border-radius: 12px; }
input, select, textarea { border-radius: 12px; }
h1, h2, .h1 { font-family: var(--font-display); letter-spacing: -.02em; }

/* ---------- Header: ☰ Seto.  |  Aplicatia  |  actiune ---------- */
.app-header {
  display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 56px; box-sizing: content-box; padding: 0 6px !important; padding-top: env(safe-area-inset-top) !important;
  background: var(--bg) !important; border-bottom: 1px solid var(--line) !important;
}
.app-header .hdr-l { display: flex; align-items: center; min-width: 0; }
.app-header .header-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.app-header .icon-btn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); border-radius: 12px; }
.app-header .icon-btn:active { background: var(--bg-elev2); }
.seto-brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; color: var(--text); text-decoration: none; padding: 0 4px; }
.seto-brand span { color: var(--accent); }
.app-header .app-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; white-space: nowrap; cursor: pointer; }
.app-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.app-header #user-chip, .app-header #role-badge { display: none !important; }

/* ---------- Meniu lateral ---------- */
.drawer-panel {
  width: 318px !important; max-width: 86vw !important; background: #141820 !important; border-right: 1px solid var(--border) !important;
  padding: calc(12px + env(safe-area-inset-top)) 14px 20px !important; display: flex; flex-direction: column; gap: 2px; box-sizing: border-box;
}
.drawer-top { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 4px 0 8px; }
.drawer-top .seto-brand { font-size: 26px; padding: 0; }
.drawer-close { width: 44px; height: 44px; border: 0; background: transparent; color: #AEB6C2; display: grid; place-items: center; padding: 0; }
.seto-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 6px 0 8px; border-radius: 14px; background: #1A1F28; }
.seto-user .av { width: 40px; height: 40px; border-radius: 50%; background: #26324A; color: #BFD3FF; font-weight: 700; display: grid; place-items: center; flex: none; }
.seto-user .u-name { font-weight: 700; font-size: 15px; }
.seto-user .u-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seto-user .u-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.seto-user .u-admin { font-size: 11px; font-weight: 700; color: var(--amber); border: 1px solid rgba(245,180,84,.5); border-radius: 999px; padding: 2px 8px; flex: none; }
.drawer-user { display: none !important; }
.drawer-label { font-size: 11px !important; font-weight: 700 !important; letter-spacing: .08em !important; text-transform: uppercase; color: #8E97A5 !important; margin: 16px 8px 6px !important; }
.drawer-item {
  display: flex !important; align-items: center; gap: 12px; height: 48px; padding: 0 8px !important; margin: 0 !important;
  border-radius: 12px !important; border: 0 !important; background: transparent !important; color: var(--text) !important;
  font-size: 15px !important; font-weight: 600 !important; text-decoration: none; width: 100%; box-sizing: border-box; text-align: left;
}
.drawer-item:active { background: #1E2633 !important; }
.drawer-item.current { background: #1E2633 !important; }
.drawer-item.current::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.drawer-item.danger { color: #FF8A80 !important; }
.d-ic { width: 32px; height: 32px; display: grid; place-items: center; flex: none; color: #AEB6C2; }
.drawer-item.danger .d-ic { color: #FF8A80; }
.d-chip { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.d-chip.comenzi { background: rgba(245,180,84,.14); color: var(--app-comenzi); }
.d-chip.bonuri { background: rgba(79,209,197,.14); color: var(--app-bonuri); }
.d-chip.sondaje { background: rgba(182,156,255,.14); color: var(--app-sondaje); }
.d-chip.cumparaturi { background: rgba(123,216,143,.14); color: var(--app-cumparaturi); }
.d-chip.buget { background: rgba(244,143,177,.14); color: var(--app-buget); }
.drawer-spacer { flex: 1; min-height: 12px; }
.drawer svg, .app-header svg { display: block; }

/* ---------- Componente comune ---------- */
.page { padding: 16px !important; }
.section-title { font-size: 12px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; margin: 14px 4px 8px !important; }
.row { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px !important; }
.card, .modal-card { background: var(--bg-elev) !important; border: 1px solid var(--border) !important; border-radius: 18px !important; }
.modal { background: rgba(4,6,10,.62) !important; }
.toast { background: #232B38 !important; border: 1px solid #2F3744 !important; border-radius: 12px !important; }
.badge-arch { border-radius: 999px; }
.empty { color: var(--muted); }
input:not([type=checkbox]):not([type=radio]), select, textarea { background: var(--bg-elev2); border: 1px solid #2F3744; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(138,180,255,.45); outline-offset: 0; border-color: var(--accent); }

/* Butonul principal lat (actiunea principala a ecranului). */
.seto-cta {
  height: 52px; width: 100%; border-radius: 14px; background: var(--accent); color: var(--on-accent); border: 0;
  font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.seto-bottom { position: sticky; bottom: 0; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); margin-top: 8px; z-index: 5; }

/* ---------- Ferestre: pe telefon se deruleaza cand nu incap ---------- */
.modal { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important; }
.modal-card { max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto !important; overscroll-behavior: contain; box-sizing: border-box; }

/* ---------- Fereastra de invitatie (la fel in toate aplicatiile) ----------
   QR + link sus, persoanele dedesubt, butoanele fixate jos (mereu vizibile). */
.modal-card.invite-card { max-width: 420px; display: flex !important; flex-direction: column; gap: 10px; text-align: left; padding-bottom: 0 !important; }
.invite-card h2, .invite-card > .muted { text-align: center; margin: 0; }
.invite-card > .muted { font-size: 14px; }
.invite-card .qr-box { align-self: center; background: #fff; border-radius: 16px; padding: 10px; margin: 4px 0 0; width: auto; }
.invite-card .qr-box img, .invite-card .qr-box svg { width: 180px !important; height: 180px !important; display: block; }
.invite-card .invite-url { text-align: center; font-size: 12px; color: var(--muted); word-break: break-all; text-decoration: underline; cursor: pointer; margin: 0; }
.invite-card .invite-people { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; }
.invite-card .invite-people > input { width: 100%; margin: 0; }
.invite-card .ppl-row { display: flex; align-items: center; gap: 12px; }
.invite-card .ppl-row input[type=checkbox] { width: 20px !important; height: 20px; flex: none; margin: 0; accent-color: var(--accent); }
.invite-card .ppl-row span:not(.ppl-tag) { flex: 1; min-width: 0; overflow-wrap: break-word; }
.invite-card .ppl-list { max-height: none !important; overflow: visible !important; margin: 0; }
.invite-foot { position: sticky; bottom: 0; display: flex; gap: 8px; margin-top: 4px; padding: 10px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--bg-elev); border-top: 1px solid var(--line); z-index: 1; }
.invite-foot button { flex: 1; height: 48px; margin: 0; border-radius: 12px; font-weight: 700; }
.invite-foot .ghost { background: #1A1F28 !important; color: var(--text) !important; border: 1px solid #2A313C !important; }

/* ---------- Impartirea unui produs (aceeasi in Comenzi si Bonuri) ----------
   Fiecare are o suma: goala = automat (imparte egal restul), scrisa = fixata (mov, cu reset). */
.split-people { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); min-height: 60px; box-sizing: border-box; }
.sp-row:last-child { border-bottom: 0; }
.sp-row.off .sp-name b { color: var(--muted); font-weight: 600; }
.sp-ck { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #3A4250; background: transparent; display: grid; place-items: center; padding: 0; color: #150B2E; flex: none; cursor: pointer; }
.sp-ck.on { background: var(--app-sondaje); border-color: var(--app-sondaje); }
.sp-ck.lock { opacity: .55; cursor: default; }
.sp-name { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-name .muted { font-size: 12px; }
.sp-amt { display: flex; align-items: center; gap: 4px; flex: none; }
.sp-inwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sp-in { width: 92px !important; height: 40px; margin: 0 !important; text-align: right; font-weight: 600; font-size: 16px; color: #C9CFD8; box-sizing: border-box; padding: 0 10px !important; }
.sp-in::placeholder { color: #C9CFD8; opacity: .9; }
.sp-in.fixed { border-color: var(--app-sondaje) !important; color: #F1ECFF; font-weight: 700; background: rgba(182,156,255,.10) !important; }
.sp-tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sp-in.fixed + .sp-tag { color: #CBB9FF; }
.sp-reset { width: 32px; height: 32px; border: 0; background: transparent; color: var(--app-sondaje); display: grid; place-items: center; padding: 0; }
.sp-reset[hidden] { display: none; }
.sp-dash { width: 92px; text-align: right; }
.sp-msg { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.sp-msg.good { background: rgba(123,216,143,.10); border: 1px solid rgba(123,216,143,.35); color: #A6EDB5; }
.sp-msg.bad { background: rgba(255,122,110,.10); border: 1px solid rgba(255,122,110,.45); color: #FFB3AB; }
.sp-msg svg { flex: none; margin-top: 1px; }

/* ---------- Fara bare de scroll vizibile (PC, telefon, oriunde) ----------
   Derularea merge normal (roti, touch, trackpad); doar bara nu se mai vede. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Identitatea aplicatiei: iconita ei (fara bulina), sus langa nume si in meniu. */
.app-header .app-ic { width: 28px; height: 28px; border-radius: 9px; }
.drawer-item.current::after { display: none !important; content: none !important; }

.seto-user[hidden] { display: none !important; }
