/* =============================================
   MY PLACEMENT - Full Responsive Styles v2
   ============================================= */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #7c3aed;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --bg: #f0f4f8;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── AUTH ── */
.auth-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
  padding: 16px;
}
.auth-card {
  background: white; border-radius: 20px;
  padding: 36px 32px; width: 100%; max-width: 440px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 16px; }
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 26px; font-weight: 800; color: #1e3a5f; margin: 0; }
.auth-logo p  { color: #64748b; margin: 5px 0 0; font-size: 13px; }

/* ── DASHBOARD LAYOUT ── */
.dashboard-layout {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #1e3a5f 0%, #1e40af 100%);
  position: fixed; left: 0; top: 0; z-index: 200;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
}
.sidebar-logo-inner h2 { color: white; margin: 0; font-size: 20px; font-weight: 800; }
.sidebar-logo-inner p  { color: rgba(255,255,255,0.6); margin: 3px 0 0; font-size: 11px; }
/* Close button inside sidebar (mobile only) */
.sidebar-close-btn {
  display: none;
  background: rgba(255,255,255,0.1); border: none; border-radius: 8px;
  color: white; width: 32px; height: 32px;
  align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; flex-shrink: 0;
}

.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; color: rgba(255,255,255,0.75);
  text-decoration: none; border-radius: 10px;
  margin-bottom: 3px; cursor: pointer;
  transition: all 0.2s; font-size: 14px; font-weight: 500;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-link:hover  { background: rgba(255,255,255,0.12); color: white; }
.nav-link.active { background: rgba(255,255,255,0.22); color: white; font-weight: 600; }
.nav-link i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  color: white; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { color: rgba(255,255,255,0.5); font-size: 11px; }
.logout-btn {
  background: rgba(255,255,255,0.1); border: none;
  color: rgba(255,255,255,0.8); cursor: pointer;
  padding: 7px 9px; border-radius: 8px;
  transition: all 0.2s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.logout-btn:hover { background: #fee2e2; color: #dc2626; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
  display: flex; flex-direction: column;
}

/* Top header */
.top-header {
  background: white; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky; top: 0; z-index: 100;
  gap: 12px;
}
.hamburger-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: #1e3a5f; font-size: 22px; padding: 4px 8px;
  border-radius: 8px; flex-shrink: 0;
}
.hamburger-btn:hover { background: #f1f5f9; }
.page-title { font-size: 18px; font-weight: 700; color: #1e3a5f; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-email { font-size: 12px; color: #64748b; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mobile header logout button */
.header-logout-btn {
  display: none;
  background: #fee2e2; border: none; border-radius: 8px;
  color: #dc2626; cursor: pointer; padding: 7px 10px;
  font-size: 14px; font-weight: 600;
  align-items: center; gap: 5px;
  transition: background 0.2s;
}
.header-logout-btn:hover { background: #fca5a5; }

.content-area { padding: 22px 24px; flex: 1; }

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  /* Sidebar slides in/out */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }

  /* Show hamburger & close btns */
  .hamburger-btn    { display: flex; }
  .sidebar-close-btn { display: flex; }

  /* Show mobile logout in header */
  .header-logout-btn { display: flex; }

  /* Hide email in header (save space) */
  .header-email { display: none; }

  /* Hide sidebar avatar in header (show only icon logout) */
  .header-avatar-circle { display: none; }

  /* Main content full width */
  .main-content { margin-left: 0; }

  /* Content padding */
  .top-header { padding: 12px 16px; }
  .content-area { padding: 14px 12px; }

  /* Cards */
  .card { padding: 16px 14px; border-radius: 12px; margin-bottom: 14px; }
  .card-title { font-size: 15px; }

  /* Stat cards: 2 columns */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .stat-card { padding: 16px 14px; }
  .stat-number { font-size: 24px; }
  .stat-icon { width: 40px; height: 40px; font-size: 18px; }

  /* Page title smaller */
  .page-title { font-size: 16px; }

  /* Auth card */
  .auth-logo h1 { font-size: 22px; }

  /* Modal full screen on mobile */
  .modal-box {
    width: 96%; max-width: 100%; margin: 8px;
    padding: 20px 16px; border-radius: 16px;
    max-height: 92vh;
  }

  /* Tables → card view on mobile */
  .data-table, .data-table thead, .data-table tbody,
  .data-table th, .data-table td, .data-table tr { display: block; }
  .data-table thead { display: none; }
  .data-table tr {
    background: white; border-radius: 12px;
    margin-bottom: 10px; padding: 12px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
  }
  .data-table td {
    padding: 5px 0; border: none; font-size: 13px;
    display: flex; align-items: flex-start; gap: 8px;
    flex-wrap: wrap;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 700; color: #64748b;
    font-size: 11px; min-width: 90px; flex-shrink: 0;
    text-transform: uppercase; letter-spacing: 0.3px;
    padding-top: 2px;
  }

  /* Job cards */
  .job-card { padding: 14px 12px; }
  .job-title { font-size: 14px; }
  .match-score-badge { width: 44px; height: 44px; font-size: 11px; top: 12px; right: 10px; }

  /* Profile header */
  .profile-header { flex-direction: column; text-align: center; padding: 20px 16px; gap: 12px; }
  .profile-avatar { width: 68px; height: 68px; font-size: 26px; }

  /* Grid → single column */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }

  /* Tabs scroll */
  .tabs { overflow-x: auto; white-space: nowrap; padding-bottom: 2px; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab-btn { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }

  /* Search bar */
  .search-bar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .search-bar input { min-width: 0; font-size: 13px; }

  /* Form */
  .form-control { font-size: 16px; } /* prevent iOS zoom */
  .form-label { font-size: 12px; }
  .form-group { margin-bottom: 14px; }

  /* Buttons */
  .btn { font-size: 13px; padding: 9px 16px; }
  .btn-sm { padding: 6px 12px; font-size: 11px; }

  /* Toast */
  .toast-container { top: auto; bottom: 16px; right: 10px; left: 10px; }
  .toast { min-width: 0; width: 100%; font-size: 13px; padding: 12px 16px; }

  /* job meta wrap */
  .job-meta { gap: 6px; }
  .job-tag { font-size: 11px; padding: 3px 8px; }

  /* Inline grid filters → stack on mobile */
  .filter-grid-3 { grid-template-columns: 1fr !important; }
  .filter-grid-2 { grid-template-columns: 1fr !important; }

  /* Salary slip pay grid */
  .pay-grid { grid-template-columns: 1fr !important; }
  .emp-box { grid-template-columns: 1fr !important; }

  /* HRMS employee cards: action buttons wrap */
  .hrms-card-actions { flex-wrap: wrap; gap: 6px; }

  /* Bulk row → stack */
  .bulk-row { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .auth-card { padding: 24px 16px; border-radius: 14px; }
  .content-area { padding: 12px 10px; }
  .top-header { padding: 10px 12px; }
  .card { padding: 14px 12px; }
  /* On very small screens, table card view label min-width smaller */
  .data-table td::before { min-width: 75px; font-size: 10px; }
  /* bulk row → full single column */
  .bulk-row { grid-template-columns: 1fr !important; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* ── DESKTOP ONLY tweaks ── */
@media (min-width: 769px) {
  .header-logout-btn { display: none !important; }
}

/* ── GRID HELPERS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1024px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Filter grid helpers (inline grids in JS) */
.filter-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; align-items: end; }
.filter-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
@media (max-width: 600px) {
  .filter-grid-3 { grid-template-columns: 1fr; }
  .filter-grid-2 { grid-template-columns: 1fr; }
}

/* ── CARDS & STATS ── */
.stat-card {
  background: white; border-radius: 16px; padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  border-left: 4px solid var(--primary);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.stat-number { font-size: 30px; font-weight: 800; color: #1e3a5f; }
.stat-label  { color: #64748b; font-size: 13px; }
.stat-icon   { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; }

.card {
  background: white; border-radius: 16px; padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07); margin-bottom: 18px;
}
.card-title {
  font-size: 16px; font-weight: 700; color: #1e3a5f;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* ── JOB CARDS ── */
.job-card {
  background: white; border-radius: 14px; padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 2px solid transparent; transition: all 0.2s;
  cursor: pointer; position: relative; margin-bottom: 12px;
}
.job-card:hover { border-color: #2563eb; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.15); }
.job-title   { font-size: 15px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; padding-right: 60px; }
.job-company { color: #2563eb; font-weight: 600; font-size: 13px; }
.job-meta    { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.job-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  background: #f1f5f9; color: #475569;
}
.match-score-badge {
  position: absolute; top: 14px; right: 14px;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white;
}
.match-90  { background: linear-gradient(135deg, #16a34a, #22c55e); }
.match-70  { background: linear-gradient(135deg, #d97706, #f59e0b); }
.match-low { background: linear-gradient(135deg, #dc2626, #ef4444); }

/* ── FORMS ── */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 2px solid #e2e8f0; border-radius: 10px;
  font-size: 14px; color: #1e293b;
  transition: border-color 0.2s; background: white;
}
.form-control:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); outline: none; }
.form-control::placeholder { color: #94a3b8; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 10px 20px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary  { background: #2563eb; color: white; }
.btn-primary:hover  { background: #1d4ed8; }
.btn-success  { background: #16a34a; color: white; }
.btn-success:hover  { background: #15803d; }
.btn-danger   { background: #dc2626; color: white; }
.btn-danger:hover   { background: #b91c1c; }
.btn-warning  { background: #d97706; color: white; }
.btn-outline  { background: transparent; border: 2px solid #2563eb; color: #2563eb; }
.btn-outline:hover  { background: #2563eb; color: white; }
.btn-sm    { padding: 6px 13px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-primary   { background: #dbeafe; color: #1d4ed8; }
.badge-success   { background: #dcfce7; color: #16a34a; }
.badge-danger    { background: #fee2e2; color: #dc2626; }
.badge-warning   { background: #fef3c7; color: #d97706; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; padding: 11px 14px; text-align: left; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #e2e8f0; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; font-size: 13px; color: #374151; }
.data-table tr:hover td { background: #f8fafc; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }

/* ── SKILL CHIPS ── */
.skill-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px;
  background: #eff6ff; color: #2563eb;
  font-size: 12px; font-weight: 500; margin: 3px;
  border: 1px solid #bfdbfe;
}
.skill-chip .remove-skill { cursor: pointer; color: #93c5fd; font-size: 10px; font-weight: 700; padding: 0 2px; }
.skill-chip .remove-skill:hover { color: #dc2626; }

/* ── STARS ── */
.stars { color: #fbbf24; }

/* ── PROFILE ── */
.profile-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: 16px; padding: 24px; color: white;
  margin-bottom: 18px; display: flex; align-items: center; gap: 18px;
}
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: white;
  border: 3px solid rgba(255,255,255,0.4);
  flex-shrink: 0; overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px); padding: 16px;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white; border-radius: 20px;
  padding: 26px; width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: modalIn 0.25s ease;
}
.modal-box.modal-lg { max-width: 780px; }
@keyframes modalIn { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title  { font-size: 17px; font-weight: 700; color: #1e3a5f; }
.modal-close  {
  background: #f1f5f9; border: none; border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #64748b; transition: background 0.2s;
}
.modal-close:hover { background: #fee2e2; color: #dc2626; }

/* ── TOAST ── */
.toast-container {
  position: fixed; top: 16px; right: 16px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 13px 18px; border-radius: 12px;
  color: white; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 9px;
  min-width: 260px; max-width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: linear-gradient(135deg, #16a34a, #22c55e); }
.toast-error   { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast-info    { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.toast-warning { background: linear-gradient(135deg, #d97706, #f59e0b); }

/* ── LOADING ── */
.loading-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%; border-top-color: white;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.page-loader-inner { width: 38px; height: 38px; border: 4px solid #e2e8f0; border-top-color: #2563eb; border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 50px 20px; color: #94a3b8; }
.empty-state i { font-size: 44px; margin-bottom: 14px; display: block; }
.empty-state h3 { font-size: 17px; color: #64748b; margin-bottom: 8px; }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: white; padding: 12px 16px;
  border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); margin-bottom: 18px;
}
.search-bar input { flex: 1; min-width: 120px; border: none; outline: none; font-size: 14px; color: #374151; }
.search-bar input::placeholder { color: #94a3b8; }

/* ── STATUS BADGES ── */
.status-applied            { background: #dbeafe; color: #1d4ed8; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-shortlisted        { background: #fef3c7; color: #d97706; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-interview_scheduled{ background: #ede9fe; color: #7c3aed; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-interviewed        { background: #ede9fe; color: #7c3aed; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-offered            { background: #dcfce7; color: #16a34a; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-hired              { background: #dcfce7; color: #15803d; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-rejected           { background: #fee2e2; color: #dc2626; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }
.status-withdrawn          { background: #f1f5f9; color: #64748b; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:600; }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab-btn {
  padding: 9px 16px; border: none; background: none;
  font-size: 13px; font-weight: 500; color: #64748b;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s; border-radius: 8px 8px 0 0;
  flex-shrink: 0; white-space: nowrap;
}
.tab-btn:hover  { color: #2563eb; background: #f0f4f8; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 700; }

/* ── REVIEW CARD ── */
.review-card { background: #f8fafc; border-radius: 12px; padding: 14px; margin-bottom: 10px; border: 1px solid #e2e8f0; }
.review-flag { background: #fee2e2; border-color: #fca5a5; }

/* ── PROGRESS BAR ── */
.progress-bar  { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2563eb, #7c3aed); transition: width 0.5s ease; }

/* ── COMPANY LOGO ── */
.company-logo {
  width: 46px; height: 46px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 17px; flex-shrink: 0; overflow: hidden;
}
.company-logo img { width: 100%; height: 100%; object-fit: cover; }
.verified-badge { color: #2563eb; font-size: 14px; }

/* ── AI BUTTON ── */
.ai-generate-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: white; border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: opacity 0.2s;
}
.ai-generate-btn:hover    { opacity: 0.9; }
.ai-generate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-status { font-size: 12px; color: #7c3aed; margin-top: 4px; padding: 4px 8px; background: #f5f3ff; border-radius: 6px; border-left: 3px solid #7c3aed; }

/* ── NOTIF DOT ── */
.notif-dot { display: inline-block; width: 7px; height: 7px; background: #ef4444; border-radius: 50%; margin-left: 5px; }

/* ── SCROLL ── */
.scroll-y { overflow-y: auto; }

/* ── BUTTON ROW (wrap on mobile) ── */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ── TABLE WRAPPER for horizontal scroll ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }

/* ── Profile complete bar ── */
.profile-complete-bar { background: #e2e8f0; border-radius: 10px; height: 8px; overflow: hidden; margin: 8px 0; }
.profile-complete-fill { height: 100%; background: linear-gradient(90deg, #16a34a, #2563eb); border-radius: 10px; transition: width 0.5s ease; }

/* ── HRMS Employee Card ── */
.hrms-emp-card {
  background: white; border-radius: 14px; padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 2px solid #e2e8f0; margin-bottom: 12px;
  transition: border-color 0.2s;
}
.hrms-emp-card:hover { border-color: #2563eb; }
.hrms-emp-card.inactive-card { border-color: #f97316; background: #fff7ed; opacity: 0.85; }
.hrms-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ── Dashboard section header ── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.section-title { font-size: 18px; font-weight: 700; color: #1e3a5f; margin: 0; }

/* ── Salary slip styles ── */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.emp-box { background: #f8fafc; border-radius: 10px; padding: 16px; margin-bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 600px) {
  .pay-grid { grid-template-columns: 1fr; }
  .emp-box  { grid-template-columns: 1fr; }
}

/* ── Bulk import row ── */
.bulk-row { display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 600px) {
  .bulk-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .bulk-row { grid-template-columns: 1fr; }
}

/* ── Attendance grid ── */
.attend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
@media (max-width: 480px) {
  .attend-grid { grid-template-columns: 1fr; }
}

/* ── Mobile-friendly button groups ── */
@media (max-width: 600px) {
  .action-group { flex-direction: column; width: 100%; }
  .action-group .btn { width: 100%; justify-content: center; }
}

/* ── Forgot password link ── */
.forgot-link {
  display: block; text-align: right; font-size: 12px;
  color: #2563eb; cursor: pointer; text-decoration: none;
  margin-top: -8px; margin-bottom: 12px;
}
.forgot-link:hover { text-decoration: underline; }

/* ── Change password section ── */
.change-pw-section {
  background: #f8fafc; border-radius: 12px;
  padding: 16px; border: 1px solid #e2e8f0; margin-top: 16px;
}

/* ── Info pill ── */
.info-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eff6ff; color: #2563eb;
  border: 1px solid #bfdbfe; border-radius: 20px;
  padding: 3px 10px; font-size: 11px; font-weight: 600;
}

/* ── HRMS Stat row ── */
.hrms-stat-row {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.hrms-stat-box {
  flex: 1; min-width: 120px; background: #f8fafc;
  border-radius: 10px; padding: 12px 16px;
  border: 1px solid #e2e8f0; text-align: center;
}
.hrms-stat-num { font-size: 22px; font-weight: 800; color: #1e3a5f; }
.hrms-stat-lbl { font-size: 11px; color: #64748b; margin-top: 2px; }

/* ── Review removal request card ── */
.removal-card {
  background: #fef3c7; border: 1px solid #fcd34d;
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.removal-card.approved { background: #dcfce7; border-color: #86efac; }
.removal-card.rejected { background: #fee2e2; border-color: #fca5a5; }

/* ── Mobile action sticky bar ── */
@media (max-width: 768px) {
  .sticky-mobile-bar {
    position: sticky; bottom: 0;
    background: white; border-top: 1px solid #e2e8f0;
    padding: 12px 16px; margin: 0 -12px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 50;
  }
}

/* =============================================
   MOBILE RESPONSIVE FIXES v3 - COMPLETE
   ============================================= */

/* ── Touch targets: min 44px ── */
@media (max-width: 768px) {
  .btn { min-height: 40px; }
  .btn-sm { min-height: 34px; }
  .form-control { min-height: 42px; font-size: 16px !important; } /* prevent iOS zoom */
  select.form-control { font-size: 16px !important; }

  /* Job search filter: stack on mobile */
  .job-filter-row {
    flex-direction: column !important;
  }
  .job-filter-row > div { min-width: 100% !important; flex: unset !important; }

  /* Job detail modal header: stack */
  .job-modal-header { flex-direction: column !important; gap: 10px !important; }

  /* Post job form: single column on small */
  .post-job-grid { grid-template-columns: 1fr !important; }

  /* Application card: stack status below info */
  .app-card-inner { flex-direction: column !important; align-items: flex-start !important; }
  .app-card-status { align-self: flex-start; margin-top: 8px; }

  /* Stat card: ensure 2 cols always */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }

  /* Find jobs: pagination wrap */
  .pagination-row { flex-wrap: wrap !important; justify-content: center; gap: 6px; }

  /* Admin header row: wrap */
  .admin-header-row { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }

  /* Company profile grid: single col */
  .company-profile-grid { grid-template-columns: 1fr !important; }

  /* HRMS modal form: single col */
  .hrms-form-grid { grid-template-columns: 1fr !important; }

  /* Table action buttons: smaller icons only */
  .data-table td[data-label="Actions"] .btn { min-width: 32px; padding: 5px 8px; }

  /* Modal box: taller max-height on mobile */
  .modal-box { max-height: 88vh; padding: 18px 14px; }
  .modal-box.modal-lg { max-height: 92vh; width: 98%; margin: 4px; }

  /* Sidebar nav items larger touch area */
  .nav-link { padding: 13px 14px; min-height: 46px; }

  /* Card title: wrap on mobile */
  .card-title { flex-wrap: wrap; gap: 8px; }

  /* Section header row: wrap */
  .section-header { flex-wrap: wrap; gap: 8px; }
  .section-header .btn { font-size: 12px; padding: 7px 12px; }

  /* Profile tab buttons: full width scroll */
  .profile-btn-row { flex-wrap: wrap; gap: 8px; }
  .profile-btn-row .btn { flex: 1; min-width: 140px; font-size: 12px; }

  /* HRMS stat boxes: 2 per row */
  .hrms-stat-row { gap: 8px; }
  .hrms-stat-box { min-width: calc(50% - 4px); flex: unset; padding: 10px 8px; }
  .hrms-stat-num { font-size: 18px; }

  /* Review card: wrap actions */
  .review-card > div:last-child { flex-wrap: wrap; }

  /* Skill chips: wrap nicely */
  .skill-chip { font-size: 11px; padding: 3px 10px; margin: 2px; }

  /* Auth card: center everything */
  .auth-logo h1 { font-size: 22px; }
  .auth-logo p { font-size: 12px; }

  /* Empty state: compact */
  .empty-state { padding: 30px 15px; }
  .empty-state i { font-size: 36px; }
  .empty-state h3 { font-size: 15px; }

  /* Tab buttons: horizontal scroll */
  .tabs { display: flex; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }

  /* Application status select: full width */
  .app-status-select { width: 100% !important; margin-bottom: 8px; }

  /* Job card match badge: smaller on mobile */
  .match-score-badge { width: 42px; height: 42px; font-size: 10px; }

  /* Modal footer buttons: stack */
  .modal-footer-btns { flex-direction: column !important; }
  .modal-footer-btns .btn { width: 100%; justify-content: center; }

  /* Change password modal */
  #change-pw-modal .modal-box { max-width: 96%; }

  /* Table card view: better spacing */
  .data-table tr { padding: 14px; margin-bottom: 12px; }
  .data-table td { padding: 4px 0; line-height: 1.5; }
  .data-table td::before { min-width: 80px; font-size: 10px; }

  /* Filter search box: full width */
  .filter-grid-3 .form-group,
  .filter-grid-2 .form-group { margin: 0 0 8px; }

  /* HRMS attendance grid: single col */
  .attend-grid { grid-template-columns: 1fr; }

  /* Bulk import row: 2 cols */
  .bulk-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .bulk-row input, .bulk-row select { font-size: 13px !important; padding: 6px 8px; min-height: 36px; }

  /* Salary slip: single col */
  .pay-grid, .emp-box { grid-template-columns: 1fr; }

  /* Job detail modal actions: full width */
  .job-apply-actions { flex-direction: column; width: 100%; }
  .job-apply-actions .btn { width: 100%; justify-content: center; }
}

/* ── Very small screens (≤400px) ── */
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .hrms-stat-box { min-width: 100%; }
  .content-area { padding: 10px 8px; }
  .top-header { padding: 8px 10px; }
  .sidebar-logo-inner h2 { font-size: 16px; }
  .modal-box { padding: 14px 12px; }
  .tab-btn { padding: 7px 10px; font-size: 12px; }
}

/* ── Fix: table in card view always has white bg ── */
@media (max-width: 768px) {
  .card > .table-responsive > .data-table tr {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
}

/* ── Hover effects disabled on touch devices ── */
@media (hover: none) {
  .job-card:hover { transform: none; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
  .stat-card:hover { transform: none; }
  .btn:hover { opacity: 0.9; }
}

/* ── Fix iOS Safari input tap issues ── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="url"],
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 10px;
}

/* ── Ensure images don't overflow ── */
img { max-width: 100%; height: auto; }

/* ── Fix long words breaking layout ── */
.card, .modal-box, .job-card, .review-card {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}
