.form-card {
  width: 100%;
  padding: 2rem;
  border-radius: 18px;
  border: 1px solid #e3e9f3;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  box-shadow: 0 18px 40px rgba(28, 47, 77, 0.08) !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-sections {
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
  padding: 0;
}

.form-left,
.form-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-left > div,
.form-right > div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.form-left > div > button,
.form-right > div > button,
.form-left > div > a.btnAction,
.form-right > div > a.btnAction {
  align-self: flex-start;
  min-width: max-content;
}

.form-left > div.checkbox-group,
.form-right > div.checkbox-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid #d5dceb;
  border-radius: 12px;
  background: #fff;
}

.form-left > div.checkbox-group > label,
.form-right > div.checkbox-group > label {
  margin: 0;
}

.form-left > div.checkbox-group > input[type="checkbox"],
.form-right > div.checkbox-group > input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
}

.picker-field {
  width: 100%;
}

.picker-input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.picker-input-group input {
  min-width: 0;
  width: 100%;
}

.attachment-btn {
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.form-card label {
  width: auto;
  font-weight: 700;
  color: var(--primary-color);
  white-space: normal;
  line-height: 1.4;
}

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  border: 1px solid #d5dceb;
  border-radius: 12px;
  background: #fff;
  color: #1f2a3d;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-card input::placeholder,
.form-card textarea::placeholder {
  color: #bfc1c4;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-color: #8fb2d1;
  box-shadow: 0 0 0 4px rgba(47, 98, 135, 0.12);
}

.form-card input.input-error,
.form-card select.input-error,
.form-card textarea.input-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
}

.field-error-message {
  display: block;
  color: #dc3545;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}

.form-card .form-hint {
  color: #6b8194;
  font-size: 0.85rem;
  font-weight: 500;
}

.address-autocomplete-list {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
  padding: 0.35rem;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 54, 75, 0.14);
  z-index: 20;
}

.address-autocomplete-list[hidden] {
  display: none;
}

.address-autocomplete-item {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #263746;
  font: inherit;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.address-autocomplete-item:hover,
.address-autocomplete-item:focus {
  outline: none;
  background: #eef5fb;
}

.form-card textarea {
  min-height: 50px;
  resize: vertical;
}

.form-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding: 0;
}

@media screen and (max-width: 1200px) {
  .form-sections {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .form-left,
  .form-right {
    width: 100%;
  }
}

@media screen and (max-width: 960px) {
  .form-card {
    padding: 1.5rem;
  }

  .form-footer {
    flex-direction: column;
  }

  .form-footer button,
  .form-footer .btnAction {
    width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .form-card {
    padding: 1.25rem;
  }

  .form-left > div.checkbox-group,
  .form-right > div.checkbox-group {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   BAIL GARAGE — Forms overlay (theme refresh)
   Appended overrides — no rewrite of legacy rules so other pages remain stable.
   ========================================================================== */
.form-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
    gap: 1.75rem;
}

.form-sections { gap: 2rem; }

.form-left,
.form-right {
    gap: 1.1rem;
}

.form-card label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.form-card label small.form-hint {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    color: #94A3B8;
    font-size: 0.78rem;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="number"],
.form-card input[type="date"],
.form-card input[type="password"],
.form-card select,
.form-card textarea {
    padding: 0.75rem 1rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 12px;
    background: #fff;
    color: #0F172A;
    font-size: 0.95rem;
    font-family: 'Urbanist', sans-serif;
    min-height: 44px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-card input::placeholder,
.form-card textarea::placeholder { color: #94A3B8; }

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    outline: none;
    border-color: #2C4A6B;
    box-shadow: 0 0 0 4px rgba(44, 74, 107, 0.12);
}

.form-card input.input-error,
.form-card select.input-error,
.form-card textarea.input-error {
    border-color: #F43F5E;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.10);
}

.field-error-message {
    color: #B91C1C;
    font-size: 0.82rem;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.field-error-message::before {
    content: "\f071";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.form-footer {
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E2E8F0;
}

/* Make the cancel/secondary button stand out less */
.form-footer .btnAction.cancel {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    box-shadow: none;
}

.form-footer .btnAction.cancel:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* Address autocomplete dropdown */
.address-autocomplete-list {
    border-radius: 12px;
    border-color: #E2E8F0;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
}

.address-autocomplete-item:hover,
.address-autocomplete-item:focus {
    background: #EEF2F7;
    color: #2C4A6B;
}

/* Attachment button helper */
.attachment-btn {
    background: #F8FAFC;
    color: #2C4A6B;
    border: 1.5px solid #E2E8F0;
    font-weight: 700;
}

.attachment-btn:hover {
    background: #fff;
    border-color: #2C4A6B;
    color: #2C4A6B;
}
