/* WTC-LMS Online Admission Stylesheet */
:root {
  --wtc-navy: #1a365d;
  --wtc-navy-dark: #0f172a;
  --wtc-blue: #0284c7;
  --wtc-blue-light: #e0f2fe;
  --wtc-gold: #d97706;
  --wtc-gold-light: #fef3c7;
  --wtc-green: #059669;
  --wtc-card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f8fafc;
  color: #334155;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.admission-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  color: white;
  border-bottom: 3px solid var(--wtc-gold);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: #93c5fd;
}

/* Hero Section */
.hero-section {
  background: radial-gradient(circle at top right, rgba(2, 132, 199, 0.15), transparent 50%),
              radial-gradient(circle at bottom left, rgba(217, 119, 6, 0.1), transparent 50%),
              #f8fafc;
  padding: 3.5rem 0 2rem;
}

.badge-year {
  background-color: #dbeafe;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #bfdbfe;
}

/* Cards for Level Selection */
.level-card {
  border: 2px solid transparent;
  border-radius: 1.25rem;
  background: white;
  box-shadow: var(--wtc-card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.level-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.12);
}

.level-card.card-vc {
  border-color: #e2e8f0;
}
.level-card.card-vc:hover {
  border-color: #3b82f6;
}

.level-card.card-dvt {
  border-color: #fed7aa;
  position: relative;
}
.level-card.card-dvt:hover {
  border-color: #f97316;
}

.card-header-badge {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.level-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.icon-vc {
  background: #eff6ff;
  color: #2563eb;
}

.icon-dvt {
  background: #fff7ed;
  color: #ea580c;
}

.level-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.level-desc {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 0;
}

.card-body-content {
  padding: 1.75rem 2rem;
  flex-grow: 1;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.feature-list li {
  padding: 0.4rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #475569;
}

.feature-list li i {
  color: #10b981;
  margin-top: 0.25rem;
}

.program-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.program-pill {
  font-size: 0.8rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

/* Card Action Buttons */
.btn-select-level {
  border-radius: 0.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

/* Quick Status Check Card */
.status-search-card {
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: var(--wtc-card-shadow);
  padding: 2rem;
}

/* ==========================================================================
   Form Card Theming, Step Badges & Responsive Enhancements
   ========================================================================== */

/* Step Number Badge */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  margin-right: 0.65rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Card Base Enhancements */
.form-section-card {
  background: #ffffff; /* สีขาวสะอาดตา */
  border-radius: 1.25rem;
  border: 1px solid #e2e8f0;
  padding: 2.25rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.form-section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: #cbd5e1;
}

.form-section-card:hover {
  transform: translateY(-2px);
}

.form-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  border-left: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.form-section-title .title-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* 0. Curriculum / System Selection - Indigo */
.card-theme-curriculum {
  border-color: #c7d2fe;
  box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.08), 0 8px 10px -6px rgba(99, 102, 241, 0.04);
}
.card-theme-curriculum::before {
  background: linear-gradient(90deg, #4f46e5, #818cf8);
}
.card-theme-curriculum .step-badge {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}
.card-theme-curriculum .form-section-title {
  color: #3730a3;
  border-bottom-color: #e0e7ff;
}

/* 1. Personal Info - Sky Blue / Navy */
.card-theme-personal {
  border-color: #bae6fd;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.08), 0 8px 10px -6px rgba(2, 132, 199, 0.04);
}
.card-theme-personal::before {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.card-theme-personal .step-badge {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}
.card-theme-personal .form-section-title {
  color: #075985;
  border-bottom-color: #e0f2fe;
}

/* 2. Address & Contact - Teal / Emerald */
.card-theme-address {
  border-color: #99f6e4;
  box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.08), 0 8px 10px -6px rgba(13, 148, 136, 0.04);
}
.card-theme-address::before {
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
}
.card-theme-address .step-badge {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.35);
}
.card-theme-address .form-section-title {
  color: #115e59;
  border-bottom-color: #ccfbf1;
}

/* 3. Education - Warm Amber */
.card-theme-education {
  border-color: #fde68a;
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.08), 0 8px 10px -6px rgba(217, 119, 6, 0.04);
}
.card-theme-education::before {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}
.card-theme-education .step-badge {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}
.card-theme-education .form-section-title {
  color: #92400e;
  border-bottom-color: #fef3c7;
}

/* 4. Major Selection - Purple / Violet */
.card-theme-major {
  border-color: #ddd6fe;
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.08), 0 8px 10px -6px rgba(124, 58, 237, 0.04);
}
.card-theme-major::before {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}
.card-theme-major .step-badge {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35);
}
.card-theme-major .form-section-title {
  color: #5b21b6;
  border-bottom-color: #ede9fe;
}

/* 5. Payment - Green / Emerald */
.card-theme-payment {
  border-color: #a7f3d0 !important;
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.08), 0 8px 10px -6px rgba(5, 150, 105, 0.04) !important;
}
.card-theme-payment::before {
  background: linear-gradient(90deg, #059669, #34d399);
}
.card-theme-payment .step-badge {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}
.card-theme-payment .form-section-title {
  color: #065f46;
  border-bottom-color: #d1fae5;
}

/* 6. Documents - Cyan / Teal */
.card-theme-docs {
  border-color: #a5f3fc;
  box-shadow: 0 10px 25px -5px rgba(8, 145, 178, 0.08), 0 8px 10px -6px rgba(8, 145, 178, 0.04);
}
.card-theme-docs::before {
  background: linear-gradient(90deg, #0891b2, #22d3ee);
}
.card-theme-docs .step-badge {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  box-shadow: 0 4px 10px rgba(8, 145, 178, 0.35);
}
.card-theme-docs .form-section-title {
  color: #155e75;
  border-bottom-color: #cffafe;
}

/* Interactive Radio Tile Selection Cards */
.radio-tile-card {
  position: relative;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  height: 100%;
}
.radio-tile-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.06);
}
.radio-tile-card:has(input[type="radio"]:checked) {
  border-color: #4f46e5;
  background: #f5f7ff;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.18);
}
.radio-tile-card.theme-danger:has(input[type="radio"]:checked) {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 8px 20px -4px rgba(220, 38, 38, 0.18);
}
.radio-tile-card.theme-success:has(input[type="radio"]:checked) {
  border-color: #059669;
  background: #f0fdf4;
  box-shadow: 0 8px 20px -4px rgba(5, 150, 105, 0.18);
}
.radio-tile-card.theme-secondary:has(input[type="radio"]:checked) {
  border-color: #475569;
  background: #f8fafc;
  box-shadow: 0 8px 20px -4px rgba(71, 85, 105, 0.15);
}

/* Form Controls & Inputs Polish */
.form-label {
  color: #1e293b;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}
.form-label.fw-semibold {
  font-weight: 600;
}

.form-control, .form-select {
  border: 1.5px solid #cbd5e1;
  border-radius: 0.65rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.95rem;
  color: #1e293b;
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.form-control:focus, .form-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
  background-color: #ffffff;
}

.input-group-text {
  border: 1.5px solid #cbd5e1;
  background-color: #f8fafc;
  color: #64748b;
  border-radius: 0.65rem;
  padding: 0.65rem 0.9rem;
}

.required-star {
  color: #ef4444;
  font-weight: bold;
}

/* Sub-Information Box */
.info-subcard {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 1.25rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.info-subcard:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Document Item Box */
.doc-item-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 1.15rem;
  height: 100%;
  transition: all 0.2s ease;
}
.doc-item-box:hover {
  border-color: #0891b2;
  background: #f0fdfa;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(8, 145, 178, 0.08);
}
.doc-item-box:focus-within {
  border-color: #0891b2;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  background: #f8fafc;
  transition: all 0.2s ease;
  cursor: pointer;
}

.upload-box:hover {
  border-color: var(--wtc-blue);
  background: #f0f9ff;
}

.photo-preview-box {
  width: 120px;
  height: 150px;
  border: 2px dashed #94a3b8;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
  margin: 0 auto 0.75rem;
  transition: all 0.2s ease;
}
.photo-preview-box:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

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

/* Submit Section Box */
.submit-confirmation-card {
  background: #ffffff; /* สีขาวสะอาดตา */
  border: 1.5px solid #e2e8f0;
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

/* Responsive Rules for Mobile / Smartphone Screen */
@media (max-width: 767.98px) {
  .form-section-card {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .form-section-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    flex-direction: column;
    align-items: flex-start !important;
  }

  .step-badge {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    margin-right: 0.5rem;
  }

  .form-control, .form-select {
    padding: 0.6rem 0.8rem;
    font-size: 16px; /* Prevents iOS auto-zoom */
  }

  .radio-tile-card {
    padding: 1rem;
  }

  .btn-submit-admission {
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    font-size: 1.1rem !important;
  }

  .submit-confirmation-card {
    padding: 1.5rem 1rem;
    margin-bottom: 2rem;
  }

  .table-responsive {
    font-size: 0.85rem;
  }
}

/* Footer */
.admission-footer {
  margin-top: auto;
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
}

/* Print Styles (Form อสท.19) */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm 8mm 10mm;
  }
  
  body {
    background: white !important;
    color: black !important;
    font-family: 'Sarabun', 'TH Sarabun New', sans-serif !important;
    font-size: 13pt;
    line-height: 1.35;
    margin: 0;
    padding: 0;
  }

  .no-print {
    display: none !important;
  }

  .print-page-container {
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .print-header-logo {
    width: 65px;
    height: 65px;
  }
}

/* ป้องกันสีพื้นหลังเพี้ยนจาก Browser Autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #212529 !important;
  transition: background-color 5000s ease-in-out 0s;
}

