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

:root {
  --navy: #17365d;
  --navy-dark: #102944;
  --green: #18794e;
  --green-light: #eaf5ef;
  --bg: #f3f6f9;
  --white: #ffffff;
  --border: #d7e0e9;
  --text: #263445;
  --muted: #697889;
  --shadow: 0 8px 28px rgba(23,54,93,.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Hind Siliguri', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  padding: 25px 14px;
}

.registration-container {
  width: 100%;
  max-width: 1050px;
  margin: auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* HEADER */

.form-header {
  position: relative;
  text-align: center;
  padding: 30px 20px 27px;
  color: white;
  background: linear-gradient(135deg, #102944, #17365d 65%, #20547a);
  border-bottom: 5px solid var(--green);
}

.form-header::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  top: -100px;
  right: -40px;
}

.form-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  padding: 5px;
  background: white;
  border: 3px solid rgba(255,255,255,.7);
  border-radius: 50%;
  margin-bottom: 12px;
}

.form-header h1 {
  color: white;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.4;
}

.form-header p {
  color: #e0ebf5;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.header-subtitle {
  display: block;
  color: #cbdbea;
  font-size: 13px;
  margin-top: 5px;
}

.back-link {
  position: absolute;
  top: 16px;
  left: 17px;
  color: white;
  text-decoration: none;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.4);
  padding: 5px 12px;
  border-radius: 5px;
  transition: .2s;
}

.back-link:hover {
  background: white;
  color: var(--navy);
}

/* FORM */

#studentRegistrationForm {
  padding: 25px;
}

.form-section {
  margin-bottom: 24px;
  padding: 22px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.section-title {
  color: var(--navy);
  font-size: 19px;
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--green);
}

.section-description {
  color: var(--muted);
  font-size: 13px;
  margin-top: -10px;
  margin-bottom: 17px;
}

/* TWO COLUMN GRID */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  color: #34465a;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* INPUTS */

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #cbd5df;
  border-radius: 5px;
  background: white;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: .2s;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23,54,93,.10);
}

input::placeholder,
textarea::placeholder {
  color: #9aa6b2;
}

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

input:disabled,
select:disabled,
textarea:disabled {
  background: #edf1f5;
  cursor: not-allowed;
}

/* DATE */

.date-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

/* PHOTO UPLOAD */

#studentPhoto {
  cursor: pointer;
  padding: 8px;
  background: #f8fafc;
}

.photo-preview {
  width: 120px;
  height: 120px;
  margin: 12px auto 0;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* CHECKBOX */

.checkbox-line,
.academic-options,
.status-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-line {
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.checkbox-line label,
.academic-options label,
.status-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 14px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  min-height: 17px;
  height: 17px;
  accent-color: var(--green);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: .2s;
}

.checkbox-card:hover {
  border-color: var(--green);
  background: var(--green-light);
}

/* CONDITIONAL SECTIONS */

.conditional-section {
  margin-top: 18px;
  padding: 18px;
  background: #f7fafc;
  border: 1px solid #d8e4ed;
  border-left: 4px solid var(--green);
  border-radius: 6px;
}

.conditional-section h3 {
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 15px;
}

.conditional-section[hidden],
[hidden] {
  display: none !important;
}

/* GOOGLE SIGN IN */

.google-auth {
  margin-top: 15px;
  padding: 17px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
}

.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 20px;
  border: 1px solid #cbd5df;
  border-radius: 5px;
  background: white;
  color: #34465a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.google-button span {
  font-size: 19px;
  font-weight: 700;
  color: #4285f4;
}

.google-button:hover {
  background: #f0f4f8;
  border-color: var(--navy);
}

/* DECLARATION */

.declaration-section {
  padding: 18px;
  background: var(--green-light);
  border: 1px solid #c8e3d3;
  border-radius: 6px;
  margin-bottom: 22px;
}

.declaration-section .section-title {
  border-color: var(--green);
}

.declaration-section label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

/* ACTION BUTTONS */

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
}

.form-actions button {
  min-width: 135px;
  padding: 11px 22px;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
}

.preview-button {
  background: var(--navy);
  color: white;
}

.preview-button:hover {
  background: var(--navy-dark);
}

.reset-button {
  background: #e9edf2;
  color: #34465a;
  border: 1px solid #cbd5df !important;
}

.reset-button:hover {
  background: #dce3eb;
}

.submit-button {
  background: var(--green);
  color: white;
}

.submit-button:hover {
  background: #11613d;
}

.form-actions button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* PREVIEW */

.preview-area {
  margin-top: 25px;
  padding: 22px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: white;
}

.preview-area h2 {
  color: var(--navy);
  font-size: 20px;
  border-bottom: 2px solid var(--green);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.preview-content {
  font-size: 14px;
}

/* ADDRESS MESSAGE */

.address-data-message {
  padding: 10px 13px;
  margin-top: 10px;
  border-radius: 5px;
  background: #eef4f9;
  border-left: 3px solid var(--navy);
  color: #45596d;
  font-size: 13px;
}

/* FOOTER */

.form-footer {
  padding: 18px;
  text-align: center;
  background: #f3f6f9;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* TABLET */

@media (max-width: 700px) {
  body {
    padding: 10px 6px;
  }

  .form-header {
    padding: 48px 12px 22px;
  }

  .form-header h1 {
    font-size: 21px;
  }

  .form-logo {
    width: 70px;
    height: 70px;
  }

  .back-link {
    top: 10px;
    left: 10px;
    font-size: 12px;
  }

  #studentRegistrationForm {
    padding: 12px;
  }

  .form-section {
    padding: 15px;
    margin-bottom: 16px;
  }

  .section-title {
    font-size: 17px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 10px;
  }

  .full-width {
    grid-column: 1 / -1;
  }

  .form-group label {
    font-size: 13px;
  }

  input,
  select,
  textarea {
    font-size: 13px;
    padding: 9px;
  }

  .date-grid {
    gap: 5px;
  }

  .photo-preview {
    width: 105px;
    height: 105px;
  }

  .conditional-section {
    padding: 12px;
  }

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

  .form-actions button {
    width: 100%;
  }
}

/* SMALL MOBILE */

@media (max-width: 360px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .full-width {
    grid-column: auto;
  }

  .date-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
