/* =============================================================================
   Multibet Transilvania — brand theme on top of Bootstrap 5
   Plain-orange brand fill (flattened from the original orange→blue gradient),
   rounded-2xl cards with soft shadow, MT logo badge, dark footer.
   ========================================================================== */

:root {
  --mt-orange:        #FF8C3A;
  --mt-orange-dark:   #e07330;
  --mt-blue:          #0091FF;
  /* Brand fill — flattened from the original orange→blue gradient to plain orange.
     Variable names kept (--mt-gradient*) so existing references don't need updating. */
  --mt-gradient:      var(--mt-orange);
  --mt-gradient-soft: rgba(255, 140, 58, 0.08);
  --mt-orange-50:     #fff4eb;
  --mt-blue-50:       #e8f4ff;
  --mt-green-50:      #ecfdf5;
  --mt-ink:           #1f2937;
  --mt-navy:          #111827;   /* footer background; also the card hover outline */

  /* Bootstrap primary → brand orange */
  --bs-primary:           #FF8C3A;
  --bs-primary-rgb:       255, 140, 58;
  --bs-link-color:        #FF8C3A;
  --bs-link-color-rgb:    255, 140, 58;
  --bs-link-hover-color:  #e07330;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #ffffff;
  color: var(--mt-ink);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

/* ----- Gradient utilities ----- */
.mt-gradient-text {
  background: var(--mt-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
/* Blue→purple gradient text — hero headline accent word ("Rapid"). */
.mt-gradient-text-blue {
  background: linear-gradient(90deg, var(--mt-blue) 0%, #7c5cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.mt-gradient-bg      { background: var(--mt-gradient); color: white; }
.mt-gradient-soft-bg { background: var(--mt-gradient-soft); }

/* ----- Bootstrap component overrides (per-component CSS vars) ----- */
/* Bootstrap 5.3 reads --bs-btn-* per component, not the root --bs-primary,
   so we must remap each component's own variables to the brand orange. */

.btn-primary {
  --bs-btn-color:                #ffffff;
  --bs-btn-bg:                   var(--mt-orange);
  --bs-btn-border-color:         var(--mt-orange);
  --bs-btn-hover-color:          #ffffff;
  --bs-btn-hover-bg:             var(--mt-orange-dark);
  --bs-btn-hover-border-color:   var(--mt-orange-dark);
  --bs-btn-focus-shadow-rgb:     255, 140, 58;
  --bs-btn-active-color:         #ffffff;
  --bs-btn-active-bg:            var(--mt-orange-dark);
  --bs-btn-active-border-color:  var(--mt-orange-dark);
  --bs-btn-disabled-color:       #ffffff;
  --bs-btn-disabled-bg:          var(--mt-orange);
  --bs-btn-disabled-border-color: var(--mt-orange);
}
.btn-outline-primary {
  --bs-btn-color:                var(--mt-orange);
  --bs-btn-border-color:         var(--mt-orange);
  --bs-btn-hover-color:          #ffffff;
  --bs-btn-hover-bg:             var(--mt-orange);
  --bs-btn-hover-border-color:   var(--mt-orange);
  --bs-btn-focus-shadow-rgb:     255, 140, 58;
  --bs-btn-active-color:         #ffffff;
  --bs-btn-active-bg:            var(--mt-orange);
  --bs-btn-active-border-color:  var(--mt-orange);
  --bs-btn-disabled-color:       var(--mt-orange);
  --bs-btn-disabled-border-color: var(--mt-orange);
}
.btn-info {
  --bs-btn-color:                #ffffff;
  --bs-btn-bg:                   var(--mt-blue);
  --bs-btn-border-color:         var(--mt-blue);
  --bs-btn-hover-color:          #ffffff;
  --bs-btn-hover-bg:             #007ad9;
  --bs-btn-hover-border-color:   #007ad9;
  --bs-btn-focus-shadow-rgb:     0, 145, 255;
  --bs-btn-active-color:         #ffffff;
  --bs-btn-active-bg:            #007ad9;
  --bs-btn-active-border-color:  #007ad9;
}
.btn-outline-info {
  --bs-btn-color:                var(--mt-blue);
  --bs-btn-border-color:         var(--mt-blue);
  --bs-btn-hover-bg:             var(--mt-blue);
  --bs-btn-hover-border-color:   var(--mt-blue);
}

/* Utility recolours */
.bg-primary    { background-color: var(--mt-orange) !important; }
.text-primary  { color:            var(--mt-orange) !important; }
.border-primary{ border-color:     var(--mt-orange) !important; }
.bg-info       { background-color: var(--mt-blue) !important; }
.text-info     { color:            var(--mt-blue) !important; }
.border-info   { border-color:     var(--mt-blue) !important; }
.badge.bg-primary { background-color: var(--mt-orange) !important; }
.badge.bg-info    { background-color: var(--mt-blue) !important; }
.link-primary  { color: var(--mt-orange) !important; }
.link-primary:hover { color: var(--mt-orange-dark) !important; }

/* Alerts */
.alert-primary {
  --bs-alert-color:        #6b3010;
  --bs-alert-bg:           #fff0e3;
  --bs-alert-border-color: #ffd1b0;
  --bs-alert-link-color:   #6b3010;
}
.alert-info {
  --bs-alert-color:        #003966;
  --bs-alert-bg:           #e3f1ff;
  --bs-alert-border-color: #99d1ff;
  --bs-alert-link-color:   #003966;
}

/* Progress (wizard step indicator) */
.progress {
  --bs-progress-bar-bg:    var(--mt-orange);
}

/* Form check / radio / switch */
.form-check-input:checked {
  background-color: var(--mt-orange);
  border-color:     var(--mt-orange);
}
.form-check-input:focus {
  border-color: var(--mt-orange);
  box-shadow:   0 0 0 0.25rem rgba(255, 140, 58, 0.25);
}
.form-switch .form-check-input:checked {
  background-color: var(--mt-orange);
  border-color:     var(--mt-orange);
}

/* Pagination */
.pagination {
  --bs-pagination-color:               var(--mt-ink);
  --bs-pagination-hover-color:         var(--mt-orange);
  --bs-pagination-focus-color:         var(--mt-orange);
  --bs-pagination-focus-bg:            #fff4eb;
  --bs-pagination-focus-box-shadow:    0 0 0 0.25rem rgba(255, 140, 58, 0.25);
  --bs-pagination-active-bg:           var(--mt-orange);
  --bs-pagination-active-border-color: var(--mt-orange);
}

/* Active states elsewhere */
.list-group-item.active {
  background-color: var(--mt-orange);
  border-color:     var(--mt-orange);
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--mt-orange);
}
.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--mt-orange);
}

/* Plain links — brand orange, darker on hover */
a { color: var(--mt-orange); }
a:hover { color: var(--mt-orange-dark); }
/* Don't paint nav-link text orange — it's already styled per .mt-navbar */
.mt-navbar a, .mt-footer a, .nav-link, .navbar-brand,
.btn, .dropdown-item, .list-group-item, .page-link { color: inherit; }
.mt-footer a { color: #d1d5db; }
.mt-footer a:hover { color: var(--mt-orange); }

/* ----- Buttons ----- */
.btn-mt-gradient {
  background: var(--mt-orange);
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(255, 140, 58, 0.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-mt-gradient:hover,
.btn-mt-gradient:focus {
  background: var(--mt-orange-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 140, 58, 0.32);
}
.btn-mt-gradient:disabled,
.btn-mt-gradient.disabled {
  background: var(--mt-orange) !important;
  color: white !important;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}
.btn-mt-gradient:disabled:hover,
.btn-mt-gradient.disabled:hover {
  background: var(--mt-orange) !important;
  transform: none;
  box-shadow: none;
}
.btn-outline-mt {
  border: 2px solid var(--mt-orange);
  color: var(--mt-orange);
  background: white;
  font-weight: 600;
}
.btn-outline-mt:hover {
  background: var(--mt-orange);
  color: white;
}
.btn { transition: all .2s; }

/* ----- Cards & shadows ----- */
.rounded-2xl { border-radius: 1rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.shadow-soft    { box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important; }
.shadow-soft-lg { box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important; }
.card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); }

/* ----- Icon-in-coloured-circle ----- */
.icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.icon-circle-orange { background: var(--mt-orange); }
.icon-circle-blue   { background: var(--mt-blue); }
.icon-circle-green  { background: #22c55e; }
.icon-circle-sm     { width: 2.25rem; height: 2.25rem; font-size: 1rem; border-radius: 0.625rem; }

/* ----- 5-step process numbered circles ----- */
.step-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--mt-gradient);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(255, 140, 58, 0.25);
}

/* ----- Tinted feature card backgrounds ----- */
.feature-card-orange { background: var(--mt-orange-50); border: none; }
.feature-card-blue   { background: var(--mt-blue-50);   border: none; }
.feature-card-green  { background: var(--mt-green-50);  border: none; }

/* ----- Company logo in nav/footer (same file as betoanemures.ro) ----- */
.mt-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  margin-right: 0.6rem;
  vertical-align: middle;
}
/* On the dark footer the logo sits on a white tile, as on the website. */
.mt-logo--on-dark {
  background: #fff;
  border-radius: 0.375rem;
  padding: 2px;
}

/* ----- Sticky white navbar ----- */
.mt-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.mt-navbar .navbar-brand { display: flex; align-items: center; padding-top: .6rem; padding-bottom: .6rem; }
.mt-navbar .nav-link     { color: var(--mt-ink); font-weight: 500; }
.mt-navbar .nav-link:hover,
.mt-navbar .nav-link.active { color: var(--mt-orange); }
.mt-navbar .contact-strip   { color: #4b5563; font-size: 0.875rem; }
.mt-navbar .contact-strip i { color: var(--mt-orange); margin-right: 0.25rem; }

/* ----- Dark footer ----- */
.mt-footer {
  background: var(--mt-navy);
  color: #d1d5db;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  border-top: none;
}
.mt-footer h5 {
  color: white;
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mt-footer a {
  color: #d1d5db;
  text-decoration: none;
  transition: color .15s ease;
}
.mt-footer a:hover { color: var(--mt-orange); }
.mt-footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 2rem;
  padding-top: 1.25rem;
}
.mt-footer .navbar-brand { padding: 0; }

/* ----- Hero visual ----- */
.mt-hero-visual {
  position: relative;
  border-radius: 1.5rem;
  overflow: visible;   /* lets .mt-floating-card overhang the corner */
}
.mt-hero-visual .hero-image {
  width: 100%;
  max-width: 100%;
  height: auto;        /* preserve aspect ratio inside the column */
  display: block;
  border-radius: 1.5rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
}
.mt-hero-visual .mt-floating-card {
  position: absolute;
  left: -1rem;
  bottom: -1.5rem;
  background: white;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  font-size: 0.9rem;
}
.mt-hero-visual .mt-floating-card .mt-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--mt-orange);
  line-height: 1;
}
.mt-hero-visual .mt-floating-card .mt-stat-num--blue { color: var(--mt-blue); }
@media (max-width: 991px) {
  .mt-hero-visual { margin-top: 2.5rem; }
  .mt-hero-visual .mt-floating-card { left: 1rem; }
}

/* ----- Misc ----- */
section.mt-section { padding: 3rem 0; }
.text-mt-orange    { color: var(--mt-orange) !important; }
.text-mt-blue      { color: var(--mt-blue) !important; }

.form-label { font-weight: 500; margin-bottom: .5rem; }
.form-control:focus,
.form-select:focus {
  border-color: var(--mt-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 140, 58, 0.2);
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
}
.table-hover tbody tr:hover { background-color: #f5f5f5; }

.badge { font-weight: 500; padding: 0.4em 0.7em; }

/* HTMX loading indicator */
.htmx-indicator         { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-block; }

@media (max-width: 768px) {
  .table  { font-size: 0.875rem; }
  .btn-sm { font-size: 0.75rem; }
}

@media print {
  .navbar, footer, .btn, .modal { display: none !important; }
  .card { box-shadow: none; border: 1px solid #dee2e6; }
}

/* =============================================================================
   Wizard top progress — 5 numbered circles with horizontal connectors.
   States: .done (green check), .current (orange filled), .upcoming (gray outline).
   ========================================================================== */
.step-circles-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  max-width: 720px;
  margin: 0 auto 0.75rem;
}
.step-pip-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 5.5rem;
}
.step-label {
  margin-top: 0.5rem;
  text-align: center;
  max-width: 6.5rem;
}
.step-label-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mt-ink);
  line-height: 1.1;
}
.step-label-title.current {
  color: var(--mt-orange);
}
.step-label-desc {
  font-size: 0.7rem;
  color: #4b5563;
  margin-top: 0.15rem;
  line-height: 1.2;
}
.step-circles-row .step-pip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: background .15s, color .15s, transform .15s;
}
.step-circles-row .step-pip.done {
  /* No disk: just a standalone green check-mark icon. */
  background: transparent;
  border-color: transparent;
  color: #22c55e;
  box-shadow: none;
}
.step-circles-row .step-pip.done .bi-check-lg {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.step-circles-row .step-pip.current {
  /* No circle: a truck icon (with the step number inside) replaces the bg.
     Layout slot stays 2.5rem so connectors align with neighbouring pips;
     the slightly oversized truck is allowed to overflow visually. */
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: inherit;
  overflow: visible;
  position: relative;
  transform: none;
}
.step-circles-row .step-pip.current .step-truck-icon {
  font-size: 2.5rem;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  background: var(--mt-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 4px 10px rgba(255, 140, 58, 0.35));
}
.step-circles-row .step-pip.current .step-truck-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-30%, -85%);     /* tuck the number over the trailer body of bi-truck */
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}
.step-circles-row .step-pip.upcoming {
  background: #ffffff;
  color: #9ca3af;
  border-color: #9ca3af;
}
.step-circles-row .step-connector {
  flex: 1;
  height: 2px;
  background: #9ca3af;
  margin: 1.2rem 0.4rem 0;
  align-self: flex-start;
}
.step-circles-row .step-connector.done {
  background: #22c55e;
}

/* =============================================================================
   Choice-card grid — clickable cards backed by radio inputs.
   Used for project type, concrete type, pump service selections.
   ========================================================================== */
.choice-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.choice-card { position: relative; cursor: pointer; }
.choice-card input[type="radio"],
.choice-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card .choice-card-body {
  border: 2px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1rem;
  background: white;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  height: 100%;
}
.choice-card .choice-card-body:hover {
  border-color: var(--mt-orange);
  box-shadow: 0 6px 18px rgba(255, 140, 58, 0.1);
  transform: translateY(-1px);
}
.choice-card input[type="radio"]:checked + .choice-card-body,
.choice-card input[type="checkbox"]:checked + .choice-card-body {
  border-color: var(--mt-orange);
  background: rgba(255, 140, 58, 0.06);
  box-shadow: 0 10px 28px rgba(255, 140, 58, 0.18);
}
.choice-card input[type="radio"]:checked + .choice-card-body::after,
.choice-card input[type="checkbox"]:checked + .choice-card-body::after {
  content: "\F26B"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  color: var(--mt-orange);
  font-size: 1.1rem;
}
.choice-card .choice-card-title  { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; color: var(--mt-ink); }
.choice-card .choice-card-meta   { font-size: 0.8rem; color: #6b7280; }
.choice-card input[type="radio"]:focus-visible + .choice-card-body,
.choice-card input[type="checkbox"]:focus-visible + .choice-card-body {
  outline: 2px solid var(--mt-orange);
  outline-offset: 2px;
}

/* =============================================================================
   Hero gradient section wrap (for landing page hero + mission sections)
   ========================================================================== */
.section-hero-gradient {
  /* Translucent white card so the mission section harmonizes with the new
     page-level hero photo background. Hero block overrides this further. */
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
}
@media (min-width: 992px) {
  .section-hero-gradient { padding: 3.5rem 3rem; }
}

/* Landing hero — the photo now lives on `body.bg-concrete`, so the card just
   carries a translucent frosted backdrop that lifts the title + CTAs off the
   page-level photo. Keeps section-hero-gradient padding + radius unchanged. */
.landing-hero {
  background: rgba(255, 255, 255, 0.88);
  min-height: 0;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
@media (max-width: 991px) {
  .landing-hero {
    /* Photo compression looks noisier under a thinner overlay on small
       screens — bump backdrop opacity for readability. */
    background: rgba(255, 255, 255, 0.92);
  }
}

/* =============================================================================
   Summary breakdown rows (step 5)
   ========================================================================== */
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  font-size: 1rem;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}
.summary-line:last-child { border-bottom: none; }
.summary-line .label { color: #6b7280; }
.summary-line .value { font-weight: 600; color: var(--mt-ink); }
.summary-line.summary-sub {
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-size: 0.9rem;
  border-bottom: none;
}
.summary-line.summary-sub .label,
.summary-line.summary-sub .value { color: #9ca3af; font-weight: 500; }
.summary-line.total {
  border-top: 2px solid var(--mt-orange);
  border-bottom: none;
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  font-size: 1.2rem;
}
.summary-line.total .value {
  font-size: 1.45rem;
  background: var(--mt-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* =============================================================================
   Confirmation success card (post-submit page)
   ========================================================================== */
.confirmation-success {
  border: none;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #e8f4ff 100%);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}
.confirmation-success .check-circle {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: #22c55e;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.35);
  margin: 0 auto 1rem;
}

/* =============================================================================
   Order-status colour badges (for admin orders list — pre-staged)
   ========================================================================== */
.badge.bg-status-pending      { background-color: #FF8C3A !important; color: white; }
.badge.bg-status-confirmed    { background-color: #0091FF !important; color: white; }
.badge.bg-status-in_production{ background-color: #8b5cf6 !important; color: white; }
.badge.bg-status-in_delivery  { background-color: #14b8a6 !important; color: white; }
.badge.bg-status-delivered    { background-color: #22c55e !important; color: white; }
.badge.bg-status-cancelled    { background-color: #6b7280 !important; color: white; }

/* =============================================================================
   Form helpers: card-wrapped form sections; address-resolved confirmation card
   ========================================================================== */
.form-section {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1rem;
  padding: 1.5rem;
  background: white;
}
.address-resolved {
  border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #e8f4ff 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.address-resolved .addr-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.address-resolved .addr-distance {
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--mt-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----- Step 4 Flatpickr inline calendar — brand-coloured selected day ----- */
.calendar-host .flatpickr-calendar.inline {
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  width: 100%;
  max-width: 360px;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: var(--mt-orange) !important;
  border-color: var(--mt-orange) !important;
  color: #fff !important;
}
.flatpickr-day.today:not(.selected) {
  border-color: var(--mt-orange);
  color: var(--mt-orange);
}

/* ----- Step 2 cost preview (legacy-parity: white card, green border, 2 rows) ----- */
.cost-detail-card {
  background: white;
  border: 2px solid #bbf7d0;   /* tailwind green-200 */
  border-radius: 0.625rem;
  padding: 0.85rem 1.1rem;
  max-width: 480px;
}
.cost-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
}
.cost-detail-row + .cost-detail-row.total {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 0.25rem;
  padding-top: 0.6rem;
}
.cost-detail-label { color: #6b7280; }
.cost-detail-value { font-weight: 600; color: var(--mt-ink); }
.cost-detail-row.total .cost-detail-label,
.cost-detail-row.total .cost-detail-value {
  color: #16a34a;              /* tailwind green-600 */
  font-weight: 700;
  font-size: 1.05rem;
}

/* Compact, centered number input next to the "Metri Cubi" label. */
.cost-qty-input {
  width: 8.5rem;
  flex: 0 0 auto;
}
.cost-qty-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 0.2rem rgba(22, 163, 74, 0.18);
}

/* ----- Step 1 delivery map (Google Maps with depot + destination pins) ----- */
.delivery-map {
  width: 100%;
  height: 360px;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  background: #f3f4f6;
}
@media (min-width: 992px) {
  .delivery-map { height: 420px; }
}

/* ----- Step 1 distance panels (Informații Distanță + Adresa Confirmată) ----- */
.distance-info-card {
  border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid rgba(34, 197, 94, 0.18);
  padding: 1.25rem 1.5rem;
  color: #14532d;
}
.distance-info-card .distance-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #14532d;
}
.distance-info-card .distance-stat-lbl {
  font-size: 0.8rem;
  color: #166534;
}
.distance-info-card .bi { color: #22c55e; }
.zone-banner {
  border-radius: 0.625rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.zone-banner-ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #14532d;
}
.zone-banner-warn {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.3);
  color: #7f1d1d;
}
.zone-banner-warn .bi,
.zone-banner-warn strong { color: #b91c1c; }

.address-confirmed-card {
  border-radius: 1rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #e8f4ff 100%);
  border: 1px solid rgba(0, 145, 255, 0.18);
  padding: 1.25rem 1.5rem;
}
.address-confirmed-card .addr-km-big {
  font-size: 2rem;
  font-weight: 800;
  background: var(--mt-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

/* =============================================================================
   Admin layout — fixed collapsible sidebar
   ========================================================================== */
:root {
  --sidebar-w-expanded: 220px;
  --sidebar-w-collapsed: 64px;
  --sidebar-w: var(--sidebar-w-expanded);
  --admin-navbar-h: 72px;
}

body.admin-layout-mode.sidebar-collapsed {
  --sidebar-w: var(--sidebar-w-collapsed);
}

/* Pin the top nav so the fixed sidebar starts at a consistent offset. */
body.admin-layout-mode .mt-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  /* Pin the navbar to the same variable the fixed sidebar uses for its `top`,
     so the sidebar starts flush with the navbar bottom (no overlap/gap). */
  height: var(--admin-navbar-h);
}

/* On admin pages, the main container should not center-constrain content — the
   sidebar plus push-margin do that. */
body.admin-layout-mode main.container {
  max-width: none;
  margin: 0;
  padding-left: calc(var(--sidebar-w) + 1.5rem);
  padding-right: 1.5rem;
  padding-top: 1.5rem;
  transition: padding-left .2s ease;
}

/* Mirror the same left padding on the footer's inner container so the marketing
   columns aren't visually overlapped by the fixed sidebar. Slides in sync with
   the sidebar collapse/expand toggle via the shared `--sidebar-w` variable. */
body.admin-layout-mode .mt-footer > .container {
  padding-left: calc(var(--sidebar-w) + 1.5rem);
  transition: padding-left .2s ease;
}

.admin-sidebar {
  position: fixed;
  top: var(--admin-navbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1020;
  transition: width .2s ease;
}

.admin-sidebar-nav {
  flex: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  color: var(--mt-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.admin-nav-item:hover { background: #f3f4f6; color: var(--mt-ink); }
.admin-nav-item.active {
  background: var(--mt-orange);
  color: #fff;
}
.admin-nav-item i {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}
.admin-sidebar-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-sidebar-toggle {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.5rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s ease;
}
.admin-sidebar-toggle:hover { background: #f3f4f6; }
.admin-sidebar-toggle i {
  transition: transform .2s ease;
  display: inline-block;
}

/* Collapsed state — hide labels, narrow the rail, flip the chevron. */
body.sidebar-collapsed .admin-nav-label { display: none; }
body.sidebar-collapsed .admin-nav-item { justify-content: center; padding: 0.65rem 0; }
body.sidebar-collapsed .admin-sidebar-user { display: none; }
body.sidebar-collapsed .admin-sidebar-footer { justify-content: center; }
body.sidebar-collapsed .admin-sidebar-toggle i { transform: rotate(180deg); }

/* Count badge on a menu item (e.g. new quote requests). Orange pill with dark
   text (white on brand orange fails contrast); inverted on the active item.
   Collapsed rail: the pill hides with the label and a dot on the icon stays. */
.admin-nav-badge {
  margin-left: auto;
  min-width: 1.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--mt-orange);
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}
.admin-nav-item.active .admin-nav-badge { background: #fff; color: #1f2937; }
.admin-nav-icon { position: relative; }
.admin-nav-dot {
  display: none;
  position: absolute;
  top: -0.1rem;
  right: 0.05rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mt-orange);
  box-shadow: 0 0 0 2px #fff;
}
body.sidebar-collapsed .admin-nav-badge { display: none; }
body.sidebar-collapsed .admin-nav-dot { display: block; }

/* Mobile — force the collapsed look on small viewports. */
/* <lg (under 992px): hide the fixed desktop sidebar entirely; the hamburger
   button (.admin-mobile-toggle) in admin_body opens an offcanvas drawer with
   the same nav links. Main content uses the full viewport width. */
@media (max-width: 991.98px) {
  body.admin-layout-mode .admin-sidebar { display: none; }
  body.admin-layout-mode main.container { padding-left: 1rem; padding-right: 1rem; }
  /* Sidebar gone → footer spans the full viewport with the standard gutter. */
  body.admin-layout-mode .mt-footer > .container { padding-left: 1rem; }
}

/* ----- Landing page: hero photo as full-page background, dimmed by a slate
   overlay so cards + text on top stay legible. The photo lived inside the
   .landing-hero card previously; now it spans the whole viewport. ---------- */
body.bg-concrete {
  background:
    linear-gradient(rgba(112, 128, 144, 0.55), rgba(112, 128, 144, 0.55)),
    url('/static/images/hero.jpg') center / cover no-repeat;
  background-color: #708090; /* solid fallback if the image fails to load */
  background-attachment: scroll; /* avoid iOS Safari URL-bar jank with `fixed` */
  min-height: 100vh;
}
body.bg-platinum {
  background: #E5E4E2;   /* platinum — order/wizard pages */
}

/* ============================================================================ */
/* MOBILE POLISH                                                                */
/* ============================================================================ */

/* Tap-target floor for primary CTAs. Opt-in via .tap-44; doesn't disturb dense
   admin bulk-action buttons that intentionally stay smaller. */
.tap-44 { min-height: 44px; min-width: 44px; }

/* Sticky-bottom CTA wrapper for the wizard's primary "Continuă" button. On
   desktop, sticky == in-flow until scrolled. On phones, the button stays
   anchored to the viewport bottom during long-scrolling steps (calendar step
   4 in particular). Uses `sticky` (not `fixed`) to dodge iOS Safari URL-bar
   collapse glitches. */
.wizard-sticky-cta {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: var(--bs-body-bg);
  margin-top: 1rem;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  /* Tablet+: drop the wrapper background + shadow — it's only useful on phones. */
  .wizard-sticky-cta {
    position: static;
    padding: 0;
    margin-top: 1rem;
    background: transparent;
    box-shadow: none;
  }
}

/* Card-stack layout for admin lists on phones. Apply .table-mobile-cards on
   the <table>. Each <td> needs a data-label attr; the action cell uses
   data-label-skip to render as a right-aligned button row. */
@media (max-width: 767.98px) {
  .table-mobile-cards thead { display: none; }
  .table-mobile-cards,
  .table-mobile-cards tbody,
  .table-mobile-cards tr,
  .table-mobile-cards td {
    display: block;
    width: 100%;
  }
  .table-mobile-cards tr {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--bs-body-bg);
  }
  .table-mobile-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border: none;
    text-align: right;
  }
  .table-mobile-cards td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--bs-secondary);
    flex-shrink: 0;
    text-align: left;
  }
  /* Action column: full-width button row, no label. */
  .table-mobile-cards td[data-label-skip] {
    justify-content: flex-end;
    padding-top: 0.5rem;
  }
  .table-mobile-cards td[data-label-skip]::before {
    display: none;
  }
}

/* Step 1 map: was a fixed 360/420px box. Now scales with viewport width,
   capped so it never gets gargantuan on tablets. */
.delivery-map {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 420px;
  height: auto;
}

/* Step 4 inline Flatpickr can overflow its column on narrow viewports.
   Cap + shrink the day-cell font below the smallest target viewport. */
.calendar-host .flatpickr-calendar.inline {
  max-width: 100%;
}
@media (max-width: 419px) {
  .calendar-host .flatpickr-day { font-size: 0.85rem; }
}

/* ----- Mobile wizard step strip (scroll-snap card stack) ---------------------
   Replaces the desktop 5-circle row on <sm. Each card = pip + title + short
   desc; cards are 85% viewport-wide so the next/prev card peeks at the edge,
   hinting scrollability. The active card is centered on load by inline JS in
   wizard_layout.html. */
.wizard-step-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0.5rem;
  /* Negative margins let the strip span the full viewport width even when
     nested inside the bootstrap col with its gutter padding. */
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.wizard-step-strip::-webkit-scrollbar { display: none; }

.wizard-step-card {
  flex: 0 0 85%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Pip inside each card — mirror the desktop .step-pip color palette. */
.wizard-step-card-pip {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  background: #e5e7eb;
  color: #6b7280;
  border: 2px solid transparent;
}
.wizard-step-card.done .wizard-step-card-pip {
  background: #10b981;
  color: #fff;
}
.wizard-step-card.active .wizard-step-card-pip {
  background: #f97316;            /* matches the brand orange used elsewhere */
  color: #fff;
  border-color: #fdba74;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.wizard-step-card-text {
  min-width: 0;                   /* allow text to truncate inside flex */
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.wizard-step-card-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wizard-step-card-desc {
  font-size: 0.82rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visual emphasis on the active card. */
.wizard-step-card.active {
  border-color: #fdba74;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.18);
}
.wizard-step-card.upcoming { opacity: 0.75; }

/* Defensive: never let the wizard pages horizontally scroll on phones.
   Any descendant that exceeds viewport (a misbehaving 3rd-party widget, etc.)
   is clipped rather than pushing the whole page sideways. Scoped to <sm so
   the desktop layout — which legitimately uses ≥720px features — is intact. */
@media (max-width: 575.98px) {
  body { overflow-x: hidden; }
}

/* ============================================================================
   Landing-only 65/35 split layout
   Navbar + main + footer (the body's direct children) all live in column 1;
   column 2 stays empty as a placeholder. A right-edge gradient gives the empty
   40% a soft tint so it reads intentional. Collapses to single column at <md.
   ============================================================================ */
/* Landing page uses the default white navbar (matches the reference header:
   white bar, dark contact strip, orange icons). Everything below the hero
   flows normally and inherits the default body background. */
body.landing .mt-navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

/* Hero: full-width warm-gradient band with container-constrained content.
   Left column = headline + subhead + order card, right column = rounded photo
   with a floating stat card. Collapses to a single column at <lg. */
.landing-hero {
  /* Full-bleed background band inside <main class="container">: the 100vw +
     symmetric negative margins is the classic "full-bleed inside a constrained
     container" trick. The inner wrapper re-constrains the content. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1.5rem;
  background: linear-gradient(135deg, var(--mt-orange-50) 0%, #f6f8fb 55%, #eef2f6 100%);
}
.landing-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
}
.landing-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--mt-ink);
}
.landing-hero__title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
/* White "order" card in the left column. */
.landing-hero__card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 1.25rem;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.10);
  padding: 1.75rem;
  text-align: center;
  max-width: 460px;
}
.landing-hero__card-features { line-height: 1.6; }

@media (max-width: 991px) {
  .landing-hero__inner {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem;
    gap: 2rem;
  }
  /* Photo drops below the content on small screens; extra top gap so the
     floating stat card doesn't collide with the order card above it. */
  .landing-hero__media { order: 2; }
  .landing-hero__card { max-width: none; }
}

/* Marketing sections under the hero: rely on .container in base.html for
   max-width; just give the section a class for vertical rhythm + future hooks. */
.landing-section {
  /* py-5 on the element handles vertical padding; nothing else needed for now */
}

/* Language switcher: light card-style border instead of Bootstrap's dark
   secondary grey (#6c757d). Matches the .landing-feature-card border below. */
.mt-lang-toggle.btn-outline-secondary {
  --bs-btn-border-color: rgba(15, 23, 42, 0.08);
  --bs-btn-hover-border-color: rgba(15, 23, 42, 0.08);
  --bs-btn-active-border-color: rgba(15, 23, 42, 0.08);
}

/* Feature + step cards: soft white panel with subtle border + hover lift. */
.landing-feature-card,
.landing-step-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
/* Hover: lift + a bolder navy outline (footer colour), combined with the soft
   drop shadow. The 1px ring gives the bolder border without any layout shift. */
.landing-feature-card:hover,
.landing-step-card:hover {
  transform: translateY(-2px);
  border-color: var(--mt-navy);
  box-shadow: 0 0 0 1px var(--mt-navy), 0 8px 24px rgba(15, 23, 42, 0.06);
}
.landing-feature-card__icon {
  font-size: 2.25rem;
  color: var(--mt-orange);
}
.landing-step-card__num {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mt-orange), #f97316);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767.98px) {
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .landing-hero__content {
    padding: 2rem 1.25rem;
  }
  .landing-hero__image {
    display: none;
  }
}

/* Mobile day-card layout shared by /admin/calendar and /admin/availability.
   On <md, the desktop matrix is hidden (d-none d-md-block) and the page
   renders a vertical stack of these cards — one card per day with the day's
   scheduled deliveries (calendar) or per-slot capacity (availability). */
.admin-mobile-day-card {
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.admin-mobile-day-card__title {
  color: var(--mt-ink);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 0.4rem;
}
.admin-mobile-day-card__row {
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.05);
}
.admin-mobile-day-card__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0 !important;
}
