@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f1f3f5;
  color: #071d32;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 8px;
}

.page-shell {
  padding: 19px 12px;
}

.admission-card {
  width: 100%;
  max-width: 530px;
  margin: 0 auto;
  padding: 15px 15px 0;
  background: #fff;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.form-header {
  min-height: 95px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d5d5d5;
}

.logo {
  width: 115px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.institution-details {
  margin-left: auto;
  text-align: right;
}

.institution-details h1 {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
  color: #061c2d;
}

.institution-details p {
  margin: 1px 0;
  font-size: 7px;
  line-height: 1.5;
  color: #354456;
}

.form-section {
  padding-top: 12px;
}

.form-section h2 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #d5d5d5;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  color: #002238;
}

label,
legend {
  display: block;
  margin: 0 0 4px;
  font-size: 7.5px;
  line-height: 1.35;
  color: #172f45;
}

label span,
legend span {
  color: #263c4f;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 22px;
  margin: 0 0 9px;
  padding: 3px 6px;
  border: 1px solid #c8cdd1;
  border-radius: 3px;
  background: #fff;
  color: #162b40;
  font: inherit;
  font-size: 7.5px;
  outline: none;
}

textarea {
  min-height: 32px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #194f45;
  box-shadow: 0 0 0 1px rgba(25, 79, 69, 0.12);
}

.three-column {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

fieldset {
  padding: 0;
  margin: 0 0 7px;
  border: 0;
}

fieldset legend {
  width: 100%;
  margin-bottom: 5px;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 7.5px;
  white-space: nowrap;
}

.radio-row input {
  width: 9px;
  height: 9px;
  margin: 0;
  accent-color: #174e44;
}

.contact-columns {
  gap: 10px;
}

.contact-columns label {
  margin-top: 0;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 7px;
}

th,
td {
  border: 1px solid #d1d7dc;
  padding: 4px;
  text-align: left;
  vertical-align: middle;
}

th {
  height: 22px;
  background: #f5f7f8;
  font-weight: 500;
}

th:first-child,
td:first-child {
  width: 24%;
}

th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3) {
  width: 38%;
}

td input:not([type="radio"]):not([type="checkbox"]) {
  min-height: 22px;
  margin: 0;
  padding: 3px 5px;
  font-size: 7px;
}

.note {
  margin: 7px 0 10px;
  font-size: 6.5px;
  line-height: 1.5;
  font-style: italic;
  color: #4b5360;
}

.declaration-section {
  padding-top: 0;
}

.declaration-text {
  margin: 0 0 11px;
  color: #31506b;
  font-size: 7.5px;
  line-height: 1.55;
}

.declaration-check {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 10px;
  justify-content: center;
}

.declaration-check input {
  accent-color: #174e44;
}

button {
  display: block;
  width: 89px;
  height: 24px;
  margin: 0 auto;
  border: 0;
  border-radius: 3px 3px 0 0;
  background: #153f36;
  color: white;
  font-family: inherit;
  font-size: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: #0e302a;
}

.form-message {
  min-height: 20px;
  margin: 8px 0 0;
  text-align: center;
  font-size: 7.5px;
}

.form-message.success {
  color: #17633e;
}

.form-message.error {
  color: #a12727;
}

@media (max-width: 560px) {
  body {
    font-size: 9px;
  }

  .page-shell {
    padding: 0;
  }

  .admission-card {
    max-width: 100%;
    min-height: 100vh;
    padding: 14px 14px 0;
    border-radius: 0;
  }

  .form-header {
    gap: 8px;
  }

  .logo {
    width: 92px;
  }

  .institution-details h1 {
    font-size: 12px;
  }

  .institution-details p {
    font-size: 6.5px;
  }

  .three-column {
    gap: 7px;
  }

  .radio-row {
    gap: 9px;
  }
}

@media (max-width: 390px) {
  .admission-card {
    padding-left: 10px;
    padding-right: 10px;
  }

  .form-header {
    align-items: flex-start;
  }

  .logo {
    width: 82px;
    margin-top: 12px;
  }

  .institution-details h1 {
    font-size: 10px;
  }

  .institution-details p {
    font-size: 6px;
  }

  .three-column {
    gap: 5px;
  }

  .radio-row {
    gap: 7px;
  }

  .radio-row label,
  label,
  legend {
    font-size: 7px;
  }
}
