:root {
  --hm157-green: #0b4a3f;
  --hm157-green-dark: #073b33;
  --hm157-mint: #dff4ec;
  --hm157-bg: #f4f8f6;
  --hm157-border: #cdded8;
  --hm157-text: #14211e;
  --hm157-muted: #61716c;
  --hm157-white: #ffffff;
  --hm157-danger: #8b2e2e;
  --hm157-shadow: 0 18px 48px rgba(11, 74, 63, .14);
}

/* Footer unic pe toate paginile */
footer.hm157-footer,
body > footer.hm157-footer {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--hm157-green-dark) !important;
  color: #fff !important;
  border: 0 !important;
  clear: both !important;
}
.hm157-footer-grid {
  box-sizing: border-box;
  width: min(1560px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 20px;
  display: grid !important;
  grid-template-columns: minmax(260px, 1.25fr) minmax(190px, .75fr) minmax(290px, 1fr) minmax(320px, 1.15fr);
  gap: 28px 42px;
  align-items: start;
}
.hm157-footer-grid > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 10px 12px;
}
.hm157-footer-grid > div:first-child {
  display: block;
}
.hm157-footer-grid strong {
  display: block;
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}
.hm157-footer-grid p {
  margin: 0;
  max-width: 310px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  line-height: 1.55;
}
.hm157-footer-label {
  flex-basis: 100%;
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hm157-footer-grid a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 12px;
  color: #fff !important;
  background: rgba(255,255,255,.04);
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.hm157-footer-grid a:hover,
.hm157-footer-grid a:focus-visible {
  color: #fff !important;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.72);
  transform: translateY(-1px);
}
.hm157-footer-grid > div:nth-child(2) a {
  min-width: 165px;
  background: #fff;
  color: #17201e !important;
  border-color: #fff;
}
.hm157-footer-note {
  grid-column: 1 / -1;
  display: block !important;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.18);
  text-align: center;
  color: rgba(255,255,255,.64);
  font-size: 13px;
}

/* Modal global pentru cont */
.hm157-modal-root[hidden],
.hm157-mobile-menu[hidden] {
  display: none !important;
}
.hm157-modal-root {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  padding: 20px !important;
  background: rgba(4, 27, 23, .62) !important;
  backdrop-filter: blur(8px);
}
.hm157-modal {
  position: relative !important;
  width: min(620px, 100%) !important;
  max-height: min(820px, calc(100dvh - 40px)) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 28px !important;
  border: 1px solid var(--hm157-border) !important;
  border-radius: 22px !important;
  background: #fff !important;
  color: var(--hm157-text) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.28) !important;
  transform: none !important;
}
.hm157-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hm157-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hm157-green-dark);
  font-size: 24px;
  cursor: pointer;
}
.hm157-modal h2 {
  margin: 0 50px 8px 0;
  font-size: 26px;
  line-height: 1.15;
}
.hm157-modal p {
  color: var(--hm157-muted);
  line-height: 1.55;
}
.hm157-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hm157-modal-message {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hm157-mint);
  color: var(--hm157-green-dark);
}
.hm157-modal-message.is-error {
  background: #fdecec;
  color: var(--hm157-danger);
}
html.hm157-scroll-lock,
html.hm157-scroll-lock body {
  overflow: hidden !important;
}

/* Meniu mobil */
.hm157-menu-toggle {
  display: none;
  width: 44px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hm157-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hm157-green-dark);
  cursor: pointer;
}
.hm157-menu-toggle span,
.hm157-menu-toggle::before,
.hm157-menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}
.hm157-menu-toggle span {
  margin: 5px 0;
}
.hm157-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  background: rgba(4,27,23,.56);
  backdrop-filter: blur(6px);
}
.hm157-mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(390px, 92vw);
  height: 100dvh;
  box-sizing: border-box;
  padding: 84px 22px 28px;
  overflow: auto;
  background: #fff;
  box-shadow: -24px 0 70px rgba(0,0,0,.22);
}
.hm157-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--hm157-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hm157-green-dark);
  font-size: 25px;
}
.hm157-mobile-links {
  display: grid;
  gap: 8px;
}
.hm157-mobile-links a,
.hm157-mobile-links button {
  display: flex;
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--hm157-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hm157-green-dark);
  text-decoration: none;
  font-weight: 750;
  text-align: left;
}
.hm157-mobile-links [aria-current="page"] {
  background: var(--hm157-mint);
  border-color: #9ecdbc;
}

/* Pagini cont si administrare */
body.hm157-page {
  margin: 0;
  background: var(--hm157-bg);
  color: var(--hm157-text);
  font-family: Inter, Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.hm157-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 68px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 10px max(20px, calc((100% - 1500px) / 2));
  border-bottom: 1px solid var(--hm157-border);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}
.hm157-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hm157-green-dark);
  text-decoration: none;
  font-size: 20px;
  font-weight: 850;
}
.hm157-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--hm157-green);
  color: #fff;
  font-size: 12px;
}
.hm157-page-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hm157-border);
  border-radius: 999px;
  background: #f8fbfa;
}
.hm157-page-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #52615d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 720;
}
.hm157-page-nav a:hover,
.hm157-page-nav a[aria-current="page"] {
  background: #fff;
  color: var(--hm157-green-dark);
  box-shadow: 0 4px 14px rgba(11,74,63,.1);
}
.hm157-header-actions button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--hm157-border);
  border-radius: 12px;
  background: #fff;
  color: var(--hm157-green-dark);
  font-weight: 800;
  cursor: pointer;
}
.hm157-main {
  min-height: calc(100vh - 340px);
}
.hm157-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 38px auto 70px;
}
.hm157-hero-card,
.hm157-panel,
.hm157-project,
.hm157-account-summary,
.hm157-admin-bar {
  box-sizing: border-box;
  border: 1px solid var(--hm157-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 38px rgba(11,74,63,.06);
}
.hm157-hero-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 32px;
  margin-bottom: 24px;
}
.hm157-hero-card h1 {
  margin: 7px 0 10px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hm157-hero-card p {
  max-width: 760px;
  margin: 0;
  color: var(--hm157-muted);
  line-height: 1.62;
}
.hm157-kicker {
  display: block;
  color: #197563;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .16em;
}
.hm157-price-box {
  width: 230px;
  box-sizing: border-box;
  padding: 22px;
  border-radius: 16px;
  background: var(--hm157-green-dark);
  color: #fff;
}
.hm157-price-box span,
.hm157-price-box small {
  display: block;
  color: rgba(255,255,255,.72);
}
.hm157-price-box strong {
  display: block;
  margin: 7px 0;
  font-size: 28px;
}
.hm157-alert {
  margin: 18px 0;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid var(--hm157-border);
  line-height: 1.55;
}
.hm157-alert-success { background: #e7f7f0; color: #075342; }
.hm157-alert-error { background: #fff0f0; color: var(--hm157-danger); border-color: #e7bcbc; }
.hm157-alert-info { background: #edf7f4; color: #275b50; }
.hm157-two-columns,
.hm157-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
  margin: 22px 0;
}
.hm157-panel {
  padding: 26px;
  margin: 22px 0;
}
.hm157-two-columns > .hm157-panel,
.hm157-admin-grid > .hm157-panel {
  margin: 0;
}
.hm157-panel h2 {
  margin: 0 0 8px;
  font-size: 25px;
}
.hm157-panel h3 {
  margin: 24px 0 10px;
  font-size: 18px;
}
.hm157-panel p {
  color: var(--hm157-muted);
  line-height: 1.55;
}
.hm157-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.hm157-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.hm157-form label {
  display: grid;
  gap: 7px;
  color: #29423c;
  font-size: 14px;
  font-weight: 760;
}
.hm157-form input,
.hm157-form select,
.hm157-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid #bdd2cb;
  border-radius: 11px;
  background: #fff;
  color: var(--hm157-text);
  font: inherit;
  font-weight: 500;
  outline: none;
}
.hm157-form input:focus,
.hm157-form select:focus,
.hm157-form textarea:focus {
  border-color: #4e9d89;
  box-shadow: 0 0 0 3px rgba(78,157,137,.14);
}
.hm157-primary,
.hm157-secondary,
.hm157-danger {
  display: inline-flex;
  min-height: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.hm157-primary {
  border: 1px solid var(--hm157-green);
  background: var(--hm157-green);
  color: #fff;
}
.hm157-secondary {
  border: 1px solid var(--hm157-border);
  background: #fff;
  color: var(--hm157-green-dark);
}
.hm157-danger {
  border: 1px solid #d9b3b3;
  background: #fff;
  color: var(--hm157-danger);
}
.hm157-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.hm157-feature-grid article {
  padding: 18px;
  border: 1px solid var(--hm157-border);
  border-radius: 14px;
  background: #f9fbfa;
}
.hm157-feature-grid h3 {
  margin: 0 0 7px;
  font-size: 17px;
}
.hm157-feature-grid p {
  margin: 0;
  font-size: 14px;
}
.hm157-account-summary,
.hm157-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  padding: 18px 22px;
  margin: 22px 0;
}
.hm157-account-summary > div {
  display: grid;
  gap: 3px;
}
.hm157-account-summary span {
  color: var(--hm157-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hm157-account-summary form,
.hm157-admin-bar form {
  margin-left: auto;
}
.hm157-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 38px 0 16px;
}
.hm157-section-title h2 {
  margin: 6px 0 0;
  font-size: 30px;
}
.hm157-project {
  padding: 24px;
  margin: 16px 0;
}
.hm157-project-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.hm157-project-head h3 {
  margin: 5px 0 4px;
  font-size: 24px;
}
.hm157-project-head p {
  margin: 0;
  color: var(--hm157-muted);
}
.hm157-project-type,
.hm157-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--hm157-mint);
  color: var(--hm157-green-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.hm157-project-count {
  min-width: 86px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 12px;
  border-radius: 14px;
  background: #f1f7f4;
}
.hm157-project-count strong { font-size: 25px; }
.hm157-project-count span { color: var(--hm157-muted); font-size: 12px; }
.hm157-project-body {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  margin: 24px 0;
  padding-top: 20px;
  border-top: 1px solid var(--hm157-border);
}
.hm157-project-body h4 {
  margin: 0 0 10px;
}
.hm157-project-body ul {
  margin: 0;
  padding-left: 20px;
  color: var(--hm157-muted);
  line-height: 1.65;
}
.hm157-location-table {
  display: grid;
  gap: 7px;
}
.hm157-location-table a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid var(--hm157-border);
  border-radius: 10px;
  color: var(--hm157-green-dark);
  text-decoration: none;
}
.hm157-location-table small { color: var(--hm157-muted); }
.hm157-empty {
  padding: 28px;
  border: 1px dashed #a9c3bb;
  border-radius: 16px;
  color: var(--hm157-muted);
  text-align: center;
}
.hm157-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}
.hm157-stats > div {
  padding: 16px;
  border-radius: 12px;
  background: #f1f7f4;
}
.hm157-stats strong,
.hm157-stats span {
  display: block;
}
.hm157-stats strong { font-size: 25px; }
.hm157-stats span { color: var(--hm157-muted); font-size: 13px; }
.hm157-admin-list {
  display: grid;
  gap: 8px;
}
.hm157-admin-list > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--hm157-border);
  border-radius: 10px;
}
.hm157-admin-list span { color: var(--hm157-muted); font-size: 13px; }
.hm157-table-wrap {
  overflow-x: auto;
}
.hm157-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}
.hm157-table th,
.hm157-table td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--hm157-border);
  text-align: left;
  vertical-align: top;
}
.hm157-table th {
  color: var(--hm157-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hm157-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hm157-admin-auth {
  width: min(520px,100%);
  margin-left: auto;
  margin-right: auto;
}

/* Proforma */
.hm157-proforma-shell { max-width: 980px; }
.hm157-print-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.hm157-proforma {
  padding: 42px;
  border: 1px solid var(--hm157-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--hm157-shadow);
}
.hm157-proforma > header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--hm157-green-dark);
}
.hm157-proforma h1 { margin: 6px 0; font-size: 34px; }
.hm157-proforma-status {
  align-self: start;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--hm157-mint);
  color: var(--hm157-green-dark);
  font-weight: 850;
}
.hm157-proforma-parties {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 30px;
  margin: 30px 0;
}
.hm157-proforma-parties section {
  padding: 20px;
  border: 1px solid var(--hm157-border);
  border-radius: 14px;
}
.hm157-proforma-parties section > span {
  color: var(--hm157-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
}
.hm157-proforma-parties h2 { margin: 8px 0; font-size: 20px; }
.hm157-proforma-parties p { margin: 0; line-height: 1.65; }
.hm157-invoice-table {
  width: 100%;
  border-collapse: collapse;
}
.hm157-invoice-table th,
.hm157-invoice-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--hm157-border);
  text-align: right;
}
.hm157-invoice-table th:first-child,
.hm157-invoice-table td:first-child { text-align: left; }
.hm157-invoice-totals {
  width: min(390px,100%);
  margin: 24px 0 24px auto;
}
.hm157-invoice-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
}
.hm157-invoice-totals .total {
  margin-top: 8px;
  padding: 14px;
  border-radius: 10px;
  background: var(--hm157-green-dark);
  color: #fff;
  font-size: 18px;
}
.hm157-proforma > footer {
  padding-top: 20px;
  border-top: 1px solid var(--hm157-border);
  color: var(--hm157-muted);
  font-size: 13px;
}

/* Straturile si controalele nu devin sticky pe mobil */
@media (max-width: 980px) {
  .hm157-page-nav { display: none; }
  .hm157-header { grid-template-columns: auto 1fr auto; }
  .hm157-feature-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hm157-footer-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .hm157-footer-note { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  /* Bara desktop este inlocuita de meniul mobil creat de v157.js */
  .hm157-menu-toggle { display: inline-flex; flex-direction: column; }
  header nav:not(.hm157-mobile-links),
  .site-header nav,
  .guide-header nav,
  .main-nav,
  .header-nav {
    display: none !important;
    max-width: 0;
  }
  .hm157-two-columns,
  .hm157-admin-grid,
  .hm157-project-body,
  .hm157-proforma-parties {
    grid-template-columns: 1fr;
  }
  .hm157-hero-card {
    grid-template-columns: 1fr;
  }
  .hm157-price-box { width: 100%; }
  .hm157-form-grid { grid-template-columns: 1fr; }
  .hm157-stats { grid-template-columns: 1fr; }
  .hm157-header-actions { display: none; }
  .hm157-header { grid-template-columns: 1fr auto; }
  /* elimina pozitionarea fixa sau sticky a vechilor controale pe mobil */
  .header-actions,
  .site-header-actions,
  .guide-header-actions,
  [class*="header-actions"] {
    display: none !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
  .map-top-actions,
  .quick-actions,
  [class*="top-actions"] {
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
}
@media (max-width: 640px) {
  .hm157-footer-grid {
    width: min(100% - 32px, 1560px);
    padding-top: 32px;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hm157-footer-note { grid-column: 1; text-align: left; }
  .hm157-footer-grid > div { align-items: stretch; }
  .hm157-footer-grid a { justify-content: flex-start; }
  .hm157-modal-root { padding: 0 !important; place-items: end center !important; }
  .hm157-modal {
    width: 100% !important;
    max-height: 90dvh !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom)) !important;
  }
  .hm157-shell { width: min(100% - 24px,1240px); margin-top: 18px; }
  .hm157-hero-card,
  .hm157-panel,
  .hm157-project,
  .hm157-proforma { padding: 20px; border-radius: 16px; }
  .hm157-feature-grid { grid-template-columns: 1fr; }
  .hm157-project-head { align-items: flex-start; }
  .hm157-location-table a { display: grid; }
  .hm157-print-actions { flex-direction: column; }
}
@media print {
  .hm157-header,
  .hm157-footer,
  .hm157-print-actions,
  .hm157-modal-root,
  .hm157-mobile-menu { display: none !important; }
  body.hm157-page { background: #fff; }
  .hm157-shell { width: 100%; margin: 0; }
  .hm157-proforma { border: 0; box-shadow: none; padding: 0; }
}
