/* =============================================
   JOBIO — Design System
   Mobile-first, Minimal UI
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- Sukhumvit Tadmai (Thai font via local or CDN fallback) ---- */
@font-face {
  font-family: 'SukhumvitTadmai';
  src: local('Sukhumvit Set'),
       local('SukhumvitSet-Medium'),
       url('https://fonts.gstatic.com/ea/notosansthai/v1/NotoSansThai-Regular.woff2') format('woff2');
  font-weight: 400;
}

/* ---- CSS Variables ---- */
:root {
  --bg:           #FAFAFA;
  --surface:      #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #6B7280;
  --text-muted:   #9CA3AF;
  --accent:       #0057FF;
  --accent-light: #EEF3FF;
  --accent-glow:  rgba(0, 87, 255, 0.18);
  --accent-dark:  #003FCC;
  --border:       #E8E8EC;
  --border-focus: #0057FF;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:    0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --font-thai:    'SukhumvitTadmai', 'Sukhumvit Set', 'Noto Sans Thai', 'Sarabun', sans-serif;
  --font-en:      'Inter', sans-serif;
  --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-thai);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ล็อก scroll เฉพาะช่วง splash */
body.splash-visible {
  overflow: hidden;
}

/* =============================================
   SPLASH SCREEN
   ============================================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.splash-logo-text {
  font-family: var(--font-en);
  font-size: clamp(52px, 12vw, 80px);
  font-weight: 700;
  letter-spacing: -3px;
  color: var(--text-primary);
  line-height: 1;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  animation: splashReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.splash-logo-text .accent-dot {
  color: var(--accent);
}

.splash-tagline {
  font-family: var(--font-thai);
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(10px);
  animation: splashReveal 0.6s ease 0.7s forwards;
  white-space: nowrap;
}

.splash-loader {
  width: 120px;
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  opacity: 0;
  animation: splashReveal 0.4s ease 1.0s forwards;
}

.splash-loader-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #4D8AFF);
  border-radius: 99px;
  width: 0%;
  animation: loaderFill 1.6s cubic-bezier(0.4, 0, 0.2, 1) 1.1s forwards;
}

@keyframes splashReveal {
  to { opacity: 1; transform: none; }
}

@keyframes loaderFill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

/* =============================================
   MAIN APP WRAPPER
   ============================================= */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#app.visible {
  opacity: 1;
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar / Skip area ---- */
.login-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 24px 0;
}

.btn-skip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-thai);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  letter-spacing: 0.01em;
}

.btn-skip:hover {
  color: var(--text-primary);
  background: var(--border);
}

.btn-skip svg {
  transition: transform var(--transition);
}

.btn-skip:hover svg {
  transform: translateX(3px);
}

/* ---- Hero area ---- */
.login-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px 0;
  text-align: center;
}

.login-brand {
  margin-bottom: 32px;
  animation: fadeUp 0.5s ease 0.1s both;
}

.login-logo {
  font-family: var(--font-en);
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.login-logo .dot {
  color: var(--accent);
}

.login-subtitle {
  font-size: clamp(13px, 3.5vw, 15px);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
}

/* ---- Form card ---- */
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 6vw, 36px);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.5s ease 0.2s both;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-thai);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-input {
  padding-left: 44px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.input-icon-wrap:focus-within .input-icon {
  color: var(--accent);
}

/* Password toggle */
.input-pwd-wrap {
  position: relative;
}

.input-pwd-wrap .form-input {
  padding-left: 44px;
  padding-right: 44px;
}

.btn-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.btn-pwd-toggle:hover { color: var(--text-primary); }

/* Forgot password link */
.forgot-link {
  display: block;
  text-align: right;
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  margin-top: 6px;
  font-weight: 500;
  transition: opacity var(--transition);
}

.forgot-link:hover { opacity: 0.75; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-thai);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.98); }

/* Primary */
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 87, 255, 0.30);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 24px rgba(0, 87, 255, 0.40);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0) scale(0.98); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: rgba(0,0,0,0.02);
}

/* ---- Form footer ---- */
.form-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Register prompt ---- */
.register-prompt {
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-secondary);
  animation: fadeUp 0.5s ease 0.35s both;
  padding-bottom: 32px;
}

.register-prompt a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition);
}

.register-prompt a:hover { opacity: 0.75; }

/* =============================================
   FORGOT PASSWORD MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 28px calc(28px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.10);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 0 auto 24px;
}

.modal-title {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--border);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: #e0e0e0;
  color: var(--text-primary);
}

/* =============================================
   REGISTER PAGE
   ============================================= */
.register-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.page-topbar {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 12px;
}

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

.btn-back:hover { background: var(--border); }

.page-title {
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.register-content {
  flex: 1;
  padding: 8px 28px 40px;
  overflow-y: auto;
}

.register-heading {
  margin-bottom: 28px;
}

.register-heading h2 {
  font-family: var(--font-en);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.register-heading p {
  font-size: 14px;
  color: var(--text-secondary);
}

.step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}

.step-dot {
  height: 3px;
  flex: 1;
  background: var(--border);
  border-radius: 99px;
  transition: background 0.4s ease;
}

.step-dot.active { background: var(--accent); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}

.terms-check label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
}

.terms-check a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

/* =============================================
   JOBS BROWSE PAGE (GUEST)
   ============================================= */
.jobs-page {
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.jobs-header {
  position: sticky;
  top: 0;
  background: rgba(250, 250, 250, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text-primary);
  flex-shrink: 0;
}

.header-logo .dot { color: var(--accent); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.jobs-search-bar {
  padding: 16px 24px 12px;
}

.search-wrap {
  position: relative;
}

.search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font-family: var(--font-thai);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Filter chips */
.filter-chips {
  display: flex;
  gap: 8px;
  padding: 0 24px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  font-family: var(--font-thai);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.chip:hover,
.chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

/* Job listings */
.jobs-list {
  flex: 1;
  padding: 8px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeUp 0.4s ease both;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.job-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--accent-glow);
  transform: translateY(-2px);
}

.job-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.company-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  border: 1px solid rgba(0,87,255,0.12);
}

.job-info { flex: 1; min-width: 0; }

.job-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-company {
  font-size: 13px;
  color: var(--text-secondary);
}

.job-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.job-badge.new {
  background: #ECFDF5;
  color: #059669;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 99px;
}

.job-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.job-salary {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.job-salary span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.btn-apply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: var(--font-thai);
  font-size: 13px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-apply:hover {
  background: var(--accent-dark);
  transform: scale(1.03);
}

/* Guest CTA banner */
.guest-cta {
  margin: 0 20px 20px;
  background: linear-gradient(135deg, #0057FF 0%, #4D8AFF 100%);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 6px 24px rgba(0,87,255,0.25);
}

.guest-cta-text h3 {
  font-family: var(--font-en);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.guest-cta-text p {
  font-size: 12.5px;
  color: rgba(255,255,255,0.80);
  line-height: 1.4;
}

.btn-cta-white {
  flex-shrink: 0;
  padding: 10px 18px;
  font-family: var(--font-thai);
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-cta-white:hover {
  background: rgba(255,255,255,0.90);
  transform: scale(1.03);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* =============================================
   PAGE TRANSITIONS
   ============================================= */
.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(30px);
}

.page.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  position: relative;
}

.page.slide-out-left {
  opacity: 0;
  transform: translateX(-30px);
}

/* =============================================
   NOTIFICATION TOAST
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 99px;
  font-size: 13.5px;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}

/* =============================================
   DESKTOP ENHANCEMENTS
   ============================================= */
@media (min-width: 768px) {
  .login-hero {
    padding-top: 60px;
  }

  .login-card {
    padding: 40px;
  }

  .modal-overlay {
    align-items: center;
  }

  .modal-sheet {
    border-radius: var(--radius-xl);
    max-width: 420px;
    transform: translateY(30px) scale(0.96);
  }

  .modal-overlay.open .modal-sheet {
    transform: none;
  }

  .jobs-header {
    padding: 16px 40px;
  }

  .jobs-search-bar {
    padding: 20px 40px 12px;
  }

  .filter-chips {
    padding: 0 40px 16px;
  }

  .jobs-list {
    padding: 8px 36px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    align-content: start;
  }

  .guest-cta {
    margin: 0 36px 24px;
  }
}

@media (min-width: 1024px) {
  .jobs-page {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
  }

  .jobs-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =============================================
   SAFE AREA (Notch / Home Indicator)
   ============================================= */
@supports (padding: env(safe-area-inset-bottom)) {
  .login-page,
  .jobs-page {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* =============================================
   SCROLLBAR (Desktop)
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: #C0C0C8; }

/* =============================================
   EMPLOYER LOGIN LINK (Login Page)
   ============================================= */
.employer-login-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  animation: fadeUp 0.5s ease 0.45s both;
}

.employer-login-link a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 1px;
}

.employer-login-link a:hover { color: var(--text-primary); }

/* =============================================
   ROLE TAB SWITCHER
   ============================================= */
.role-tabs {
  display: flex;
  background: var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 0 24px 4px;
  gap: 4px;
}

.role-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  font-family: var(--font-thai);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.role-tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.6);
}

.role-tab.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.role-tab svg {
  flex-shrink: 0;
}

/* =============================================
   EMPLOYER BANNER
   ============================================= */
.employer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #EEF3FF 0%, #F5F8FF 100%);
  border: 1px solid rgba(0,87,255,0.12);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 22px;
  animation: fadeUp 0.4s ease 0.1s both;
}

.employer-banner-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  border: 1px solid rgba(0,87,255,0.15);
}

.employer-banner-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
}

.employer-banner-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =============================================
   FORM SECTION LABEL
   ============================================= */
.form-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* =============================================
   SELECT DROPDOWN
   ============================================= */
.select-wrap {
  position: relative;
}

.select-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition);
}

.select-wrap:focus-within .select-icon { color: var(--accent); }

.form-select {
  padding-left: 44px;
  padding-right: 38px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--bg);
}

.form-select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* =============================================
   FORM EXTRAS
   ============================================= */
.required-star {
  color: #EF4444;
  margin-left: 2px;
}

.label-optional {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Package info box */
.package-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: #166534;
  line-height: 1.5;
}

.package-info svg {
  flex-shrink: 0;
  color: #16A34A;
  margin-top: 1px;
}

@media (min-width: 768px) {
  .role-tabs {
    margin: 0 40px 4px;
  }
}
