:root {
  /* Shree HR Solutions Brand Palette (from Logo) */
  --brand-primary: #0045a5;
  --brand-primary-hover: #003682;
  --brand-primary-light: #eef4fc;
  --brand-primary-border: #bfdbfe;
  
  --brand-accent-orange: #f97316;
  --brand-accent-orange-hover: #ea580c;
  --brand-accent-orange-light: #fff7ed;
  --brand-accent-orange-border: #fed7aa;

  /* Colors - Modern Light SaaS Theme */
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-hover: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --brand-green: #10b981;
  --brand-green-dark: #059669;
  --brand-green-deep: #064e3b;
  --brand-green-light: #ecfdf5;
  --brand-green-border: #a7f3d0;
  
  --wa-green: #25D366;
  --wa-dark: #128C7E;
  
  --accent-blue: #0045a5;
  --accent-blue-light: #eef4fc;
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --accent-red: #ef4444;
  --accent-red-light: #fef2f2;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Material Symbols Outlined Font Support */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================== */
/* Split-Screen Authentication (Image 3 Tuga Style) */
/* ========================================== */
.login-backdrop {
  position: fixed;
  inset: 0;
  background: #f8fafc;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}

/* Zero-delay FOUC prevention on page refresh */
html.is-authenticated #loginBackdrop {
  display: none !important;
}

html.is-unauthenticated #loginBackdrop {
  display: flex !important;
}

.login-split-card {
  width: 100%;
  max-width: 960px;
  min-height: 560px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.login-left-pane {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.login-brand-img {
  max-width: 250px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  display: block;
}

.login-heading-area {
  margin-bottom: 24px;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-error {
  display: none;
  background: var(--accent-red-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--accent-red);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 18px;
}

.login-form-group {
  margin-bottom: 18px;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.login-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
  background: #fdfdfd;
  transition: all 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--text-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

.login-toggle-eye {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-toggle-eye:hover {
  color: var(--text-primary);
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 0.82rem;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
}

.login-remember input {
  accent-color: var(--text-primary);
}

.login-forgot {
  color: var(--brand-green-dark);
  text-decoration: none;
  font-weight: 600;
}

.login-forgot:hover {
  text-decoration: underline;
}

.login-submit-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--text-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.login-submit-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.login-footer-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
}

/* Right Illustration Pane */
.login-right-pane {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 60%, #bbf7d0 100%);
  border-left: 1px solid var(--border-subtle);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.login-decor-circle {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(40px);
  z-index: 1;
}

.login-vector-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.login-vector-art {
  width: 100%;
  height: auto;
  max-height: 250px;
  filter: drop-shadow(0 15px 25px rgba(16, 185, 129, 0.15));
}

.login-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.login-feature-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-feature-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.feature-badge-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ========================================== */
/* Application Shell Layout (Image 1 ACRU Style) */
/* ========================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Sidebar */
.app-sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s ease;
}

/* Sidebar Toggle & Collapsed State (Requirement 1) */
.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-color: var(--brand-primary-border);
  transform: translateY(-1px);
}

.sidebar-toggle-btn .material-symbols-outlined {
  font-size: 20px;
}

.app-sidebar.collapsed {
  width: 72px;
}

.app-sidebar.collapsed .sidebar-brand {
  padding: 14px 8px;
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-brand-inner {
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-brand-img {
  max-height: 28px;
  max-width: 44px;
}

.app-sidebar.collapsed .sidebar-section-title {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-nav {
  padding: 16px 8px;
  gap: 8px;
  align-items: center;
}

.app-sidebar.collapsed .nav-link-item {
  width: 48px;
  height: 44px;
  padding: 0;
  justify-content: center;
  position: relative;
  border-radius: var(--radius-md);
}

.app-sidebar.collapsed .nav-link-left {
  justify-content: center;
  gap: 0;
}

.app-sidebar.collapsed .nav-link-left span:not(.nav-symbol) {
  display: none !important;
}

.app-sidebar.collapsed .nav-count-badge {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-help-card {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-footer {
  padding: 12px 6px;
  display: flex;
  justify-content: center;
}

.app-sidebar.collapsed .user-profile-card {
  padding: 0;
  justify-content: center;
}

.app-sidebar.collapsed .user-profile-left {
  gap: 0;
}

.app-sidebar.collapsed .user-profile-left > div:not(.user-avatar-circle) {
  display: none !important;
}

.app-sidebar.collapsed .btn-sidebar-logout {
  display: none !important;
}

.sidebar-brand {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  align-items: center;
}

.sidebar-brand-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.sidebar-brand-img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  display: block;
}

.sidebar-nav {
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 12px 12px 6px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.nav-link-item:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.nav-link-item.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(0, 69, 165, 0.22);
}

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

.nav-symbol {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-link-item:hover .nav-symbol {
  color: var(--brand-primary);
}

.nav-link-item.active .nav-symbol,
.nav-link-item.active span {
  color: #ffffff !important;
}

.nav-count-badge {
  background: #f1f5f9;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-link-item.active .nav-count-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Sidebar Help Card */
.sidebar-help-card {
  margin: 10px 12px 6px;
  padding: 10px 12px;
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-border);
  border-radius: var(--radius-md);
}

.sidebar-help-card .help-card-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-help-card .help-icon {
  font-size: 22px;
  color: var(--brand-primary);
}

.sidebar-help-card .help-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.sidebar-help-card .help-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #fafafa;
}

.user-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-radius: var(--radius-md);
}

.user-profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-sidebar-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: color 0.2s;
}

.btn-sidebar-logout:hover {
  color: var(--accent-red);
}

/* Right Main Layout */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-canvas);
}

/* Topbar */
.app-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  max-width: 480px;
}

.global-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.global-search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  background: var(--bg-surface-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.global-search-box input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.global-search-icon {
  position: absolute;
  left: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

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

.topbar-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--brand-green-light);
  color: var(--brand-green-deep);
  border: 1px solid var(--brand-green-border);
}

.topbar-status-chip.secondary {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-color: #bae6fd;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-secondary);
}

.topbar-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.topbar-btn.btn-primary, .btn-primary {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 2px 8px rgba(0, 69, 165, 0.22);
}

.topbar-btn.btn-primary:hover, .btn-primary:hover {
  background: var(--brand-primary-hover) !important;
  border-color: var(--brand-primary-hover) !important;
  box-shadow: 0 4px 12px rgba(0, 69, 165, 0.32);
}

.topbar-btn.btn-danger {
  background: var(--accent-red-light);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.2);
}

.topbar-btn.btn-danger:hover {
  background: #fee2e2;
}

.topbar-btn.btn-reset-filters {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  min-width: 38px;
}

.topbar-btn.btn-reset-filters:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.topbar-btn.btn-reset-filters.is-active-filter {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.topbar-btn.btn-reset-filters.is-active-filter:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

.topbar-btn.btn-reset-filters .material-symbols-outlined {
  color: #64748b;
  transition: color 0.15s ease;
}

.topbar-btn.btn-reset-filters.is-active-filter .material-symbols-outlined {
  color: #ea580c;
}

/* Active Filter Chips / Badges Bar */
.active-filter-chips-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.filter-chips-label {
  color: #64748b;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-chips-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 3px 8px 3px 10px;
  border-radius: 16px;
  font-weight: 500;
  font-size: 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.filter-chip .chip-label {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.filter-chip .chip-value {
  color: #0f172a;
  font-weight: 600;
}

.filter-chip .chip-remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  padding: 0;
  transition: all 0.15s ease;
}

.filter-chip .chip-remove-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.filter-chip-clear-all-btn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #ea580c;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  transition: all 0.15s ease;
}

.filter-chip-clear-all-btn:hover {
  background: #ffedd5;
  border-color: #fdba74;
  color: #c2410c;
  transform: scale(1.08);
}

.filter-chip-clear-all-btn .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}

.filter-chips-right-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-filter-count-text {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.active-filter-count-text b {
  color: #0f172a;
  font-size: 0.82rem;
}

.ats-toolbar-total-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  margin-left: auto;
}

.ats-toolbar-total-count .count-highlight {
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.88rem;
}

/* Notification Bell Button */
.topbar-notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.topbar-notif-btn:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  border-color: var(--brand-primary-border);
}

.topbar-notif-btn .notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--brand-accent-orange);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
}

/* Notification Popover Dropdown */
.topbar-notif-container {
  position: relative;
}

.notif-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 330px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
  z-index: 1050;
  overflow: hidden;
  animation: popoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-popover-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.notif-popover-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-popover-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notif-today-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 9999px;
}

.notif-popover-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.notif-popover-body {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #f1f5f9;
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  background: var(--brand-primary-tint);
  color: var(--brand-primary);
}

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

.notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-time {
  font-size: 0.7rem;
  color: var(--brand-accent-orange);
  font-weight: 600;
  margin-top: 2px;
}

.notif-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.notif-popover-footer {
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

.notif-view-all-btn {
  background: transparent;
  border: none;
  color: var(--brand-primary);
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.notif-view-all-btn:hover {
  background: var(--brand-primary-tint);
}

/* Topbar User Profile Pill */
.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
}

.topbar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
}

.topbar-user-meta {
  display: flex;
  flex-direction: column;
}

.topbar-user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.topbar-user-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand-primary);
  line-height: 1.1;
}

/* Top Slogan Quote Badge */
.page-quote-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-primary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.page-quote-badge .quote-icon {
  font-size: 18px;
  color: var(--brand-primary);
}

.page-quote-badge .quote-text {
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
}

.page-quote-badge .quote-author {
  font-weight: 700;
  color: var(--brand-accent-orange);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* KPI Grids and Variations */
.kpi-five-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .kpi-five-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .kpi-five-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-box-icon.navy {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.kpi-box-icon.orange {
  background: var(--brand-accent-orange-light);
  color: var(--brand-accent-orange);
}

.kpi-box-icon.teal {
  background: #f0fdfa;
  color: #0d9488;
}

/* Table Action Buttons */
.table-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
}

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

.table-action-btn.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

.table-action-btn .material-symbols-outlined {
  font-size: 16px;
}

/* Content Area */
.app-content {
  padding: 28px;
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================== */
/* Dashboard Overview Tab (Image 1 ACRU Style) */
/* ========================================== */
.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dash-header-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.dash-header-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.dash-date-badge {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 24px;
  align-items: start;
}

.dash-col-left, .dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Clean Modern Card */
.modern-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Activity Inflow Chart Card */
.chart-metric-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-big-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.chart-pill-badge {
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.chart-svg-container {
  width: 100%;
  height: 220px;
  margin-top: 10px;
}

/* KPI Summary Cards */
.kpi-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kpi-four-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1080px) {
  .kpi-four-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpi-four-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

/* Distinct visual top accent stripe per KPI for maximum readability */
.kpi-six-grid .kpi-box:nth-child(1) { border-top: 3.5px solid #0045a5; }
.kpi-six-grid .kpi-box:nth-child(2) { border-top: 3.5px solid #10b981; }
.kpi-six-grid .kpi-box:nth-child(3) { border-top: 3.5px solid #8b5cf6; }
.kpi-six-grid .kpi-box:nth-child(4) { border-top: 3.5px solid #f59e0b; }
.kpi-six-grid .kpi-box:nth-child(5) { border-top: 3.5px solid #3b82f6; }
.kpi-six-grid .kpi-box:nth-child(6) { border-top: 3.5px solid #06b6d4; }
.kpi-six-grid .kpi-box:nth-child(7) { border-top: 3.5px solid #4f46e5; }

.kpi-three-grid .kpi-box:nth-child(1) { border-top: 3.5px solid #0045a5; }
.kpi-three-grid .kpi-box:nth-child(2) { border-top: 3.5px solid #f97316; }
.kpi-three-grid .kpi-box:nth-child(3) { border-top: 3.5px solid #10b981; }

.kpi-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.kpi-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpi-box-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.01em;
}

.kpi-box-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.kpi-box-icon.green {
  background: var(--brand-green-light);
  color: var(--brand-green-dark);
}

.kpi-box-icon.blue {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}

.kpi-box-icon.amber {
  background: var(--accent-amber-light);
  color: var(--accent-amber);
}

.kpi-box-icon.purple {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
}

.kpi-box-icon.teal {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

.kpi-box-icon.navy {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.kpi-box-icon.orange {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
}

.kpi-box-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin: 4px 0 6px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-box-footer {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Right Side: WhatsApp Business Card (Image 1 Style) */
.wa-hero-card {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px -6px rgba(16, 185, 129, 0.35);
}

.wa-hero-bg-icon {
  position: absolute;
  right: -15px;
  bottom: -20px;
  font-size: 130px;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.wa-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.wa-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.wa-hero-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #d1fae5;
  margin-bottom: 18px;
}

.wa-hero-actions {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.wa-hero-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.wa-hero-btn.primary {
  background: #ffffff;
  color: #065f46;
}

.wa-hero-btn.primary:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
}

.wa-hero-btn.secondary {
  background: rgba(0, 0, 0, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.wa-hero-btn.secondary:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Industry Breakdown Bars */
.industry-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.industry-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 5px;
}

.industry-name {
  font-weight: 600;
  color: var(--text-secondary);
}

.industry-val {
  font-weight: 700;
  color: var(--text-primary);
}

.industry-progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.industry-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* Circular Gauge Card */
.gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.gauge-circle-container {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.gauge-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-circle-bg {
  fill: none;
  stroke: #f1f5f9;
  stroke-width: 8;
}

.gauge-circle-progress {
  fill: none;
  stroke: var(--brand-green);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 62.8; /* 75% */
  transition: stroke-dashoffset 0.8s ease;
}

.gauge-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.gauge-details-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.gauge-details-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.recent-candidates-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-candidate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  transition: all 0.18s ease;
}

.recent-candidate-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.recent-candidate-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.candidate-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.recent-candidate-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
}

.recent-candidate-role {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.recent-candidate-time {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ========================================== */
/* ATS Candidates Tab (Image 2 EXE.EYES Style) */
/* ========================================== */
.ats-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.ats-breadcrumbs {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.ats-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.ats-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ats-page-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.ats-count-pill {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.ats-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Horizontal Status Filter Pills (Image 2 style) */
.ats-status-pills-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.status-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pill-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.status-pill-btn.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 2px 8px rgba(0, 69, 165, 0.22);
}

.status-pill-btn .pill-count {
  font-size: 0.72rem;
  opacity: 0.8;
  font-weight: 700;
}

/* Filters & Search Toolbar */
.ats-filter-toolbar {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.ats-search-input-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.ats-search-input-box input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-primary);
  background: #ffffff;
  transition: all 0.2s;
  box-sizing: border-box;
}

.ats-search-input-box input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(0, 69, 165, 0.08);
}

.ats-search-icon,
.ats-search-input-box > .material-symbols-outlined,
.ats-search-input-box > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ats-dropdown-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ats-select-filter {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}

.ats-select-filter:focus {
  outline: none;
  border-color: var(--text-primary);
}


/* Modern ATS Table */
.ats-table-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ats-table-scroll {
  overflow-x: auto;
}

.ats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.ats-table th {
  background: #fafafa;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.ats-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.ats-table tr:hover td {
  background: #fbfcfe;
}

/* Candidate Selected Row Highlight (Easy Visual Identification) */
.ats-table tbody tr.cand-row-selected td,
.ats-table tbody tr:has(.cand-select-checkbox:checked) td {
  background-color: #e0f2fe !important;
  border-bottom-color: #bae6fd !important;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ats-table tbody tr.cand-row-selected:hover td,
.ats-table tbody tr:has(.cand-select-checkbox:checked):hover td {
  background-color: #bae6fd !important;
}

.ats-table tbody tr.cand-row-selected td:first-child,
.ats-table tbody tr:has(.cand-select-checkbox:checked) td:first-child {
  box-shadow: inset 4px 0 0 0 #0284c7 !important;
}

/* Styled checkbox for candidate selection */
.cand-select-checkbox,
#masterCandidateCheckbox {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #0045a5;
  border-radius: 4px;
  vertical-align: middle;
  transition: transform 0.15s ease;
}

.cand-select-checkbox:hover,
#masterCandidateCheckbox:hover {
  transform: scale(1.1);
}

/* Candidate Short ID column badge */
.candidate-short-id {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  min-width: 32px;
  text-align: center;
}

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

/* Candidate Avatar with Source Suffix Badge */
.candidate-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.avatar-source-icon {
  position: absolute;
  bottom: -3px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  border: 2px solid #ffffff;
  z-index: 2;
}

.avatar-source-icon.src-wa {
  background: #25d366;
  color: #ffffff;
}

.avatar-source-icon.src-qr {
  background: #2563eb;
  color: #ffffff;
}

.avatar-source-icon.src-csv {
  background: #8b5cf6;
  color: #ffffff;
}

.candidate-name-bold {
  font-weight: 700;
  color: var(--text-primary);
}

.candidate-sub-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.phone-wa-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.phone-wa-link:hover {
  color: var(--brand-green-dark);
}

/* ATS Status Badges */
.ats-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.ats-status-badge.status-new {
  background: #f1f5f9;
  color: #475569;
}

.ats-status-badge.status-review {
  background: #eff6ff;
  color: #1d4ed8;
}

.ats-status-badge.status-shortlisted {
  background: #ecfdf5;
  color: #065f46;
}

.ats-status-badge.status-interview {
  background: #f5f3ff;
  color: #6d28d9;
}

.ats-status-badge.status-selected,
.ats-status-badge.status-open {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-weight: 700;
}

.ats-status-badge.status-screening {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 700;
}

.ats-status-badge.status-hired {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  font-weight: 700;
}

.ats-status-badge.status-rejected {
  background: #fef2f2;
  color: #b91c1c;
}

.ats-status-badge.status-notlooking,
.status-badge.status-notlooking,
.detail-status-select.status-notlooking {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-weight: 700;
}

.status-pill-btn.pill-not-looking.active {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #f59e0b !important;
}

.ats-status-badge.status-blocked,
.status-badge.status-blocked,
.detail-status-select.status-blocked {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}

/* Registration Source Badges */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.source-badge.source-wa {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.source-badge.source-qr {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.source-badge.source-csv {
  background: #fdf4ff;
  color: #86198f;
  border: 1px solid #f5d0fe;
}

/* Passing Year Badge */
.passing-year-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Import Dropzone */
.import-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.import-dropzone:hover,
.import-dropzone.dragover {
  border-color: #8b5cf6;
  background: #f5f3ff;
}

/* Pagination Bar */
.ats-pagination-bar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.page-size-selector label {
  font-weight: 600;
  color: var(--text-muted);
}

.page-size-selector select {
  padding: 3px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.page-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 2px 6px rgba(0, 69, 165, 0.25);
}

/* ========================================== */
/* Simulator Tab & Device Mockup              */
/* ========================================== */
.simulator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.phone-mockup {
  background: #ffffff;
  border-radius: 36px;
  border: 12px solid #0f172a;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
  height: 700px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.phone-notch {
  width: 120px;
  height: 20px;
  background: #0f172a;
  margin: 0 auto;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.notch-camera {
  width: 8px;
  height: 8px;
  background: #1e293b;
  border-radius: 50%;
}

.notch-speaker {
  width: 40px;
  height: 4px;
  background: #1e293b;
  border-radius: 4px;
}

.wp-chat-header {
  background: #075E54;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.wp-contact-info {
  flex: 1;
}

.wp-contact-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.wp-contact-status {
  font-size: 0.68rem;
  opacity: 0.85;
}

.wp-chat-messages {
  flex: 1;
  background: #efeae2;
  background-image: radial-gradient(#d1d7db 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: #ffffff;
  color: #111b21;
  border-top-left-radius: 0;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.chat-bubble.user {
  align-self: flex-end;
  background: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 0;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.chat-time {
  font-size: 0.62rem;
  color: #667781;
  text-align: right;
  margin-top: 4px;
}

.quick-replies-container {
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 110px;
  overflow-y: auto;
}

.quick-btn {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s;
}

.quick-btn:hover {
  background: #dcfce7;
}

.simulator-progress-bar {
  height: 3px;
  background: #e2e8f0;
  width: 100%;
}

.progress-fill {
  height: 100%;
  background: var(--brand-green);
  transition: width 0.3s;
}

.wp-chat-input-bar {
  background: #f0f2f5;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-chat-input-bar input {
  flex: 1;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-family: inherit;
}

.wp-chat-input-bar input:focus {
  outline: none;
  border-color: #cbd5e1;
}

.btn-send-msg {
  width: 36px;
  height: 36px;
  background: #00a884;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.btn-input-action {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #54656f;
  cursor: pointer;
}

/* Simulator Inspector */
.simulator-inspector {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.session-data-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.session-data-item {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.session-data-key {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.session-data-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}

/* ========================================== */
/* Webhook Logs Tab                           */
/* ========================================== */
.logs-container {
  background: #0f172a;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  max-height: 650px;
  overflow-y: auto;
}

.log-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

.log-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  height: fit-content;
}

.log-tag.in {
  background: #065f46;
  color: #6ee7b7;
}

.log-tag.out {
  background: #1e3a8a;
  color: #93c5fd;
}

.log-tag.err {
  background: #7f1d1d;
  color: #fca5a5;
}

.log-time {
  color: #64748b;
  font-size: 0.72rem;
}

.log-body {
  color: #cbd5e1;
  word-break: break-all;
}

/* ========================================== */
/* Meta Setup Tab                             */
/* ========================================== */
.setup-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.config-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.config-key {
  font-weight: 600;
  color: var(--text-secondary);
}

.config-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  font-weight: 600;
}

.config-val.copyable {
  cursor: pointer;
  color: var(--brand-green-dark);
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--text-primary);
}

/* ========================================== */
/* Modals & Overlays                          */
/* ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  padding: 28px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.candidate-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.detail-item {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.detail-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 3px;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.25s ease-out;
}

.toast-notification.success {
  background: #065f46;
  border: 1px solid #059669;
}

.toast-notification.error {
  background: #7f1d1d;
  border: 1px solid #b91c1c;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ========================================== */
/* Responsive Styles                          */
/* ========================================== */
@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  .phone-mockup {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
  }
  .app-sidebar.open {
    left: 0;
  }
  .login-split-card {
    grid-template-columns: 1fr;
  }
  .login-right-pane {
    display: none;
  }
  .kpi-three-grid {
    grid-template-columns: 1fr;
  }
  .app-content {
    padding: 16px;
  }
}

/* ========================================== */
/* User & Role Management (RBAC) Styles       */
/* ========================================== */

.perm-checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.perm-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.perm-checkbox-card:hover {
  border-color: var(--brand-green);
  background: #fcfdfd;
}

.perm-checkbox-card.checked {
  border-color: var(--brand-green);
  background: #f0fdf4;
}

.perm-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-green);
  cursor: pointer;
  flex-shrink: 0;
}

.perm-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.perm-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.perm-card-icon {
  font-size: 1rem;
}

.perm-card-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.perm-card-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Custom Status Switch Toggle */
.custom-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.custom-switch input:checked + .switch-slider {
  background-color: var(--brand-green);
}

.custom-switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* User Table Badges & Cell Layout */
.user-cell-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-cell-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #0284c7);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.user-cell-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-cell-handle {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.user-self-tag {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.role-badge-admin {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.role-badge-recruiter {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.role-badge-ops {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.role-badge-staff {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.perm-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 320px;
}

.perm-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.perm-pill.perm-active {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.perm-pill.perm-all {
  background: linear-gradient(135deg, #fef3c7, #fef9c3);
  border: 1px solid #fde047;
  color: #854d0e;
  font-weight: 700;
}

.user-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.user-status-pill.active {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.user-status-pill.inactive {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #cbd5e1;
}

.user-row-deactivated {
  opacity: 0.65;
}

.table-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-warn {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.btn-warn:hover {
  background: #fef3c7;
}

/* ========================================================================== */
/* CANDIDATE FULL PAGE DETAIL VIEW STYLING                                    */
/* ========================================================================== */

.candidate-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-back-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-back-nav:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--brand-green-dark);
  transform: translateX(-3px);
  box-shadow: var(--shadow-md);
}

.back-arrow {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn-back-nav:hover .back-arrow {
  transform: translateX(-2px);
}

.detail-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.breadcrumb-item {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.breadcrumb-item:hover {
  color: var(--brand-green-dark);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-weight: 400;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 700;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-status-changer {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.detail-status-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-status-select {
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.detail-status-select:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-wa-chat-link {
  background: #25d366 !important;
  color: #ffffff !important;
  border-color: #20ba5a !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-wa-chat-link:hover {
  background: #1eb954 !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25) !important;
}

/* Hero Profile Banner */
.candidate-profile-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.candidate-profile-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-green) 0%, var(--brand-blue) 100%);
}

.candidate-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 22px;
}

.candidate-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border: 2px solid #ffffff;
}

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

.candidate-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.candidate-hero-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0;
  outline: none;
}

.candidate-hero-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-target-role {
  font-weight: 700;
  color: #1e293b;
}

.hero-sub-dot {
  color: var(--text-muted);
}

.hero-source-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.candidate-hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-pill-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* 2-Column Responsive Information Layout */
.candidate-detail-grid-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .candidate-detail-grid-layout {
    grid-template-columns: 1fr;
  }
}

/* Profile Section Cards */
.profile-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  margin-bottom: 20px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.profile-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-icon {
  font-size: 1.1rem;
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 20px;
}

@media (max-width: 640px) {
  .profile-fields-grid {
    grid-template-columns: 1fr;
  }
}

.field-item {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.field-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.mini-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #e2e8f0;
  text-decoration: none;
  font-size: 0.82rem;
  transition: all 0.15s ease;
}

.mini-icon-link:hover {
  background: #cbd5e1;
  transform: scale(1.08);
}

.badge-role-type {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-exp {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-fresher {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.fresher-callout-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px;
}

.fresher-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.skill-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.15s ease;
}

.skill-chip:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.badge-verified {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Resume Box */
.resume-document-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.resume-doc-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pdf-icon-badge {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  letter-spacing: 0.05em;
}

.resume-doc-meta {
  min-width: 0;
}

.resume-file-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.resume-file-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.resume-embed-container {
  width: 100%;
  height: 380px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f1f5f9;
}

.resume-embed-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.no-resume-box {
  text-align: center;
  padding: 32px 20px;
  background: #f8fafc;
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.mini-copy-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.mini-copy-btn:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

/* Print Optimization */
@media print {
  .app-sidebar,
  .app-topbar,
  .btn-back-nav,
  .detail-status-changer,
  .btn-wa-chat-link,
  .resume-embed-container,
  .toast-notification {
    display: none !important;
  }

  body, .app-shell, .app-main, .app-content {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .candidate-profile-hero {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }

  .candidate-detail-grid-layout {
    display: block !important;
  }

  .profile-card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    margin-bottom: 16px !important;
  }
}

/* ========================================================================== */
/* Company Profiles, Placements Tracking & Referral Commercials               */
/* ========================================================================== */

.kpi-six-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.margin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.78rem;
}

.margin-profit {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.margin-loss {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.status-active-chip {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 9999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pending-chip {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 9999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.placed-count-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
}

.industry-tag {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}

.referrer-pill {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #f3e8ff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bulk-action-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 9999px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  animation: floatUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bulk-action-floating-bar.active {
  display: flex;
}

@keyframes floatUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.filter-date-input {
  height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  background: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.filter-date-input:focus {
  border-color: var(--brand-blue, #2563eb);
}

.stat-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.doc-download-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.doc-download-chip:hover {
  background: #dbeafe;
  color: #1e40af;
}

/* ========================================================================== */
/* Invoice Tracker & Commercial Collections                                   */
/* ========================================================================== */

.billing-period-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
}

.status-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.73rem;
  font-weight: 700;
}

.badge-pill-reached {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-pill-guarantee {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.invoice-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.invoice-status-chip.badge-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.invoice-status-chip.badge-partial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.invoice-status-chip.badge-pending {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.invoice-status-chip.badge-due-alert {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  animation: pulseDue 2s infinite ease-in-out;
}

@keyframes pulseDue {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

.invoice-row-due {
  background: #fffdf5 !important;
}

/* Printable Professional Invoice Paper */
.printable-invoice-paper {
  background: #ffffff;
  border-radius: 8px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 780px;
  margin: 0 auto;
}

.inv-print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.inv-brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0045a5;
  letter-spacing: -0.5px;
}

.inv-brand-tagline {
  font-size: 0.8rem;
  color: #f97316;
  font-weight: 700;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inv-brand-details {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.45;
}

.inv-title-box {
  text-align: right;
}

.inv-main-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.inv-meta-row {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 2px;
}

.inv-stamp-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inv-stamp-status.stamp-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.inv-stamp-status.stamp-pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.inv-divider {
  border: 0;
  height: 1px;
  background: #e2e8f0;
  margin: 20px 0;
}

.inv-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.inv-col-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 16px;
}

.inv-card-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.inv-company-name {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.inv-card-text {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
  margin-top: 4px;
}

.inv-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.inv-print-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 12px;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

.inv-print-table td {
  padding: 12px;
  font-size: 0.85rem;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
}

.inv-print-table tfoot td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.inv-footer-section {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: flex-end;
  margin-top: 20px;
}

.inv-bank-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px 16px;
}

.inv-sign-box {
  text-align: center;
}

.inv-sign-line {
  border-top: 1px solid #0f172a;
  padding-top: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #0f172a;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printableInvoicePaper, #printableInvoicePaper * {
    visibility: visible;
  }
  #printableInvoicePaper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
