/* StartPFA — aplicația clientului. Design system: neutre cu nuanță verde, accent verde (sigla),
   ierarhie clară, spațiere pe grilă de 4px, adâncime fină, tranziții discrete. */

:root {
  /* neutre calde */
  --paper: #fafcfa;
  --surface: #ffffff;
  --surface-2: #f3f7f4;
  --panel: #ebf2ed;
  --ink: #16211a;
  --ink-2: #3b4740;
  --muted: #68756c;
  --rule: #e0e8e2;
  --rule-strong: #ccd8cf;

  /* accent */
  --accent: #15883a;
  --accent-strong: #0e7430;
  --accent-dark: #11702f;      /* text accent pe fundal deschis */
  --accent-soft: #e7f5ea;
  --accent-ink: #ffffff;       /* text pe butonul verde */

  /* semantice */
  --danger: #c93b3b;
  --danger-soft: #fbeceb;
  --ok: #3d8f4e;
  --warn: #9a6a1e;
  --bad-bg: #fbeceb;
  --bad-ink: #7c2723;
  --wait-bg: #fdf1de;
  --wait-ink: #6b4a12;

  /* formă */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* adâncime */
  --sh-1: 0 1px 2px rgba(14, 34, 20, .05);
  --sh-2: 0 1px 3px rgba(14, 34, 20, .06), 0 8px 24px -14px rgba(14, 34, 20, .16);
  --sh-3: 0 2px 6px rgba(14, 34, 20, .08), 0 22px 48px -20px rgba(14, 34, 20, .28);
  --sh-accent: 0 6px 20px -8px rgba(21, 136, 58, .5);
  --accent-grad: linear-gradient(135deg, #43b23a 0%, #15883a 55%, #0b6f2c 100%);

  /* mișcare */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t: .18s var(--ease);

  --tap: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1410;
    --surface: #141c17;
    --surface-2: #19221c;
    --panel: #1d2721;
    --ink: #ebf2ed;
    --ink-2: #c0ccc4;
    --muted: #8a988f;
    --rule: #26312a;
    --rule-strong: #344239;

    --accent: #3fb24f;
    --accent-strong: #56c565;
    --accent-dark: #7fd68a;
    --accent-soft: #15291b;
    --accent-ink: #04130a;

    --danger: #ef6a5c;
    --danger-soft: #2a1512;
    --ok: #74bd7c;
    --bad-bg: #2a1512;
    --bad-ink: #f0c5bd;
    --wait-bg: #2a2214;
    --wait-ink: #e8cd97;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
    --sh-2: 0 1px 3px rgba(0, 0, 0, .35), 0 10px 28px -16px rgba(0, 0, 0, .6);
    --sh-3: 0 2px 8px rgba(0, 0, 0, .4), 0 24px 52px -20px rgba(0, 0, 0, .7);
    --sh-accent: 0 8px 24px -10px rgba(63, 178, 79, .35);
    --accent-grad: linear-gradient(135deg, #5cc463 0%, #3fb24f 55%, #24923a 100%);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; accent-color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "cv05", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

svg { max-width: 100%; }
button svg, label svg { width: 1.5em; height: 1.5em; flex: none; }

.wrap { max-width: 540px; margin: 0 auto; padding: 1.25rem 1.15rem 3.5rem; }
[hidden] { display: none !important; }

/* apariția lină a ecranelor */
.wrap > section:not([hidden]) { animation: apar .28s var(--ease); }
@keyframes apar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wrap > section:not([hidden]) { animation: none; } }

h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.021em; margin: 0 0 .35rem; text-wrap: balance; }
h2 { font-size: 1.06rem; font-weight: 650; letter-spacing: -.012em; margin: 1.75rem 0 .7rem; color: var(--ink); }
h3 { letter-spacing: -.01em; }
p { margin: .45rem 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
a { color: var(--accent-dark); text-underline-offset: 2px; }

:where(button, a, input, select, .chip, .an-tab):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4.5px var(--accent);
}

/* ============ meniu (drawer) ============ */
.meniu-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 1.7rem);
  right: max(1rem, calc((100vw - 540px) / 2 + 1rem));
  z-index: 30;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  cursor: pointer;
  transition: transform var(--t), background var(--t);
}
.meniu-btn:active { transform: scale(.94); }

.meniu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 20, 12, .48);
  backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
  animation: fadeIn .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.meniu-panou {
  width: min(84vw, 328px);
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--rule);
  padding: calc(env(safe-area-inset-top) + 1.1rem) 1.1rem calc(env(safe-area-inset-bottom) + 1.1rem);
  display: flex; flex-direction: column; overflow-y: auto;
  box-shadow: var(--sh-3);
  animation: slideIn .26s var(--ease);
}
@keyframes slideIn { from { transform: translateX(18px); opacity: .6; } }
.meniu-head { display: flex; align-items: center; gap: .6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); margin-bottom: .9rem; }
.meniu-head .app-name { flex: 1; }
.meniu-head button {
  width: 36px; height: 36px; border: 0; background: none; color: var(--muted);
  font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 8px;
}
.meniu-head button:active { background: var(--surface-2); }
.meniu-lista { display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.meniu-item {
  display: flex; align-items: center;
  text-align: left; border: 0; background: none; color: var(--ink);
  font-size: 1.02rem; font-weight: 500;
  padding: .92rem .7rem; border-radius: var(--r-sm); cursor: pointer;
  transition: background var(--t);
}
.meniu-item:hover, .meniu-item:focus-visible { background: var(--surface-2); }
.meniu-item:active { background: var(--accent-soft); }
.meniu-iesire {
  display: block; text-align: center; margin-top: 1rem;
  padding: .85rem; border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  color: var(--danger); font-weight: 600; text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.meniu-iesire:active { background: var(--danger-soft); border-color: var(--danger); }

/* ============ header ============ */
.app-head {
  display: flex; flex-direction: column; gap: .25rem;
  padding: .5rem 0 1.15rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}
.app-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: .85rem; }
.app-logo { width: 40px; height: 40px; border-radius: 11px; flex: none; display: block; box-shadow: var(--sh-1); }
.app-logo.lg { width: 68px; height: 68px; border-radius: 18px; box-shadow: var(--sh-2); }
.app-name { font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.app-head .salut { font-size: .9rem; color: var(--muted); margin: 0; }
.app-head .firma { font-size: 1.42rem; font-weight: 750; line-height: 1.18; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.app-head .btn-inapoi + .firma { margin-top: .25rem; }
.brand-mare {
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  margin: 2.2rem 0 2rem;
}
.brand-mare .app-name { font-size: 1.28rem; }

/* ============ butoane ============ */
.trimite {
  margin-top: 1.6rem;
  width: 100%; min-height: 58px;
  font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em;
  border: 0; border-radius: var(--r);
  background: var(--accent-grad, var(--accent)); color: var(--accent-ink);
  box-shadow: var(--sh-accent);
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), opacity var(--t), background var(--t);
}
.trimite:hover { background: var(--accent-grad, var(--accent)); filter: brightness(1.06); }
.trimite:active { transform: translateY(1px) scale(.99); box-shadow: 0 3px 12px -6px rgba(21,136,58,.45); }
.trimite:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; transform: none; }

.btn-secundar {
  margin-top: 1rem; width: 100%; min-height: 50px;
  font-size: 1rem; font-weight: 600;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--sh-1); cursor: pointer;
  transition: transform var(--t), border-color var(--t);
}
.btn-secundar:active { transform: scale(.99); border-color: var(--accent); }

.btn-inapoi {
  align-self: flex-start; background: none; border: 0;
  color: var(--accent-dark); font-size: .96rem; font-weight: 600;
  padding: .35rem .1rem .35rem 0; cursor: pointer;
  transition: opacity var(--t);
}
.btn-inapoi:active { opacity: .6; }

/* ============ inputuri ============ */
.camp-mare, input[type="text"].detaliu, .pin-input,
.profil-camp input, .profil-cerere-panel input, .profil-cerere-panel select {
  width: 100%;
  font: inherit; font-size: 1.05rem;
  padding: .85rem .95rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none; appearance: none;
}
.camp-mare { margin: .5rem 0; min-height: var(--tap); }
.camp-mare:focus, input[type="text"].detaliu:focus,
.profil-camp input:focus, .profil-cerere-panel input:focus, .profil-cerere-panel select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pin-input { font-size: 1.9rem; letter-spacing: .55em; text-align: center; margin: 1rem 0; }
input[type="text"].detaliu { margin-top: .65rem; }

.pw-wrap { position: relative; display: block; }
.pw-wrap > input { padding-right: 3rem; }
.pw-toggle {
  position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
  border: 0; background: none; cursor: pointer; font-size: 1.15rem;
  line-height: 1; padding: .4rem; color: var(--muted); border-radius: 8px;
}

/* ============ pagină de conținut ============ */
.pagina-continut { font-size: 1rem; color: var(--ink-2); }
.pagina-continut p { margin: 0 0 1rem; }
.pagina-continut a { word-break: break-word; }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1.6rem; padding: 1rem;
  border-radius: var(--r); background: #25d366; color: #fff;
  font-size: 1.04rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 20px -10px rgba(37, 211, 102, .7);
  transition: transform var(--t);
}
.btn-whatsapp:active { transform: scale(.985); }

/* ============ segmented / tab-uri / chips — o singură familie de pastile ============ */
.segmented {
  display: flex; gap: .25rem; background: var(--surface-2);
  border-radius: var(--r-sm); padding: .28rem;
}
.segmented button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  font-size: .98rem; font-weight: 600; padding: .58rem; border-radius: 8px; cursor: pointer;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.segmented button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-1);
}

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip, .an-tab {
  border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--ink-2);
  border-radius: var(--r-pill);
  padding: .55rem 1.05rem;
  font-size: .96rem; font-weight: 550;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t), transform var(--t);
}
.chip:active, .an-tab:active { transform: scale(.96); }
.chip[aria-pressed="true"], .an-tab.activ {
  border-color: var(--accent); background: var(--accent); color: var(--accent-ink);
  font-weight: 650;
  box-shadow: var(--sh-accent);
}

/* ============ month picker ============ */
.luna-pick { display: flex; align-items: stretch; gap: .5rem; margin: .5rem 0 0; }
.luna-nav {
  flex: none; width: 46px; min-height: var(--tap);
  font-size: 1.3rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); cursor: pointer;
  box-shadow: var(--sh-1);
  transition: transform var(--t), opacity var(--t);
}
.luna-nav:active { transform: scale(.94); }
.luna-nav:disabled { opacity: .28; box-shadow: none; }
.luna-btn {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap); font-size: 1.04rem; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap;
  border: 1.5px solid var(--accent); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink);
  padding: .7rem .6rem; cursor: pointer;
  box-shadow: var(--sh-1);
  transition: background var(--t);
}
.luna-btn svg { flex: none; color: var(--accent); transition: transform var(--t); }
.luna-btn[aria-expanded="true"] { background: var(--accent-soft); }
.luna-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.luna-lista {
  margin: .55rem 0 1rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  overflow-y: auto; max-height: 56vh; background: var(--surface);
  box-shadow: var(--sh-2);
}
.luna-optiune {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--rule); color: var(--ink);
  font-size: 1rem; padding: .9rem 1.1rem; cursor: pointer;
  transition: background var(--t);
}
.luna-optiune:last-child { border-bottom: 0; }
.luna-optiune:active { background: var(--surface-2); }
.luna-optiune[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.luna-optiune .bif { color: var(--accent); font-weight: 700; }

/* ============ acțiuni mari (poze) ============ */
.actiuni { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 1.7rem 0 1rem; }
.btn-mare {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem;
  min-height: 116px; padding: 1rem .5rem;
  border: 1px solid var(--rule-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font-size: .96rem; font-weight: 600; text-align: center; cursor: pointer;
  box-shadow: var(--sh-1);
  transition: transform var(--t), border-color var(--t), background var(--t);
}
.btn-mare svg { width: 30px; height: 30px; color: var(--accent-dark); }
.btn-mare:hover { border-color: var(--accent); }
.btn-mare:active { transform: scale(.97); background: var(--accent-soft); }
.btn-mare input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.atas-wrap { margin-top: .4rem; }
.btn-atas {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .95rem 1rem;
  border: 1px dashed var(--rule-strong); border-radius: var(--r);
  background: var(--surface); color: var(--muted);
  font-size: .98rem; font-weight: 600; text-align: center; cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.btn-atas:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-atas:active { background: var(--accent-soft); }
.btn-atas svg { width: 18px; height: 18px; flex: none; }
.btn-atas input { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.atas-hint { margin: .5rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }

.adauga-mai {
  background: none; border: 1px dashed var(--rule-strong); color: var(--muted);
  border-radius: var(--r-sm); padding: .75rem; width: 100%; font-size: .94rem; cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.adauga-mai:active { border-color: var(--accent); color: var(--accent-dark); }

/* ============ listă fișiere atașate ============ */
.fisiere-lista { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.file-chip {
  display: flex; align-items: center; gap: .7rem;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: .6rem .75rem; background: var(--surface); box-shadow: var(--sh-1);
}
.file-chip .fc-ic {
  flex: none; font-family: ui-monospace, "SF Mono", monospace;
  font-size: .66rem; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-soft); border-radius: 6px;
  padding: .32rem .42rem; min-width: 3rem; text-align: center; letter-spacing: .02em;
}
.file-chip .fc-n { flex: 1; font-size: .88rem; word-break: break-all; color: var(--ink-2); }
.file-chip button {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--surface-2); color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer;
  transition: background var(--t), color var(--t);
}
.file-chip button:active { background: var(--danger-soft); color: var(--danger); }

/* ============ thumbnails ============ */
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.thumb {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-sm); overflow: hidden;
  background: var(--surface-2); box-shadow: var(--sh-1);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.thumb .thumb-x {
  position: absolute; top: 5px; right: 5px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(6, 16, 10, .68); color: #fff;
  font-size: 1.05rem; line-height: 1; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform var(--t);
}
.thumb .thumb-x:active { transform: scale(.86); }
.thumb-ov { position: absolute; inset: 0; background: rgba(6, 16, 10, .48); display: grid; place-items: center; }
.mini-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  animation: spin 1s linear infinite;
}
.thumb-badge {
  position: absolute; left: 5px; bottom: 5px;
  font-size: .6rem; font-weight: 700; letter-spacing: .02em;
  background: var(--accent); color: var(--accent-ink);
  padding: .12rem .4rem; border-radius: 5px;
}
.thumb-badge.orig { background: var(--warn); color: #fff; }
.thumbs-hint { margin: -.2rem 0 .5rem; font-size: .8rem; color: var(--muted); text-align: center; }

/* ============ bara de instalare ============ */
.install-bar {
  display: flex; align-items: center; gap: .65rem;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--r-sm); padding: .75rem .85rem;
  margin: 0 0 1.1rem; font-size: .9rem; line-height: 1.35;
}
.install-bar span { flex: 1; color: var(--ink-2); }
.install-bar #install-btn {
  flex: none; background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 8px; padding: .5rem .9rem;
  font-size: .9rem; font-weight: 700; cursor: pointer;
}
.install-bar #install-close {
  flex: none; background: none; border: 0; color: var(--muted);
  font-size: 1.35rem; line-height: 1; padding: 0 .15rem; cursor: pointer;
}

/* ============ bannere ============ */
.banner {
  border-radius: var(--r-sm); padding: .95rem 1.05rem; margin: 1rem 0;
  font-size: .96rem; line-height: 1.45;
  border: 1px solid transparent;
  animation: apar .24s var(--ease);
}
.banner.ok { background: var(--accent-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: var(--ink-2); }
.banner.bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--bad-ink); }
.banner.wait { background: var(--wait-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--wait-ink); }

/* ============ istoric ============ */
.istoric { list-style: none; padding: 0; margin: .5rem 0 0; }
.istoric li {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--rule);
  font-size: .96rem;
}
.istoric li:last-child { border-bottom: 0; }
.istoric .st {
  font-size: .78rem; font-weight: 650; white-space: nowrap;
  padding: .18rem .55rem; border-radius: var(--r-pill);
}
.istoric .st.urcata { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.istoric .st.esuata { color: var(--danger); background: var(--danger-soft); }
.istoric .st.primita, .istoric .st.in_curs { color: var(--warn); background: var(--wait-bg); }

/* ============ termeni ============ */
.termeni-text {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1);
  padding: 1rem 1.1rem; margin: .8rem 0 1rem;
  max-height: 44vh; overflow-y: auto;
  white-space: pre-wrap; font-size: .88rem; line-height: 1.6; color: var(--ink-2);
}
.termeni-check {
  display: flex; align-items: flex-start; gap: .65rem;
  margin: 0 0 1rem; font-size: .98rem; cursor: pointer; color: var(--ink-2);
}
.termeni-check input { width: 1.35rem; height: 1.35rem; flex: none; margin-top: .06rem; accent-color: var(--accent); }

#ecran-pagina:not([hidden]) { display: flex; flex-direction: column; min-height: calc(100dvh - 5rem); }
.pagina-legal { text-align: center; margin: auto 0 0; padding-top: 2.5rem; }
.pagina-legal button {
  background: none; border: 0; padding: .3rem;
  color: var(--muted); font-size: .78rem; text-decoration: underline; cursor: pointer;
}
.dlg-termeni {
  border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 0;
  width: min(92vw, 480px); max-height: 80vh;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--sh-3);
}
.dlg-termeni::backdrop { background: rgba(8, 20, 12, .55); backdrop-filter: blur(2px); }
.dlg-termeni-cap {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: var(--paper);
}
.dlg-termeni-cap strong { font-size: 1rem; letter-spacing: -.01em; }
.dlg-termeni-cap button {
  width: 34px; height: 34px; border: 0; background: none; color: var(--muted);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.dlg-termeni-text {
  padding: 1.1rem; overflow-y: auto; max-height: calc(80vh - 58px);
  white-space: pre-wrap; font-size: .8rem; line-height: 1.6; color: var(--ink-2);
}

.dlg-galerie {
  box-sizing: border-box;
  border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 0;
  width: min(94vw, 520px); max-width: 94vw; max-height: 90vh; max-height: 90dvh;
  background: var(--paper); color: var(--ink);
  box-shadow: var(--sh-3); overflow: hidden;
}
.dlg-galerie[open] { display: flex; flex-direction: column; }
.dlg-galerie::backdrop { background: rgba(8, 20, 12, .72); backdrop-filter: blur(2px); }
.dlg-galerie-cap {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  padding: .6rem .6rem .6rem 1rem; border-bottom: 1px solid var(--rule); flex: 0 0 auto;
}
.dlg-galerie-cap #gal-contor {
  flex: 1 1 auto; min-width: 0; font-size: .85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dlg-galerie-cap button {
  flex: 0 0 auto; width: 36px; height: 36px; border: 0; background: none; color: var(--muted);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
}
.dlg-galerie-corp {
  position: relative; display: flex; align-items: center; justify-content: center;
  flex: 1 1 auto; min-width: 0; min-height: 0; height: 68vh; height: 68dvh; overflow: hidden;
  background: #0b0b0c;
}
.dlg-galerie-corp img {
  display: block; min-width: 0; width: auto; height: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
}
#dlg-galerie #gal-salveaza { flex: 0 0 auto; width: calc(100% - 2rem); margin: .8rem 1rem; box-sizing: border-box; }
.gal-fisier-link {
  color: var(--paper); background: var(--accent); padding: .7rem 1.2rem; border-radius: var(--r-pill);
  font-weight: 600; text-decoration: none;
}
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.gal-prev { left: .5rem; }
.gal-next { right: .5rem; }

/* ============ situația fiscală ============ */
.an-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.3rem; }

.fisc-card {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1);
  padding: .35rem 1.1rem; margin: .65rem 0;
}
.fisc-rand {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--rule);
}
.fisc-rand:last-child { border-bottom: 0; }
.fisc-rand span { color: var(--muted); }
.fisc-rand small { font-size: .8rem; }
.fisc-rand b { font-size: 1.04rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fisc-rand.net span, .fisc-rand.total span { color: var(--ink); font-weight: 600; }
.fisc-rand.net b, .fisc-rand.total b { font-size: 1.2rem; letter-spacing: -.01em; }
.fisc-card.ramas { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--sh-2); }
.fisc-card.ramas .fisc-rand.net b { color: var(--accent-dark); }
.fisc-motive {
  margin: .8rem 0 0; padding: .75rem 1rem .75rem 2rem; list-style: disc;
  background: var(--surface-2); border-radius: var(--r-sm); font-size: .86rem; color: var(--ink-2);
}
.fisc-motive li { margin: .2rem 0; }
.fisc-data { margin: 1rem 0 0; font-size: .84rem; color: var(--muted); }
.disclaimer { margin-top: 1.7rem; font-size: .82rem; color: var(--muted); line-height: 1.5; }

/* ============ taxe de plată ============ */
.ob-sumar {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--sh-1);
  padding: .35rem 1.1rem; margin: 0 0 1.4rem;
}
.ob-sumar .os-total, .ob-sumar .os-rand {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid var(--rule);
}
.ob-sumar .os-rand:last-child { border-bottom: 0; }
.ob-sumar .os-total { font-weight: 700; }
.ob-sumar .os-total b { color: var(--accent-dark); font-size: 1.16rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ob-sumar .os-rand { color: var(--muted); font-size: .95rem; }

.ob-luna {
  display: inline-block; margin: .4rem 0 1rem;
  padding: .48rem 1.05rem; border-radius: var(--r-pill);
  background: var(--surface-2); font-weight: 600; font-size: .92rem; color: var(--ink-2);
}

.ob-card {
  border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--surface); padding: 1.1rem;
  margin: 0 0 1rem; box-shadow: var(--sh-2);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.ob-card.ob-plecat { opacity: 0; transform: translateX(24px); }
.ob-card-cap {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding-bottom: .85rem; margin-bottom: .35rem; border-bottom: 1px solid var(--rule);
}
.ob-tip { font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; }
.ob-per { color: var(--muted); font-size: .84rem; margin-top: .12rem; }
.ob-suma {
  font-size: 1.28rem; font-weight: 800; color: var(--accent-dark);
  font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em;
}
.ob-camp {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  text-align: left; border: 0; border-bottom: 1px solid var(--rule);
  background: none; color: var(--ink); padding: .75rem 0; cursor: pointer;
  transition: background var(--t);
}
.ob-camp .ob-et { flex: none; width: 6.5rem; font-size: .78rem; color: var(--muted); }
.ob-camp .ob-val { flex: 1; font-size: 1rem; word-break: break-all; }
.ob-camp.mono .ob-val { font-family: ui-monospace, "SF Mono", monospace; letter-spacing: .01em; }
.ob-camp .ob-copy {
  flex: none; font-size: .7rem; font-weight: 800; color: var(--accent-dark);
  text-transform: uppercase; letter-spacing: .05em;
}
.ob-camp:active { background: var(--accent-soft); }

.ob-platit {
  width: 100%; margin-top: .95rem; min-height: 50px;
  border: 0; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink);
  font-size: 1.04rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--sh-accent);
  transition: transform var(--t), opacity var(--t);
}
.ob-platit:active { transform: scale(.99); }
.ob-platit:disabled { opacity: .5; box-shadow: none; }

.ob-gol { text-align: center; padding: 3.2rem 1rem; color: var(--muted); }
.ob-gol-emoji {
  width: 66px; height: 66px; margin: 0 auto .85rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 2rem; font-weight: 700;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
}
.ob-gol p { font-size: 1.04rem; }

/* ============ profil ============ */
.profil-lista { display: flex; flex-direction: column; margin: 1.1rem 0 .4rem; }
.profil-grup { display: flex; flex-direction: column; padding: 1.4rem 0; }
.profil-grup:first-child { padding-top: .2rem; }
.profil-grup + .profil-grup { border-top: 1px solid var(--rule-strong); }
.profil-grup > h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; color: var(--ink); }
.profil-ro {
  display: flex; justify-content: space-between; align-items: baseline; gap: .9rem;
  padding: .65rem 0; border-bottom: 1px solid var(--rule);
}
.profil-ro:last-child { border-bottom: 0; padding-bottom: 0; }
.profil-ro > span { font-size: .84rem; color: var(--muted); flex: none; }
.profil-ro > b { font-size: .98rem; text-align: right; word-break: break-word; flex: 1; min-width: 0; }
.profil-camp { display: block; font-size: .84rem; color: var(--muted); margin-top: .75rem; }
.profil-camp input { margin-top: .38rem; }
.profil-camp input:disabled { background: var(--surface-2); color: var(--ink-2); opacity: 1; }
.profil-blocat { color: var(--ok); font-weight: 600; }
.profil-bife { display: flex; gap: 1.9rem; padding: .5rem 0 .1rem; }
.profil-bifa { display: flex; align-items: center; gap: .55rem; font-size: 1rem; color: var(--ink); margin: 0; cursor: pointer; }
.profil-bifa input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.profil-nota { margin: .1rem 0 .5rem; font-size: .8rem; color: var(--muted); }
.profil-in-asteptare { color: var(--warn); font-weight: 600; }
.profil-editeaza-btn {
  display: block; width: 100%; margin-top: 1.1rem;
  background: none; border: 1px solid var(--rule-strong); border-radius: var(--r);
  color: var(--accent-dark); font-size: 1rem; font-weight: 600; padding: .9rem; cursor: pointer;
  transition: border-color var(--t);
}
.profil-editeaza-btn:active { border-color: var(--accent); }
.profil-cerere-panel {
  margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--rule);
  border-radius: var(--r); background: var(--surface-2);
}
.profil-cerere-panel label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: .9rem; }
.profil-cerere-panel input, .profil-cerere-panel select { margin-top: .38rem; }
.profil-cerere-butoane { display: flex; align-items: center; justify-content: space-between; margin-top: .9rem; gap: .8rem; }
.profil-cerere-butoane .trimite { width: auto; min-height: auto; padding: .72rem 1.35rem; margin: 0; font-size: 1rem; }

/* ============ toast ============ */
.toast {
  position: fixed; left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 1.5rem);
  transform: translateX(-50%);
  z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: .72rem 1.25rem; border-radius: var(--r-pill);
  font-size: .94rem; font-weight: 600;
  box-shadow: var(--sh-3);
  animation: toastIn .28s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

.link-jos { display: block; text-align: center; margin-top: 2rem; color: var(--muted); font-size: .9rem; }
.link-danger { color: var(--danger); font-weight: 600; }

/* ============ spinner ============ */
.spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--rule); border-top-color: var(--accent);
  animation: spin 1s linear infinite; margin: 3.5rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  * { scroll-behavior: auto !important; }
}

/* StartPFA — „PFA" în verdele siglei */
.app-name .pfa { color: var(--accent); }
