/* ============================================================
   GAIBANDHA GOVT COLLEGE — ADMISSION FORM STYLES
   ============================================================ */

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

:root {
  --primary:       #1e3a5f;
  --primary-light: #2d5a8e;
  --primary-fg:    #ffffff;
  --accent:        #c9972b;
  --accent-light:  #f0c060;
  --bg:            #f0f4f9;
  --surface:       #ffffff;
  --border:        #d1dce8;
  --text:          #1a2535;
  --muted:         #6b7a90;
  --error:         #dc2626;
  --success:       #16a34a;
  --radius:        14px;
  --shadow:        0 4px 24px rgba(30,58,95,.10);
  --shadow-lg:     0 8px 40px rgba(30,58,95,.16);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(30,58,95,.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(201,151,43,.06) 0%, transparent 50%);
}

/* ---- SCROLL PROGRESS BAR ---- */
#scroll-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #5b8ec4, var(--accent));
  z-index: 1000;
  transition: width .1s linear;
}

/* ---- BACK TO TOP ---- */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(30,58,95,.35);
  opacity: 0;
  transform: translateY(20px) scale(.8);
  transition: opacity .3s, transform .3s;
  z-index: 999;
  pointer-events: none;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover { background: var(--primary-light); transform: translateY(-3px) scale(1); }
#back-to-top svg { width: 20px; height: 20px; }

/* ---- WATERMARK ---- */
#watermark {
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url('college-logo.png');
  background-repeat: repeat;
  background-size: 260px;
  opacity: .04;
  z-index: 0;
}

/* ---- WRAPPER ---- */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* ---- HEADER ---- */
.header {
  text-align: center;
  margin-bottom: 40px;
}
.header-logo-ring {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.header-logo-ring img { width: 72px; height: 72px; object-fit: contain; }
.header h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}
.header .subtitle {
  font-size: .95rem;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: .08em;
}
.header .subtitle span { margin: 0 6px; }

/* ---- GLASS PANEL ---- */
.glass-panel {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid rgba(209,220,232,.7);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .5s ease, transform .5s ease, box-shadow .3s;
}
.glass-panel.visible { opacity: 1; transform: translateY(0); }
.glass-panel:hover { box-shadow: var(--shadow-lg); }

/* ---- SECTION HEADER ---- */
.section-header {
  background: rgba(30,58,95,.05);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-icon svg { width: 18px; height: 18px; }
.section-header h2 { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.section-header p { font-size: .82rem; color: var(--muted); margin-top: 1px; }

/* ---- SECTION BODY ---- */
.section-body { padding: 28px 24px; }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.col-span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
}

/* ---- FORM FIELDS ---- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 4px;
}
.field label .req { color: var(--error); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: .92rem;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}
.field input.error,
.field select.error,
.field textarea.error { border-color: var(--error); }
.field .err-msg {
  font-size: .78rem;
  color: var(--error);
  display: none;
}
.field .err-msg.show { display: block; }
.field .hint { font-size: .78rem; color: var(--muted); }
.field textarea { resize: vertical; min-height: 90px; }

/* ---- PHOTO UPLOAD ---- */
.photo-wrap {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
@media (max-width: 640px) { .photo-wrap { flex-direction: column; } }
.photo-box {
  width: 130px; height: 155px;
  flex-shrink: 0;
  border: 2px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
  background: rgba(30,58,95,.03);
  overflow: hidden;
  position: relative;
  transition: border-color .2s;
}
.photo-box:hover { border-color: var(--primary); }
.photo-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.photo-box svg { width: 36px; height: 36px; opacity: .4; }
.photo-box input { display: none; }
.photo-hint { font-size: .75rem; color: var(--muted); margin-top: 6px; }

/* ---- PAYMENT ---- */
.fee-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.fee-amount { font-size: 1.8rem; font-weight: 800; }
.fee-label { font-size: .82rem; opacity: .8; }
.fee-due { font-size: .8rem; background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 20px; }

.pay-number-banner {
  background: rgba(201,151,43,.12);
  border: 1px solid rgba(201,151,43,.35);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 24px 20px;
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: #7a5c10;
}
.pay-number-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.pay-number-banner strong { font-size: 1rem; letter-spacing: .04em; }

.pay-methods { padding: 0 24px 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.pay-method-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
  font-size: .88rem; font-weight: 600;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  white-space: nowrap;
}
.pay-method-btn .dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color .2s, background .2s;
}
.pay-method-btn.selected { border-color: var(--primary); background: rgba(30,58,95,.05); box-shadow: 0 0 0 3px rgba(30,58,95,.08); }
.pay-method-btn.selected .dot { border-color: var(--primary); background: var(--primary); }

.pay-details { padding: 20px 24px; display: none; }
.pay-details.show { display: block; }
.bank-info {
  background: rgba(30,58,95,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
  font-size: .85rem;
}
.bank-info h4 { font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.bank-info p { color: var(--muted); margin-bottom: 4px; }
.bank-info span { font-weight: 600; color: var(--text); }

/* ---- DECLARATION ---- */
.declaration-panel {
  border-left: 4px solid var(--accent) !important;
}
.declaration-body { padding: 28px 24px; }
.decl-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.decl-head svg { width: 32px; height: 32px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.decl-head h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.decl-head p { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; background: rgba(0,0,0,.03); padding: 14px; border-radius: 8px; border: 1px solid var(--border); }
.checkbox-row input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.checkbox-row label { font-size: .85rem; color: var(--text); cursor: pointer; }

/* ---- BUTTONS ---- */
.btn-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-top: 8px; }
.btn-reset {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: .9rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-reset:hover { border-color: var(--error); color: var(--error); }
.btn-submit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,58,95,.3);
  transition: background .2s, transform .15s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.btn-submit:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(30,58,95,.35); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.btn-submit .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-submit.loading .btn-text { display: none; }
.btn-submit.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- SUCCESS SCREEN ---- */
#success-screen {
  display: none;
  text-align: center;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 52px 36px;
  box-shadow: var(--shadow-lg);
  max-width: 620px;
  margin: 0 auto;
}
#success-screen.show { display: block; animation: popIn .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
.success-icon {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.success-icon svg { width: 48px; height: 48px; }
#success-screen h2 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
#success-screen p { color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
.success-info {
  background: rgba(30,58,95,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  margin-bottom: 24px;
  font-size: .88rem;
}
.success-info div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); }
.success-info div:last-child { border-bottom: none; }
.success-info .key { color: var(--muted); }
.success-info .val { font-weight: 600; color: var(--text); }
.btn-print {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border: 1.5px solid var(--primary);
  border-radius: 10px;
  background: transparent;
  color: var(--primary);
  font-size: .9rem; font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-print:hover { background: var(--primary); color: #fff; }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 90px; right: 24px;
  background: var(--error);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 2000;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ---- REVEAL ANIMATION ---- */
@keyframes revealUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.header { animation: revealUp .7s ease both; }

/* ---- PRINT ---- */
@media print {
  #scroll-bar, #back-to-top, .btn-row, #watermark { display: none !important; }
  body { background: #fff; }
  .glass-panel { box-shadow: none; border: 1px solid #ccc; opacity: 1 !important; transform: none !important; }
}
