/* ══ Bara laterală RNDC — stilul nou, comun tuturor aplicațiilor ═══════════
   Se încarcă DUPĂ theme.css și schimbă doar aspectul barei laterale, al butoanelor
   de portal / Despre, al limbii, al contului și animația roții portalului.
   Conținutul (ce linkuri are fiecare aplicație) rămâne neatins: se stilizează
   clasele existente `.pasaport-*`, nu se adaugă markup.
   Sursa: bara din Registrul specialiștilor (templates/reatestare/includes/_rail.html).
   Fișier identic în toate aplicațiile — o corectură se face peste tot. */

/* ── lățimi: bara strânsă 74px, deschisă 224px (conținutul le urmează prin variabile) */
body.pasaport-shell--signed-in,
body.pasaport-shell {
  --pasaport-sidebar-collapsed: 74px;
  --pasaport-sidebar-expanded: 224px;
}

/* ── suprafața ─────────────────────────────────────────────────────────────── */
html body .pasaport-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafd 42%, #eaf1f8 100%);
  border-right: 0;
  box-shadow: 1px 0 0 rgba(15, 38, 74, .055), 3px 0 22px -16px rgba(15, 38, 74, .3);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.pasaport-nav-open body .pasaport-sidebar {
  box-shadow: 1px 0 0 rgba(15, 38, 74, .055), 18px 0 48px -22px rgba(15, 38, 74, .3);
}
html body .pasaport-sidebar__inner { padding: .9rem .5rem 1rem; gap: .3rem; }

/* ── zona 1: sigla + butonul de strângere ─────────────────────────────────── */
html body .pasaport-sidebar__top { min-height: 0; padding-bottom: .9rem; margin-bottom: .5rem;
  border-bottom: 0; position: relative; }
html body .pasaport-sidebar__top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 38, 74, .1) 30%, rgba(15, 38, 74, .1) 70%, transparent); }
html body .pasaport-sidebar__brand { padding: .15rem .25rem; gap: .6rem; border-radius: 16px; }
html body .pasaport-sidebar__brand-mark {
  width: 2.6rem; height: 2.6rem; border-radius: 14px; overflow: hidden;
  background: linear-gradient(155deg, #1a5494, #103f78 60%, #0b2e59);
  box-shadow: 0 8px 20px -8px rgba(11, 43, 85, .55), inset 0 1px 0 rgba(255, 255, 255, .2);
}
html:not(.pasaport-nav-open) body .pasaport-sidebar__brand { width: auto !important; height: auto !important; }
html body .pasaport-sidebar__brand-copy .brand-title { font-size: .78rem; font-weight: 800; color: #004890; }
/* butonul de strângere: bulină pe marginea barei (doar cu bara deschisă, ca înainte) */
html.pasaport-nav-open body .pasaport-sidebar-toggle {
  position: absolute; right: -20px; top: 14px; z-index: 3;
  width: 24px; height: 24px; border-radius: 50%; padding: 0;
  background: #fff; color: #64748b; border: 1px solid rgba(15, 38, 74, .1);
  box-shadow: 0 3px 10px -3px rgba(15, 38, 74, .3);
}
html.pasaport-nav-open body .pasaport-sidebar-toggle:hover { color: #0f67be; border-color: rgba(15, 103, 190, .4); }
html.pasaport-nav-open body .pasaport-sidebar-toggle svg { width: 13px; height: 13px; }

/* ── zona 2: linkurile ────────────────────────────────────────────────────── */
html body .pasaport-sidebar__section { gap: .3rem; }
html body .pasaport-sidebar .pasaport-rail-link {
  min-height: 0; padding: .45rem; gap: .6rem; border-radius: 12px; border: 0;
  color: #33465f; font-weight: 600; background: transparent; box-shadow: none;
  transition: background .16s cubic-bezier(.3, .7, .3, 1), color .16s, box-shadow .16s;
}
html body .pasaport-sidebar .pasaport-rail-link:hover {
  background: rgba(15, 103, 190, .07); color: #0f67be;
  box-shadow: inset 0 0 0 1px rgba(15, 103, 190, .1);
}
html body .pasaport-sidebar .pasaport-rail-link.active,
html body .pasaport-sidebar .pasaport-rail-link.active:hover {
  background: linear-gradient(140deg, #15529a, #0b2e59); color: #fff; border: 0;
  box-shadow: 0 8px 18px -10px rgba(11, 46, 89, .75), inset 0 1px 0 rgba(255, 255, 255, .14);
}
html body .pasaport-sidebar .pasaport-rail-link__icon {
  width: 1.8rem; height: 1.8rem; flex: none; border-radius: 0; background: none; box-shadow: none; color: inherit;
}
html body .pasaport-sidebar .pasaport-rail-link__icon .pasaport-rail-icon,
html body .pasaport-sidebar .pasaport-rail-link__icon svg { width: 1.15rem; height: 1.15rem; stroke-width: 1.8; }
html body .pasaport-sidebar .pasaport-rail-link.active .pasaport-rail-link__icon { background: none; color: #fff; }
html body .pasaport-sidebar .pasaport-rail-link__label { font-size: .83rem; font-weight: 600; letter-spacing: -.005em; }
html body .pasaport-sidebar .pasaport-rail-link--sesizare { color: #d58512; }
html body .pasaport-sidebar .pasaport-rail-link--sesizare:hover { background: rgba(213, 133, 18, .1); color: #a8660c;
  box-shadow: inset 0 0 0 1px rgba(213, 133, 18, .18); }
/* contoare: cifră la colțul pictogramei pe bara strânsă, pastilă la capăt pe cea deschisă */
html body .pasaport-sidebar .pasaport-rail-badge {
  min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem; border-radius: 999px;
  background: #0f67be; color: #fff; font-size: .64rem; font-weight: 800; border: 2px solid #f4f8fc;
  box-shadow: 0 1px 4px rgba(15, 38, 74, .22);
}
html body .pasaport-sidebar .pasaport-rail-link.active .pasaport-rail-badge { background: #fff; color: #0b2e59; border-color: transparent; }

/* ── zona 3: portal + Despre pe un rând, apoi limba și contul ──────────────── */
html body .pasaport-sidebar__footer { gap: .5rem; padding-top: .9rem; position: relative; }
html body .pasaport-sidebar__footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 38, 74, .1) 30%, rgba(15, 38, 74, .1) 70%, transparent); }
html body .pasaport-sidebar__portal {
  display: flex !important; flex-direction: row; align-items: stretch; gap: .35rem;
  padding: 0; border: 0; position: relative;
}
html body .pasaport-sidebar__radial-shell { min-height: 0 !important; padding: 0 !important; width: auto; flex: 1 1 auto; }
/* „Portal RNDC" — butonul plin, primul; „Despre" — butonul mic alb, al doilea */
html body .pasaport-sidebar__radial-shell:not(.pasaport-sidebar__radial-shell--about) { order: 1; }
html body .pasaport-sidebar__radial-shell--about { order: 2; flex: 0 0 auto; }
html body .pasaport-sidebar .pasaport-radial-toggle:not(.pasaport-radial-toggle--about) {
  width: 100%; height: auto; min-height: 2.75rem; padding: .45rem; gap: .6rem; justify-content: flex-start;
  border: 0; border-radius: 12px; font-size: .83rem; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #15529a, #0b2e59);
  box-shadow: 0 8px 18px -10px rgba(11, 46, 89, .75), inset 0 1px 0 rgba(255, 255, 255, .14);
  transform: none;
}
html body .pasaport-sidebar .pasaport-radial-toggle:not(.pasaport-radial-toggle--about):hover {
  background: linear-gradient(140deg, #1a5fae, #0d3568); transform: none;
  box-shadow: 0 10px 22px -10px rgba(11, 46, 89, .85), inset 0 1px 0 rgba(255, 255, 255, .18);
}
html body .pasaport-sidebar .pasaport-radial-toggle__icon { width: 1.8rem; height: 1.8rem; flex: none;
  display: inline-flex; align-items: center; justify-content: center; }
html body .pasaport-sidebar .pasaport-radial-toggle__icon svg { width: 1.15rem; height: 1.15rem; }
html body .pasaport-sidebar .pasaport-radial-toggle--about {
  width: 2.6rem; height: 100%; min-height: 2.75rem; padding: 0; border-radius: 12px; justify-content: center;
  background: #fff !important; color: #004890 !important; border: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 72, 144, .18) !important; transform: none !important;
}
html body .pasaport-sidebar .pasaport-radial-toggle--about:hover { background: #004890 !important; color: #fff !important; }
html body .pasaport-sidebar .pasaport-radial-toggle--about .pasaport-radial-toggle__label { display: none !important; }
/* bara strânsă: portalul pătrat, „Despre" bulină în colțul lui */
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle:not(.pasaport-radial-toggle--about) {
  justify-content: center; }
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle:not(.pasaport-radial-toggle--about) .pasaport-radial-toggle__label {
  display: none; }
html:not(.pasaport-nav-open) body .pasaport-sidebar__radial-shell--about {
  position: absolute; top: -.45rem; right: -.3rem; z-index: 5; }
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle--about {
  width: 1.35rem; height: 1.35rem; min-height: 0; border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 38, 74, .25), inset 0 0 0 1px rgba(0, 72, 144, .18) !important; }
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle--about svg { width: .8rem; height: .8rem; }

/* limba: control segmentat, fără steaguri (steagul numește țara, nu limba) */
html body .pasaport-sidebar__lang { padding: 0 !important; }
html body .pasaport-sidebar__lang form.rnc-lang {
  display: flex !important; flex-direction: row; gap: 2px; width: 100%; padding: 3px !important; margin: 0;
  border-radius: 10px; background: rgba(15, 38, 74, .06); border: 0; box-shadow: none; justify-content: stretch;
}
html:not(.pasaport-nav-open) body .pasaport-sidebar__lang form.rnc-lang { flex-direction: column; }
html body .pasaport-sidebar__lang form.rnc-lang > .rnc-lang__opt,
html:not(.pasaport-nav-open) body .pasaport-sidebar__lang form.rnc-lang > .rnc-lang__opt,
html:not(.pasaport-nav-open) body .pasaport-sidebar__lang form.rnc-lang > .rnc-lang__opt:not(.is-active) {
  display: flex !important; align-items: center; justify-content: center; flex: 1 1 auto; width: 100%;
  min-width: 0; height: 26px; min-height: 0; margin: 0; padding: 0; gap: 0; border: 0; border-radius: 8px;
  background: transparent; box-shadow: none; opacity: 1; cursor: pointer;
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1; color: #7a8ca1;
}
html body .pasaport-sidebar__lang form.rnc-lang > .rnc-lang__opt.is-active,
html:not(.pasaport-nav-open) body .pasaport-sidebar__lang form.rnc-lang > .rnc-lang__opt.is-active {
  background: #fff; color: #004890; cursor: default; box-shadow: 0 1px 3px rgba(15, 38, 74, .14);
}
html body .pasaport-sidebar__lang .rnc-lang__flag { display: none !important; }
html body .pasaport-sidebar__lang .rnc-lang__code { display: inline !important; }

/* contul: suprafață proprie; avatar rotund cu degrade */
html body .pasaport-sidebar__account { padding: .3rem .5rem .3rem .3rem !important; border: 0;
  border-radius: 14px; background: rgba(15, 38, 74, .04); box-shadow: inset 0 0 0 1px rgba(15, 38, 74, .05); }
html:not(.pasaport-nav-open) body .pasaport-sidebar__account { padding: .4rem .25rem !important; }
html body .pasaport-sidebar .pasaport-profile { padding: 0; border: 0; background: transparent; box-shadow: none; }
html body .pasaport-sidebar .pasaport-profile:hover,
html body .pasaport-sidebar .pasaport-profile.active { background: transparent; box-shadow: none; }
html body .pasaport-sidebar .pasaport-profile__avatar {
  width: 2rem; height: 2rem; border-radius: 50%; font-size: .74rem; color: #fff;
  background: linear-gradient(145deg, #1a5494, #0b2e59);
  box-shadow: 0 5px 14px -6px rgba(11, 46, 89, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
}
html body .pasaport-sidebar .pasaport-profile__name { font-size: .8rem; font-weight: 700; color: #004890; }
html body .pasaport-sidebar .pasaport-profile__meta { font-size: .7rem; color: #5b6b80; }
/* vizitator: butonul „Autentificare" — conturat, plin la hover */
html body .pasaport-sidebar .pasaport-auth-button {
  border-radius: 12px; padding: .45rem; gap: .6rem; font-size: .83rem; font-weight: 700;
  background: #fff; color: #004890; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 72, 144, .2);
}
html body .pasaport-sidebar .pasaport-auth-button:hover { background: #004890; color: #fff; }

/* ══ Roata portalului: doar animația de hover (feliile și culorile rămân) ══ */
.pasaport-radial-wheel .pasaport-radial-item {
  transition:
    transform .32s cubic-bezier(.22, 1, .36, 1),
    opacity .28s cubic-bezier(.22, 1, .36, 1),
    filter .26s cubic-bezier(.34, 1.26, .5, 1);
}
.pasaport-radial-wheel .pasaport-radial-item__body { transition: transform .34s cubic-bezier(.34, 1.26, .5, 1); }
.pasaport-radial-wheel .pasaport-radial-item__icon {
  transition: background .2s ease, box-shadow .2s ease, transform .34s cubic-bezier(.34, 1.26, .5, 1);
}
.pasaport-radial-wheel .pasaport-radial-item:hover,
.pasaport-radial-wheel .pasaport-radial-item:focus-visible { filter: brightness(1.17) saturate(1.08); }
.pasaport-radial-wheel .pasaport-radial-item:hover .pasaport-radial-item__body,
.pasaport-radial-wheel .pasaport-radial-item:focus-visible .pasaport-radial-item__body {
  transform: translate(-50%, -50%) translate(calc(var(--body-x, 0) * 1.06), calc(var(--body-y, 0) * 1.06)) scale(1.09);
}
.pasaport-radial-wheel .pasaport-radial-item:hover .pasaport-radial-item__icon,
.pasaport-radial-wheel .pasaport-radial-item:focus-visible .pasaport-radial-item__icon {
  background: rgba(255, 255, 255, .26); transform: scale(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

/* „Despre": forma moștenită din temă (cerc, înălțimi fixe) se rescrie complet */
html.pasaport-nav-open body .pasaport-sidebar .pasaport-radial-toggle--about {
  width: 2.6rem !important; height: 2.75rem !important; min-height: 0 !important; border-radius: 12px !important; }
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle--about {
  width: 1.35rem !important; height: 1.35rem !important; min-height: 0 !important; border-radius: 50% !important; }
html body .pasaport-sidebar .pasaport-radial-toggle--about .pasaport-radial-toggle__icon {
  width: auto; height: auto; background: none !important; box-shadow: none !important; }

/* ══ Limba într-o bară de SUS (harta referențialului, bara orizontală) ═════
   Același control segmentat ca în bara laterală: două jumătăți egale, coduri RO/EN,
   fără steaguri, cu înălțimea butoanelor de lângă (Portal, Autentificare). */
html body .map-topbar__lang form.rnc-lang,
html body .rnc-topbar__nav form.rnc-lang {
  display: inline-flex !important; flex-direction: row; align-items: stretch; gap: 2px;
  width: auto; height: 2.5rem; padding: 3px !important; margin: 0;
  border-radius: 12px; background: rgba(15, 38, 74, .06); border: 0;
  box-shadow: inset 0 0 0 1px rgba(15, 38, 74, .05);
}
html body .map-topbar__lang form.rnc-lang > .rnc-lang__opt,
html body .rnc-topbar__nav form.rnc-lang > .rnc-lang__opt {
  display: inline-flex !important; align-items: center; justify-content: center;
  min-width: 2.9rem !important; min-height: 0 !important; height: auto; flex: 0 0 auto;
  margin: 0; padding: 0 .7rem; gap: 0; border: 0; border-radius: 9px;
  background: transparent; box-shadow: none; opacity: 1; cursor: pointer;
  font-size: .76rem; font-weight: 800; letter-spacing: .08em; line-height: 1; color: #7a8ca1;
  transition: background .15s, color .15s;
}
html body .map-topbar__lang form.rnc-lang > .rnc-lang__opt:hover,
html body .rnc-topbar__nav form.rnc-lang > .rnc-lang__opt:hover { color: #004890; }
html body .map-topbar__lang form.rnc-lang > .rnc-lang__opt.is-active,
html body .rnc-topbar__nav form.rnc-lang > .rnc-lang__opt.is-active {
  background: #fff; color: #004890; cursor: default; box-shadow: 0 1px 3px rgba(15, 38, 74, .14);
}
html body .map-topbar__lang .rnc-lang__flag,
html body .rnc-topbar__nav .rnc-lang__flag { display: none !important; }
html body .map-topbar__lang .rnc-lang__code,
html body .rnc-topbar__nav .rnc-lang__code { display: inline !important; }

/* Bara strânsă: eticheta rămâne în rând cu lățime 0, iar `gap` dintre pictogramă și ea
   împingea pictograma cu ~5px spre stânga. Fără etichetă vizibilă nu e nevoie de spațiu. */
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-rail-link,
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-auth-button,
html:not(.pasaport-nav-open) body .pasaport-sidebar .pasaport-radial-toggle { gap: 0 !important; justify-content: center; }
