/* Brandul Agent Vocal AI în aplicație. Tokenii, fonturile și componentele de bază sunt copiate din site-ul de prezentare
   (~/agentvocalai-site/src/styles/tokens.css și base.css), cu aceleași valori. CSS static: deploy-ul nu rulează npm. */

/* Fonturi (subset latin + diacritice românești; poloneză și greacă doar la nevoie), unicode-range identic cu site-ul */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/chakra-petch-600-latin-v1.woff2') format('woff2'); unicode-range: U+0020-007E,U+00A0-00FF,U+00B7,U+2018-201E,U+2026,U+2022,U+20AC,U+2190,U+2192,U+2212,U+2713; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/chakra-petch-600-ro-v1.woff2') format('woff2'); unicode-range: U+0102-0103,U+015E-015F,U+0162-0163,U+0218-021B; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/chakra-petch-700-latin-v1.woff2') format('woff2'); unicode-range: U+0020-007E,U+00A0-00FF,U+00B7,U+2018-201E,U+2026,U+2022,U+20AC,U+2190,U+2192,U+2212,U+2713; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/chakra-petch-700-ro-v1.woff2') format('woff2'); unicode-range: U+0102-0103,U+015E-015F,U+0162-0163,U+0218-021B; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/chakra-petch-600-latin-v1.woff2') format('woff2'); unicode-range: U+0020-007E,U+00A0-00FF,U+00B7,U+2018-201E,U+2026,U+2022,U+20AC,U+2190,U+2192,U+2212,U+2713; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/chakra-petch-600-ro-v1.woff2') format('woff2'); unicode-range: U+0102-0103,U+015E-015F,U+0162-0163,U+0218-021B; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-latin-v1.woff2') format('woff2'); unicode-range: U+0020-007E,U+00A0-00FF,U+00B7,U+2018-201E,U+2026,U+2022,U+20AC,U+2190,U+2192,U+2212,U+2713; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-ro-v1.woff2') format('woff2'); unicode-range: U+0102-0103,U+015E-015F,U+0162-0163,U+0218-021B; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-latin-v1.woff2') format('woff2'); unicode-range: U+0020-007E,U+00A0-00FF,U+00B7,U+2018-201E,U+2026,U+2022,U+20AC,U+2190,U+2192,U+2212,U+2713; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-ro-v1.woff2') format('woff2'); unicode-range: U+0102-0103,U+015E-015F,U+0162-0163,U+0218-021B; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/chakra-petch-600-pl-v1.woff2') format('woff2'); unicode-range: U+0104-0107,U+0118-0119,U+0141-0144,U+015A-015B,U+0179-017C; }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/chakra-petch-700-pl-v1.woff2') format('woff2'); unicode-range: U+0104-0107,U+0118-0119,U+0141-0144,U+015A-015B,U+0179-017C; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-pl-v1.woff2') format('woff2'); unicode-range: U+0104-0107,U+0118-0119,U+0141-0144,U+015A-015B,U+0179-017C; }
@font-face { font-family: 'Manrope Variable'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('/fonts/manrope-el-v1.woff2') format('woff2'); unicode-range: U+0370-03FF; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-pl-v1.woff2') format('woff2'); unicode-range: U+0104-0107,U+0118-0119,U+0141-0144,U+015A-015B,U+0179-017C; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('/fonts/jetbrains-mono-el-v1.woff2') format('woff2'); unicode-range: U+0370-03FF; }

/* Tokeni: copie exactă din tokens.css (temă light, aleasă de Cristian) */
:root {
  --bg: #f4f6fb;
  --bg-2: #eaeff7;
  --paper: #ffffff;
  --mist: #f4f6fb;
  --surf-2: #f7f9fc;
  --line: rgba(14, 24, 52, .09);
  --line-2: rgba(14, 24, 52, .16);

  --ink: #0b1226;
  --ink-2: #141a2e;
  --ink-3: #1b2448;
  --text: #0b1226;
  --text-2: #44506e;
  --text-3: #5f6a88;

  --teal: #10a38a;
  --teal-ink: #08806b;
  --teal-fill: #2fd4b6;
  --teal-fill-2: #22c3a6;
  --teal-on: #04201b;
  --teal-soft: #e5f7f3;
  --teal-glow: #43e3c8;

  --blue: #2f5be0;
  --blue-ink: #2449c4;
  --blue-soft: #eaf0fe;
  --violet: #4f6ef2;

  --amber: #a86200;
  --amber-soft: #fdf3e2;
  /* Textul chihlimbar pe --amber-soft: --amber dă doar 4,33:1 acolo; aceasta trece de AA (4,8:1). */
  --amber-ink: #9e5c00;
  --coral: #c2412d;
  --coral-ink: #a83522;
  --coral-soft: #fdecea;

  --f-display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --f-text: 'Manrope Variable', 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 6px;
  --r: 10px;

  --sh-1: 0 1px 0 rgba(14, 24, 52, .03), 0 24px 48px -34px rgba(14, 24, 52, .32);
  --sh-2: 0 1px 0 rgba(14, 24, 52, .04), 0 40px 80px -44px rgba(14, 24, 52, .38);
  --glow: 0 0 0 1px rgba(16, 163, 138, .06), 0 0 80px -30px rgba(16, 163, 138, .35);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --t1: .16s; --t2: .32s; --t3: .6s;

  --w: 1216px;
  --gutter: clamp(16px, 3vw, 32px);
  --gap: clamp(16px, 2vw, 24px);
  --header-h: 68px;
  /* Doar în aplicație: turcoaz pentru text pe --teal-soft (5.0:1, AA); --teal-ink pe --teal-soft dă 4.39:1. */
  --teal-ink-soft: #07765f;
  color-scheme: light;
}

/* Bază (ca pe site) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: var(--f-text); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
[x-cloak] { display: none !important; }
:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); z-index: 200; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }
::selection { background: rgba(47, 212, 182, .35); color: var(--ink); }
.muted { color: var(--text-3); }
.mono { font-family: var(--f-mono); }
.link { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link:hover { text-decoration-thickness: 2px; }

/* Logo (identic cu Logo.astro) */
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo-mark { flex: none; display: block; }
.logo-word { font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .005em; line-height: 1; white-space: nowrap; color: var(--ink); }
.logo-word i { font-style: normal; font-family: var(--f-mono); font-weight: 600; font-size: 12px; color: var(--teal-ink); border: 1px solid rgba(16, 163, 138, .5); border-radius: 4px; padding: 3px 5px 2px; margin-left: 4px; vertical-align: 3px; letter-spacing: .04em; }
.logo-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; flex: none; }

/* Titluri */
.h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance; }
.h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.2; letter-spacing: -.005em; }
.h1 em, .h2 em { font-style: normal; color: var(--teal-ink); }

/* Butoane (ca pe site): primar turcoaz viu cu text închis, 48px */
.btn { --bg: var(--teal-fill); --fg: var(--teal-on); --bd: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: var(--r); border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); background: var(--teal-fill-2); box-shadow: 0 10px 30px -10px rgba(16, 163, 138, .55); }
.btn:active { transform: translateY(0); }
.btn--ghost { --bg: var(--paper); --fg: var(--text); --bd: var(--line-2); }
.btn--ghost:hover { background: var(--paper); border-color: var(--teal-ink); color: var(--teal-ink); box-shadow: none; }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled, .btn[disabled] { cursor: progress; transform: none; box-shadow: none; }
.btn--ghost:disabled { opacity: .7; }
.btn:disabled:not([aria-busy]) { opacity: .6; }

/* Undă mică în butoane, în timpul trimiterii */
.btn-wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.btn-wave b { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: center; animation: waveBar .55s ease-in-out infinite alternate; }
.btn-wave b:nth-child(2) { animation-delay: -.15s; }
.btn-wave b:nth-child(3) { animation-delay: -.3s; }
.btn-wave b:nth-child(4) { animation-delay: -.45s; }
.btn-wave b:nth-child(5) { animation-delay: -.6s; }

/* Carduri, panouri, pastile */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); padding: clamp(16px, 2.4vw, 24px); }
.panel { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--sh-2); overflow: hidden; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); font: 500 12px/1.2 var(--f-mono); color: var(--text-2); letter-spacing: .03em; background: var(--surf-2); }
.panel-h b { color: var(--text); font-weight: 500; }
.panel-h .r { margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--paper); border: 1px solid var(--line-2); color: var(--text-2); font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .02em; line-height: 1.2; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; flex: none; }
.pill--t { color: var(--teal-ink-soft); border-color: rgba(16, 163, 138, .4); background: var(--teal-soft); }
.pill--b { color: var(--blue-ink); border-color: rgba(47, 91, 224, .35); background: var(--blue-soft); }
.pill--a { color: var(--amber-ink); border-color: rgba(217, 138, 0, .4); background: var(--amber-soft); }
.pill--c { color: var(--coral-ink); border-color: rgba(194, 65, 45, .35); background: var(--coral-soft); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(16, 163, 138, .16); flex: none; }
/* Fără puls: singura mișcare care nu pornește de la utilizator rămâne unda. */

/* Undă sonoră: motivul grafic al brandului */
.wave { display: flex; align-items: center; gap: 3px; height: 34px; }
.wave b { flex: 1; height: var(--h, 50%); border-radius: 2px; background: var(--c, var(--teal)); transform-origin: center; animation: waveBar 1.1s ease-in-out infinite alternate; animation-delay: var(--d, 0s); opacity: .9; }
@keyframes waveBar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* Formulare */
.form { display: grid; gap: 18px; }
.form-h { display: grid; gap: 6px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.label { font-weight: 600; font-size: 15px; color: var(--text); }
.hint { font-size: 14px; color: var(--text-3); line-height: 1.45; }
.input { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--paper); color: var(--text); font-size: 16px; transition: border-color var(--t1), box-shadow var(--t1); }
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: rgba(14, 24, 52, .28); }
.input:focus { outline: none; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(16, 163, 138, .18); }
.input:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 1px; border-radius: var(--r-sm); }
.input[aria-invalid='true'] { border-color: var(--coral); }
.input--citire { height: auto; min-height: 48px; display: flex; align-items: center; padding-block: 11px; margin: 0; background: var(--surf-2); color: var(--text-2); line-height: 1.4; overflow-wrap: anywhere; }
.input--citire:hover { border-color: var(--line-2); }
.link-expirat-msg { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); padding: 14px 16px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.eye { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); border-radius: var(--r-sm); cursor: pointer; }
.eye:hover { color: var(--teal-ink); }
.eye svg { width: 20px; height: 20px; }
.err { display: flex; align-items: flex-start; gap: 8px; color: var(--coral-ink); font-size: 14px; line-height: 1.45; animation: errIn var(--t2) var(--ease); }
.err svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ok-msg { display: flex; align-items: flex-start; gap: 8px; color: var(--teal-ink); font-size: 14px; line-height: 1.45; font-weight: 600; }
.ok-msg svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 15px; color: var(--text-2); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--teal-ink); flex: none; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Căsuțele codului */
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 2vw, 10px); }
.otp input { width: 100%; min-width: 0; height: 56px; text-align: center; padding: 0; font-family: var(--f-mono); font-size: 22px; font-weight: 600; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--paper); color: var(--text); caret-color: var(--teal-ink); transition: border-color var(--t1), box-shadow var(--t1); }
.otp input:focus { outline: 2px solid var(--teal-ink); outline-offset: 1px; border-color: var(--teal-ink); box-shadow: 0 0 0 3px rgba(16, 163, 138, .18); }
.otp input.is-full { border-color: rgba(16, 163, 138, .55); background: var(--teal-soft); color: var(--ink); }
.otp input:disabled { opacity: .55; cursor: not-allowed; background: var(--paper); }
.timer { font-family: var(--f-mono); font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.timer b { color: var(--text); font-weight: 600; }

/* Ecranele de autentificare: panou de brand + formular */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.auth-brand { background: radial-gradient(70% 60% at 20% 10%, rgba(16, 163, 138, .10), transparent 70%), var(--bg-2); border-bottom: 1px solid var(--line); padding: 10px var(--gutter); display: flex; align-items: center; gap: 16px; }
.auth-brand .wave--mini { width: 72px; height: 22px; margin-left: auto; flex: none; }
.auth-brand .auth-show { display: none; }
.auth-main { display: grid; justify-items: center; align-items: start; padding: clamp(28px, 6vw, 56px) var(--gutter); }
.auth-box { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.auth-alt { color: var(--text-2); font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-alt a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto; }
  .auth-brand { flex-direction: column; align-items: flex-start; gap: 0; padding: 40px clamp(40px, 5vw, 72px); border-bottom: 0; border-right: 1px solid var(--line); }
  .auth-brand .wave--mini { display: none; }
  .auth-brand .auth-show { display: grid; gap: clamp(28px, 4vh, 44px); width: 100%; max-width: 34rem; margin-block: auto; padding-block: 32px; }
  .auth-main { align-items: center; padding: 48px; }
}
.auth-copy { display: grid; gap: 16px; }
.ticket { margin: 0; }
.auth-title { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; color: var(--text); }
.auth-title em { font-style: normal; color: var(--teal-ink); }
.auth-lede { font-size: 17px; color: var(--text-2); max-width: 46ch; }

/* Biletul de apel din panoul de brand */
.ticket .panel-h { flex-wrap: wrap; }
.ticket-body { padding: 20px 18px 22px; display: grid; gap: 18px; }
.ticket .wave { height: 48px; }
.ticket-line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; min-height: 3em; }
.ticket-who { font: 600 12px/1 var(--f-mono); padding: 6px 8px; border-radius: var(--r-sm); background: var(--teal-soft); color: var(--teal-ink-soft); letter-spacing: .02em; }
.ticket-who.is-c { background: var(--blue-soft); color: var(--blue-ink); }
.ticket-text { font-size: 16px; line-height: 1.5; color: var(--text); transition: opacity var(--t2) var(--ease); }
.ticket-text.is-out { opacity: 0; }

/* Antetul aplicației (/manage și /portal) */
.appbar { position: sticky; top: 0; z-index: 50; background: rgba(244, 246, 251, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.appbar-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'logo nav cont'; align-items: center; gap: 12px 24px; min-height: var(--header-h); padding: 0 var(--gutter); }
.appbar .logo-link { grid-area: logo; }
.appbar-nav { grid-area: nav; min-width: 0; }
.appbar-nav ul { list-style: none; margin: 0; padding: 4px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.appbar-nav ul::-webkit-scrollbar { display: none; }
.appbar-nav li { flex: none; }
/* Meniul derulabil: săgeată + estompare la marginea unde mai sunt pastile (clasele vin din public/js/antet.js). */
.appbar-nav { position: relative; }
.nav-sageata { position: absolute; top: 0; bottom: 0; width: 48px; display: none; align-items: center; padding: 0 6px; margin: 0; border: 0; color: var(--teal-ink); cursor: pointer; z-index: 1; }
.nav-sageata svg { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(14, 24, 52, .18); padding: 3px; }
.nav-sageata--st { left: 0; justify-content: flex-start; background: linear-gradient(90deg, var(--bg) 45%, rgba(244, 246, 251, 0)); }
.nav-sageata--dr { right: 0; justify-content: flex-end; background: linear-gradient(270deg, var(--bg) 45%, rgba(244, 246, 251, 0)); }
.appbar-nav.are-stanga .nav-sageata--st, .appbar-nav.are-dreapta .nav-sageata--dr { display: flex; }
/* Pe tabletă numele din cont lasă loc meniului (avatarul rămâne). */
@media (max-width: 1024px) { .cont-nume { display: none; } }
.navpill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text-2); white-space: nowrap; transition: color var(--t1), background var(--t1); }
a.navpill:hover { color: var(--text); background: rgba(14, 24, 52, .05); }
.navpill[aria-current='page'] { background: var(--teal-soft); color: var(--teal-ink-soft); }
.navpill.is-off { color: var(--text-3); font-weight: 500; }
.cont { grid-area: cont; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--teal-glow); font: 600 13px/1 var(--f-mono); letter-spacing: .02em; flex: none; }
.cont-nume { font-weight: 600; font-size: 15px; color: var(--text); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cont form { margin: 0; }
@media (max-width: 760px) {
  .appbar-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'logo cont' 'nav nav'; gap: 0 12px; padding-top: 6px; }
  .appbar-nav { margin: 0 calc(var(--gutter) * -1); }
  .appbar-nav ul { padding: 2px var(--gutter) 8px; scroll-padding-inline: 48px; }
  .nav-sageata { bottom: 8px; top: 2px; }
  .cont-nume { display: none; }
}
@media (max-width: 420px) {
  .avatar { display: none; }
  .appbar-nav ul { gap: 2px; }
  .navpill { padding: 0 11px; }
  .mod-h .actions { width: 100%; }
  .actions .btn { flex: 1 1 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: 10px; }
}

/* Conținutul panourilor: pe toată lățimea, cu gutter */
.app-main { padding: clamp(20px, 3vw, 32px) var(--gutter) 64px; display: grid; gap: var(--gap); align-content: start; }
.page { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.page-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-h > div { display: grid; gap: 6px; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.back:hover { color: var(--teal-ink); }
.back svg { width: 16px; height: 16px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row-link { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 16px 20px; min-height: 64px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); text-decoration: none; color: inherit; transition: border-color var(--t1), transform .2s var(--ease); }
.row-link:hover { border-color: rgba(16, 163, 138, .5); }
.row-link strong { font-family: var(--f-display); font-weight: 700; font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
.row-link .r { display: flex; align-items: center; gap: 12px; color: var(--text-3); }
.row-link .r svg { width: 18px; height: 18px; }
.mod { display: grid; gap: 0; padding: 0; }
.mod-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: clamp(16px, 2.4vw, 22px); }
.mod-h > div:first-child { min-width: 0; flex: 1 1 240px; display: grid; gap: 4px; }
.mod-h .actions { flex: none; align-items: center; }
.mod-form { border-top: 1px solid var(--line); background: var(--surf-2); padding: clamp(16px, 2.4vw, 22px); display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.mod-form > .full { grid-column: 1 / -1; }
.field-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--text-3); }
.empty { padding: 28px; text-align: center; color: var(--text-3); background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--r); }
.grid-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
/* Tabel cu două coloane (etichetă, valoare), de ex. tarifele din portal: rămâne tabel și pe ecrane înguste, încape fără
   scroll orizontal. Anulează transformarea .tabel în carduri de mai jos (selectori mai specifici, deci ordinea nu contează). */
@media (max-width: 760px) {
  .tabel.tabel--doua { display: table; }
  .tabel.tabel--doua thead { display: table-header-group; }
  .tabel.tabel--doua tbody { display: table-row-group; }
  .tabel.tabel--doua tr, .tabel.tabel--doua tr:last-child { display: table-row; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; }
  .tabel.tabel--doua th, .tabel.tabel--doua td, .tabel.tabel--doua tbody tr:last-child td { display: table-cell; padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
  .tabel.tabel--doua tbody tr:last-child td { border-bottom: 0; }
  .tabel.tabel--doua td::before { content: none; }
  .tabel.tabel--doua tr th.num, .tabel.tabel--doua tbody tr td.num, .tabel.tabel--doua tbody tr:last-child td.num { text-align: right; white-space: nowrap; }
}

textarea.input { height: auto; min-height: 112px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.pill--x { border-style: dashed; color: var(--text); }

/* Filtre segmentate (ex. statusul cererilor): pe mobil se derulează orizontal, fără scroll pe pagină */
.seg { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text-2); white-space: nowrap; transition: color var(--t1), background var(--t1); }
.seg a:hover { color: var(--teal-ink); }
.seg a[aria-current='page'] { background: var(--teal-soft); color: var(--teal-ink-soft); }
.seg-n { font-family: var(--f-mono); font-size: 12px; font-weight: 500; min-width: 22px; padding: 2px 6px; border-radius: var(--r-sm); background: var(--bg); color: var(--text-2); text-align: center; }
.seg a[aria-current='page'] .seg-n { background: var(--paper); color: var(--teal-ink-soft); }
@media (max-width: 760px) {
  .seg { margin: 0 calc(var(--gutter) * -1); border-radius: 0; border-inline: 0; padding-inline: var(--gutter); }
}

/* Perechi etichetă / valoare */
.dl { display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: 0 16px; margin: 0; }
.dl dt, .dl dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.dl dt:first-of-type, .dl dt:first-of-type + dd { border-top: 0; }
.dl dt { font-family: var(--f-mono); font-size: 13px; color: var(--text-3); line-height: 1.5; padding-top: 12px; }
.dl dd { color: var(--text); overflow-wrap: anywhere; }
.dl .dl-total { font-weight: 700; color: var(--text); border-top: 1px solid var(--line-2); }
@media (max-width: 520px) {
  .dl { grid-template-columns: minmax(0, 1fr); }
  .dl dd, .dl dd.dl-total { border-top: 0; padding-top: 0; }
  .dl dt { padding-bottom: 2px; }
}

/* Cererile de înregistrare (/manage/inregistrari) */
.cerere-rand { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) 150px minmax(0, 1.4fr) 18px; align-items: center; gap: 10px 20px; }
.cerere-firma, .cerere-contact { display: grid; gap: 2px; min-width: 0; }
.cerere-firma span, .cerere-contact span { font-size: 14px; overflow-wrap: anywhere; }
.cerere-contact > span:first-child { color: var(--text); font-weight: 600; font-size: 15px; }
.cerere-data { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.cerere-data .muted { display: block; font-size: 12px; }
.previz-act { display: grid; gap: 6px; max-width: 26rem; justify-items: start; }
.previz-act .muted { font-size: 13px; line-height: 1.4; }
.cerere-pastile { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.row-link .cerere-sageata { width: 18px; height: 18px; color: var(--text-3); }
@media (max-width: 1100px) {
  .cerere-rand { grid-template-columns: minmax(0, 1fr) 18px; gap: 8px 12px; }
  .cerere-firma { grid-column: 1; grid-row: 1; }
  .cerere-sageata { grid-column: 2; grid-row: 1; }
  .cerere-contact, .cerere-data, .cerere-pastile { grid-column: 1 / -1; }
  .cerere-pastile { justify-content: flex-start; }
}
.paginare { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cerere-meta { font-size: 13px; }
.cerere-sec { display: grid; gap: 14px; align-content: start; min-width: 0; }
.cerere-h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; color: var(--text); }
.cerere-fara-tva { font-family: var(--f-mono); font-size: 12px; font-weight: 500; margin-left: 8px; }
.cerere-nota { white-space: pre-line; }
.dd-pastila { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.dd-mic { font-size: 13px; color: var(--text-2); }
.cerinte-grupuri { display: grid; gap: 18px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.cerinte-grup { display: grid; gap: 6px; min-width: 0; }
.decizie { border-color: rgba(16, 163, 138, .35); }
.decizie-parte { display: grid; gap: 14px; }
.decizie-parte + .decizie-parte { border-top: 1px solid var(--line); padding-top: 18px; }
.decizie-module { display: grid; gap: 4px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.decizie-modul { align-items: flex-start; padding: 8px 0; }
.decizie-modul input { margin-top: 3px; }
.decizie-modul > span { display: grid; gap: 2px; min-width: 0; }
.decizie-modul b { color: var(--text); font-weight: 600; }
.decizie .actions .btn { min-height: 48px; }
.avert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px solid rgba(217, 138, 0, .4); border-radius: var(--r-sm); background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; line-height: 1.45; font-weight: 600; }
.avert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.link-netrimis { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.link-retrimite { align-items: center; gap: 8px 14px; flex-wrap: wrap; }

/* Portal: cartonașul „Termină configurarea” de pe prima pagină (modulul onboarding) */
.cfg-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; border-color: rgba(16, 163, 138, .35); background: var(--teal-soft); }
.cfg-card-text { display: grid; gap: 6px; min-width: 0; flex: 1 1 360px; }
.cfg-card-text .hint { color: var(--text-2); }
.cfg-card-btn { border-radius: var(--r-sm); flex: none; }
@media (max-width: 599px) {
  .cfg-card-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Bara de impersonare (adminul vede portalul unei firme), pe orice pagină din portal. Pe ecran lat stă lipită sus împreună
   cu antetul; pe telefon antetul pleacă la derulare și rămâne lipită doar bara, ca să nu ocupe jumătate din ecran. */
.antet-imp { position: sticky; top: 0; z-index: 50; }
.antet-imp .appbar { position: static; }
.bara-imp { background: var(--amber-soft); border-bottom: 1px solid rgba(168, 98, 0, .35); box-shadow: inset 4px 0 0 var(--amber); }
.bara-imp-in { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px var(--gutter); }
.bara-imp-ic { width: 20px; height: 20px; flex: none; color: var(--amber); }
.bara-imp-text { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.bara-imp-text strong { font-weight: 700; }
.bara-imp-nota { color: var(--text-2); }
.bara-imp form { margin: 0; flex: none; }
.bara-imp .btn--ghost { border-color: rgba(168, 98, 0, .45); }
.bara-imp-scurt { display: none; }
@media (max-width: 560px) {
  .antet-imp { display: contents; }
  .bara-imp { position: sticky; top: 0; z-index: 50; }
  .bara-imp-in { gap: 10px; min-height: 52px; }
  .bara-imp-text { font-size: 14px; }
  .bara-imp-nota, .bara-imp-lung { display: none; }
  .bara-imp-scurt { display: inline; }
  .bara-imp .btn--sm { padding: 0 14px; }
}

/* Tabele de date (etapa 3). Pe ecrane înguste fiecare rând devine un card cu perechi etichetă/valoare, fără scroll orizontal. */
.tabel { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabel th, .tabel td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.tabel th { font-weight: 600; color: var(--text-2); font-size: 13px; background: var(--surf-2); overflow-wrap: normal; }
.tabel tbody tr:last-child td { border-bottom: 0; }
.tabel .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.tabel tr.is-dif td { background: var(--coral-soft); }
.tabel .legaturi { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 760px) {
  .tabel, .tabel tbody { display: block; }
  .tabel thead { display: none; }
  .tabel tr { display: block; padding: 10px 14px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
  .tabel tr:last-child { margin-bottom: 0; }
  .tabel tr.is-dif { background: var(--coral-soft); border-color: rgba(194, 65, 45, .35); }
  .tabel tr.is-dif td { background: transparent; }
  .tabel td, .tabel tbody tr:last-child td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border: 0; padding: 5px 0; text-align: right; min-width: 0; }
  .tabel td::before { content: attr(data-eticheta); flex: none; max-width: 50%; font-family: var(--f-text); font-weight: 600; font-size: 13px; color: var(--text-2); text-align: left; }
  .tabel .num { white-space: normal; }
  .tabel .legaturi { justify-content: flex-end; }
}

/* Butoanele din antetul unei pagini stau pe un rând (formularul unui buton POST se comportă ca butonul). */
.page-h > .actions { display: flex; align-items: center; }
.actions > form { display: flex; margin: 0; }
@media (max-width: 420px) {
  .page-h > .actions { width: 100%; }
  .actions > form { flex: 1 1 100%; }
}

/* Secțiunile unei fișe: titlu, apoi conținut, cu spațiu egal. Perechile etichetă/valoare din datele firmei. */
.stiva { display: grid; gap: 14px; align-content: start; min-width: 0; }
.perechi { margin: 0; display: grid; gap: 14px 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.perechi dt { font-size: 13px; font-weight: 600; color: var(--text-2); }
.perechi dd { margin: 2px 0 0; overflow-wrap: anywhere; }

/* Bandă de stare pe toată lățimea panoului. */
.banda { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue-ink); font-size: 15px; line-height: 1.45; }
.banda--impersonare { background: var(--amber-soft); color: var(--text); }
.banda--ok { background: var(--teal-soft); color: var(--teal-ink-soft); }
.banda--eroare { background: var(--coral-soft); color: var(--coral-ink); }

/* Grafic simplu cu bare (panoul aplicației mobile): fiecare bară are eticheta text pentru cititoarele de ecran. */
.bare { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 160px; }
.bara { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.bara-coloana { flex: 1; display: flex; align-items: flex-end; width: 100%; min-height: 0; }
.bara-umplere { width: 100%; min-height: 2px; background: var(--teal); border-radius: 4px 4px 0 0; }
.bara-nr { font-size: 11px; color: var(--text-2); line-height: 1.4; }
.bara-zi { font-size: 11px; color: var(--text-3); line-height: 1.6; }
