/* MinVal360 theme system */
.minval360-theme-light {
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card-soft: #f9fafc;
  --bg-surface-alt: #f3f4f6;
  --bg-input: #f3f4f6;
  --border: #e3e6ef;
  --border-strong: #d5dae5;
  --text: #111827;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-strong: 0 24px 56px rgba(17, 24, 39, 0.12);
  --success: #16a34a;
  --error: #dc2626;
  --error-bg: rgba(220, 38, 38, 0.08);
  --badge-bg: #e8ecf5;
  --badge-border: #d5daea;
  --inverse: #ffffff;
  --primary-border-soft: rgba(37, 99, 235, 0.13);
  --overlay-strong: rgba(15, 23, 42, 0.9);
  --overlay-soft: rgba(0, 0, 0, 0.7);
  --spinner-border: rgba(17, 24, 39, 0.25);
}

.minval360-theme-dark {
  --bg-page: #020617;
  --bg-card: #0b1120;
  --bg-card-soft: #111827;
  --bg-surface-alt: #0f162a;
  --bg-input: #0f162a;
  --border: #1f2937;
  --border-strong: #2c3b52;
  --text: #e5e7eb;
  --text-muted: #9aa5bf;
  --primary: #3b82f6;
  --primary-strong: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.12);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 24px 56px rgba(0, 0, 0, 0.45);
  --success: #22c55e;
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --badge-bg: #0f1c36;
  --badge-border: #1d2d4f;
  --inverse: #0b1120;
  --primary-border-soft: rgba(59, 130, 246, 0.18);
  --overlay-strong: rgba(15, 23, 42, 0.9);
  --overlay-soft: rgba(0, 0, 0, 0.7);
  --spinner-border: rgba(255, 255, 255, 0.4);
}

.minval360-pro-wrapper {
  background: var(--bg-page);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mv-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
  padding-top: 56px;
  padding-bottom: 72px;
}
.mv-shell.mv-cartier-active {
  max-width: 720px;
}
@media (max-width: 640px) {
  .mv-shell { padding-left: 18px; padding-right: 18px; }
}
.mv-page-header h1 { letter-spacing: 0.02em; }
.mv-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.mv-theme-toggle {
  background: var(--primary-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
}

.mv-tab-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.mv-tab-bar {
  gap: 10px;
  padding: 0;
  background: transparent;
  border: none;
}
.mv-btn-type {
  border-radius: 999px !important;
  padding: 10px 18px !important;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: var(--bg-input);
  transition: all 0.15s ease;
}
.mv-btn-type.bg-indigo-600 {
  background: linear-gradient(120deg, var(--primary), var(--primary-strong)) !important;
  color: var(--inverse) !important;
  border-color: transparent;
  box-shadow: 0 12px 35px var(--primary-soft);
}
.mv-btn-type.bg-gray-700:hover {
  background: var(--bg-surface-alt) !important;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.mv-layout-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; grid-auto-flow: row; }
.mv-layout-grid > .mv-left-col { grid-column: 1; }
.mv-layout-grid > .mv-right-col { grid-column: 2; }
.mv-shell.mv-cartier-active .mv-layout-grid { display: block; max-width: 700px; margin: 0 auto; }
.mv-shell.mv-cartier-active .mv-right-col,
.mv-shell.mv-cartier-active .mv-left-col { gap: 32px; }
.mv-shell.mv-cartier-active .mv-right-col { max-width: 700px; margin: 0 auto; }
@media (max-width: 1023px) {
  .mv-layout-grid { grid-template-columns: 1fr; }
  .mv-layout-grid > .mv-left-col,
  .mv-layout-grid > .mv-right-col { grid-column: auto; }
}
.mv-left-col,
.mv-right-col { display: flex; flex-direction: column; gap: 18px; }

.mv-search-card,
.mv-form-card,
.mv-cartier-wrapper,
.mv-guest-card {
  background: linear-gradient(140deg, var(--bg-card), var(--bg-card-soft));
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}
.mv-search-card { padding: 22px; }
.mv-cartier-wrapper { padding: 20px; }
.mv-shell.mv-cartier-active #mv-form-cartier {
  padding: 26px;
}
.mv-shell.mv-cartier-active #mv-form-cartier .mv-field-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}
.mv-shell.mv-cartier-active #mv-form-cartier input,
.mv-shell.mv-cartier-active #mv-form-cartier select { width: 100%; }
.mv-shell.mv-cartier-active .mv-cartier-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}
.mv-guest-card .mv-link { color: var(--primary); text-decoration: underline; }
.mv-link { color: var(--primary); text-decoration: underline; }

.mv-search-card label,
.mv-form-card label,
.mv-cartier-wrapper label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mv-search-card input,
.mv-form-card select,
.mv-form-card input,
.mv-cartier-wrapper select,
.mv-cartier-wrapper input {
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.mv-search-card input:focus,
.mv-form-card select:focus,
.mv-form-card input:focus,
.mv-cartier-wrapper select:focus,
.mv-cartier-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
  background: var(--bg-surface-alt);
}
.mv-muted { color: var(--text-muted); }
.mv-suggestion-item { padding: 10px; border-bottom: 1px solid var(--border); }
.mv-suggestion-item:hover { background: var(--bg-surface-alt); }

#mv-street-results,
#mv_cartier_dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.mv-cartier-item {
  padding: 10px 12px;
  color: var(--text);
}
.mv-cartier-item:hover { background: var(--primary-soft); color: var(--text); }
.mv-cartier-item.active { background: var(--bg-input); color: var(--primary); font-weight: 700; }

#mv-zone-info {
  display: none;
  padding: 0;
  border: none;
}
#mv-zone-info.is-visible {
  display: block;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 12px;
  box-shadow: var(--shadow-soft);
}
#mv-zone-info strong { color: var(--text); }

#mv-zone-map img,
.mv-zone-map,
.mv-map-image {
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  max-height: 360px;
  object-fit: cover;
  overflow: hidden;
  transition: box-shadow 0.15s ease, outline-color 0.15s ease, transform 0.15s ease;
}
#mv-zone-map:hover img,
.mv-map-image:hover {
  outline: 2px solid var(--primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}
#mv-zone-map::after {
  content: "Click pentru zoom";
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}
#mv-zone-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
#mv-zone-choices > div {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
#mv-zone-choices img {
  width: 100%;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}
#mv-zone-choices > div:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.mv-zone-options-grid .mv-zone-card {
  background: var(--bg-input);
  border-color: var(--border-strong);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.mv-zone-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  gap: 18px;
  margin-top: 12px;
  justify-content: center;
}
.mv-zone-explanation { margin-top: 8px; margin-bottom: 8px; color: var(--text-muted); }
#mv-zone-choices { display: block; }
#mv-zone-choices .mv-zone-options-grid { margin-top: 0; }
.mv-zone-card {
  justify-self: center;
  box-shadow: var(--shadow-soft);
}
.mv-zone-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
#mv-zone-map { display: flex; align-items: center; justify-content: center; }
#mv-zone-map img { border-radius: 12px; cursor: zoom-in; max-height: 320px; object-fit: contain; }
#mv-zone-map { display: flex; align-items: center; justify-content: center; }
#mv-zone-map img { border-radius: 12px; cursor: zoom-in; max-height: 320px; object-fit: contain; }
.mv-zone-map { height: 300px; width: 100%; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
#mv-zone-map img { cursor: zoom-in; }
.mv-choose-zone {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  color: var(--inverse, #fff);
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  box-shadow: 0 8px 22px var(--primary-soft);
  cursor: pointer;
}
.mv-choose-zone:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }

.mv-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.mv-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.mv-field-grid > div,
.mv-case-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mv-field-grid label,
.mv-case-grid label { min-height: 32px; }
.mv-case-grid select,
.mv-case-grid input { margin-top: 0; }
.mv-case-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mv-case-grid label { min-height: 32px; }

.mv-parcari-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.mv-parcari-actions > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}
.mv-parcari-actions > button::before { content: "+"; font-weight: 700; }
.mv-parcare-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 12px;
  align-items: stretch;
  grid-auto-flow: row;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 12px;
}
.mv-parcare-item select,
.mv-parcare-item .mv-parcare-mp {
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0 10px;
  width: 100%;
}
.mv-parcare-delete {
  background: transparent;
  color: var(--error);
  border: 1px solid var(--error);
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.12s ease, transform 0.12s ease;
  justify-self: end;
}
.mv-parcare-delete:hover { background: var(--error-bg); transform: translateY(-1px); }
.mv-parcare-item select.mv-parcare-type { grid-column: 1 / 2; grid-row: 1; }
.mv-parcare-item select.mv-parcare-count { grid-column: 2 / 3; grid-row: 1; }
.mv-parcare-item .mv-parcare-mp { grid-column: 1 / 2; grid-row: 2; }
.mv-parcare-delete { grid-column: 2 / 3; grid-row: 2; align-self: center; }
.mv-parcare-item .mv-parcare-mp {
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0 10px;
}

/* Corectii suplimentare */
.mv-corrections-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  padding: 16px;
}
.mv-corr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mv-corr-title { font-weight: 700; font-size: 15px; }
.mv-corr-toggle-btn {
  font-size: 13px;
  color: var(--primary);
  background: var(--bg-input);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.mv-corr-panel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  background: var(--bg-card);
}
.mv-corr-group {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.mv-corr-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.mv-corr-row,
.mv-radio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.mv-corr-label { color: var(--text); }
.mv-radio-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-input);
  transition: all 0.2s ease;
  cursor: pointer;
}
.mv-radio-row input { display: none; }
.mv-radio-row span { flex: 1; color: var(--text); }
.mv-radio-row.is-checked {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  color: var(--text);
}
.mv-radio-row.is-checked span { font-weight: 600; }
.mv-switch {
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.mv-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease;
}
.mv-switch.is-on { background: #2563eb; }
.mv-switch.is-on .mv-switch-knob { transform: translateX(18px); }
.mv-radio-switch { width: 38px; height: 20px; border-radius: 999px; background: #d1d5db; position: relative; flex: 0 0 auto; }
.mv-radio-switch .mv-switch-knob { position: absolute; top: 2px; left: 2px; }
.mv-radio-row.is-checked .mv-radio-switch { background: #2563eb; }
.mv-radio-row.is-checked .mv-radio-switch .mv-switch-knob { transform: translateX(18px); }

#mv-calc-btn,
#mv-case-calc-btn,
#mv-cartier-calc-btn,
#mv-spatii-calc-btn,
#mv-ind-calc-btn {
  width: 100%;
  height: 56px;
  background: linear-gradient(120deg, var(--primary), var(--primary-strong));
  border: none;
  color: var(--inverse);
  padding: 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}
#mv-calc-btn:hover,
#mv-case-calc-btn:hover,
#mv-cartier-calc-btn:hover,
#mv-spatii-calc-btn:hover,
#mv-ind-calc-btn:hover { transform: translateY(-1px) scale(1.01); box-shadow: var(--shadow-soft); }
#mv-calc-btn:disabled,
#mv-case-calc-btn:disabled,
#mv-cartier-calc-btn:disabled,
#mv-spatii-calc-btn:disabled,
#mv-ind-calc-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  position: relative;
}
#mv-calc-btn:disabled::after,
#mv-case-calc-btn:disabled::after,
#mv-cartier-calc-btn:disabled::after,
#mv-spatii-calc-btn:disabled::after,
#mv-ind-calc-btn:disabled::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--spinner-border);
  border-top-color: var(--inverse);
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
  animation: mv-spin 0.8s linear infinite;
}

#mv-case-mp-btn {
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 14px;
  padding: 12px 16px;
  background: transparent;
  height: 48px;
  transition: background 0.12s ease, transform 0.12s ease;
}
#mv-case-mp-btn:hover { background: var(--primary-soft); transform: translateY(-1px); }

.mv-cartier-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mv-result-block {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-strong);
}
.mv-result-block h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.mv-result-block h4::after {
  content: "ℹ";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 11px;
}
.mv-result-line { margin-top: 10px; color: var(--text-muted); line-height: 1.5; }
.mv-result-line strong {
  color: var(--text);
  background: var(--bg-surface-alt);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 13px;
}
.mv-result-total {
  margin-top: 10px;
}
.mv-result-total strong {
  font-size: 22px;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 10px;
  background: var(--primary-soft);
}
.mv-case-result-card .mv-result-line strong { background: transparent; padding: 0; }

.mv-error {
  background: var(--error-bg);
  border: 1px solid var(--error);
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mv-error::before { content: "⚠"; font-size: 14px; line-height: 1.2; margin-top: 2px; }

.mv-map-modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-strong);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.mv-map-modal-backdrop.active { display: flex !important; }
.mv-map-modal-content {
  border-radius: 18px;
  max-width: calc(100vw - 140px);
  max-height: calc(100vh - 140px);
  overflow: auto;
  background: var(--bg-card);
  padding: 12px;
  box-shadow: var(--shadow-strong);
}
#mv-map-modal-img { border-radius: 18px; display: block; cursor: zoom-in; max-height: calc(100vh - 200px); }
#mv-map-modal-img.zoomed { max-width: none; max-height: none; width: 160%; height: auto; cursor: zoom-out; }

#minval360-app > * + * { margin-top: 32px; }

.mv-cartier-card {
  background: var(--bg-card-soft);
  border: 1px solid var(--primary-border-soft);
  box-shadow: var(--shadow-strong);
  padding: 26px;
}
.mv-cartier-card .mv-result-line { text-align: center; }
.mv-cartier-result {
  max-width: 700px;
  margin: 0 auto;
}
.mv-cartier-card h4 { justify-content: center; width: 100%; text-align: center; }
.mv-cartier-value {
  margin-top: 16px;
  font-size: 2.05rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}
.mv-case-result-card {
  background: var(--bg-card-soft);
  border: 1px solid var(--primary-border-soft);
  box-shadow: var(--shadow-strong);
  padding: 22px;
}
.mv-case-result-card h4 { justify-content: center; width: 100%; text-align: center; }
.mv-case-value {
  margin-top: 12px;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}
.mv-case-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.mv-cartier-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}
.mv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 14px;
  padding: 7px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.mv-case-total-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mv-case-final {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 700;
}
.mv-case-final strong { font-size: 20px; }
.mv-case-final-detail {
  display: inline-block;
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.mv-footer {
  margin-top: 48px;
  padding: 18px 0 8px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mv-footer a {
  color: var(--primary);
  text-decoration: none;
}
.mv-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .mv-parcare-item { grid-template-columns: 1fr; }
  .mv-corr-panel { grid-template-columns: 1fr; }
  .mv-corr-card-header { flex-direction: column; align-items: flex-start; }
  #mv-calc-btn, #mv-case-calc-btn, #mv-cartier-calc-btn, #mv-spatii-calc-btn { width: 100%; }
}
@media (max-width: 1024px) {
  .mv-parcare-item { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}
@keyframes mv-spin { to { transform: rotate(360deg); } }
