/* ==========================================================================
   KACST Career & Recruitment Application Portal Stylesheet
   Modern Institutional & Premium Academic Design System
   ========================================================================== */

:root {
  --primary-navy: #0d3880;
  --primary-dark: #071e46;
  --secondary-blue: #1d4ed8;
  --blue-light: #eff6ff;
  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --accent-gold-hover: #b45309;
  --success-emerald: #059669;
  --success-bg: #ecfdf5;
  --danger-crimson: #dc2626;
  --danger-bg: #fef2f2;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --font-bn: 'Hind Siliguri', 'Tiro Bangla', sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', 'Hind Siliguri', sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-en);
  background: linear-gradient(135deg, #091a38 0%, #0d2b5c 50%, #081d3d 100%);
  color: var(--slate-800);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Ambient Glows */
.portal-bg-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: #3b82f6;
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: #f59e0b;
  bottom: -150px;
  right: -100px;
  opacity: 0.12;
}

/* Header Navbar */
.portal-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 33, 67, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-combo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border-radius: 50%;
  padding: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  object-fit: contain;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.college-name-en {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.college-name-bn {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 600;
}

.bteb-tag {
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-btn-secondary {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transform: translateY(-1px);
}

.nav-btn-admin {
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.2);
  border-color: rgba(217, 119, 6, 0.4);
}

.nav-btn-admin:hover {
  background: var(--accent-gold);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Page Layout */
.portal-main {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 30px auto 60px;
  padding: 0 20px;
}

/* Hero Notice Card */
.notice-hero-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 30px;
  box-shadow: var(--shadow-xl);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.notice-badge-group {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.meta-badge.gold {
  background: #fef3c7;
  color: #b45309;
}

.hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 6px;
}

.hero-subtitle {
  font-size: 14.5px;
  color: var(--slate-600);
}

.quick-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 110px;
}

.stat-box.highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
}

.stat-label {
  font-size: 11.5px;
  color: var(--slate-600);
  font-weight: 600;
}

/* Two Column Application Grid */
.portal-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

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

/* Application Form Card */
.form-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-header-section {
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.form-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-heading-icon {
  width: 32px;
  height: 32px;
  background: #eff6ff;
  color: var(--secondary-blue);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.form-subheading {
  font-size: 13.5px;
  color: var(--slate-500);
  margin-top: 4px;
}

/* Form Groups & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 7px;
}

.req-star {
  color: var(--danger-crimson);
  font-weight: bold;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--slate-400);
  font-size: 17px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--slate-800);
  background: #f8fafc;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.2s ease;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  appearance: none;
}

.form-textarea {
  padding-left: 14px;
  resize: vertical;
  min-height: 80px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  background: #ffffff;
  border-color: var(--secondary-blue);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.form-input.is-invalid, .form-select.is-invalid {
  border-color: var(--danger-crimson);
  background-color: #fffbfb;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-hint {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 5px;
  display: block;
}

.error-text {
  font-size: 12px;
  color: var(--danger-crimson);
  margin-top: 5px;
  display: none;
  font-weight: 500;
}

.error-text.show {
  display: block;
}

/* Department Info Card (Live details on dropdown change) */
.dept-info-callout {
  display: none;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

.dept-info-callout.show {
  display: block;
}

.dic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.dic-role {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--primary-navy);
}

.dic-vacancy {
  font-size: 12px;
  font-weight: 600;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  border-radius: 20px;
}

.dic-qual {
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
}

/* Drag and Drop File Upload Area */
.file-dropzone {
  border: 2px dashed var(--slate-300);
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.file-dropzone:hover, .file-dropzone.drag-active {
  border-color: var(--secondary-blue);
  background: #f0f7ff;
  transform: translateY(-1px);
}

.file-dropzone.drag-active {
  border-style: solid;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.15);
}

.dropzone-icon-wrap {
  width: 52px;
  height: 52px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.file-dropzone:hover .dropzone-icon-wrap {
  transform: scale(1.08);
}

.dropzone-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 4px;
}

.dropzone-subtitle {
  font-size: 12.5px;
  color: var(--slate-500);
  margin-bottom: 10px;
}

.dropzone-formats {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.format-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

/* File Selected Preview Box */
.file-selected-box {
  display: none;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-selected-box.show {
  display: flex;
}

.fsb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.fsb-file-icon {
  font-size: 28px;
}

.fsb-meta {
  overflow: hidden;
}

.fsb-name {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.fsb-size {
  font-size: 11.5px;
  color: #15803d;
}

.fsb-remove-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.fsb-remove-btn:hover {
  background: #fee2e2;
}

/* Checkbox Agreement */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--secondary-blue);
  cursor: pointer;
}

.checkbox-label {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.4;
}

/* Submit Button & Progress */
.btn-submit-app {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #0d3880 0%, #1e40af 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(13, 56, 128, 0.35);
  transition: all 0.25s ease;
}

.btn-submit-app:hover {
  background: linear-gradient(135deg, #1b4d9b 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(13, 56, 128, 0.45);
  transform: translateY(-2px);
}

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

.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.btn-submit-app.loading .btn-spinner {
  display: inline-block;
}

.btn-submit-app.loading .btn-text-content {
  opacity: 0.8;
}

/* Side Info Panel */
.side-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.side-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dept-pill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dept-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.dept-item-name {
  font-weight: 600;
  color: var(--slate-800);
}

.dept-item-vac {
  font-size: 11.5px;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--slate-700);
  padding: 2px 8px;
  border-radius: 12px;
}

.dept-item-vac.highlight {
  background: #dbeafe;
  color: #1e40af;
}

.contact-card-box {
  background: linear-gradient(135deg, #091c3d 0%, #0d2b5c 100%);
  color: #ffffff;
}

.contact-card-box .side-card-title {
  color: #fbbf24;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 12px;
}

.contact-line strong {
  color: #fff;
}

.contact-line a {
  color: #93c5fd;
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

/* Success Confirmation Overlay Modal */
.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.success-modal.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.success-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 6px solid var(--success-emerald);
}

.success-check-icon {
  width: 68px;
  height: 68px;
  background: #dcfce7;
  color: var(--success-emerald);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  margin-bottom: 18px;
}

.success-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.success-desc {
  font-size: 14px;
  color: var(--slate-600);
  margin-bottom: 20px;
}

.tracking-slip-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
  text-align: left;
}

.tracking-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tracking-number-val {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: 1px;
}

.tracking-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid #e2e8f0;
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-modal-action {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-modal-action.primary {
  background: var(--primary-navy);
  color: #fff;
}

.btn-modal-action.secondary {
  background: #e2e8f0;
  color: var(--slate-700);
}

.btn-modal-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Footer */
.portal-footer {
  text-align: center;
  padding: 24px 20px;
  color: #94a3b8;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

/* ==========================================================================
   SUPER MOBILE FRIENDLY RESPONSIVE DESIGN (Tablets & Smartphones)
   ========================================================================== */
@media (max-width: 900px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    padding: 10px 14px;
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .brand-combo {
    justify-content: flex-start;
  }

  .brand-logo-img {
    width: 42px;
    height: 42px;
  }

  .college-name-en {
    font-size: 13.5px;
    line-height: 1.25;
  }

  .bteb-tag {
    font-size: 10.5px;
  }

  .nav-links {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .nav-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
    min-height: 44px;
  }

  .portal-hero {
    padding: 24px 12px 20px;
  }

  .hero-headline {
    font-size: 26px;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .hero-tagline {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  .hero-cta-btns {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .btn-cta-primary, .btn-cta-secondary {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    min-height: 48px;
  }

  .quick-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
  }

  .stat-box {
    min-width: unset;
    padding: 10px 8px;
  }

  .stat-number {
    font-size: 18px;
  }

  .stat-label {
    font-size: 11px;
  }

  .portal-main {
    margin: 16px auto 40px;
    padding: 0 12px;
  }

  .positions-section {
    padding: 20px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
  }

  .positions-title {
    font-size: 17px;
  }

  .grid-dept-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dept-card-item {
    padding: 12px 14px;
  }

  .form-card {
    padding: 22px 14px;
    border-radius: var(--radius-md);
  }

  .form-heading {
    font-size: 18px;
  }

  .form-subheading {
    font-size: 12.5px;
  }

  /* Prevent mobile browser zoom on focus by ensuring 16px font-size */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important;
    padding: 12px 12px 12px 38px;
    min-height: 48px;
  }

  .form-textarea {
    padding-left: 12px;
  }

  .input-icon {
    left: 12px;
    font-size: 16px;
  }

  .file-dropzone {
    padding: 22px 14px;
  }

  .dropzone-title {
    font-size: 14px;
  }

  .dropzone-subtitle {
    font-size: 12px;
  }

  .btn-submit-app {
    padding: 16px 20px;
    font-size: 15.5px;
    min-height: 52px;
  }

  .success-card {
    padding: 24px 16px;
    margin: 10px;
  }

  .tracking-number-val {
    font-size: 17px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .btn-modal-action {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 23px;
  }

  .quick-stats-row {
    grid-template-columns: 1fr;
  }

  .stat-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    text-align: left;
  }

  .college-name-en {
    font-size: 12.5px;
  }
}
