:root {
  --bg-base: #F8F9FA;
  --bg-surface: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --accent-primary: #3B82F6;
  --accent-blue: #3B82F6;
  --accent-green: #10B981;
  --accent-red: #EF4444;
  --accent-yellow: #FBBF24;
  --text-primary: #1E293B;
  --text-muted: #64748B;
  --text-label: #475569;
  --border: #E2E8F0;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] {
  --bg-base: #0A0F1E;
  --bg-surface: #111827;
  --bg-elevated: #1C2640;
  --text-primary: #F9FAFB;
  --text-muted: #9CA3AF;
  --text-label: #CBD5E1;
  --border: #1F2D45;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .topbar { background-color: rgba(17, 24, 39, 0.8); }
[data-theme="dark"] .sidebar__item--active { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .data-table td { background-color: var(--bg-base); }
[data-theme="dark"] .quick-action-btn:hover { background-color: rgba(255,255,255,0.05); }

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Inter', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Global form label visibility ───────────────────────────────
   All form labels, helper text, and small captions are light
   by default so they're readable on dark panels/surfaces.
   Use .text-muted-soft for secondary/hint text.
---------------------------------------------------------------- */
label,
.form-label,
.col-form-label {
  color: var(--text-label) !important;
  font-size: 13px;
  font-weight: 500;
}

/* Slightly dimmer for genuine placeholder/hint text only */
.text-muted {
  color: var(--text-muted) !important;
}

/* Small text — keep legible */
small, .small {
  color: var(--text-muted);
  font-size: 12px;
}

/* Help/hint blocks under inputs */
.form-text {
  color: var(--text-muted) !important;
  font-size: 12px;
}

/* Section labels inside panels (all-caps titles above input groups) */
.sidebar__section-label,
.section-label {
  color: var(--text-label);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Base Link & Button reset */
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

/* ================== LAYOUT SHELL ================== */

.layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px; /* Space for topbar */
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

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

.platform-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text-primary);
}

.platform-tagline {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.notification-bell {
  position: relative;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.notification-bell:hover {
  color: var(--accent-primary);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 4px 12px 4px 4px;
  transition: all 0.2s ease;
}

.profile-pill:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg-base);
}

.profile-name {
  font-size: 14px;
  font-weight: 500;
}

/* ================== SIDEBAR ================== */

.sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 240px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 0;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 10px;
}

.sidebar__section-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 16px 24px 8px;
  font-weight: 600;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  margin: 2px 8px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
  border-left: 3px solid transparent;
}

.sidebar__item:hover {
  color: var(--text-primary);
  background-color: var(--bg-elevated);
}

.sidebar__item--active {
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--accent-primary);
}

.sidebar__item i {
  width: 18px;
  height: 18px;
}

/* ================== MAIN CONTENT ================== */

.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
  min-height: calc(100vh - 64px);
  width: calc(100% - 240px);
}

.page-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* ================== COMPONENTS ================== */

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeSlideUp 0.4s ease both;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-card-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon.blue { background-color: rgba(59,130,246,0.1); color: var(--accent-blue); }
.stat-card-icon.amber { background-color: rgba(245,166,35,0.1); color: var(--accent-primary); }
.stat-card-icon.green { background-color: rgba(16,185,129,0.1); color: var(--accent-green); }

.stat-card-subline {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 500;
}
.stat-card-subline.green { color: var(--accent-green); }
.stat-card-subline.amber { color: var(--accent-yellow); }

/* Quick Actions */
.quick-actions-bar {
  background-color: var(--bg-elevated);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.quick-action-btn {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  transition: transform 0.2s;
}

.quick-action-btn:active {
  transform: scale(0.96);
}

.quick-action-btn.btn-amber { color: var(--accent-primary); border-color: var(--accent-primary); }
.quick-action-btn.btn-blue { color: var(--accent-blue); border-color: var(--accent-blue); }
.quick-action-btn.btn-muted { color: var(--text-primary); border-color: var(--border); }

.quick-action-btn:hover { background-color: rgba(0,0,0,0.05); }

/* Panels / Cards */
.panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge--pending {
  background-color: rgba(251,191,36,0.15);
  color: var(--accent-yellow);
  animation: pulseAmber 2s infinite;
}
.badge--active {
  background-color: rgba(16,185,129,0.15);
  color: var(--accent-green);
}
.badge--rejected {
  background-color: rgba(239,68,68,0.15);
  color: var(--accent-red);
}

/* Tables */
.data-table-container {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px; /* For card-style rows */
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  padding: 0 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 16px;
  background-color: var(--bg-surface);
  font-size: 14px;
  transition: background-color 0.2s;
}

.data-table tbody tr {
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.data-table tbody tr td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.data-table tbody tr td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.data-table tbody tr:hover td {
  background-color: var(--bg-elevated);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.btn-icon-outline {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon-outline:active { transform: scale(0.96); }
.success-outline { color: var(--accent-green); border-color: rgba(16,185,129,0.5); }
.success-outline:hover { background: rgba(16,185,129,0.1); }
.danger-outline { color: var(--accent-red); border-color: rgba(239,68,68,0.5); }
.danger-outline:hover { background: rgba(239,68,68,0.1); }
.primary-outline { color: var(--accent-blue); border-color: rgba(59,130,246,0.5); }
.primary-outline:hover { background: rgba(59,130,246,0.1); }

/* Animations */
@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseAmber {
  0% { box-shadow: 0 0 0 0 rgba(251,191,36,0.4); }
  70% { box-shadow: 0 0 0 6px rgba(251,191,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
}

/* Utility Layouts */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-60-40 { display: grid; grid-template-columns: 60% calc(40% - 24px); gap: 24px; }

/* Filter Bar */
.filter-bar {
  background-color: var(--bg-surface);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.form-control, .form-select {
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-elevated);
  border-color: var(--accent-primary);
  box-shadow: none;
  outline: none;
  color: var(--text-primary);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Custom primary Button */
.btn-primary-amber {
  background-color: var(--accent-primary);
  color: var(--bg-base);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-primary-amber:hover {
  background-color: #E0961B;
  transform: translateY(-1px);
}
.btn-primary-amber:active {
  transform: translateY(1px);
}

/* ================== NOTIFICATION BELL DROPDOWN ================== */

.notif-bell-wrapper,
.profile-pill-wrapper {
  position: relative;
}

/* Badge with count */
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background-color: var(--accent-red);
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-surface);
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  z-index: 999;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.notif-dropdown__body {
  max-height: 320px;
  overflow-y: auto;
}

.notif-dropdown__body::-webkit-scrollbar { width: 4px; }
.notif-dropdown__body::-webkit-scrollbar-track { background: transparent; }
.notif-dropdown__body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.notif-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-muted);
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-elevated); }
.notif-item--unread { background: rgba(99,102,241,0.06); }

.notif-item__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  margin-top: 1px;
}

.notif-item__content { flex: 1; min-width: 0; }

.notif-item__msg {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.45;
  white-space: normal;
}

.notif-item__time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.notif-item__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  margin-top: 6px;
}

.notif-dropdown__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.notif-dropdown__footer a {
  font-size: 12.5px;
  color: var(--accent-primary);
  font-weight: 600;
  transition: opacity 0.15s;
}
.notif-dropdown__footer a:hover { opacity: 0.75; }

.notif-mark-read-btn,
.notif-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.notif-mark-read-btn:hover { background: var(--bg-elevated); color: var(--accent-green); }
.notif-view-all:hover { background: var(--bg-elevated); color: var(--accent-primary); }

.notif-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ================== PROFILE DROPDOWN ================== */

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  z-index: 999;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease;
}

.profile-dropdown__info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
}

.profile-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.profile-dropdown__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.profile-dropdown__item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.profile-dropdown__item--danger { color: var(--accent-red) !important; }
.profile-dropdown__item--danger:hover { background: rgba(239,68,68,0.08); }

.profile-dropdown__badge {
  margin-left: auto;
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ================== ADDITIONAL BADGE VARIANTS ================== */

.badge--applied    { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.badge--shortlisted{ background: rgba(245,166,35,0.12); color: var(--accent-primary); }
.badge--selected   { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.badge--draft      { background: rgba(107,114,128,0.12); color: var(--text-muted); }
.badge--pending_review { background: rgba(251,191,36,0.12); color: var(--accent-yellow); animation: pulseAmber 2s infinite; }
.badge--closed     { background: rgba(239,68,68,0.1); color: var(--accent-red); }

/* ================== JOB FILTERS SIDEBAR ================== */

.filter-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  position: sticky;
  top: 80px;
}

.filter-panel__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.filter-group { margin-bottom: 18px; }
.filter-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.filter-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(245,166,35,0.12);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(245,166,35,0.3);
}
.filter-chip a {
  color: var(--accent-primary);
  opacity: 0.7;
  margin-left: 2px;
}
.filter-chip a:hover { opacity: 1; }

/* ================== PASSWORD RESET FORMS ================== */

.auth-card {
  max-width: 440px;
  margin: 80px auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
}

.auth-card__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-card__title {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-card__subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
