/* =================================================
   FORM PAGE – GLASS + ANIMATION
================================================= */

/* ===============================
   MAIN FORM CONTAINER
================================ */
.modern-form-container {
  width: 100%;
  height: 100%;
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 48px;
  padding: 48px;
  animation: formEnter 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

/* ===============================
   GLASS PANELS
================================ */
.glass {
  background: linear-gradient(135deg, #abd4a0, #dab264);
  border-radius: 36px;
  padding: 56px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.22);
  box-sizing: border-box;
}

/* ===============================
   LEFT PANEL
================================ */
.form-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===============================
   RIGHT PANEL
================================ */
.form-right {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  max-width: 100%;
  box-sizing: border-box;
}

/* ===============================
   FLOATING INPUTS
================================ */
.floating-group {
  position: relative;
  margin-bottom: 26px;
  width: 100%;
}

.floating-group input,
.floating-group select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: none;
  background: #f1f5f9;
  font-size: 16px;
  outline: none;
  box-sizing: border-box;
}

.floating-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #64748b;
  pointer-events: none;
  transition: all 0.25s ease;
  padding: 0 6px;
}

.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label,
.floating-group select:focus + label,
.floating-group select:not([value=""]) + label {
  top: -10px;
  font-size: 12px;
  color: #ffffff;
  background: #22c55e;
  padding: 3px 10px;
  border-radius: 8px;
}

/* ===============================
   RIGHT FORM – TWO COLUMN LAYOUT
================================ */
.right-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  align-items: start;
  position: relative;
}

.left-divider-col {
  position: relative;
  padding-right: 36px;
}

.left-divider-col::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  width: 1px;
  height: calc(100% - 16px);
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0,0,0,0.25),
    transparent
  );
}

/* ===============================
   PARENT DETAILS – NAME / AGE
================================ */
.parent-row {
  display: grid;
  grid-template-columns: 3.6fr 1.4fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

/* Age field visibility */
.parent-row .age-field {
  min-width: 92px;
}

.age-field input {
  text-align: center;
  font-weight: 600;
  background: #eef2f7;
  padding-left: 12px;
  padding-right: 12px;
}

/* ===============================
   WIFE DETAILS
================================ */
.wife-row-main {
  display: grid;
  grid-template-columns: 3.6fr 1.4fr;
  gap: 12px;
  margin-bottom: 16px;
}

/* ===============================
   CHILDREN SECTION
================================ */
.children-section {
  display: none;
  margin-top: 28px;
}

.children-section.show {
  display: block;
}

/* Top bar */
.children-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.children-top strong {
  font-size: 17px;
  font-weight: 600;
}

/* Header */
.children-header {
  display: grid;
  grid-template-columns:
    1.6fr
    1.4fr
    1.4fr
    0.9fr
    1.6fr
    0.6fr;
  gap: 12px;
  background: #3b2505;
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 14px;
  min-width: 100%;
}

/* Rows */
.children-row {
  display: grid;
  grid-template-columns:
    1.6fr
    1.4fr
    1.4fr
    0.9fr
    1.6fr
    0.6fr;
  gap: 12px;
  background: #ffffff;
  padding: 14px 16px;
  border-radius: 18px;
  margin-top: 12px;
  align-items: center;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  min-width: 100%;
}

/* Inputs */
.children-row input,
.children-row select {
  width: 100%;
  height: 42px;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.25);
  box-sizing: border-box;
}

/* Disabled spouse */
.children-row input[disabled] {
  background: #e5e7eb;
  cursor: not-allowed;
}

/* Delete button */
.children-row button {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
}

/* ===============================
   FORM ACTIONS
================================ */
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

.form-actions button {
  min-width: 140px;
}

/* ===============================
   ANIMATION
================================ */
@keyframes formEnter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===============================
   TABLET
================================ */
@media (max-width: 1000px) {
  .modern-form-container {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .right-two-col {
    grid-template-columns: 1fr;
  }

  .left-divider-col::after {
    display: none;

  }.left-divider-col {
	position: relative;
	padding-right: 0px;
}

}

/* ===============================
   MOBILE
================================ */
@media (max-width: 576px) {

  .children-header {
    display: none;
  }

  .children-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 20px;
  }

  .children-row button {
    width: 100%;
    border-radius: 12px;
  }

  .parent-row,
  .wife-row-main {
    grid-template-columns: 1fr;
  }

  .age-field {
    min-width: 100%;
  }

  .glass.form-right {
    align-items: center;
  }

  .glass.form-right form,
  .glass.form-right .children-section,
  .glass.form-right .form-actions {
    max-width: 420px;
    width: 100%;
  }
}
