/*
 * ALPHA WEB APPS - compact entry form visual redesign
 * Layout inspired by supplied reference HTML (forest background, slate workspace,
 * dark field labels and compact white controls).
 * CSS ONLY: input names, business logic, Flask routes, JS handlers and buttons retained.
 */
:root {
  --page-bg:#00452c;
  --surface:#7a9b9d;
  --surface-soft:#e1eceb;
  --surface-tint:#dce8e7;
  --ink:#112d29;
  --muted:#304d4a;
  --line:#537575;
  --line-strong:#527779;
  --brand:#2f4f4f;
  --brand-dark:#183e3c;
  --brand-soft:#cce0de;
  --navy:#2f4f4f;
  --navy-2:#244747;
  --shadow:0 8px 24px rgba(0,0,0,.20);
  --shadow-sm:0 2px 8px rgba(0,0,0,.12);
  --radius-xl:4px;
  --radius-lg:3px;
  --radius-md:3px;
}
html {scroll-behavior:smooth}
body {
  background:#00452c !important;
  color:#0d2622;
  font-family:Arial,Helvetica,sans-serif;
  font-size:12px;
  line-height:1.35;
}
.container.py-5 {
  max-width:1280px !important;
  padding-top:14px !important;
  padding-bottom:24px !important;
}
.card {
  display:block !important;
  padding:10px !important;
  border:1px solid #e3efec !important;
  border-radius:2px !important;
  background:#7a9b9d !important;
  box-shadow:0 6px 22px rgba(0,0,0,.28) !important;
  backdrop-filter:none !important;
}
.page-hero {
  display:flex;
  min-height:auto;
  margin:0 0 9px !important;
  padding:10px 14px !important;
  border:1px solid #004044;
  border-bottom:3px solid #123e3e;
  border-radius:1px !important;
  background:#2f4f4f !important;
  box-shadow:none !important;
  gap:12px;
}
.page-hero::after,.hero-badge::before {display:none !important}
.hero-badge {
  margin:0 0 3px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  color:#c9e5d9;
  font-size:10px;
  letter-spacing:.045em;
}
.hero-title {font-size:19px !important;letter-spacing:0;color:white !important;font-weight:700}
.hero-subtitle {font-size:11px !important;color:#e0ecea !important;margin:4px 0 0;max-width:850px}
.hero-actions {gap:6px}
.hero-actions .btn {min-width:90px !important}
.step-indicator {
  display:flex !important;
  position:static !important;
  flex-direction:row !important;
  flex-wrap:wrap;
  gap:3px !important;
  width:100%;
  margin:0 0 8px !important;
  padding:0 !important;
  border:0 !important;
  border-bottom:2px solid #2f4f4f !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.step-indicator::before {display:none !important}
.step-indicator .step {
  display:flex !important;
  flex:1 1 150px;
  min-height:33px !important;
  padding:7px 11px !important;
  background:#d4d0c8 !important;
  border:1px solid #9da8aa !important;
  border-bottom:0 !important;
  border-radius:2px 2px 0 0 !important;
  cursor:pointer;
  gap:7px !important;
  transition:background .14s ease;
}
.step-indicator .step::before {
  content:attr(data-step);
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:19px !important;height:19px !important;
  background:#f4f5ee !important;
  border:1px solid #879b96 !important;
  border-radius:2px !important;
  color:#2f4f4f !important;
  font-size:11px !important;
  box-shadow:none !important;
}
.step-indicator .step span {font-size:12px !important;color:#21564c !important;font-weight:700 !important}
.step-indicator .step.active {
  background:#ece9d8 !important;
  border-color:#2f4f4f !important;
  box-shadow:inset 0 3px #2f4f4f;
}
.step-indicator .step.active::before {background:#2f4f4f !important;color:#fff !important}
#policyForm {width:100%;min-width:0}
.form-step {
  margin:0 0 8px !important;
  padding:12px !important;
  border:1px solid #e5f0ed !important;
  border-radius:1px !important;
  background:#7a9b9d !important;
  box-shadow:none !important;
}
.form-step.row {--bs-gutter-x:10px;--bs-gutter-y:7px}
.section-title {
  margin:0 0 4px !important;
  padding:6px 9px !important;
  background:#2f4f4f !important;
  border:1px solid #004044 !important;
  border-radius:1px !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
}
.section-title::before {display:none !important}
.section-note {font-size:11px !important;color:#153c37 !important;margin:4px 0 0}
.form-step label.form-label {
  margin:0;
  padding:6px 7px;
  display:flex;
  align-items:center;
  min-height:30px;
  background:#2f4f4f;
  color:white !important;
  border:1px solid #004044;
  border-radius:1px 0 0 1px;
  font-size:11px !important;
  font-weight:700 !important;
  line-height:1.2;
  letter-spacing:0;
}
.form-step input.form-control,.form-step select.form-select,.form-step textarea.form-control {
  min-height:30px !important;
  height:30px;
  padding:4px 7px !important;
  border:1px solid #7f9db9 !important;
  border-radius:0 1px 1px 0 !important;
  background:white !important;
  color:#111 !important;
  font-family:Arial,Helvetica,sans-serif;
  font-size:12px !important;
  font-weight:400;
  box-shadow:none !important;
}
.form-step textarea.form-control {height:55px !important;min-height:55px !important;resize:vertical}
.form-step input.form-control:focus,.form-step select.form-select:focus,.form-step textarea.form-control:focus {
  border-color:#00452c !important;
  outline:2px solid rgba(0,69,44,.22) !important;
  outline-offset:0;
}
.form-step input.form-control[readonly],.form-step select.form-select[disabled] {
  background:#e2e5e2 !important;
  color:#344a45 !important;
}
.summary-readonly input.form-control {background:#e4f5e6 !important;color:#075330 !important;font-weight:bold !important}
.form-text {color:#234d44;font-size:10px;margin:3px 0 0}
.btn,.small-action {
  min-height:30px !important;
  padding:5px 11px !important;
  border-radius:2px !important;
  border:1px solid #003333 !important;
  background:#2f4f4f !important;
  color:#fff !important;
  font-family:Arial,Helvetica,sans-serif;
  font-size:11px !important;
  font-weight:700;
  letter-spacing:0;
  transform:none !important;
  box-shadow:inset 1px 1px rgba(255,255,255,.24) !important;
}
.btn:hover,.btn:focus {background:#1a3e3c !important;color:#fff !important}
.btn-danger {background:#8b2929 !important;border-color:#5f1717 !important}
.btn-danger:hover {background:#6d1919 !important}
.btn-secondary {background:#466363 !important}
.btn-outline-primary {background:#e9f0ed !important;color:#245047 !important}
.rider-toolbar {
  padding:7px 9px !important;
  border:1px solid #004d40 !important;
  border-radius:1px !important;
  background:#89a9a8 !important;
  gap:10px;
}
.rider-toolbar-title {font-size:12px;color:#123d35}
.rider-toolbar-text {font-size:10px;color:#245048}
.supple-row,.file-row {
  border:1px solid #456c67 !important;
  border-radius:1px !important;
  background:#93adab !important;
  padding:9px !important;
  box-shadow:none !important;
}
.supple-row::before {
  border:1px solid #456c67;
  border-radius:0;
  background:#2f4f4f;
  color:white;
}
.field-column-active {background:#bdd5c5 !important;border-radius:2px !important;box-shadow:inset 0 0 0 1px #528b74 !important}
.modal-content {border-radius:3px !important}
.toast {border-radius:3px !important}
/* Wide screens: compact two-column field layout like the supplied reference,
   without changing field order or form names. Nested dynamic sections keep their grids. */
@media (min-width:1024px) {
  .form-step.row > .col-md-3,
  .form-step.row > .col-md-4 {
    display:flex;
    align-items:flex-start;
    gap:0;
  }
  .form-step.row > .col-md-3 > label.form-label,
  .form-step.row > .col-md-4 > label.form-label {
    flex:0 0 44%;
    width:44%;
    min-width:0;
  }
  .form-step.row > .col-md-3 > .form-control,
  .form-step.row > .col-md-3 > .form-select,
  .form-step.row > .col-md-4 > .form-control,
  .form-step.row > .col-md-4 > .form-select {flex:1 1 0;min-width:0;width:1%}
  .form-step.row > .col-md-3 > .form-text {flex-basis:100%}
  .form-step.row > .col-md-3 {width:50%}
  .form-step.row > .col-md-4 {width:50%}
  .form-step.row > .col-md-6 {width:100%}
  .form-step.row > .col-md-6:has(> label.form-label) {display:flex;align-items:flex-start}
  .form-step.row > .col-md-6 > label.form-label {flex:0 0 22%;min-width:0}
  .form-step.row > .col-md-6 > :is(input.form-control,textarea.form-control,select.form-select) {flex:1 1 0;min-width:0}
}
/* Preserve validation explanations by letting selected fields wrap vertically. */
.form-step.row > .col-md-3:has(> .form-text) {flex-wrap:wrap}
.form-step.row > .col-md-3:has(> .form-text) > .form-text {width:100%}
/* Rider / Health Insurance inline widgets are allowed to wrap if space runs out. */
.supple-inline-row,.hi-inline-grid {flex-wrap:wrap !important}
.supp-field,.hi-item {min-width:115px}
.supp-field > label.form-label,.hi-item > label.form-label {border-radius:1px 1px 0 0}
.supp-field > :is(input.form-control,select.form-select),.hi-item > :is(input.form-control,select.form-select) {border-radius:0 0 1px 1px !important}
@media (max-width:1023.98px) {
  .card {display:block !important}
  .step-indicator {display:flex !important}
  .form-step.row > .col-md-3,.form-step.row > .col-md-4 {width:50%}
  .form-step.row > .col-md-3 > label.form-label,.form-step.row > .col-md-4 > label.form-label {min-height:27px}
}
@media (max-width:767.98px) {
  .container.py-5 {padding:5px !important}
  .card {padding:6px !important}
  .page-hero {padding:9px !important;flex-direction:column !important;align-items:stretch !important}
  .hero-title {font-size:16px !important}
  .hero-actions {width:100%}
  .step-indicator {display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:3px !important}
  .step-indicator .step {min-width:0;min-height:37px !important}
  .step-indicator .step span {font-size:10px !important}
  .form-step {padding:8px !important}
  .form-step.row > .col-md-3,.form-step.row > .col-md-4 {width:100%}
  .form-step label.form-label {padding:5px 7px}
  .form-step.row > .col-md-6 {width:100%}
  .supple-inline-row,.hi-inline-grid {flex-wrap:wrap !important;flex-direction:column !important}
  .supple-inline-row > *,.hi-inline-grid > * {width:100% !important}
}
@media (max-width:380px) {
  .step-indicator {grid-template-columns:1fr !important}
}

/* Update Proposal Form only: keep search widget visually consistent. */
.proposal-search-bar {
  background:#89a9a8 !important;
  border:1px solid #e3efec !important;
  border-radius:2px !important;
  padding:10px !important;
  box-shadow:none !important;
  --bs-gutter-y:7px;
}
.proposal-search-bar .form-label {
  display:flex;
  align-items:center;
  min-height:30px;
  margin:0 !important;
  padding:6px 8px;
  color:#fff !important;
  background:#2f4f4f !important;
  border:1px solid #004044;
  font-size:11px !important;
  font-weight:700 !important;
  border-radius:1px;
}
.proposal-search-bar .form-control {
  min-height:30px !important;
  height:30px !important;
  padding:4px 7px !important;
  background:#fff !important;
  color:#111 !important;
  border:1px solid #7f9db9 !important;
  border-radius:1px !important;
  font-size:12px !important;
}
.proposal-search-bar .search-current-chip {
  background:#e1eceb !important;
  border:1px solid #537575 !important;
  border-radius:2px !important;
  color:#163d37 !important;
  box-shadow:none !important;
  padding:6px 10px !important;
  font-size:11px !important;
}
