/* ============================================================
   TechJatra Admission Form — Stylesheet
   ============================================================ */

:root {
  --primary-blue: #2563EB;
  --light-blue: #3B82F6;
  --accent-gold: #F59E0B;
  --success-green: #22C55E;
  --danger-red: #EF4444;

  --bg-start: #EFF6FF;
  --bg-mid: #F0F9FF;
  --bg-end: #FFFFFF;

  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);

  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  background: linear-gradient(160deg, var(--bg-start) 0%, var(--bg-mid) 45%, var(--bg-end) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Background Orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float-orb 14s ease-in-out infinite;
}

.orb-1 { width: 450px; height: 450px; background: var(--light-blue); top: -8%; right: -5%; }
.orb-2 { width: 380px; height: 380px; background: var(--accent-gold); bottom: 5%; left: -6%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #93C5FD; top: 45%; left: 40%; animation-delay: -9s; }

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -30px); }
}

.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

/* Header */
.form-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-blue);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.form-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.header-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 2rem;
}

/* Form Sections */
.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 1.5rem;
  padding-bottom: 0;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i { color: var(--primary-blue); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.required { color: var(--danger-red); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input.error, select.error, textarea.error {
  border-color: var(--danger-red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

.error-msg {
  font-size: 0.75rem;
  color: var(--danger-red);
  margin-top: 0.3rem;
  min-height: 1rem;
}

/* Amount Input */
.amount-input {
  position: relative;
}

.currency-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 1rem;
}

.amount-input input {
  padding-left: 2.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 1.1rem;
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}

/* Radio & Checkbox */
.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.radio-label input, .checkbox-label input { display: none; }

.radio-custom, .checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #CBD5E1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.checkbox-custom { border-radius: 5px; }

.radio-label input:checked + .radio-custom,
.checkbox-label input:checked + .checkbox-custom {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
}

.radio-label input:checked + .radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.checkbox-label input:checked + .checkbox-custom::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.65rem;
  color: white;
}

/* File Upload */
.file-upload {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: rgba(255, 255, 255, 0.5);
}

.file-upload:hover, .file-upload.dragover {
  border-color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.04);
}

.file-upload-content i {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.file-upload-content p {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.file-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.file-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.file-info span {
  font-size: 0.85rem;
  font-weight: 500;
  word-break: break-all;
}

.remove-file {
  background: none;
  border: none;
  color: var(--danger-red);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
}

.remove-file:hover { text-decoration: underline; }

/* Progress Bar */
.upload-progress {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(37, 99, 235, 0.05);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.progress-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 0.6rem;
}

.progress-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Success View */
.success-view { margin-top: 1rem; }

.success-card {
  text-align: center;
  padding: 2.5rem 2rem;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--success-green), #16A34A);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
  animation: success-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-card h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.success-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.success-details {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.detail-value.highlight {
  font-size: 1.1rem;
  color: var(--primary-blue);
  font-weight: 800;
}

.status-pending {
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem !important;
}

.success-note {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  background: #EFF6FF;
  border-left: 4px solid var(--primary-blue);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
  text-align: left;
}

.success-note-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  padding-top: 0.15rem;
  color: var(--primary-blue);
  font-size: 1rem;
  line-height: 1;
}

.success-note-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-secondary);
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}

.success-note-text strong {
  color: var(--primary-blue);
  font-weight: 700;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: white;
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-blue);
  transition: all var(--transition);
}

.back-home-btn:hover {
  background: var(--primary-blue);
  color: white;
}

/* Footer */
.form-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-footer strong { color: var(--primary-blue); }

.help-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  color: #128C7E;
  font-weight: 600;
  font-size: 0.85rem;
}

.help-link:hover { color: #25D366; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: toast-in 0.4s ease, toast-out 0.4s ease 3.6s forwards;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.error { background: var(--danger-red); }
.toast.success { background: var(--success-green); }
.toast.info { background: var(--primary-blue); }

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  to { transform: translateX(100%); opacity: 0; }
}

/* Animations */
.fade-in { animation: fadeIn 0.7s ease forwards; }
.fade-in-up { animation: fadeInUp 0.7s ease forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
  .page-wrapper { padding: 1rem 1rem 2rem; }
  .glass-card { padding: 1.25rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: auto; }
  .radio-group { flex-direction: column; gap: 0.75rem; }
  .detail-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .detail-value { text-align: left; }
  .success-note {
    padding: 0.9rem 1rem;
    gap: 0.65rem;
  }
  .success-note-text {
    font-size: 0.82rem;
    line-height: 1.6;
  }
  .toast-container { left: 1rem; right: 1rem; }
  .toast { max-width: 100%; }
}
