/* ============================================================
 *  MDS Admission Registration — Styles
 *  Future Education · futeducation.com
 * ============================================================ */

/* ── MDS Registration Page Styles ── */
    :root {
      --mds-primary: #0d6efd;
      --mds-dark:    #0a1931;
      --mds-success: #198754;
      --mds-gold:    #f59e0b;
      --mds-red:     #dc2626;
    }

    /* Hero */
    .mds-hero {
      background:
        radial-gradient(120% 120% at 85% -10%, rgba(96,165,250,.22) 0%, transparent 45%),
        radial-gradient(100% 100% at 0% 110%, rgba(37,99,235,.20) 0%, transparent 50%),
        linear-gradient(135deg, #081428 0%, #0d3570 58%, #1a5fb4 100%);
      padding: 92px 0 64px;
      position: relative;
      overflow: hidden;
      isolation: isolate;
    }
    /* faint grid texture for depth */
    .mds-hero::before {
      content: '';
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
      background-size: 46px 46px;
      -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
      mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
      pointer-events: none; z-index: -1;
    }
    /* soft glow orb, top-right */
    .mds-hero::after {
      content: '';
      position: absolute;
      top: -120px; right: -100px;
      width: 460px; height: 460px;
      background: radial-gradient(circle, rgba(96,165,250,.28) 0%, transparent 68%);
      pointer-events: none; z-index: -1;
      animation: heroGlow 9s ease-in-out infinite alternate;
    }
    @keyframes heroGlow { from { transform: translateY(0) scale(1); opacity:.85; } to { transform: translateY(22px) scale(1.08); opacity:1; } }

    .mds-hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,.10);
      border: 1px solid rgba(255,255,255,.22);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-radius: 50px;
      padding: 7px 16px;
      font-size: .76rem;
      font-weight: 600;
      color: #eaf2ff;
      margin-bottom: 20px;
      letter-spacing: .4px;
      box-shadow: 0 2px 18px rgba(0,0,0,.18);
    }
    .mds-hero-badge .live-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: #34d399; position: relative; flex: none;
      box-shadow: 0 0 0 0 rgba(52,211,153,.7);
      animation: livePulse 2s infinite;
    }
    @keyframes livePulse {
      0%   { box-shadow: 0 0 0 0 rgba(52,211,153,.6); }
      70%  { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
      100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
    }

    .mds-hero-title {
      font-size: clamp(1.85rem, 4.4vw, 3rem);
      font-weight: 800;
      color: #fff;
      line-height: 1.14;
      letter-spacing: -.5px;
    }
    .mds-hero-title span {
      background: linear-gradient(100deg, #60a5fa 0%, #93c5fd 55%, #a5b4fc 100%);
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent; color: #60a5fa;
    }
    .mds-hero-subtitle {
      color: rgba(233,240,252,.82);
      font-size: 1rem;
      line-height: 1.7;
      max-width: 560px;
    }

    /* Course pills row */
    .mds-hero-courses {
      display: flex; flex-wrap: wrap; gap: 8px;
      margin-top: 22px;
    }
    .mds-course-pill {
      display: inline-flex; align-items: center;
      background: rgba(255,255,255,.08);
      border: 1px solid rgba(255,255,255,.16);
      color: #dbe7fb;
      font-size: .76rem; font-weight: 600;
      padding: 6px 12px; border-radius: 8px;
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
      transition: background .18s ease, transform .18s ease, border-color .18s ease;
    }
    .mds-course-pill:hover { background: rgba(96,165,250,.20); border-color: rgba(96,165,250,.5); transform: translateY(-2px); }

    /* Glass stat chips */
    .mds-hero-stats {
      display: flex; flex-wrap: wrap; gap: 12px;
      margin-top: 30px;
    }
    .mds-hero-stat {
      background: rgba(255,255,255,.07);
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 14px;
      padding: 12px 18px;
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      min-width: 118px;
    }
    .mds-hero-stat .num {
      font-size: 1.32rem; font-weight: 800; color: #fff; line-height: 1;
      display: flex; align-items: baseline; gap: 3px;
    }
    .mds-hero-stat .num span { color: #60a5fa; -webkit-text-fill-color: #60a5fa; }
    .mds-hero-stat .lbl {
      font-size: .72rem; color: rgba(233,240,252,.66);
      margin-top: 5px; font-weight: 500; letter-spacing: .2px;
    }

    /* Hero image framing */
    .mds-hero-visual { position: relative; display: inline-block; }
    .mds-hero-visual img {
      max-width: 100%; border-radius: 20px;
      border: 1px solid rgba(255,255,255,.14);
      box-shadow: 0 24px 60px rgba(3,10,26,.55);
    }
    .mds-hero-visual::before {
      content: '';
      position: absolute; inset: -14px;
      border-radius: 26px;
      background: radial-gradient(circle at 50% 50%, rgba(96,165,250,.28), transparent 70%);
      z-index: -1; filter: blur(6px);
    }
    /* Floating "trusted" chip on the image */
    .mds-hero-float {
      position: absolute; left: -14px; bottom: 22px;
      background: #fff; color: #0a1931;
      border-radius: 12px; padding: 10px 14px;
      box-shadow: 0 12px 30px rgba(3,10,26,.35);
      display: flex; align-items: center; gap: 10px;
      font-size: .8rem; font-weight: 700;
    }
    .mds-hero-float i { color: #16a34a; font-size: 1.15rem; }
    .mds-hero-float small { display: block; font-weight: 500; color: #6b7280; font-size: .68rem; margin-top: 1px; }

    @media (max-width: 991px) {
      .mds-hero { padding: 60px 0 44px; text-align: center; }
      .mds-hero-subtitle { margin-left: auto; margin-right: auto; }
      .mds-hero-courses, .mds-hero-stats { justify-content: center; }
    }
    @media (prefers-reduced-motion: reduce) {
      .mds-hero::after, .mds-hero-badge .live-dot { animation: none; }
    }

    /* Trust bar */
    .mds-trust-bar {
      background: #fff;
      border-bottom: 2px solid #e5e7eb;
      padding: 12px 0;
    }
    .mds-trust-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: .82rem;
      font-weight: 600;
      color: #374151;
    }
    .mds-trust-item i { color: var(--mds-primary); font-size: 1.1rem; }

    /* Progress steps */
    .mds-steps {
      display: flex;
      justify-content: center;
      gap: 0;
      margin: 32px 0 28px;
      position: relative;
    }
    .mds-steps::before {
      content: '';
      position: absolute;
      top: 18px; left: 15%;
      width: 70%; height: 2px;
      background: #e5e7eb;
      z-index: 0;
    }
    .mds-step {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      flex: 1;
      max-width: 120px;
      position: relative;
      z-index: 1;
    }
    .mds-step-num {
      width: 36px; height: 36px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: .85rem;
      background: #e5e7eb;
      color: #6b7280;
      border: 2px solid #e5e7eb;
      transition: all .3s;
    }
    .mds-step.active .mds-step-num {
      background: var(--mds-primary);
      border-color: var(--mds-primary);
      color: #fff;
      box-shadow: 0 0 0 4px rgba(13,110,253,.2);
    }
    .mds-step.done .mds-step-num {
      background: var(--mds-success);
      border-color: var(--mds-success);
      color: #fff;
    }
    .mds-step-label {
      font-size: .72rem;
      font-weight: 600;
      color: #9ca3af;
      text-align: center;
      line-height: 1.2;
    }
    .mds-step.active .mds-step-label { color: var(--mds-primary); }
    .mds-step.done  .mds-step-label  { color: var(--mds-success); }

    /* Form card */
    .mds-form-card {
      background: #fff;
      border-radius: 16px;
      box-shadow: 0 4px 30px rgba(0,0,0,.1);
      overflow: hidden;
    }
    .mds-form-header {
      background: linear-gradient(135deg, var(--mds-primary), #0a58ca);
      padding: 18px 24px;
    }
    .mds-form-header h2 { color: #fff; margin: 0; font-size: 1.15rem; font-weight: 700; }
    .mds-form-header p  { color: rgba(255,255,255,.8); margin: 4px 0 0; font-size: .82rem; }
    .mds-form-body { padding: 24px; }

    /* Form fields */
    .mds-form-body .form-control,
    .mds-form-body .form-select {
      border-radius: 8px;
      border: 1.5px solid #e5e7eb;
      padding: 10px 14px;
      font-size: .9rem;
      transition: border-color .2s, box-shadow .2s;
    }
    .mds-form-body .form-control:focus,
    .mds-form-body .form-select:focus {
      border-color: var(--mds-primary);
      box-shadow: 0 0 0 3px rgba(13,110,253,.12);
    }
    .mds-form-body .form-control.is-invalid,
    .mds-form-body .form-select.is-invalid {
      border-color: var(--mds-red);
    }
    .mds-section-label {
      font-size: .72rem;
      font-weight: 700;
      letter-spacing: .8px;
      text-transform: uppercase;
      color: #6b7280;
      margin: 16px 0 8px;
      display: flex; align-items: center; gap: 6px;
    }
    .mds-section-label::after {
      content: ''; flex: 1; height: 1px; background: #e5e7eb;
    }

    /* Submit button */
    .mds-btn-pay {
      width: 100%;
      padding: 14px;
      font-size: 1rem;
      font-weight: 700;
      border-radius: 10px;
      background: linear-gradient(135deg, #0d6efd, #0a58ca);
      border: none;
      color: #fff;
      letter-spacing: .3px;
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
      position: relative;
    }
    .mds-btn-pay:hover:not(:disabled) {
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(13,110,253,.35);
    }
    .mds-btn-pay:disabled { opacity: .7; cursor: not-allowed; transform: none; }
    .mds-btn-pay .spinner-border {
      width: 18px; height: 18px; border-width: 2px;
    }

    /* Amount badge */
    .mds-amount-badge {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #f0f7ff;
      border: 1.5px solid #bfdbfe;
      border-radius: 10px;
      padding: 12px 16px;
      margin-bottom: 16px;
    }
    .mds-amount-badge .label { font-size: .82rem; color: #374151; }
    .mds-amount-badge .amount { font-size: 1.3rem; font-weight: 800; color: var(--mds-primary); }
    .mds-amount-badge .gst { font-size: .72rem; color: #6b7280; margin-top: 2px; }

    /* UPI icons */
    .mds-payment-icons {
      display: flex; gap: 8px; flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .mds-upi-chip {
      background: #f9fafb;
      border: 1px solid #e5e7eb;
      border-radius: 6px;
      padding: 4px 10px;
      font-size: .72rem;
      font-weight: 600;
      color: #374151;
    }

    /* Security note */
    .mds-secure-note {
      display: flex; align-items: center; gap: 6px;
      font-size: .75rem; color: #6b7280;
      justify-content: center;
      margin-top: 10px;
    }


    /* Sidebar info card */
    .mds-info-card {
      background: #fff;
      border-radius: 14px;
      border: 1px solid #e5e7eb;
      overflow: hidden;
      margin-bottom: 16px;
    }
    .mds-info-card-head {
      background: #f8faff;
      border-bottom: 1px solid #e5e7eb;
      padding: 12px 16px;
      font-weight: 700;
      font-size: .85rem;
      display: flex; align-items: center; gap: 8px;
    }
    .mds-info-card-body { padding: 16px; }
    .mds-step-list { list-style: none; padding: 0; margin: 0; }
    .mds-step-list li {
      display: flex; align-items: flex-start; gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid #f3f4f6;
      font-size: .83rem;
      color: #374151;
    }
    .mds-step-list li:last-child { border: none; padding-bottom: 0; }
    .mds-step-list .num {
      min-width: 22px; height: 22px;
      background: var(--mds-primary);
      color: #fff;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: .72rem; font-weight: 700;
      margin-top: 1px;
    }

    /* ── SUCCESS SCREEN ─────────────────────────────────────────── */
    #success-screen { display: none; }
    .mds-success-card {
      background: #fff;
      border-radius: 16px;
      box-shadow: 0 4px 30px rgba(0,0,0,.1);
      overflow: hidden;
    }
    .mds-success-header {
      background: linear-gradient(135deg, #065f46, #059669);
      padding: 32px 24px;
      text-align: center;
    }
    .mds-success-icon {
      width: 70px; height: 70px;
      background: rgba(255,255,255,.2);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 14px;
      font-size: 2rem; color: #fff;
    }
    .mds-success-title { color: #fff; font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
    .mds-success-sub   { color: rgba(255,255,255,.8); font-size: .87rem; margin: 0; }
    .mds-success-body  { padding: 24px; }
    .mds-detail-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 10px 0; border-bottom: 1px solid #f3f4f6;
      font-size: .87rem;
    }
    .mds-detail-row:last-child { border: none; }
    .mds-detail-row .key   { color: #6b7280; }
    .mds-detail-row .value { font-weight: 600; color: #111827; text-align: right; max-width: 60%; word-break: break-all; }
    .mds-inquiry-badge {
      background: #eff6ff;
      border: 2px dashed #3b82f6;
      border-radius: 10px;
      padding: 14px;
      text-align: center;
      margin-bottom: 20px;
    }
    .mds-inquiry-badge .label { font-size: .75rem; color: #6b7280; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
    .mds-inquiry-badge .id    { font-size: 1.3rem; font-weight: 800; color: var(--mds-primary); font-family: 'Courier New', monospace; letter-spacing: 1px; }
    .mds-btn-receipt {
      width: 100%;
      padding: 13px;
      font-weight: 700;
      border-radius: 10px;
      background: linear-gradient(135deg, #059669, #065f46);
      border: none; color: #fff; cursor: pointer;
      font-size: .95rem;
      transition: box-shadow .2s;
    }
    .mds-btn-receipt:hover { box-shadow: 0 6px 18px rgba(5,150,105,.3); }

    /* ── LOADING OVERLAY ────────────────────────────────────────── */
    #fe-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,.65);
      z-index: 2147483647; /* above Razorpay iframe */
      align-items: center; justify-content: center;
      flex-direction: column; gap: 16px;
    }
    #fe-overlay.show { display: flex; }
    #fe-overlay p { color: #fff; font-weight: 600; font-size: .95rem; margin: 0; }

    /* ── NOTIFICATION TOAST ──────────────────────────────────────────
       Clean white card · top-right · slides in from right
       Above Razorpay (z-index max)
    ─────────────────────────────────────────────────────────────── */
    #fe-toast-wrap {
      position: fixed;
      top: 24px;
      right: 24px;
      z-index: 2147483647;
      pointer-events: none;
      width: 340px;
    }
    @media (max-width: 480px) {
      #fe-toast-wrap {
        top: 12px; right: 12px; left: 12px; width: auto;
      }
    }
    #fe-toast {
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 4px 6px -1px rgba(0,0,0,.07),
                  0 10px 24px -4px rgba(0,0,0,.12),
                  0 0 0 1px rgba(0,0,0,.06);
      overflow: hidden;
      opacity: 0;
      pointer-events: none;
      transform: translateX(calc(100% + 32px));
      transition: transform .32s cubic-bezier(.22,1,.36,1),
                  opacity .2s ease;
    }
    #fe-toast.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(0);
    }
    /* Coloured top accent bar */
    .fe-toast-bar {
      height: 3px;
      width: 100%;
    }
    #fe-toast.error   .fe-toast-bar { background: #ef4444; }
    #fe-toast.success .fe-toast-bar { background: #22c55e; }
    #fe-toast.info    .fe-toast-bar { background: #3b82f6; }
    #fe-toast.warning .fe-toast-bar { background: #f59e0b; }
    /* Body */
    .fe-toast-inner {
      display: flex;
      align-items: flex-start;
      gap: 11px;
      padding: 14px 14px 14px 16px;
    }
    /* SVG icon container */
    .fe-toast-icon {
      flex-shrink: 0;
      width: 20px; height: 20px;
      margin-top: 1px;
    }
    .fe-toast-icon svg { width: 20px; height: 20px; display: block; }
    #fe-toast.error   .fe-toast-icon svg { color: #ef4444; }
    #fe-toast.success .fe-toast-icon svg { color: #22c55e; }
    #fe-toast.info    .fe-toast-icon svg { color: #3b82f6; }
    #fe-toast.warning .fe-toast-icon svg { color: #f59e0b; }
    /* Text */
    .fe-toast-body  { flex: 1; min-width: 0; }
    .fe-toast-title {
      font-size: .825rem;
      font-weight: 600;
      color: #111827;
      margin-bottom: 2px;
      line-height: 1.3;
    }
    .fe-toast-msg {
      font-size: .775rem;
      color: #6b7280;
      line-height: 1.45;
    }
    /* Close button */
    .fe-toast-close {
      flex-shrink: 0;
      background: none;
      border: none;
      padding: 2px;
      cursor: pointer;
      color: #9ca3af;
      line-height: 1;
      border-radius: 4px;
      transition: color .15s, background .15s;
      margin-top: 1px;
    }
    .fe-toast-close:hover { color: #374151; background: #f3f4f6; }
    .fe-toast-close svg { width: 14px; height: 14px; display: block; }
    /* Auto-dismiss progress bar */
    .fe-toast-progress {
      height: 2px;
      background: #e5e7eb;
      transform-origin: left;
      transform: scaleX(1);
      transition: transform linear;
    }
    #fe-toast.error   .fe-toast-progress { background: #fca5a5; }
    #fe-toast.success .fe-toast-progress { background: #86efac; }
    #fe-toast.info    .fe-toast-progress { background: #93c5fd; }
    #fe-toast.warning .fe-toast-progress { background: #fcd34d; }

    /* ── RECEIPT PRINT ───────────────────────────────────────────── */
    @media print {
      /* Suppress entire page — receipt prints via printReceipt() in a new window */
      body * { display: none !important; }
    }

    /* ── Secret coupon modal ─────────────────────────────────── */
    #coupon-modal-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,.35);
      z-index: 2147483647;
      align-items: center;
      justify-content: center;
    }
    #coupon-modal-overlay.open { display: flex; }
    #coupon-modal-box {
      background: #fff;
      border-radius: 10px;
      padding: 20px;
      width: 300px;
      box-shadow: 0 8px 32px rgba(0,0,0,.18);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    #coupon-modal-input {
      width: 100%;
      border: 1.5px solid #e5e7eb;
      border-radius: 7px;
      padding: 10px 13px;
      font-size: .95rem;
      font-family: 'Poppins', sans-serif;
      letter-spacing: 1px;
      outline: none;
      text-transform: uppercase;
      transition: border-color .2s;
    }
    #coupon-modal-input:focus { border-color: #0d6efd; }
    #coupon-modal-ok {
      width: 100%;
      padding: 10px;
      background: #0d6efd;
      color: #fff;
      border: none;
      border-radius: 7px;
      font-size: .9rem;
      font-weight: 600;
      cursor: pointer;
      font-family: 'Poppins', sans-serif;
      transition: background .15s;
    }
    #coupon-modal-ok:hover { background: #0b5ed7; }

    /* ── RESPONSIVE ──────────────────────────────────────────────── */
    @media (max-width: 576px) {
      .mds-steps::before { width: 60%; left: 20%; }
      .mds-form-body { padding: 16px; }
    }
/* ============================================================
 *  UNIVERSAL FORM — NEW COMPONENTS
 *  (chips / multi-select / dynamic-field hint)
 * ============================================================ */

/* Dynamic hint shown before a course is picked */
.fe-dynamic-hint {
  background: #f0f6ff;
  border: 1px dashed #b9d3f5;
  color: #345a86;
  font-size: .82rem;
  font-weight: 500;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 4px 0 10px;
}

/* Multi-select group label */
.fe-multi-label {
  font-size: .8rem;
  font-weight: 600;
  color: #374151;
  margin: 2px 0 6px;
}

/* Chip container */
.fe-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 2px;
}
.fe-chip-wrap.is-invalid {
  border: 1px solid #dc2626;
  border-radius: 10px;
  padding: 8px;
  background: #fef2f2;
}

/* Individual chip (checkbox pill) */
.fe-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.fe-chip input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.fe-chip span {
  display: inline-block;
  padding: 7px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 30px;
  transition: all .15s ease;
  line-height: 1.1;
}
.fe-chip:hover span {
  border-color: #94a3b8;
  background: #e9eef5;
}
.fe-chip input:checked + span {
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  border-color: #0a58ca;
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 110, 253, .28);
}
.fe-chip input:focus-visible + span {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Dynamic-field select/input error state matches Bootstrap */
.dyn-field.is-invalid {
  border-color: #dc2626 !important;
}

/* Slightly tighter gaps for dense dynamic rows on mobile */
@media (max-width: 575px) {
  .fe-chip span { padding: 6px 12px; font-size: .76rem; }
}

/* ============================================================
 *  POST-PAYMENT DOCUMENT UPLOAD
 *  (modal shown after success; 21 doc types → Supabase; links
 *   emailed to admin). File-widget styles ported from the NEET UG
 *   counselling page, namespaced fe-* to match this form.
 * ============================================================ */

/* Full-screen modal shell */
.fe-doc-modal-overlay {
  position: fixed; inset: 0; z-index: 2147483200;
  background: rgba(10, 25, 49, .78);
  display: none; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.fe-doc-modal-overlay.open { display: flex; }
.fe-doc-modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 860px; margin: auto;
  box-shadow: 0 30px 80px rgba(3,10,26,.5);
  overflow: hidden; animation: feDocIn .28s ease;
}
@keyframes feDocIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.fe-doc-modal-head {
  background: linear-gradient(135deg, #0a1931 0%, #0d3570 65%, #1a5fb4 100%);
  color: #fff; padding: 18px 22px; position: relative;
}
.fe-doc-modal-head h3 { font-size: 1.12rem; font-weight: 800; margin: 0; }
.fe-doc-modal-head p { font-size: .82rem; margin: 4px 0 0; color: rgba(233,240,252,.82); }
.fe-doc-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  color: #fff; cursor: pointer; font-size: .9rem;
}
.fe-doc-modal-close:hover { background: rgba(255,255,255,.22); }

.fe-doc-modal-body { padding: 20px 22px; max-height: 68vh; overflow-y: auto; }

/* "submit later" alt block */
.fe-doc-alt {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 18px; font-size: .86rem; color: #475569;
}
.fe-doc-alt strong { color: #1e293b; }
.fe-doc-alt .fe-doc-alt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.fe-doc-modal-foot {
  padding: 14px 22px; border-top: 1px solid #eef1f6;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: #f9fafb;
}
.fe-doc-progress { font-size: .82rem; color: #6b7280; font-weight: 600; }
.fe-doc-progress b { color: var(--mds-success); }

/* File widget (ported) */
.fe-file-wrap { position: relative; }
.fe-file-drop {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed #cbd5e1; border-radius: 10px;
  padding: 10px 78px 10px 12px; cursor: pointer;
  background: #f9fafb; transition: border-color .15s, background .15s;
}
.fe-file-drop:hover, .fe-file-drop:focus-within { border-color: var(--mds-primary); background: #f0f7ff; }
.fe-file-drop.has-file { border-style: solid; border-color: var(--mds-success); background: #f0fdf4; }
.fe-file-drop .fe-file-icon {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px;
  background: #e5e7eb; color: #6b7280;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background .15s, color .15s;
}
.fe-file-drop.has-file .fe-file-icon { background: var(--mds-success); color: #fff; }
.fe-file-drop .fe-file-text { flex: 1; min-width: 0; }
.fe-file-drop .fe-file-name {
  font-size: .82rem; font-weight: 600; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.fe-file-drop .fe-file-hint { font-size: .72rem; color: #9ca3af; }
.fe-file-drop input[type="file"] {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; overflow: hidden; clip: rect(0,0,0,0);
}
.fe-file-actions {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  display: none; gap: 4px;
}
.fe-file-wrap.has-file .fe-file-actions { display: flex; }
.fe-file-action-btn {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid #e5e7eb;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: #6b7280; cursor: pointer; font-size: .8rem;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.fe-file-action-btn:hover { background: #f3f4f6; }
.fe-file-action-view:hover { color: var(--mds-primary, #0d6efd); border-color: var(--mds-primary, #0d6efd); }
.fe-file-action-remove:hover { color: #dc2626; border-color: #dc2626; }

/* File preview lightbox */
.fe-file-preview-overlay {
  position: fixed; inset: 0; z-index: 2147483400;
  background: rgba(15, 23, 42, .82);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.fe-file-preview-overlay.open { display: flex; }
.fe-file-preview-box {
  background: #fff; border-radius: 14px; max-width: 92vw; max-height: 88vh;
  width: 480px; display: flex; flex-direction: column; overflow: hidden;
}
.fe-file-preview-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eef1f6; }
.fe-file-preview-head span { font-size: .88rem; font-weight: 700; color: #1f2937; }
.fe-file-preview-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; color: #6b7280; }
.fe-file-preview-body { padding: 16px; overflow: auto; display: flex; align-items: center; justify-content: center; background: #f9fafb; min-height: 200px; }
.fe-file-preview-body img { max-width: 100%; max-height: 60vh; border-radius: 8px; }
.fe-file-preview-body iframe { width: 100%; height: 60vh; border: none; border-radius: 8px; }
.fe-file-preview-fallback { text-align: center; color: #6b7280; font-size: .85rem; }
.fe-file-preview-fallback a { display: inline-block; margin-top: 10px; }

/* Countdown chip on the success screen */
.fe-doc-countdown {
  display: inline-flex; align-items: center; gap: 8px;
  background: #eef4ff; border: 1px solid #cfe0fb; color: #1a4a8c;
  border-radius: 10px; padding: 9px 14px; font-size: .84rem; font-weight: 600;
  margin: 14px 0 4px;
}
.fe-doc-countdown b { font-variant-numeric: tabular-nums; }

@media (max-width: 575px) {
  .fe-doc-modal-body { padding: 16px; }
  .fe-doc-modal-foot { flex-direction: column; align-items: stretch; }
}