/* styles.css - Premium Glassmorphism Theme for AI Recruitment & HR platform (Enterprise Version) */

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

/* Variables */
:root {
  /* Common Accents */
  --primary: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.15);
  --secondary: #8b5cf6; /* Violet */
  --secondary-glow: rgba(139, 92, 246, 0.15);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.15);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.15);
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.15);
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.15);

  --font-sans: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;

  /* Theme Defaults (Dark Mode is Default) */
  --bg-app: #030712;
  --bg-sidebar: rgba(11, 15, 25, 0.75);
  --card-bg-rgb: 17, 24, 39;
  --card-bg: rgba(17, 24, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-rgb: 255, 255, 255;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --glass-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --header-bg: rgba(3, 7, 18, 0.6);
  --input-bg: rgba(31, 41, 55, 0.5);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --scrollbar-thumb: #374151;
}

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-sidebar: rgba(255, 255, 255, 0.85);
  --card-bg-rgb: 255, 255, 255;
  --card-bg: rgba(255, 255, 255, 0.75);
  --border-color: rgba(0, 0, 0, 0.06);
  --border-color-rgb: 0, 0, 0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --glass-glow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
  --header-bg: rgba(248, 250, 252, 0.6);
  --input-bg: rgba(255, 255, 255, 0.8);
  --hover-bg: rgba(0, 0, 0, 0.03);
  --scrollbar-thumb: #cbd5e1;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-color);
  box-shadow: var(--glass-glow);
  border-radius: 16px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Auth View Styles */
#auth-view {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 90.2%), var(--bg-app);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#auth-view.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 40px;
  text-align: center;
}

.auth-header {
  margin-bottom: 30px;
}

.auth-header h1 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  margin-top: 10px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 5px;
}

.role-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.role-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.role-btn:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.role-btn svg {
  color: var(--primary);
  width: 24px;
  height: 24px;
}

.role-btn .role-info {
  display: flex;
  flex-direction: column;
}

.role-btn .role-title {
  font-weight: 600;
}

.role-btn .role-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.auth-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* App Main Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.sidebar-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 8px;
  overflow-y: auto;
  flex-grow: 1;
}

.menu-item {
  margin-bottom: 4px;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.menu-link:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.menu-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.menu-link.active svg {
  color: #fff;
}

.menu-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s ease;
}

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

.user-role-badge {
  font-size: 0.7rem;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  width: fit-content;
  font-weight: 600;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
  width: 76px;
}
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .user-meta,
.sidebar.collapsed .sidebar-logo + span {
  opacity: 0;
  pointer-events: none;
  display: none;
}
.sidebar.collapsed .menu-link span {
  display: none;
}
.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 24px 0;
}

/* App Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Header */
.top-header {
  height: 70px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--hover-bg);
}

.search-bar-wrapper {
  position: relative;
  width: 320px;
}

.search-bar-wrapper input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border-radius: 99px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.search-bar-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.voice-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.voice-search-btn:hover {
  color: var(--primary);
  background: var(--hover-bg);
}

.voice-search-btn.listening {
  color: var(--rose);
  animation: pulse-mic 1.2s infinite;
}

@keyframes pulse-mic {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.25); opacity: 0.7; }
  100% { transform: translateY(-50%) scale(1); }
}

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

.header-btn {
  position: relative;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.header-btn:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
  transform: scale(1.05);
}

.header-btn svg {
  width: 20px;
  height: 20px;
}

.badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--rose);
  border-radius: 50%;
  border: 2px solid var(--bg-app);
}

/* Notification Dropdown Drawer */
.notif-dropdown {
  position: absolute;
  top: 80px;
  right: 80px;
  width: 320px;
  z-index: 110;
  display: none;
  animation: fade-slide-in 0.25s ease;
}

.notif-dropdown.show {
  display: block;
}

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

.dropdown-header h3 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
}

.clear-notif-btn {
  font-size: 0.75rem;
  color: var(--primary);
  background: transparent;
  border: none;
  cursor: pointer;
}

.notif-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s ease;
}

.notif-item:hover {
  background: var(--hover-bg);
}

.notif-item.unread {
  background: rgba(99, 102, 241, 0.05);
}

.notif-item h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.notif-item p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.notif-item .notif-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Page Containers */
.page-view {
  padding: 32px;
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: page-slide-in-anim 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  height: calc(100vh - 70px);
}

.page-view.active {
  display: flex;
}

@keyframes page-slide-in-anim {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.page-header h2 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  background: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.1);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.2);
}

.btn-danger:hover {
  background: var(--rose);
  color: #fff;
}

/* Dashboard Page Widgets */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.metric-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.metric-card.color-2::before { background: var(--secondary); }
.metric-card.color-3::before { background: var(--cyan); }
.metric-card.color-4::before { background: var(--emerald); }
.metric-card.color-5::before { background: var(--amber); }

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.metric-header svg {
  width: 18px;
  height: 18px;
}

.metric-value {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.metric-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  margin-top: 8px;
  font-weight: 600;
}

.metric-change.up { color: var(--emerald); }
.metric-change.down { color: var(--rose); }

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 24px;
}

.chart-panel {
  padding: 24px;
  height: 340px;
  display: flex;
  flex-direction: column;
}

.chart-panel h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.chart-container {
  position: relative;
  flex-grow: 1;
  height: 0;
}

.bottom-dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
}

/* Hiring Pipeline View (Kanban Board) */
.pipeline-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
  flex-grow: 1;
  min-height: 500px;
}

.pipeline-column {
  width: 280px;
  flex-shrink: 0;
  background: rgba(var(--card-bg-rgb), 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
  transition: all 0.25s ease;
}

.pipeline-column.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  box-shadow: 0 0 12px var(--primary-glow);
}

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

.column-title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.column-header.Applied .column-dot { background: var(--primary); }
.column-header.Screening .column-dot { background: var(--secondary); }
.column-header.Interview .column-dot { background: var(--cyan); }
.column-header.Assessment .column-dot { background: var(--amber); }
.column-header.Final-Round .column-dot { background: var(--secondary); }
.column-header.Selected .column-dot { background: var(--emerald); }
.column-header.Rejected .column-dot { background: var(--rose); }

.column-count {
  font-size: 0.75rem;
  background: var(--input-bg);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.candidate-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  min-height: 200px;
}

/* Candidate Kanban Card */
.candidate-card {
  padding: 14px;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
}

.candidate-card:active {
  cursor: grabbing;
}

.candidate-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cand-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.cand-card-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cand-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.cand-card-score {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
}

.cand-card-score.score-high {
  background: var(--emerald-glow);
  color: var(--emerald);
}
.cand-card-score.score-mid {
  background: var(--amber-glow);
  color: var(--amber);
}
.cand-card-score.score-low {
  background: var(--rose-glow);
  color: var(--rose);
}

.cand-card-exp {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cand-card-actions {
  display: flex;
  gap: 4px;
}

.cand-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cand-mini-btn:hover {
  color: var(--primary);
  background: var(--hover-bg);
}

/* ATS Candidate Ranking Table Views */
.ats-filter-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.ats-filter-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.ats-filter-section label {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.ats-filter-range {
  width: 100%;
  accent-color: var(--primary);
}

.ats-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

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

.ats-table th, .ats-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.ats-table th {
  background: rgba(0,0,0,0.15);
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--text-secondary);
}

.ats-table tr:hover {
  background: var(--hover-bg);
}

.ats-table tr.highlighted {
  background: var(--primary-glow);
}

/* Side-by-Side Candidate Comparison CSS */
.compare-header-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.compare-profile-card {
  padding: 24px;
  text-align: center;
}

.compare-profile-card h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-top: 12px;
}

.compare-matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.85rem;
}

.compare-matrix-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.compare-matrix-table tr td:first-child {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Interview Scheduling Calendar Widget */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  flex-grow: 1;
}

.calendar-main-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.calendar-navigation h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
}

.calendar-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex-grow: 1;
}

.calendar-day-cell {
  aspect-ratio: 1.2;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(var(--card-bg-rgb), 0.25);
  position: relative;
}

.calendar-day-cell:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
}

.calendar-day-cell.active-day {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.calendar-day-cell.other-month {
  opacity: 0.35;
  cursor: not-allowed;
}

.calendar-day-number {
  font-size: 0.8rem;
  font-weight: 600;
}

.calendar-dots-indicator {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.calendar-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.calendar-event-dot.tech { background: var(--cyan); }
.calendar-event-dot.hr { background: var(--secondary); }

.calendar-scheduler-pane {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.calendar-schedule-card {
  padding: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 3px solid var(--primary);
}

.calendar-schedule-card.tech { border-left-color: var(--cyan); }
.calendar-schedule-card.hr { border-left-color: var(--secondary); }

.calendar-schedule-meta {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

/* Toast System Notifications */
.toast-notification-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message-card {
  width: 340px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
  animation: toast-slide-in-anim 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.25s ease;
  position: relative;
}

.toast-message-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--primary);
  animation: toast-timer-anim 4.5s linear forwards;
}

.toast-message-card.error::after { background: var(--rose); }
.toast-message-card.success::after { background: var(--emerald); }

@keyframes toast-slide-in-anim {
  from { transform: translateX(100%) scale(0.9); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toast-timer-anim {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-message-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* AI chat view */
.ai-assistant-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  flex-grow: 1;
  height: calc(100vh - 190px);
}

.candidates-selector-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.candidates-selector-panel h3 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
}

.comp-selector-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex-grow: 1;
}

.comp-selector-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.comp-selector-item:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
}

.comp-selector-item.selected {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.comp-selector-item input[type="checkbox"] {
  accent-color: var(--primary);
}

.comp-selector-item .comp-meta {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
}

.comp-selector-item .comp-name {
  font-weight: 600;
}

.comp-selector-item .comp-role {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.chat-panel-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  animation: fade-slide-in 0.25s ease;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble h3 { font-family: var(--font-title); font-size: 1rem; margin-top: 8px; margin-bottom: 6px; }
.chat-bubble h4 { font-family: var(--font-title); font-size: 0.9rem; margin-top: 6px; margin-bottom: 4px; }
.chat-bubble ul, .chat-bubble ol { padding-left: 20px; margin-bottom: 8px; }
.chat-bubble li { margin-bottom: 4px; }
.chat-bubble table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.8rem; }
.chat-bubble th, .chat-bubble td { padding: 8px; border: 1px solid var(--border-color); text-align: left; }
.chat-bubble th { background: rgba(0,0,0,0.1); font-weight: 600; }
.chat-bubble code { background: rgba(0, 0, 0, 0.2); padding: 2px 4px; border-radius: 4px; font-family: monospace; font-size: 0.8rem; }
.chat-bubble.user code { background: rgba(255, 255, 255, 0.2); }

@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble .typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.chat-bubble .typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.chat-bubble .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-chips-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip-btn {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.chat-form-wrapper {
  display: flex;
  gap: 12px;
}

.chat-form-wrapper input {
  flex-grow: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.chat-form-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Resume Analyzer View */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(var(--card-bg-rgb), 0.2);
}

.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.upload-dropzone svg {
  color: var(--primary);
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

.upload-dropzone h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.upload-dropzone p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.parser-progress-container {
  display: none;
  margin-top: 20px;
}

.parser-progress-container.show {
  display: block;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--input-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.1s linear;
}

.parsed-results-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 24px;
  margin-top: 24px;
}

.parsed-card {
  padding: 24px;
}

.parsed-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.parsed-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.parsed-title-info h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
}

.parsed-title-info p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.info-label-group {
  margin-bottom: 16px;
}

.info-label-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.info-label-group span, .info-label-group p {
  font-size: 0.85rem;
  font-weight: 500;
}

.skills-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-company {
  color: var(--primary);
}

.timeline-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Candidate Detail Overlay Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-content-wrapper {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-scale-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-scale-in {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

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

.modal-body {
  padding: 32px;
}

/* AI Insights Panel details */
.insight-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.insight-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.insight-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.insight-card-title svg {
  width: 20px;
  height: 20px;
}

.insight-card-title.top-cand svg { color: var(--emerald); }
.insight-card-title.risk-cand svg { color: var(--rose); }
.insight-card-title.sug-cand svg { color: var(--amber); }

.insight-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.insight-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--input-bg);
  border-radius: 6px;
  font-size: 0.8rem;
}

.insight-item span {
  font-weight: 500;
}

.insight-item-score {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.insight-item-score.high { background: var(--emerald-glow); color: var(--emerald); }
.insight-item-score.low { background: var(--rose-glow); color: var(--rose); }
.insight-item-score.consider { background: var(--amber-glow); color: var(--amber); }

.insight-paragraph {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Activity Logs list styling */
.logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.log-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--hover-bg);
  border-radius: 8px;
  font-size: 0.8rem;
  border-left: 2px solid var(--primary);
}

.log-row.system {
  border-left-color: var(--cyan);
}

.log-row .log-action {
  font-weight: 500;
}

.log-row .log-user {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-right: 4px;
}

.log-row .log-time {
  font-size: 0.7 room;
  color: var(--text-muted);
}

/* Job Matcher elements */
.matcher-split-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.jd-paste-box {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 12px;
  resize: none;
}

.jd-paste-box:focus {
  outline: none;
  border-color: var(--primary);
}

.match-score-radial-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.radial-percentage-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--bg-app) 79%, transparent 80% 100%),
              conic-gradient(var(--primary) 0%, var(--border-color) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 0 16px var(--primary-glow);
}

/* Score display bar */
.custom-progress-row {
  margin-bottom: 12px;
}
.custom-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.custom-progress-bg {
  width: 100%;
  height: 6px;
  background: var(--input-bg);
  border-radius: 3px;
  overflow: hidden;
}
.custom-progress-fill {
  height: 100%;
  background: var(--primary);
}

/* Selection components */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  appearance: none;
  cursor: pointer;
}

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

/* Custom form inputs */
.form-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-input-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input-group input, .form-input-group select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.form-input-group input:focus, .form-input-group select:focus {
  outline: none;
  border-color: var(--primary);
}

/* Text editor layout (Interview Gen & Email Automator) */
.editor-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.editor-preview-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.editor-textarea {
  width: 100%;
  flex-grow: 1;
  min-height: 350px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.85rem;
  padding: 20px;
  resize: none;
}

.editor-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* General Layout helpers */
.flex-row-gap {
  display: flex;
  gap: 16px;
}
.flex-column-gap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.margin-top-auto { margin-top: auto; }
.full-width { width: 100%; }

/* Toggle Switch */
.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch-track {
  width: 44px;
  height: 22px;
  border-radius: 99px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  position: relative;
  transition: background 0.3s ease;
}

.switch-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  position: absolute;
  top: 2px;
  left: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .switch-thumb {
  background: var(--primary);
}

.toggle-switch-wrapper input {
  display: none;
}

.toggle-switch-wrapper input:checked + .switch-track {
  background: var(--primary-glow);
  border-color: var(--primary);
}

.toggle-switch-wrapper input:checked + .switch-track .switch-thumb {
  left: 23px;
  background: var(--primary);
}

/* Reports view layouts */
.reports-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
}

.reports-list-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-item-btn {
  text-align: left;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.report-item-btn:hover {
  border-color: var(--primary);
  background: var(--hover-bg);
}

.report-item-btn.active {
  border-color: var(--primary);
  background: var(--primary-glow);
  font-weight: 600;
}

.report-paper-preview {
  background: #fff;
  color: #0f172a;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  min-height: 500px;
  border: 1px solid #e2e8f0;
}

/* Print Overrides for simulated PDF exports */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .sidebar, .top-header, .page-header, .reports-list-panel, .btn, .header-right {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .page-view {
    display: block !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .report-paper-preview {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    font-size: 11pt !important;
  }
}

/* Responsive Rules */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-charts-grid, .bottom-dashboard-grid, .ai-assistant-container, .parsed-results-grid, .insight-card-grid, .matcher-split-grid, .editor-split-grid, .reports-layout, .calendar-layout {
    grid-template-columns: 1fr;
  }
  .ai-assistant-container {
    height: auto;
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    left: -260px;
  }
  .sidebar.mobile-open {
    left: 0;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .search-bar-wrapper {
    width: 150px;
  }
  .top-header {
    padding: 0 16px;
  }
  .page-view {
    padding: 16px;
  }
}
