
.ph-pagina {
  --brand: #636d2f; --brand-d: #4f5725; --brand-l: #f6f8ec; --brand-ll: #fbfcf7; --linie: #e1e6bf;
  --text: #1c1c1c; --text-2: #545454; --gri: #a3a3a3; --gri-l: #eeeeee; --harta: #f3f4ef; --bordo: #8b1e2d;
  color: var(--text); background: #fff; font-size: 15px;
}
.ph-pagina * { box-sizing: border-box; }
.ph-pagina button, .ph-pagina input, .ph-pagina select { font: inherit; color: inherit; }
.ph-pagina a { color: var(--brand); }

/* ---------- antet ---------- */
.ph-sus { padding: 0 24px; }
.ph-antet { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.ph-antet h1 { margin: 0 !important; font-size: 24px !important; line-height: 1.25 !important; font-weight: 700 !important; color: var(--text) !important; }
.ph-antet p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.ph-mod { display: inline-flex; border: 1.5px solid var(--brand); border-radius: 10px; overflow: hidden; flex: none; }
.ph-mod a { background: #fff; color: var(--brand) !important; padding: 10px 20px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; text-decoration: none !important; }
.ph-mod a.activ { background: var(--brand); color: #fff !important; }
.ph-mod svg { width: 18px; height: 18px; }

/* ---------- structura ---------- */
.ph { display: grid; grid-template-columns: 330px minmax(0, 1fr); border-top: 1px solid var(--gri-l); }
.ph--harta { height: calc(100vh - 60px); min-height: 620px; }
.ph-filtre { border-right: 1px solid var(--gri-l); background: var(--brand-ll); }
.ph--harta .ph-filtre { overflow-y: auto; }
.ph--lista .ph-filtre { position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.ph-filtre__in { padding: 18px 18px 20px; }
.ph-grup { border-bottom: 1px solid var(--linie); padding: 14px 0; }
.ph-grup:first-child { padding-top: 0; }
.ph-grup__t { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 0 0 10px; }
.ph-camp { margin-bottom: 10px; }
.ph-camp label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.ph-camp select, .ph-camp input[type=text], .ph-camp input[type=search], .ph-camp input[type=month] {
  width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--gri); border-radius: 8px; background: #fff; font-size: 16px;
}
.ph-camp select:focus, .ph-camp input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--linie); }
.ph-camp select:disabled { background: #f4f4f4; color: #6f6f6f; }
.ph-dep { border-left: 3px solid var(--brand); padding-left: 10px; margin-top: 4px; }
.ph-dep[hidden] { display: none; }
.ph-nota { font-size: 14px; color: var(--text-2); margin: 2px 0 8px; line-height: 1.4; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-chip { border: 1px solid var(--gri); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 15px; cursor: pointer; }
.ph-chip.activ { background: var(--brand); border-color: var(--brand); color: #fff; }
.ph-doua { display: grid; grid-template-columns: 1fr; gap: 8px; }
.ph-seg { display: inline-flex; border: 1px solid var(--gri); border-radius: 8px; overflow: hidden; width: 100%; }
.ph-seg button { flex: 1; border: 0; background: #fff; padding: 8px 4px; font-size: 15px; cursor: pointer; }
.ph-seg button + button { border-left: 1px solid var(--gri); }
.ph-seg button.activ { background: var(--brand); color: #fff; }
.ph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 8px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand); font-weight: 600; cursor: pointer; width: 100%; }
.ph-btn:hover { background: var(--brand-l); }
.ph-filtre .ph-btn { font-size: 17px; }
.ph-filtre .ph-grup > label { font-size: 15px !important; }
.ph-reset { padding-bottom: 14px; border-bottom: 1px solid var(--linie); margin-bottom: 14px; }

/* ---------- zona principala ---------- */
.ph-main { position: relative; min-width: 0; display: flex; flex-direction: column; }
.ph-sumar { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: baseline; padding: 12px 20px; border-bottom: 1px solid var(--gri-l); background: #fff; }
.ph-sumar div { font-size: 16px; color: var(--text-2); }
.ph-sumar b { font-size: 22px; color: var(--brand-d); font-weight: 700; margin-right: 4px; }
.ph-activ { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--gri-l); }
.ph-activ:empty { display: none; }
.ph-tag { background: var(--brand); border: 1px solid var(--brand); color: #fff; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; max-width: 360px; }
.ph-tag span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tag button { border: 0; background: none; cursor: pointer; font-size: 17px; line-height: 1; color: #fff; padding: 0 4px; }
.ph-tag button:hover { opacity: .8; }
.ph-incarcare { padding: 60px 20px; text-align: center; color: var(--text-2); }

.ph-vedere-harta { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 0; }
.ph-harta { flex: 1; background: var(--harta); }
.ph-pagina .leaflet-container { font-family: inherit; background: var(--harta); }
.ph-pagina .leaflet-interactive:focus { outline: none; }
.ph-legenda { position: absolute; left: 16px; bottom: 16px; z-index: 500; background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.12); padding: 12px 14px; font-size: 13px; max-width: 290px; }
.ph-legenda h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.ph-legenda .r { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.ph-legenda i { width: 22px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); flex: none; }
.ph-legenda p { margin: 8px 0 0; color: var(--text-2); font-size: 12px; line-height: 1.4; }
.ph-metric { position: absolute; right: 16px; top: 16px; z-index: 500; background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.12); padding: 4px; display: flex; flex-wrap: wrap; max-width: calc(100% - 80px); }
.ph-metric button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ph-metric button.activ { background: var(--brand); color: #fff; }

/* panoul UAT */
/* tot panoul se deruleaza ca un intreg (o singura bara de derulare) */
/* fereastra UAT-ului: pe centrul ecranului, 850px, pana la 80% din inaltime, cu fundal semitransparent */
.ph-fundal { position: fixed; inset: 0; z-index: 2990; background: rgba(28, 28, 28, .45); }
.ph-fundal[hidden] { display: none; }
.ph-panou { position: fixed; top: 50%; left: 50%; width: 850px; max-width: calc(100vw - 32px); max-height: 80vh; z-index: 3000; background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow-y: auto; margin: 0; padding: 0 !important; transform: translate(-50%, -48%); opacity: 0; transition: transform .2s, opacity .2s; visibility: hidden; }
.ph-panou.deschis { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
.ph-panou__cap { padding: 18px 20px 14px; border-bottom: 1px solid var(--gri-l); position: relative; }
.ph-panou__cap h2 { margin: 0 40px 4px 0 !important; font-size: 24px !important; font-weight: 700 !important; }
.ph-panou__cap .sub { color: var(--text-2); font-size: 16px; }
.ph-x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--gri-l); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; }
.ph-panou__cifre { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--gri-l); }
.ph-panou__cifre div { background: var(--brand-l); border-radius: 10px; padding: 10px 12px; }
.ph-panou__cifre b { display: block; font-size: 22px; color: var(--brand-d); }
.ph-panou__cifre span { font-size: 14px; color: var(--text-2); }
.ph-stari { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--gri-l); }
.ph-panou__lista { padding: 6px 20px 20px; }
.ph-stare { border: 1.5px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--gri-l); color: var(--text); }
.ph-stare b { font-weight: 700; margin-left: 2px; }
.ph-stare.activ { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }
.ph-stare[data-g=""].activ { background: var(--brand); border-color: var(--brand); color: #fff; }
.ph-pr { padding: 12px 0; border-bottom: 1px solid var(--gri-l); }
.ph-pr a.t { font-size: 17px; font-weight: 600; color: var(--text) !important; text-decoration: none; display: block; margin: 4px 0; line-height: 1.35; }
.ph-pr a.t:hover { color: var(--brand) !important; text-decoration: underline; }
.ph-pr .m { font-size: 14px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }

.ph-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.b-contractat, .b-realizare { background: #e5f2d9; color: #3b6b1e; }
.b-finalizat { background: #636d2f; color: #fff !important; }
.b-depus, .b-aprobat { background: #fff3cd; color: #6b5000; }
.b-respins { background: #f3e0e0; color: #8a3030; }

/* ---------- lista ---------- */
.ph-lista { padding: 16px 20px 40px; background: #fff; }
.ph-lista__bara { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 16px; color: var(--text-2); }
.ph-lista__bara select { height: 40px; font-size: 16px; border: 1px solid var(--gri); border-radius: 8px; padding: 0 8px; background: #fff; }
.ph-card { border: 1px solid var(--gri-l); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; transition: border-color .15s, box-shadow .15s; }
.ph-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(99, 109, 47, .15); }
.ph-card .meta { font-size: 15px; color: var(--text-2); }
.ph-card h3 { margin: 6px 0 10px !important; font-size: 20px !important; line-height: 1.35 !important; font-weight: 600 !important; }
.ph-card h3 a { color: var(--text) !important; text-decoration: none; }
.ph-card h3 a:hover { color: var(--brand) !important; text-decoration: underline; }
.ph-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0; font-size: 14px; }
.ph-card dt { color: var(--text-2); font-size: 14px; font-weight: 400; }
.ph-card dd { margin: 0; font-weight: 500; }
.ph-card .dr { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ph-card .suma { font-size: 20px; font-weight: 700; color: var(--brand-d); }
.ph-bara { height: 6px; width: 100%; background: var(--gri-l); border-radius: 3px; overflow: hidden; }
.ph-bara i { display: block; height: 100%; background: var(--brand); }
.ph-lista__info { margin-right: auto; }
.ph-pagini { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 16px; }
.ph-pagini button { min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--gri); border-radius: 8px; background: #fff; cursor: pointer; font-size: 15px; }
.ph-pagini button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ph-pagini button.activ { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.ph-pagini button:disabled { opacity: .4; cursor: default; }
.ph-pagini .gol { color: var(--text-2); padding: 0 2px; }
.ph-gol { padding: 40px 20px; text-align: center; color: var(--text-2); }

.ph-btn-filtre { display: none; }

/* ---------- mobil ---------- */
@media (max-width: 900px) {
  .ph-sus { padding: 0 16px; }
  .ph-antet { flex-direction: column; align-items: flex-start; }
  .ph-antet h1 { font-size: 20px !important; }
  .ph, .ph--harta { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .ph-filtre, .ph--lista .ph-filtre { position: fixed; inset: auto 0 0 0; top: auto; height: 85vh; max-height: none; overflow-y: auto; z-index: 2000; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.25); transform: translateY(105%); transition: transform .2s; visibility: hidden; }
  .ph-filtre.deschis { transform: none; visibility: visible; }
  .ph-filtre__in { padding-bottom: 90px; }
  .ph-btn-filtre { display: inline-flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1900; width: auto; background: var(--brand); color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
  .ph-btn-filtre:hover { background: var(--brand-d); }
  .ph-vedere-harta { height: 72vh; flex: none; }
  .ph-legenda { bottom: 10px; left: 10px; max-width: 170px; font-size: 11px; padding: 8px 10px; }
  .ph-legenda p { display: none; }
  .ph-legenda .r { margin: 1px 0; }
  .ph-sumar { gap: 2px 16px; padding: 10px 16px; }
  .ph-sumar b { font-size: 17px; }
  .ph-metric { top: 10px; right: 10px; }
  .ph-metric button { padding: 6px 8px; font-size: 12px; }
  .ph-panou__cifre { grid-template-columns: 1fr 1fr; }
  .ph-panou { width: 100%; max-width: none; top: auto; left: 0; right: 0; bottom: 0; max-height: 75vh; border-radius: 16px 16px 0 0; transform: translateY(105%); opacity: 1; }
  .ph-panou.deschis { transform: none; }
  .ph-card { grid-template-columns: minmax(0, 1fr); }
  .ph-card dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ph-card .dr { text-align: left; align-items: flex-start; }
  .ph-lista { padding: 12px 16px 90px; }
}

.ph-vedere-harta[hidden], .ph-lista[hidden] { display: none !important; }
/* tema site-ului are line-height mare pe text; aici textele sunt dense */
.ph-pagina .ph-card dd, .ph-pagina .ph-card dt, .ph-pagina .ph-legenda, .ph-pagina .ph-pr, .ph-pagina .ph-nota { line-height: 1.4; }
.ph-pagina .ph-stare { font-size: 14px !important; line-height: 1.4; }
.ph-panou .ph-badge { font-size: 13px; }
.ph-panou .ph-gol { font-size: 17px; }
.ph-card .ph-badge { font-size: 13px; }

/* statutul cu butonul "?" (explicatia statutului) */
.ph-stat { display: inline-flex; align-items: center; gap: 6px; }
.ph-help { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #818d48; background: #fff; color: #4f5725; font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; flex: none; }
.ph-help:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
/* centrata pe ecran (tema site-ului pune margin: 0 pe dialog) */
.ph-help-dlg { position: fixed; inset: 0; margin: auto !important; height: fit-content; border: 0; border-radius: 16px; padding: 0; width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); overflow: auto; box-shadow: 0 16px 48px rgba(0, 0, 0, .2); color: #1c1c1c; }
.ph-help-dlg::backdrop { background: rgba(28, 28, 28, .45); }
.ph-help-dlg__cap { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; background: #f6f8ec; border-bottom: 1px solid #e1e6bf; }
.ph-help-dlg__cap h3 { margin: 0 !important; font-size: 18px !important; font-weight: 700 !important; color: #1c1c1c !important; }
.ph-help-dlg__cap form { margin: 0; }
.ph-help-dlg__inchide { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: #1c1c1c; }
.ph-help-dlg__inchide:hover { background: #e1e6bf; }
.ph-help-dlg__corp { padding: 16px 20px 20px; font-size: 15px; line-height: 1.5; }
.ph-help-dlg__corp p { margin: 0 0 12px; }
.ph-help-dlg__corp h4 { margin: 0 0 6px !important; font-size: 15px !important; font-weight: 700 !important; color: #1c1c1c !important; }
.ph-help-dlg__corp ul { margin: 0; padding-left: 20px; }
/* statutul proiectului in filtre: o coloana, statutul pe toata latimea si "?" aliniat in dreapta */
#f-statut { flex-direction: column; align-items: stretch; gap: 8px; }
#f-statut .ph-stat { display: flex; gap: 8px; }
#f-statut .ph-chip { flex: 1; text-align: left; }
/* panoul hartii: GAL-urile UAT-ului ca linkuri spre profil */
.ph-panou__gal { color: var(--brand) !important; font-weight: 600; text-decoration: underline; }
.ph-panou__gal:hover { color: var(--brand-d) !important; }
