/* ============================================================================
   Layout-ul propriu al catalogului, asezat peste token-urile din rnc-theme.css.
   Structura (topbar + grila de carduri + panou harta) ramane cea dinainte;
   s-au schimbat paleta, tipografia si suprafetele, ca sa se potriveasca cu
   restul suitei RNDC.
   ========================================================================== */

/* ---------------------------------------------------------------- structura */

#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* latimea hartii, trasa cu divizorul; citita si de .resizer si de .map-toggle */
  --map-w: 50%;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0.8rem 1rem 0;
  padding: 0.7rem 1.1rem;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

/* marca: sigla + denumirea suitei ca supratitlu, numele aplicatiei dedesubt —
   aceeasi ierarhie ca in referential */
.topbar .brand-copy { display: grid; gap: 2px; }

.topbar .search {
  margin-left: auto;
  position: relative;
}

.topbar .search input {
  width: 280px;
  max-width: 36vw;
  padding-left: 2.15rem;
  border-radius: 999px;
}

.topbar .search svg {
  position: absolute;
  left: 0.75rem;
  top: 0.62rem;
  color: var(--rnc-text-soft);
}

.topbar .count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--rnc-text-soft);
}

.split {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
  padding: 1rem;
  gap: 1rem;
}

.pane-catalog {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  padding-right: 0.25rem;
}

/* Titlul sectiunii de carduri e singurul cap de continut al paginii, deci mai
   mare decat `.section-title` din tema (care e o eticheta marunta, folosita in
   panouri). Suprascris aici, nu in rnc-theme.css: acolo valorile sunt copiate
   identic din suita si nu le divergem. */
.pane-catalog .section-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--rnc-text);
  margin: 0.15rem 0 1rem;
}

.pane-map {
  width: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  transition: width 0.3s ease;
}

#app.map-open .pane-map {
  width: var(--map-w);
  border: 1px solid var(--rnc-border);
  box-shadow: var(--shadow-glass);
}

/* Harta e canvas: `backdrop-filter` n-ar avea ce filtra, deci fundal opac. */
#map {
  position: absolute;
  inset: 0;
  background: #eaf1f8;
}

/* ------------------------------------------------------------ tab-ul hartii */

.map-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 40;
  background: var(--rnc-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 1rem 0.6rem;
  border-radius: 14px 0 0 14px;
  box-shadow: -6px 0 22px rgba(0, 72, 144, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: right 0.3s ease, background-color 0.15s ease;
}

.map-toggle:hover { background: var(--rnc-primary-deep); }
#app.map-open .map-toggle { right: var(--map-w); }

.map-toggle .chev { font-size: 1.05rem; line-height: 1; font-weight: 700; }

.map-toggle .lbl {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

/* ------------------------------------------------------- selectorul de limba */
/* Control segmentat cu doua optiuni, ca in landing_page. */

.rnc-lang {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  margin: 0;
  flex: none;
  border-radius: 999px;
  background: rgba(var(--rnc-primary-rgb), 0.06);
  border: 1px solid rgba(var(--rnc-primary-rgb), 0.1);
}

.rnc-lang__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
  opacity: 0.58;
  transition: background-color 0.18s ease, opacity 0.18s ease;
}

.rnc-lang__opt:hover { opacity: 0.88; }

.rnc-lang__opt.is-active {
  opacity: 1;
  background: #fff;
  box-shadow: 0 1px 4px rgba(8, 37, 73, 0.18);
}

.rnc-lang__opt:focus-visible {
  outline: 2px solid var(--rnc-primary);
  outline-offset: 2px;
}

.rnc-lang__flag {
  display: block;
  width: 21px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 3px;
  overflow: hidden;
  line-height: 0;
}

.rnc-lang__flag svg { display: block; width: 100%; height: 100%; }
.rnc-lang__code { letter-spacing: 0.06em; }

/* ----------------------------------------------------- butonul „Portal RNDC" */
/* Roata de aplicatii, portata din theme.css-ul suitei (landing_page).
   Feliile sunt 5 sectoare de 72 grade taiate cu `clip-path`, deci acopera tot
   cercul; fiecare e CENTRATA pe pozitia ei (Harta la ora 12, restul din 72 in
   72 in sensul acelor de ceasornic). Landing are 6 sectoare de 60, unul gol.
   Eticheta
   fiecareia se muta in centrul sectorului ei cu --body-x/--body-y. Valorile
   sunt cele din original: daca se schimba acolo, se schimba si aici. */

.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: none;
}

.portal-btn__icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pasaport-rail-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- invelisul: ecran plin, centrat --- */

.pasaport-radial-flyout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  z-index: 1100;
}

.pasaport-radial-flyout__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(7, 22, 43, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pasaport-radial-flyout__dialog {
  position: fixed;
  left: 50vw;
  top: 50vh;
  width: min(82vw, 34rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, calc(-50% + 0.6rem)) scale(0.92);
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  z-index: 1;
}

.pasaport-radial-flyout__close {
  position: absolute;
  top: -0.8rem;
  right: -0.8rem;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(9, 31, 59, 0.72);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 14px 24px rgba(4, 21, 43, 0.24);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 5;
}

.pasaport-radial-flyout__close:hover,
.pasaport-radial-flyout__close:focus-visible {
  transform: translateY(-1px);
  background: rgba(13, 41, 77, 0.92);
  box-shadow: 0 18px 28px rgba(4, 21, 43, 0.3);
}

/* --- roata --- */

.pasaport-radial-wheel {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 34px 68px rgba(4, 20, 39, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pasaport-radial-wheel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02), transparent 74%);
}

/* inelul subtire dintre butuc si felii */
.pasaport-radial-wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 32%, rgba(255, 255, 255, 0.08) 32% 33%, transparent 33% 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04), transparent 64%);
  pointer-events: none;
}

/* --- feliile --- */

.pasaport-radial-item {
  position: absolute;
  inset: 0;
  background: var(--slice-fill, rgba(24, 101, 176, 0.96));
  color: #fff;
  text-decoration: none;
  opacity: 0;
  pointer-events: auto;
  clip-path: var(--slice-clip);
  transform: scale(0.94);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.22s ease,
    box-shadow 0.22s ease;
  z-index: 3;
}

.pasaport-radial-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  opacity: 0;
  transition: opacity 0.22s ease, filter 0.22s ease;
}

.pasaport-radial-item__body {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--body-width, 7.6rem);
  min-height: var(--body-height, 5.25rem);
  padding: 0.82rem 0.58rem 0.68rem;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  text-align: center;
  transform: translate(-50%, -50%) translate(var(--body-x, 0), var(--body-y, 0));
  transition: transform 0.22s ease;
}

body.pasaport-portal-open .pasaport-radial-item {
  opacity: 0.95;
  transform: scale(1);
}

.pasaport-radial-item--map {
  --slice-fill: #1663af;
  --slice-clip: polygon(
    50% 50%,
    20.61% 9.55%, 25.00% 6.70%, 29.66% 4.32%, 34.55% 2.45%, 39.60% 1.09%,
    44.77% 0.27%, 50.00% 0.00%, 55.23% 0.27%, 60.40% 1.09%, 65.45% 2.45%,
    70.34% 4.32%, 75.00% 6.70%, 79.39% 9.55%
  );
  --body-x: 0.00rem;
  --body-y: -11.20rem;
}

.pasaport-radial-item--passport {
  --slice-fill: #145da9;
  --slice-clip: polygon(
    50% 50%,
    79.39% 9.55%, 83.46% 12.84%, 87.16% 16.54%, 90.45% 20.61%,
    93.30% 25.00%, 95.68% 29.66%, 97.55% 34.55%, 98.91% 39.60%,
    99.73% 44.77%, 100.00% 50.00%, 99.73% 55.23%, 98.91% 60.40%,
    97.55% 65.45%
  );
  --body-x: 10.65rem;
  --body-y: -3.46rem;
}

.pasaport-radial-item--registry-personal {
  --slice-fill: #0f4f94;
  --slice-clip: polygon(
    50% 50%,
    97.55% 65.45%, 95.68% 70.34%, 93.30% 75.00%, 90.45% 79.39%,
    87.16% 83.46%, 83.46% 87.16%, 79.39% 90.45%, 75.00% 93.30%,
    70.34% 95.68%, 65.45% 97.55%, 60.40% 98.91%, 55.23% 99.73%,
    50.00% 100.00%
  );
  --body-x: 6.58rem;
  --body-y: 9.06rem;
  --body-width: 8.2rem;
}

.pasaport-radial-item--analytics {
  --slice-fill: #114b87;
  --slice-clip: polygon(
    50% 50%,
    50.00% 100.00%, 44.77% 99.73%, 39.60% 98.91%, 34.55% 97.55%,
    29.66% 95.68%, 25.00% 93.30%, 20.61% 90.45%, 16.54% 87.16%,
    12.84% 83.46%, 9.55% 79.39%, 6.70% 75.00%, 4.32% 70.34%, 2.45% 65.45%
  );
  --body-x: -6.58rem;
  --body-y: 9.06rem;
}

.pasaport-radial-item--nis {
  --slice-fill: #1f76c2;
  --slice-clip: polygon(
    50% 50%,
    2.45% 65.45%, 1.09% 60.40%, 0.27% 55.23%, 0.00% 50.00%, 0.27% 44.77%,
    1.09% 39.60%, 2.45% 34.55%, 4.32% 29.66%, 6.70% 25.00%, 9.55% 20.61%,
    12.84% 16.54%, 16.54% 12.84%, 20.61% 9.55%
  );
  --body-x: -10.65rem;
  --body-y: -3.46rem;
  --body-width: 8.2rem;
}

.pasaport-radial-item:hover,
.pasaport-radial-item:focus-visible,
.pasaport-radial-item[aria-current="page"] {
  color: #fff;
  filter: brightness(1.08) saturate(1.04);
}

.pasaport-radial-item:hover::before,
.pasaport-radial-item:focus-visible::before,
.pasaport-radial-item[aria-current="page"]::before { opacity: 1; }

.pasaport-radial-item:hover .pasaport-radial-item__body,
.pasaport-radial-item:focus-visible .pasaport-radial-item__body,
.pasaport-radial-item[aria-current="page"] .pasaport-radial-item__body {
  transform: translate(-50%, -50%) translate(var(--body-x, 0), var(--body-y, 0)) scale(1.06);
}

.pasaport-radial-item__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.pasaport-radial-item__icon .pasaport-rail-icon {
  width: 1.3rem;
  height: 1.3rem;
}

.pasaport-radial-item__label {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

/* --- butucul central --- */

.pasaport-radial-wheel__hub {
  position: relative;
  z-index: 4;
  width: 35%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 1.2rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(8, 29, 56, 0.97), rgba(4, 21, 43, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 34px rgba(5, 21, 43, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.45rem;
  text-align: center;
  color: #fff;
  text-decoration: none;
}

.pasaport-radial-wheel__hub-icon .pasaport-rail-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.pasaport-radial-wheel__title {
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* --- starea deschisa --- */

body.pasaport-portal-open .pasaport-radial-flyout {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.pasaport-portal-open .pasaport-radial-flyout__dialog {
  transform: translate(-50%, -50%) scale(1);
}

body.pasaport-portal-open { overflow: hidden; }

@media (max-width: 720px) {
  .pasaport-radial-flyout__dialog { width: min(92vw, 28rem); }

  .pasaport-radial-item__body {
    width: var(--body-width-mobile, 5.9rem);
    min-height: var(--body-height-mobile, 4.2rem);
    padding: 0.62rem 0.34rem 0.48rem;
  }

  .pasaport-radial-item__icon { width: 2.1rem; height: 2.1rem; }
  .pasaport-radial-item__icon .pasaport-rail-icon { width: 1.05rem; height: 1.05rem; }
  .pasaport-radial-item__label { font-size: 0.74rem; }

  .pasaport-radial-item--map { --body-x: 0.00rem; --body-y: -7.60rem; }
  .pasaport-radial-item--passport { --body-x: 7.23rem; --body-y: -2.35rem; }
  .pasaport-radial-item--registry-personal { --body-x: 4.47rem; --body-y: 6.15rem; --body-width-mobile: 6.7rem; }
  .pasaport-radial-item--analytics { --body-x: -4.47rem; --body-y: 6.15rem; }
  .pasaport-radial-item--nis { --body-x: -7.23rem; --body-y: -2.35rem; --body-width-mobile: 6.7rem; }



  .pasaport-radial-flyout__close { display: none; }
  .pasaport-radial-wheel__hub { width: 39%; padding: 0.9rem; }
}
/* ---------------------------------------------------------------- carduri */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  border-color: rgba(var(--rnc-primary-rgb), 0.3);
  box-shadow: 0 22px 40px rgba(8, 37, 73, 0.16);
  transform: translateY(-2px);
}

.card .top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.card .badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--rnc-primary);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.card .layers-n {
  font-size: 0.66rem;
  color: var(--rnc-text-soft);
  margin-left: auto;
}

.card h3 {
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
}

.card .abstract {
  font-size: 0.78rem;
  color: var(--rnc-text-soft);
  line-height: 1.5;
  margin: 0.35rem 0 0.75rem;
  flex: 1;
}

.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.card .tag {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--rnc-primary);
  background: var(--rnc-chip);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.card .actions { display: flex; gap: 0.5rem; }
.card .actions .btn { flex: 1; text-align: center; text-decoration: none; }

.empty {
  font-size: 0.85rem;
  color: var(--rnc-text-soft);
  border: 1px dashed rgba(var(--rnc-primary-rgb), 0.22);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
}

/* ------------------------------------------------- panoul de straturi + hint */

.layers-panel {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  padding: 0.75rem 0.9rem;
  max-width: 250px;
}

.layers-panel h4 {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnc-text-soft);
  margin: 0 0 0.4rem;
}

.layers-panel label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  padding: 0.15rem 0;
  cursor: pointer;
}

.layers-panel input[type="checkbox"] { accent-color: var(--rnc-primary); }

/* un rand = un strat: bifa de vizibilitate + cursorul de opacitate */
.layers-panel .lyr {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--rnc-line);
}

.layers-panel .lyr:last-child { border-bottom: none; }

.layers-panel .opa {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.3rem 0 0 1.4rem;
}

.layers-panel .opa input {
  flex: 1;
  min-width: 0;
  height: 3px;
  accent-color: var(--rnc-primary);
  cursor: pointer;
}

.layers-panel .opa input:disabled {
  accent-color: var(--rnc-text-soft);
  cursor: default;
  opacity: 0.5;
}

.layers-panel .opa span {
  font-size: 0.64rem;
  color: var(--rnc-text-soft);
  width: 32px;
  text-align: right;
  flex: none;
}

/* apare cat timp harta e prea departe pentru straturile cu prag de scara */
.zoom-hint {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(3, 37, 77, 0.92);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.zoom-hint.on { display: block; }

/* ------------------------------------------------------------------- modal */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 37, 77, 0.42);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1.25rem;
}

.overlay.open { display: flex; }

.modal {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--rnc-border);
  width: 620px;
  max-width: 100%;
  max-height: 88vh;
  overflow: auto;
  border-radius: var(--radius-xl);
  padding: 1.4rem;
  box-shadow: 0 30px 70px rgba(8, 37, 73, 0.28);
}

.modal .m-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.modal h2 { font-size: 1.05rem; font-weight: 800; margin: 0; }

.modal .m-sub {
  font-size: 0.78rem;
  color: var(--rnc-text-soft);
  margin: 0.25rem 0 0.9rem;
}

.modal .close {
  border: none;
  background: var(--rnc-chip);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--rnc-text-soft);
}

.modal h3.sec {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnc-text-soft);
  margin: 1.1rem 0 0.5rem;
}

.tag2 {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--rnc-primary);
  background: var(--rnc-chip);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  margin: 0 0.3rem 0.3rem 0;
}

.layer-block {
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.6rem;
  background: rgba(255, 255, 255, 0.6);
}

.layer-block .lname { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.4rem; }

.kv { display: flex; gap: 0.5rem; font-size: 0.78rem; margin: 0.2rem 0; }
.kv b { color: var(--rnc-text-soft); font-weight: 600; min-width: 88px; }

/* --- blocul de conectare la servicii --- */

.svc.reco {
  border: 1px solid rgba(var(--rnc-primary-rgb), 0.22);
  background: rgba(var(--rnc-primary-rgb), 0.05);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.95rem;
}

.svc .svc-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.svc .svc-name { font-size: 0.85rem; font-weight: 700; }

.svc .pill {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: var(--rnc-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.svc .svc-desc { font-size: 0.72rem; color: var(--rnc-text-soft); margin-bottom: 0.55rem; }

.copyrow { display: flex; gap: 0.5rem; }

.copyrow input {
  flex: 1;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.75rem;
}

.copyrow button {
  border: 1px solid var(--rnc-primary);
  background: var(--rnc-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.copyrow button.copied { background: var(--rnc-success); border-color: var(--rnc-success); }

.hint {
  font-size: 0.72rem;
  color: var(--rnc-text-soft);
  line-height: 1.5;
  margin-top: 0.45rem;
  background: var(--rnc-chip);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--rnc-success);
  color: #fff;
}

.btn-dl:hover { background: #16724f; }

/* nu se poate descarca inca (lipseste zona / selectia) */
.btn-dl.off {
  background: var(--rnc-chip);
  color: var(--rnc-text-soft);
  pointer-events: none;
}

.map-close { display: none; }

/* ============================================================== Administrare */

.editor-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  padding: 0 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.panel { padding: 1.1rem; }

.panel h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rnc-text-soft);
  margin: 0 0 0.8rem;
}

.card-item {
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.card-item:hover,
.card-item.active {
  border-color: rgba(var(--rnc-primary-rgb), 0.35);
  background: rgba(var(--rnc-primary-rgb), 0.06);
}

.card-item .t { font-size: 0.82rem; font-weight: 700; }
.card-item .m { font-size: 0.7rem; color: var(--rnc-text-soft); margin-top: 2px; }

.btn.block { width: 100%; }

/* --- filele de limba din formularul de card --- */

.lang-tabs {
  display: flex;
  gap: 3px;
  margin: 1rem 0 0.25rem;
  padding: 3px;
  border-radius: 999px;
  background: rgba(var(--rnc-primary-rgb), 0.06);
  border: 1px solid rgba(var(--rnc-primary-rgb), 0.1);
  width: fit-content;
}

.lang-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  opacity: 0.58;
  transition: background-color 0.18s ease, opacity 0.18s ease;
}

.lang-tab:hover { opacity: 0.88; }

.lang-tab.is-active {
  opacity: 1;
  background: #fff;
  box-shadow: 0 1px 4px rgba(8, 37, 73, 0.18);
}

.lang-pane { display: none; }
.lang-pane.is-active { display: block; }

.layers-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.55);
}

.layers-pick label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  padding: 0.15rem 0.1rem;
  cursor: pointer;
}

.layers-pick input[type="checkbox"] { accent-color: var(--rnc-primary); }

.tech {
  margin-top: 0.5rem;
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.5);
  padding: 0.75rem;
}

.tech .layer-block {
  padding: 0.5rem 0;
  border: none;
  border-bottom: 1px dashed var(--rnc-line);
  border-radius: 0;
  margin: 0;
  background: none;
}

.tech .layer-block:last-child { border-bottom: none; }

.actions { display: flex; gap: 0.6rem; margin-top: 1.2rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rnc-primary-deep);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 200;
}

.toast.show { opacity: 1; }
.toast.err { background: var(--rnc-danger); }

/* =================================================================== Login */

body.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.login-box {
  position: relative;
  z-index: 1;
  padding: 1.75rem;
  width: 360px;
  max-width: 100%;
}

.login-box .brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.login-box .brand-title { margin: 0; }

.err {
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.22);
  color: var(--rnc-danger);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  margin-top: 0.9rem;
}

.back {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rnc-text-soft);
  text-decoration: none;
}

.back:hover { color: var(--rnc-primary); }

/* -------------------------------------------------------------- divizorul */
/* Bara verticala dintre catalog si harta; latimea rezultata se scrie in
   --map-w de pe #app, de unde o citesc si panoul, si tab-ul HARTA. */

.resizer {
  display: none;
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  width: 11px;
  margin-right: -5px;
  z-index: 41;
  cursor: col-resize;
  transition: right 0.3s ease;
}

#app.map-open .resizer {
  display: block;
  right: calc(var(--map-w) + 0.5rem);
}

.resizer::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 46px;
  border-radius: 999px;
  background: rgba(var(--rnc-primary-rgb), 0.2);
  transition: background-color 0.15s ease;
}

.resizer:hover::before,
#app.resizing .resizer::before { background: var(--rnc-primary); }

#app.resizing { cursor: col-resize; user-select: none; }

#app.resizing .pane-map,
#app.resizing .map-toggle,
#app.resizing .resizer { transition: none; }

/* ---------------------------------------------------------- cautarea de UAT */

.uat-search {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 6;
  width: 264px;
  max-width: calc(100% - 4.5rem);
}

.uat-search .box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--rnc-border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  box-shadow: var(--shadow-soft);
}

.uat-search .box:focus-within {
  border-color: rgba(var(--rnc-primary-rgb), 0.45);
  box-shadow: 0 0 0 3px rgba(var(--rnc-primary-rgb), 0.12);
}

.uat-search svg { color: var(--rnc-text-soft); flex: none; }

.uat-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--rnc-text);
  background: none;
  border-radius: 0;
}

.uat-search input:focus { box-shadow: none; border: none; }

.uat-search .clear {
  border: none;
  background: none;
  color: var(--rnc-text-soft);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 2px;
  display: none;
}

.uat-search.has-text .clear { display: block; }

.uat-results {
  display: none;
  margin-top: 0.4rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--rnc-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.uat-results.on { display: block; }

.uat-results .it {
  padding: 0.5rem 0.75rem;
  font-size: 0.79rem;
  cursor: pointer;
  line-height: 1.35;
}

.uat-results .it:hover,
.uat-results .it.sel { background: rgba(var(--rnc-primary-rgb), 0.08); }

.uat-results .it .j { color: var(--rnc-text-soft); }

.uat-results .none {
  padding: 0.6rem 0.75rem;
  font-size: 0.76rem;
  color: var(--rnc-text-soft);
}

.panel-hint {
  font-size: 0.7rem;
  color: var(--rnc-text-soft);
  margin: 0.5rem 0 0;
  line-height: 1.45;
  border-top: 1px solid var(--rnc-line);
  padding-top: 0.45rem;
}

/* ------------------------------------------------ popup-ul de pe harta (OL) */

.ol-popup {
  position: relative;
  width: 296px;
  max-width: 78vw;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--rnc-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(8, 37, 73, 0.26);
  font-size: 0.78rem;
}

/* varful sagetii: doua triunghiuri suprapuse, cel din spate face conturul */
.ol-popup::before,
.ol-popup::after {
  content: "";
  position: absolute;
  left: 50%;
  border: solid transparent;
  border-bottom: 0;
}

.ol-popup::before {
  bottom: -10px;
  margin-left: -10px;
  border-width: 10px;
  border-top-color: var(--rnc-border);
}

.ol-popup::after {
  bottom: -9px;
  margin-left: -9px;
  border-width: 9px;
  border-top-color: rgba(255, 255, 255, 0.97);
}

.pop-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rnc-line);
}

.pop-title {
  font-size: 0.78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pop-close {
  margin-left: auto;
  flex: none;
  border: none;
  background: var(--rnc-chip);
  width: 22px;
  height: 22px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--rnc-text-soft);
  font-size: 0.95rem;
  line-height: 1;
}

.pop-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--rnc-line);
  font-size: 0.7rem;
  color: var(--rnc-text-soft);
}

.pop-nav button {
  border: 1px solid var(--rnc-line);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 7px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  color: var(--rnc-text);
  line-height: 1;
  padding: 0;
}

.pop-nav button:disabled { opacity: 0.35; cursor: default; }

.pop-body {
  max-height: min(250px, 38vh);
  overflow: auto;
  padding: 0.45rem 0.75rem 0.7rem;
}

.pop-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--rnc-line);
}

.pop-row:last-child { border-bottom: none; }

.pop-row b {
  color: var(--rnc-text-soft);
  font-weight: 600;
  flex: 0 0 42%;
  word-break: break-word;
}

.pop-row span { flex: 1; word-break: break-word; }
.pop-row span.empty-val { color: rgba(22, 50, 79, 0.38); }
.pop-msg { color: var(--rnc-text-soft); padding: 0.2rem 0; }

/* ------------------------------------------------- optiunile de descarcare */

.dl {
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-lg);
  padding: 0.7rem 0.9rem 0.85rem;
  background: rgba(255, 255, 255, 0.6);
}

.dl-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.3rem 0;
  cursor: pointer;
}

.dl-opt input { margin: 2px 0 0; flex: none; accent-color: var(--rnc-primary); }

.dl-uat { display: flex; gap: 0.5rem; margin: 1px 0 0.4rem 1.45rem; }

.dl-uat select {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.76rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--rnc-line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--rnc-text);
}

.dl-uat select:disabled { color: var(--rnc-text-soft); background: var(--rnc-chip); }

.dl-count {
  font-size: 0.76rem;
  color: var(--rnc-text-soft);
  line-height: 1.5;
  margin: 0.55rem 0 0.7rem;
}

.dl-count b { color: var(--rnc-text); }

.dl-count.warn {
  color: #8a5405;
  background: rgba(214, 164, 54, 0.12);
  border: 1px solid rgba(214, 164, 54, 0.38);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.7rem;
}

.dl-count.warn b { color: #8a5405; }

/* ============================================================== Responsive */

@media (max-width: 980px) {
  .editor-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0.6rem 0.6rem 0;
    padding: 0.6rem 0.8rem;
  }
  .topbar .section-kicker { font-size: 0.62rem; letter-spacing: 0.12em; }
  .topbar .brand-title { font-size: 0.9rem; }
  .topbar .count { display: none; }
  .topbar a.admin { margin-left: auto; }
  .topbar .search { order: 5; flex: 1 1 100%; margin-left: 0; }
  .topbar .search input { width: 100%; max-width: none; }

  .split { padding: 0.6rem; }
  .pane-catalog { width: 100%; }
  .grid { grid-template-columns: 1fr; }

  .pane-map { width: 0; }
  #app.map-open .pane-map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    border: none;
    border-radius: 0;
  }

  /* Pe mobil harta e pe tot ecranul, iar comenzile se stivuiesc pe verticala:
     butonul de inchidere sus, sub el cautarea de UAT, apoi panoul de straturi.
     Divizorul n-are ce imparti. */
  .uat-search { top: 3.5rem; left: 0.75rem; right: 0.75rem; width: auto; max-width: none; }
  .layers-panel { top: 7rem; left: 0.75rem; right: auto; max-width: 62%; }
  .resizer,
  #app.map-open .resizer { display: none; }

  .map-toggle { top: auto; bottom: 5.5rem; }
  #app.map-open .map-toggle { display: none; }
  #app.map-open .map-close {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1002;
    background: var(--rnc-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
  }

  .modal { padding: 1.1rem; max-height: 92vh; }
  .editor-wrap { padding: 0 0.6rem 1.2rem; }
}
