:root {
  --primary: #4B7BE5;
  --accent: #FFB703;
  --bg: #F8F9FA;
  --text: #2C2C2C;
  --card: #ffffff;
  --muted: #6c757d;
  --success: #22c55e;
  --info: #4B7BE5;
  --warn: #FFB703;
  --danger: #ef4444;
  --shadow: 0 10px 20px rgba(0,0,0,0.06);
}

/* Dark mode overrides */
body.dark {
  --bg: #1f2937;
  --text: #e5e7eb;
  --card: #111827;
  --muted: #9ca3af;
  --shadow: 0 10px 20px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
h1, h2, h3, h4 { font-family: 'Poppins', 'Inter', sans-serif; margin: 0 0 8px; }
.muted { color: var(--muted); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; backdrop-filter: saturate(180%) blur(8px); background: rgba(255,255,255,0.75); border-bottom: 1px solid rgba(0,0,0,0.06); }
body.dark .site-header { background: rgba(31,41,55,0.75); border-bottom-color: rgba(255,255,255,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; text-decoration: none; color: var(--text); display: flex; align-items: center; gap: 10px; font-size: 24px; }
.logo-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), #7aa3ff); color: #fff; font-weight: 800; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.nav a { color: var(--text); text-decoration: none; margin: 0 12px; padding: 8px 6px; border-radius: 8px; }
.nav a:hover { background: rgba(75, 123, 229, 0.15); }
.nav a.active { color: var(--primary); font-weight: 700; }
.actions { display: flex; gap: 10px; }
.actions .btn.small, .actions button { height: 32px; }
.icon-btn, .actions button { background: transparent; border: none; color: var(--text); cursor: pointer; font-size: 16px; }
.modal .icon-btn { 
  width: 32px; 
  height: 32px; 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: background-color 0.2s ease;
  margin-left: auto;
}
.modal .icon-btn:hover { 
  background: rgba(0, 0, 0, 0.1); 
}

/* Hero */
.hero { padding: 56px 0 24px; background: linear-gradient(180deg, rgba(75,123,229,0.10), transparent); }
.hero-title { font-size: 32px; }
.hero-sub { color: var(--muted); margin-bottom: 16px; }

.sub-hero { padding: 32px 0 8px; background: linear-gradient(180deg, rgba(75,123,229,0.08), transparent); }

/* Search bar */
.search-bar { display: grid; grid-template-columns: 1fr repeat(4, minmax(160px, 1fr)) auto; gap: 10px; background: var(--card); padding: 12px; border-radius: 14px; box-shadow: var(--shadow); }
.search-bar input, .search-bar select { height: 40px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.1); padding: 0 12px; background: transparent; color: var(--text); }
.search-bar input::placeholder { color: var(--muted); }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--card); border: 1px solid rgba(0,0,0,0.08); box-shadow: var(--shadow); color: var(--text); padding: 6px 10px; border-radius: 20px; cursor: pointer; }
.chip:hover { background: rgba(75,123,229,0.12); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; border-radius: 10px; border: none; padding: 0 14px; cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.secondary { background: var(--accent); color: #1f2937; }
.btn.link { background: transparent; color: var(--primary); }
.btn.small { height: 32px; font-size: 13px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.space-between { justify-content: space-between; }
.half { flex: 1; }

/* Sections */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 12px; }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.card-title { font-size: 22px; margin-bottom: 8px; }
.card-row { display: flex; align-items: center; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(75,123,229,0.12); color: var(--primary); padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.badge.verified { background: rgba(84, 255, 179, 0.12); color: #10b981; }
.meta { color: var(--muted); font-size: 13px; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }

/* Status Summary */
.status-summary { margin-top: 12px; }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.status-card { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; }
.status-label { font-weight: 700; }
.status-label.pending { color: var(--warn); }
.status-label.accepted { color: var(--success); }
.status-label.rejected { color: var(--danger); }

/* Footer */
.site-footer { margin-top: 40px; padding: 24px 0; background: var(--primary); color: #fff; border-top: none; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .muted { color: rgba(255,255,255,0.85); }

/* Sticky footer layout: keep footer at bottom when content is short */
html, body { height: 100%; }
body { min-height: 100vh; display: flex; flex-direction: column; }
.site-header { flex-shrink: 0; }
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

/* Toasts */
.toast-container { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #fff; box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.toast.success { background: #10b981; }
.toast.info { background: #2563eb; }
.toast.warn { background: #f59e0b; }
.toast .close { border: none; background: transparent; color: #fff; cursor: pointer; }

/* Modal */
.modal { border: none; border-radius: 14px; padding: 0; background: transparent; }
.modal::backdrop { background: rgba(0,0,0,0.35); }
.modal-content { background: var(--card); border: 1px solid rgba(0,0,0,0.08); box-shadow: var(--shadow); border-radius: 14px; padding: 16px; min-width: 360px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.modal-content label { display: grid; gap: 6px; margin-bottom: 8px; }
.modal-content input, .modal-content select { height: 40px; border: 1px solid rgba(0,0,0,0.1); border-radius: 10px; padding: 0 10px; background: transparent; color: var(--text); }
.modal-content textarea { border: 1px solid rgba(0,0,0,0.1); border-radius: 10px; padding: 10px; background: transparent; color: var(--text); resize: vertical; font-family: inherit; }
.modal-content input[type="file"] { height: auto; padding: 8px 10px; }

/* Submission Modal Styling */
#submissionModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#submissionModal .modal-content {
  min-width: 400px;
  max-width: 600px;
  width: 85vw;
  max-height: 85vh;
  overflow-y: auto;
}

#submissionModal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

#submissionModal .form-group {
  margin-bottom: 16px;
}

#submissionModal .form-group input,
#submissionModal .form-group textarea,
#submissionModal .form-group select {
  width: 100%;
  box-sizing: border-box;
}

/* Responsive adjustments for submission modal */
@media (max-width: 768px) {
  #submissionModal .modal-content {
    min-width: 320px;
    width: 95vw;
    max-height: 90vh;
  }
  
  #submissionModal .modal-body {
    max-height: 70vh;
  }
}

/* Confirmation Modal Styling */
#confirmationModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#confirmationModal .modal-content {
  min-width: 350px;
  max-width: 500px;
  width: 80vw;
}

.confirmation-content { text-align: center; padding: 20px 0; }
.success-icon { font-size: 48px; color: #10b981; margin-bottom: 16px; }
.confirmation-content p { margin: 12px 0; line-height: 1.5; }

/* Enhanced Apply Modal */
#applyModal .modal-content { min-width: 500px; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.modal-body { margin: 16px 0; }
.job-header { margin-bottom: 20px; }
.job-header h4 { margin: 0 0 4px 0; color: var(--text); font-size: 20px; }
.job-header p { margin: 0; font-size: 14px; color: var(--muted); }
.job-details { display: grid; gap: 16px; }
.detail-section h5 { margin: 0 0 8px 0; color: var(--text); font-size: 16px; font-weight: 600; }
.detail-section p { margin: 0; line-height: 1.5; color: var(--muted); }

/* Modal Descriptions and Help Text */
.modal-description { margin-bottom: 20px; padding: 12px; background: rgba(59, 130, 246, 0.1); border-radius: 8px; border-left: 3px solid #3b82f6; }
.modal-description p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.5; }
.help-text { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.section-description { margin: 8px 0 16px 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Checkbox Labels */
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; cursor: pointer; }
.checkbox-label input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.checkbox-label span { font-size: 14px; line-height: 1.4; }

/* File Upload Section */
.file-upload-section { margin: 20px 0; padding: 16px; background: rgba(0,0,0,0.02); border-radius: 8px; border: 1px dashed rgba(0,0,0,0.1); }
.file-upload-section h4 { margin: 0 0 8px 0; color: var(--text); font-size: 16px; font-weight: 600; }

/* Terms and Login Options */
.terms-section, .login-options { margin: 16px 0; }
.modal-footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.1); text-align: center; }
.register-prompt, .login-prompt { margin: 0; font-size: 14px; }

/* Application Status and Instructions */
.application-status { margin-top: 8px; }
.status-badge { display: inline-block; padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-badge.verified { background: #dcfce7; color: #166534; }

.application-instructions { margin: 24px 0; padding: 16px; background: rgba(0,0,0,0.02); border-radius: 8px; }
.application-instructions h5 { margin: 0 0 16px 0; color: var(--text); font-size: 16px; font-weight: 600; }
.instruction-steps { display: grid; gap: 12px; margin-bottom: 16px; }
.step { display: flex; align-items: flex-start; gap: 12px; }
.step-number { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: #3b82f6; color: white; border-radius: 50%; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.step p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.application-note { padding: 12px; background: rgba(245, 158, 11, 0.1); border-radius: 6px; border-left: 3px solid #f59e0b; }
.application-note p { margin: 0; font-size: 13px; color: var(--text); }
.detail-section ul { margin: 0; padding-left: 20px; }
.detail-section li { margin-bottom: 4px; color: var(--muted); line-height: 1.4; }
.job-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding: 16px; background: rgba(0,0,0,0.02); border-radius: 8px; }
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.info-item span:last-child { font-size: 14px; color: var(--text); font-weight: 500; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.1); }
.btn-secondary { padding: 8px 16px; border: 1px solid rgba(0,0,0,0.2); background: transparent; color: var(--text); border-radius: 6px; cursor: pointer; }
.btn-primary { padding: 8px 16px; border: none; background: var(--primary); color: white; border-radius: 6px; cursor: pointer; }

/* Forms */
form label { display: grid; gap: 6px; margin-bottom: 10px; }
input, select { height: 40px; border: 1px solid rgba(0,0,0,0.1); border-radius: 10px; padding: 0 10px; background: transparent; color: var(--text); }
input::placeholder { color: var(--muted); }

/* Layout: keep footer at bottom on login page */
body[data-page="login"] { display: flex; flex-direction: column; min-height: 100vh; }
body[data-page="login"] main { flex: 1; }
/* Layout: center register form and keep footer at bottom */
body[data-page="register"] { display: flex; flex-direction: column; min-height: 100vh; }
body[data-page="register"] main { flex: 1; display: grid; place-items: center; padding-top: 40px; padding-bottom: 24px; }
/* Layout: center profile card and match login sizing */
body[data-page="profile"] { display: flex; flex-direction: column; min-height: 100vh; }
body[data-page="profile"] main { flex: 1; display: grid; place-items: center; padding-top: 40px; padding-bottom: 24px; }
/* Profile card design */
body[data-page="profile"] .card.profile-card {
  /* Inherit base .card styles to get glass effect in dark mode */
  border-radius: 14px;
  padding: 48px;
  position: relative;
  width: 100%;
  max-width: 720px;
  text-align: center;
}
body[data-page="profile"] .profile-card h3 { margin: 10px 0; }
body[data-page="profile"] .profile-card h6 { margin: 5px 0; text-transform: uppercase; color: #8f93a3; }
body[data-page="profile"] .profile-card p { font-size: 14px; line-height: 21px; margin: 6px 0 0; }
body[data-page="profile"] .profile-card .pro {
  color: #231E39;
  background-color: #FEBB0B;
  border-radius: 3px;
  font-size: 14px;
  font-weight: bold;
  padding: 3px 7px;
  position: absolute;
  top: 30px;
  left: 30px;
}
body[data-page="profile"] .profile-card .round {
  border: 1px solid #03BFCB;
  border-radius: 50%;
  padding: 7px;
  width: 120px;
  height: 120px;
  object-fit: cover;
}
body[data-page="profile"] .profile-card .buttons { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
body[data-page="profile"] .profile-card .skills { background: transparent; text-align: left; padding: 15px; margin-top: 30px; }
body[data-page="profile"] .profile-card .skills h6 { margin: 0 0 10px; color: #b3b8cd; }
body[data-page="profile"] .profile-card .skills ul { list-style: none; margin: 0; padding: 0; }
body[data-page="profile"] .profile-card .skills ul li {
  border: 1px solid #2D2747;
  border-radius: 2px;
  display: inline-block;
  font-size: 12px;
  margin: 0 7px 7px 0;
  padding: 7px;
}
/* Dark mode: rely on global .card glass effect */

/* Edit Profile Modal Styles */
#editProfileModal .profile-image-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  margin-bottom: 10px;
}

#editProfileModal .profile-image-section img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

#editProfileModal .profile-image-section input[type="file"] {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

#editProfileModal select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
}

#editProfileModal textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
}

/* Dark mode styles for edit profile modal */
body.dark #editProfileModal .profile-image-section {
  background: rgba(255, 255, 255, 0.1);
}

body.dark #editProfileModal .profile-image-section input[type="file"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

body.dark #editProfileModal select,
body.dark #editProfileModal textarea {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #e5e7eb;
}

body.dark #editProfileModal select option {
  background: #1f2937;
  color: #e5e7eb;
}

/* Loading */
.loading { display: grid; place-items: center; gap: 8px; margin-top: 10px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(0,0,0,0.1); border-top-color: var(--primary); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Company item */
.company { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.company img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }

/* Responsive */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .search-bar { grid-template-columns: 1fr repeat(3, minmax(140px, 1fr)) auto; }
}
@media (max-width: 720px) {
  .header-inner { height: auto; padding: 12px 0; gap: 12px; flex-wrap: wrap; }
  .search-bar { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .status-grid, .footer-grid { grid-template-columns: 1fr; }
}
/* Compact dark-mode toggle switch for header */
#dark-mode { position: absolute; opacity: 0; width: 0; height: 0; }
.theme-switch { position: relative; width: 44px; height: 22px; border-radius: 999px; display: inline-block; cursor: pointer; background: rgba(0,0,0,0.20); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.30); }
.theme-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s ease; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
#dark-mode:checked + .theme-switch { background: rgba(255,255,255,0.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.70); }
#dark-mode:checked + .theme-switch::after { transform: translateX(22px); background: var(--accent); }

/* Ensure header icon buttons stay visible on dark header */
body.dark .site-header .icon-btn, body.dark .site-header .actions button { color: #fff; }

/* Make language toggle look like nav links */
.site-header #toggleLang.btn.small { background: transparent; color: var(--text); padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; }
.site-header #toggleLang.btn.small:hover { background: rgba(75, 123, 229, 0.15); }

/* Actions: Login button styling */
.actions { display: flex; align-items: center; gap: 10px; }
.actions .btn.small.primary { background: var(--primary); color: #fff; border-radius: 8px; padding: 0 12px; height: 28px; font-size: 12px; transition: background 0.2s ease, transform 0.2s ease; }
.actions .btn.small.primary:hover { background: #365fc7; transform: translateY(-2px); }
body.dark .actions .btn.small.primary { background: var(--primary); color: #fff; }
/* User menu dropdown in navbar */
.user-menu { position: relative; }
.user-menu-btn { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 0; vertical-align: middle; transition: all 0.2s ease; }
.user-menu-btn:hover { transform: scale(1.05); }
.user-menu-btn img { width: 20px; height: 20px; display: block; filter: none; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid rgba(0,0,0,0.08); box-shadow: var(--shadow); border-radius: 12px; padding: 0; min-width: 220px; display: none; overflow: hidden; }
.user-menu .menu.open { display: block; animation: slideDown 0.2s ease-out; }

/* User info section in dropdown */
.user-info { 
  padding: 16px; 
  background: linear-gradient(135deg, rgba(75,123,229,0.1) 0%, rgba(75,123,229,0.05) 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar { 
  width: 40px; 
  height: 40px; 
  border-radius: 50%; 
  overflow: hidden;
  border: 2px solid rgba(75,123,229,0.2);
  background: #fff;
}
.user-avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
.user-details { 
  flex: 1; 
  min-width: 0;
}
.user-name { 
  font-weight: 600; 
  font-size: 14px; 
  color: var(--primary);
  margin-bottom: 2px;
  font-family: 'Courier New', monospace;
}
.user-role {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 2px;
}
.user-email { 
  font-size: 12px; 
  color: var(--muted); 
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Menu divider */
.menu-divider { 
  height: 1px; 
  background: rgba(0,0,0,0.06); 
  margin: 0;
}

/* Menu items */
.user-menu .menu-item { 
  display: flex; 
  align-items: center;
  gap: 10px;
  width: 100%; 
  padding: 12px 16px; 
  color: var(--text); 
  text-align: left; 
  background: transparent; 
  border: none; 
  cursor: pointer; 
  text-decoration: none; 
  transition: all 0.2s ease;
  font-size: 14px;
}
.user-menu .menu-item:hover { 
  background: rgba(75,123,229,0.08); 
  transform: translateX(2px);
}
.menu-icon { 
  font-size: 16px; 
  width: 20px; 
  text-align: center;
}
.menu-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
}

/* Dark mode styles */
body.dark .user-menu .menu { 
  background: rgba(31,41,55,0.95); 
  border-color: rgba(255,255,255,0.12); 
  box-shadow: 0 10px 28px rgba(0,0,0,0.45); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
}
body.dark .user-info { 
  background: linear-gradient(135deg, rgba(75,123,229,0.15) 0%, rgba(75,123,229,0.08) 100%);
  border-bottom-color: rgba(255,255,255,0.1);
}
body.dark .user-avatar { 
  border-color: rgba(75,123,229,0.3);
  background: rgba(255,255,255,0.1);
}
body.dark .user-name { 
  color: #60a5fa;
}
body.dark .user-role {
  color: #d1d5db;
}
body.dark .user-email { 
  color: #9ca3af;
}
body.dark .menu-divider { 
  background: rgba(255,255,255,0.1);
}
body.dark .user-menu .menu-item { 
  color: #e5e7eb; 
}
body.dark .user-menu .menu-item:hover { 
  background: rgba(75,123,229,0.15);
}
body.dark .user-menu-btn { 
  background: rgba(255,255,255,0.12); 
  border: 1px solid rgba(255,255,255,0.18); 
}
body.dark .user-menu-btn:hover { 
  background: rgba(255,255,255,0.18); 
}
body.dark .user-menu-btn img { 
  filter: invert(1) brightness(1.1) contrast(1.1); 
}

/* Animation for dropdown */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark mode: glass effect for search bar */
body.dark .search-bar {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
body.dark .search-bar input, body.dark .search-bar select {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #e5e7eb;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(31, 38, 135, 0.2);
  transition: all 0.3s ease;
}

body.dark .search-bar input:focus, body.dark .search-bar select:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 24px rgba(31, 38, 135, 0.3);
  outline: none;
}

body.dark .search-bar input:hover, body.dark .search-bar select:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
body.dark .search-bar input::placeholder { color: rgba(229, 231, 235, 0.7); }

/* Glass effect for select dropdown options */
body.dark .search-bar select option {
  background: rgba(31, 41, 55, 0.95);
  color: #e5e7eb;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
}

/* Dark mode: glass effect for recent searches chips */
body.dark .recent-searches h3 { color: #e5e7eb; }
body.dark .chips { gap: 10px; }
body.dark .chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 22px rgba(31, 38, 135, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e5e7eb;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
body.dark .chip:hover { background: rgba(255, 255, 255, 0.18); }
/* Dark mode footer: match header/navigation style */
body.dark .site-footer {
  background: rgba(31,41,55,0.75);
  color: #e5e7eb;
  border-top: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: saturate(180%) blur(8px);
}
body.dark .site-footer a { color: #e5e7eb; }
/* Glass frame for company cards in dark mode */
body.dark .card.company {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e5e7eb;
}
/* Dark mode: glass effect for all cards */
body.dark .card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}
/* Dark mode: glass effect for status cards */
body.dark .status-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 28px rgba(31, 38, 135, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e5e7eb;
}
/* Dark mode: glass effect for company modal */
body.dark #companyModal .modal-content {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}
body.dark #companyModal .modal-header h3 { color: #e5e7eb; }
body.dark #companyModal .icon-btn { color: #e5e7eb; }
body.dark #companyModal .modal-content input,
body.dark #companyModal .modal-content select {
  border-color: rgba(255, 255, 255, 0.25);
  color: #e5e7eb;
}
body.dark #companyModal .modal-content input::placeholder { color: rgba(229, 231, 235, 0.7); }
/* Dark mode: glass effect for all modals */
body.dark .modal-content {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}
body.dark .modal-header h3 { color: #e5e7eb; }
body.dark .modal .icon-btn { color: #e5e7eb; }
body.dark .modal .icon-btn:hover { 
  background: rgba(255, 255, 255, 0.1); 
}

/* Minimal cancel button - no container styling */
.modal-actions .btn[data-close] {
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  height: auto;
  font-weight: normal;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
}

.modal-actions .btn[data-close]:hover {
  text-decoration: none;
}

body.dark .modal-actions .btn[data-close] {
  color: #e5e7eb;
}
body.dark .modal-content input,
body.dark .modal-content select {
  border-color: rgba(255, 255, 255, 0.25);
  color: #e5e7eb;
}
body.dark .modal-content input::placeholder { color: rgba(229, 231, 235, 0.7); }

/* Dark mode for enhanced apply modal */
body.dark .job-info-grid { background: rgba(255,255,255,0.05); }
body.dark .modal-actions { border-top-color: rgba(255,255,255,0.1); }
body.dark .btn-secondary { border-color: rgba(255,255,255,0.2); }

/* Dark mode for detailed modal elements */
body.dark .modal-description { background: rgba(59, 130, 246, 0.2); border-left-color: #60a5fa; }
body.dark .help-text { color: rgba(229, 231, 235, 0.7); }
body.dark .file-upload-section { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); }
body.dark .application-instructions { background: rgba(255,255,255,0.05); }
body.dark .application-note { background: rgba(245, 158, 11, 0.2); border-left-color: #fbbf24; }
body.dark .status-badge.verified { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
body.dark .modal-footer { border-top-color: rgba(255,255,255,0.1); }
/* Dark mode: glass login form with floating labels */
body.dark[data-page="login"] .card {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(31, 38, 135, 0.36);
}
body.dark[data-page="login"] form label { position: relative; }
body.dark[data-page="login"] form label span {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 14px;
  color: rgba(229, 231, 235, 0.85);
  pointer-events: none;
  transition: transform 0.2s ease, top 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}
/* Dark mode: make Register link more prominent */
body.dark[data-page="login"] p.muted a { font-size: 16px; }
/* Light mode: make Register link more prominent */
body[data-page="login"] p.muted a { font-size: 16px; }
body.dark[data-page="login"] form input {
  padding-top: 18px;
}
/* Float label on focus or when input is valid */
body.dark[data-page="login"] form label:focus-within span,
body.dark[data-page="login"] form label:has(input:valid) span {
  top: -8px;
  font-size: 12px;
  color: var(--accent);
}
/* Input focus styling */
body.dark[data-page="login"] input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250, 112, 154, 0.25);
}
/* Gradient primary button for login */
body.dark[data-page="login"] .btn.primary {
  background: linear-gradient(135deg, #fa709a, #784ba8);
  box-shadow: 0 6px 18px rgba(31, 38, 135, 0.36);
}
/* Login form sizing: make the card fit nicely */
body[data-page="login"] .card {
  max-width: 720px;
  width: 100%;
  margin: 32px auto;
  padding: 48px;
  min-height: 420px;
}
body[data-page="login"] form input,
body[data-page="login"] form select {
  width: 100%;
  height: 52px;
  font-size: 17px;
}
/* Login button: match navbar login (size and color) */
body[data-page="login"] .btn.primary {
  background: var(--primary);
  color: #fff;
  height: 28px;
  font-size: 12px;
  padding: 0 12px;
  border-radius: 8px;
}
body[data-page="login"] .btn.primary:hover {
  background: #365fc7;
  transform: translateY(-2px);
}
body.dark[data-page="login"] .btn.primary {
  background: var(--primary);
  color: #fff;
}
/* Register link: make it prominent blue */
body[data-page="login"] .muted a {
  color: var(--primary);
  font-weight: 600;
}
body[data-page="login"] .muted a:hover { text-decoration: underline; }
/* Login form bottom: restore slightly larger compact spacing and set blue color */
body[data-page="login"] .row.space-between { margin-bottom: 8px; }
body[data-page="login"] p.muted { margin: 6px 0 0; font-size: 14px; color: var(--primary); }
/* Register form bottom: match compact spacing */
body[data-page="register"] .row.space-between { margin-bottom: 6px; }
body[data-page="register"] .row.space-between .muted { font-size: 14px; }
/* Reduce space below the form footer text */
@media (max-width: 480px) {
  body[data-page="login"] .card { margin: 20px; }
}

/* Admin Dashboard Styles */
.dashboard-stats {
  margin: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.stat-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #7aa3ff);
  border-radius: 12px;
  color: white;
}

.stat-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.stat-content p {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 14px;
}

/* Admin Tabs */
.admin-tabs {
  margin: 32px 0 24px;
}

.tab-buttons {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-btn:hover {
  color: var(--primary);
  background: rgba(75, 123, 229, 0.05);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

.filters select,
.filters input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 0 12px;
  background: var(--card);
  color: var(--text);
  min-width: 150px;
}

.filters input {
  min-width: 200px;
}

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

/* Admin Tables */
.table-container {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  background: rgba(75, 123, 229, 0.05);
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.admin-table td {
  padding: 16px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--text);
}

.admin-table tbody tr:hover {
  background: rgba(75, 123, 229, 0.03);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.pending {
  background: rgba(255, 183, 3, 0.15);
  color: #d97706;
}

.status-badge.accepted,
.status-badge.active {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.status-badge.rejected,
.status-badge.dropped {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.status-badge.completed {
  background: rgba(75, 123, 229, 0.15);
  color: var(--primary);
}

/* Progress Bar */
.progress-bar {
  width: 80px;
  height: 8px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7aa3ff);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Action Buttons */
.action-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  transition: all 0.2s ease;
  margin-right: 8px;
}

.action-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.action-btn.danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

/* Modal Enhancements for Admin */
.application-details,
.enrollment-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-section {
  padding: 20px;
  background: rgba(75, 123, 229, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.detail-section h4 {
  margin: 0 0 16px;
  color: var(--primary);
  font-weight: 600;
}

.detail-section p {
  margin: 8px 0;
  line-height: 1.5;
}

.detail-section strong {
  color: var(--text);
  font-weight: 600;
  display: inline-block;
  min-width: 120px;
}

/* Dark Mode for Admin Dashboard */
body.dark .stat-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}

body.dark .stat-content h3 {
  color: #e5e7eb;
}

body.dark .stat-content p {
  color: #9ca3af;
}

body.dark .tab-buttons {
  border-bottom-color: rgba(255,255,255,0.1);
}

body.dark .admin-table th {
  background: rgba(75, 123, 229, 0.1);
  border-bottom-color: rgba(255,255,255,0.1);
}

body.dark .admin-table td {
  border-bottom-color: rgba(255,255,255,0.1);
}

body.dark .admin-table tbody tr:hover {
  background: rgba(75, 123, 229, 0.08);
}

body.dark .table-container {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.dark .filters select,
body.dark .filters input {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e5e7eb;
}

body.dark .filters input::placeholder {
  color: rgba(229, 231, 235, 0.7);
}

body.dark .action-btn {
  border-color: rgba(255,255,255,0.2);
}

body.dark .detail-section {
  background: rgba(75, 123, 229, 0.08);
}

body.dark .progress-bar {
  background: rgba(255,255,255,0.1);
}

/* Responsive Design for Admin Dashboard */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filters select,
  .filters input {
    min-width: auto;
    width: 100%;
  }
  
  .tab-buttons {
    flex-direction: column;
  }
  
  .admin-table {
    font-size: 12px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 12px 8px;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .admin-table {
    min-width: 600px;
  }
}
