/* ==========================================================================
   Bontrase SHTS — Application Flow Stylesheet
   Shared across: application_form.php, preview_application.php,
                  application_documents.php
   ========================================================================== */

:root {
  --brand-primary: #1b5e3a;
  --brand-primary-dark: #123f27;
  --brand-primary-light: #e8f5ee;
  --brand-accent: #f4a300;
  --brand-accent-dark: #d68d00;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e2e8f0;
  --danger: #e74c3c;
  --danger-light: #fdecea;
  --success: #27ae60;
  --success-light: #e9f9ef;
  --pending: #f39c12;
  --pending-light: #fff6e5;
  --bg-soft: #f7f9fc;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.10);
  --shadow-lg: 0 25px 50px -12px rgba(16, 24, 40, 0.25);
  --font-heading: 'Roboto Slab', serif;
  --font-body: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

body.flow-body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--bg-soft) 0%, #ffffff 320px);
  color: var(--text-dark);
  margin: 0;
  min-height: 100vh;
}

.flow-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ---------- Page intro ---------- */
.flow-intro {
  text-align: center;
  margin-bottom: 28px;
}

.flow-intro .school-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.flow-intro h1 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 4vw, 34px);
  color: var(--brand-primary-dark);
  margin: 0 0 8px;
}

.flow-intro p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 28px auto 36px;
  max-width: 640px;
}

.stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.stepper .step .circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.25s ease;
  z-index: 2;
}

.stepper .step .label {
  font-size: 12px;
  margin-top: 8px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
}

.stepper .step.active .circle {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0 0 5px var(--brand-primary-light);
}

.stepper .step.active .label { color: var(--brand-primary-dark); }

.stepper .step.done .circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.stepper .step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 19px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.stepper .step.done:not(:last-child)::after { background: var(--success); }

/* ---------- Card container ---------- */
.flow-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.flow-card-header {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  padding: 26px 32px;
}

.flow-card-header h2 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 22px;
}

.flow-card-header p {
  margin: 0;
  opacity: 0.85;
  font-size: 14px;
}

.flow-card-body { padding: 32px; }

@media (max-width: 600px) {
  .flow-card-header { padding: 20px; }
  .flow-card-body { padding: 20px; }
}

/* ---------- Profile picture uploader ---------- */
.profile-picture-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px dashed var(--border-color);
}

.profile-preview {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--brand-primary-light);
  border: 3px solid var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}

.profile-preview .default-avatar {
  font-size: 44px;
  font-weight: 700;
  color: var(--brand-primary);
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-upload-btn {
  background: var(--brand-accent);
  color: #23180a;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, background 0.2s ease;
}

.profile-upload-btn:hover { background: var(--brand-accent-dark); transform: translateY(-1px); }

.profile-required-note {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 8px;
}

.form-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

/* ---------- Form sections ---------- */
.form-section { margin-bottom: 30px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-primary-light);
}

.section-title i {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 7px;
}

.form-group label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14.5px;
  background: #fbfcfe;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--brand-primary-light);
  background: #fff;
}

textarea.form-control { resize: vertical; min-height: 90px; }

.radio-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 6px;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

.program-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-primary-light);
  color: var(--brand-primary-dark);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13.5px;
}

/* ---------- Buttons ---------- */
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(27, 94, 58, 0.28);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(27, 94, 58, 0.35); }

.btn-secondary {
  background: #fff;
  color: var(--text-dark);
  border: 1.5px solid var(--border-color);
}

.btn-secondary:hover { background: #f2f4f7; }

.btn-accent {
  background: var(--brand-accent);
  color: #23180a;
}

.btn-accent:hover { background: var(--brand-accent-dark); transform: translateY(-2px); }

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

/* ---------- Preview page ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .preview-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

.preview-photo {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid var(--brand-primary-light);
  box-shadow: var(--shadow-sm);
}

.preview-name h3 {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--brand-primary-dark);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.preview-table tr { border-bottom: 1px solid var(--border-color); }
.preview-table tr:last-child { border-bottom: none; }

.preview-table td {
  padding: 12px 8px;
  font-size: 14.5px;
  vertical-align: top;
}

.preview-table td.field-label {
  color: var(--text-muted);
  font-weight: 600;
  width: 40%;
}

.preview-table td.field-value {
  color: var(--text-dark);
  font-weight: 500;
}

.verify-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--pending-light);
  border: 1px solid #fde3b0;
  color: #8a5a00;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 26px;
}

.verify-banner i { font-size: 18px; margin-top: 2px; }

/* ---------- Status badge ---------- */
.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
}

.status-badge-pill.pending {
  background: var(--pending-light);
  color: #8a5a00;
  border: 1.5px solid #fde3b0;
}

/* ---------- Documents page ---------- */
.success-hero {
  text-align: center;
  padding: 10px 0 26px;
}

.success-hero .icon-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
}

.success-hero h2 {
  font-family: var(--font-heading);
  color: var(--brand-primary-dark);
  margin: 0 0 8px;
  font-size: 24px;
}

.app-id-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-soft);
  border: 1.5px dashed var(--border-color);
  padding: 12px 22px;
  border-radius: var(--radius-md);
  margin-top: 14px;
  font-size: 14px;
}

.app-id-box strong { color: var(--brand-primary-dark); font-size: 16px; letter-spacing: 0.5px; }

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 26px 0;
}

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

.doc-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  background: #fbfcfe;
}

.doc-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }

.doc-card .doc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.doc-card h4 { margin: 0; font-size: 16px; color: var(--text-dark); }
.doc-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

.doc-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

.next-steps {
  background: var(--brand-primary-light);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-top: 10px;
}

.next-steps h4 {
  margin: 0 0 10px;
  color: var(--brand-primary-dark);
  font-size: 15px;
}

.next-steps ol { margin: 0; padding-left: 20px; color: var(--text-dark); font-size: 13.5px; }
.next-steps li { margin-bottom: 6px; }

/* ---------- Alert ---------- */
.flow-alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flow-alert.error { background: var(--danger-light); color: var(--danger); border: 1px solid #f6c6c1; }
.flow-alert.success { background: var(--success-light); color: var(--success); border: 1px solid #bfe8cf; }
