/* ═══════════════════════════════════════════════════════════════
   HRNEXUS — DESIGN SYSTEM
   Palette: Alpine Frost × Dark Navy
   Fonts: Bricolage Grotesque (display) + Plus Jakarta Sans (body)
═══════════════════════════════════════════════════════════════ */

:root {
  /* Core Palette */
  --navy-950: #020817;
  --navy-900: #0f172a;
  --navy-800: #1e293b;
  --navy-700: #334155;
  --navy-600: #475569;
  --navy-500: #64748b;
  --navy-400: #94a3b8;
  --navy-300: #cbd5e1;
  --navy-200: #e2e8f0;
  --navy-100: #f1f5f9;
  --navy-50:  #f8fafc;

  /* Accent Colors */
  --sky-500:  #0ea5e9;
  --sky-400:  #38bdf8;
  --sky-300:  #7dd3fc;
  --sky-100:  #e0f2fe;

  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-100: #dcfce7;

  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;

  --red-600:  #dc2626;
  --red-500:  #ef4444;
  --red-100:  #fee2e2;

  --purple-600: #9333ea;
  --purple-500: #a855f7;
  --purple-100: #f3e8ff;

  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;

  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;

  --yellow-500: #eab308;
  --yellow-100: #fef9c3;

  /* Semantic */
  --bg-primary:   #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card:      #ffffff;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted:   #94a3b8;

  /* Sidebar */
  --sidebar-bg:     #0f172a;
  --sidebar-hover:  #1e293b;
  --sidebar-active: rgba(56,189,248,0.12);
  --sidebar-text:   #94a3b8;
  --sidebar-active-text: #38bdf8;
  --sidebar-width:  260px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.hidden { display: none !important; }
.gradient-text {
  background: linear-gradient(135deg, var(--sky-400), var(--blue-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH SCREENS
═══════════════════════════════════════════════════════════════ */
.auth-screen {
  min-height: 100vh;
  background: var(--bg-primary);
}

.auth-page { display: none; }
.auth-page.active { display: flex; min-height: 100vh; }

/* Auth Left Panel */
.auth-left {
  width: 45%;
  background: var(--navy-900);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(56,189,248,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.auth-logo {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.auth-hero { position: relative; z-index: 1; }
.auth-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}
.auth-hero p {
  color: var(--navy-400);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.auth-features { display: flex; flex-direction: column; gap: 0.6rem; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy-300);
  font-size: 0.9rem;
}
.feature-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.feature-dot.green  { background: var(--green-500); box-shadow: 0 0 8px var(--green-500); }
.feature-dot.blue   { background: var(--sky-400);   box-shadow: 0 0 8px var(--sky-400); }
.feature-dot.orange { background: var(--orange-500); box-shadow: 0 0 8px var(--orange-500); }
.feature-dot.purple { background: var(--purple-500); box-shadow: 0 0 8px var(--purple-500); }

.auth-stats {
  display: flex;
  gap: 2rem;
  position: relative;
  z-index: 1;
}
.auth-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--sky-400);
}
.stat-label { font-size: 0.8rem; color: var(--navy-500); }

/* Auth Right Panel */
.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-primary);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}

.auth-card-header { text-align: center; margin-bottom: 2rem; }
.auth-card-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.auth-card-header p { color: var(--text-secondary); font-size: 0.9rem; }

.forgot-icon {
  width: 64px; height: 64px;
  background: var(--sky-100);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--sky-500);
}
.forgot-icon svg { width: 28px; height: 28px; }

/* Auth Form */
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.input-wrapper { position: relative; }
.input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--navy-400);
  pointer-events: none;
}
.input-wrapper input { padding-left: 2.5rem !important; }

.toggle-password {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy-400);
  padding: 0;
  transition: color var(--transition);
}
.toggle-password:hover { color: var(--text-primary); }
.toggle-password svg { width: 16px; height: 16px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
}
input:disabled, select:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
input[readonly] {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px; padding-right: 2.5rem; }
textarea { resize: vertical; min-height: 80px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-row-between { display: flex; align-items: center; justify-content: space-between; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--sky-500);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14,165,233,0.4);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--border); color: var(--text-primary); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--red-100);
  color: var(--red-600);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
}
.btn-danger:hover { background: var(--red-500); color: #fff; }

.btn-full { width: 100%; }

.link-btn {
  background: none;
  border: none;
  color: var(--sky-500);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
  font-family: inherit;
}
.link-btn:hover { color: var(--blue-600); }

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.7rem 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-google:hover { background: var(--bg-secondary); border-color: var(--navy-300); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-error {
  background: var(--red-100);
  color: var(--red-600);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.auth-success {
  background: var(--green-100);
  color: var(--green-600);
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-slow);
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-brand { flex: 1; }
.brand-name {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.brand-tagline {
  display: block;
  font-size: 0.72rem;
  color: var(--navy-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.sidebar-close {
  display: none;
  color: var(--navy-500);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.sidebar-close:hover { color: #fff; }
.sidebar-close svg { width: 18px; height: 18px; }

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
  padding: 0.5rem 0.75rem 0.4rem;
  margin-top: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.875rem;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 0.15rem;
  position: relative;
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--sky-400); }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item span:not(.nav-badge) { flex: 1; }

.nav-badge {
  background: var(--orange-500);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.75rem 0;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
}
.user-info { flex: 1; min-width: 0; }
.user-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role {
  display: block;
  font-size: 0.72rem;
  color: var(--navy-500);
  text-transform: capitalize;
}
.logout-btn {
  color: var(--navy-500);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--red-400); background: rgba(239,68,68,0.1); }
.logout-btn svg { width: 16px; height: 16px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ─── MAIN WRAPPER ───────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

/* ─── TOP HEADER ─────────────────────────────────────────────── */
.top-header {
  height: 64px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.menu-toggle {
  display: none;
  color: var(--text-secondary);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.menu-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); }
.menu-toggle svg { width: 20px; height: 20px; }

.page-title-area {}
.page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}
.header-search svg {
  position: absolute;
  left: 0.75rem;
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.header-search input {
  width: 220px;
  padding: 0.5rem 0.875rem 0.5rem 2.25rem;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.header-search input:focus {
  width: 280px;
  background: var(--bg-card);
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.1);
}

.header-clock {
  font-family: 'Bricolage Grotesque', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* Notifications */
.notif-wrapper { position: relative; }
.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}
.notif-btn:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--navy-300); }
.notif-btn svg { width: 18px; height: 18px; }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red-500);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-card);
  padding: 0 3px;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow: hidden;
  animation: dropIn 0.2s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.9rem;
}
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  cursor: pointer;
}
.notif-item:hover { background: var(--bg-secondary); }
.notif-item.unread { background: rgba(56,189,248,0.04); }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky-400);
  flex-shrink: 0;
  margin-top: 0.35rem;
}
.notif-item-content { flex: 1; }
.notif-item-msg { font-size: 0.85rem; color: var(--text-primary); line-height: 1.4; }
.notif-item-time { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

.header-avatar-btn {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition);
}
.header-avatar-btn:hover { transform: scale(1.05); }

/* ─── AVATARS ────────────────────────────────────────────────── */
.user-avatar-sm {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }

.user-avatar-lg {
  width: 48px; height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* ─── PAGE CONTENT ───────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 1.75rem;
  position: relative;
}

.page { display: none; animation: fadeIn 0.25s ease; }
.page.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── CARDS ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─── STATS GRID ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--sky-400), var(--blue-500)); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--orange-500), var(--yellow-500)); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--green-500), var(--teal-500)); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--red-500), var(--purple-500)); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.blue   { background: var(--blue-100);   color: var(--blue-600); }
.stat-icon.orange { background: var(--orange-100); color: var(--orange-600); }
.stat-icon.green  { background: var(--green-100);  color: var(--green-600); }
.stat-icon.red    { background: var(--red-100);    color: var(--red-600); }

.stat-info { flex: 1; }
.stat-value {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }
.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  align-self: flex-start;
  white-space: nowrap;
}
.stat-trend.up      { background: var(--green-100); color: var(--green-600); }
.stat-trend.down    { background: var(--red-100);   color: var(--red-600); }
.stat-trend.neutral { background: var(--bg-secondary); color: var(--text-muted); }

/* ─── DASHBOARD GRID ─────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.25rem;
}
.dashboard-main { display: flex; flex-direction: column; gap: 1.25rem; }
.dashboard-side { display: flex; flex-direction: column; gap: 1.25rem; }

/* Live Indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-100);
  color: var(--green-600);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Status Chart */
.status-chart { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.chart-bar-item { display: flex; flex-direction: column; gap: 0.3rem; }
.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.chart-bar-track {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* On Vacation List */
.on-vacation-list { padding: 0.75rem 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.vacation-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.vacation-person-info { flex: 1; }
.vacation-person-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.vacation-person-dates { font-size: 0.75rem; color: var(--text-muted); }
.empty-state-sm { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ─── PAGE TOOLBAR ───────────────────────────────────────────── */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 0.75rem; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box svg {
  position: absolute;
  left: 0.75rem;
  width: 15px; height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  width: 280px;
  padding: 0.6rem 0.875rem 0.6rem 2.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.filter-select {
  padding: 0.6rem 2.25rem 0.6rem 0.875rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  min-width: 130px;
}

/* ─── DATA TABLES ────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(56,189,248,0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem !important;
  font-size: 0.875rem;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.employee-cell-info { display: flex; flex-direction: column; }
.employee-cell-name { font-weight: 600; color: var(--text-primary); font-size: 0.875rem; }
.employee-cell-sub  { font-size: 0.75rem; color: var(--text-muted); }

/* Action buttons */
.action-btns { display: flex; align-items: center; gap: 0.4rem; }
.action-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  color: var(--text-muted);
}
.action-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.action-btn.edit:hover  { background: var(--blue-100);  color: var(--blue-600); }
.action-btn.delete:hover { background: var(--red-100);  color: var(--red-600); }
.action-btn.view:hover  { background: var(--sky-100);   color: var(--sky-500); }
.action-btn svg { width: 14px; height: 14px; }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-green   { background: var(--green-100);  color: var(--green-600); }
.badge-blue    { background: var(--blue-100);   color: var(--blue-600); }
.badge-orange  { background: var(--orange-100); color: var(--orange-600); }
.badge-red     { background: var(--red-100);    color: var(--red-600); }
.badge-purple  { background: var(--purple-100); color: var(--purple-600); }
.badge-teal    { background: var(--teal-100);   color: var(--teal-600); }
.badge-gray    { background: var(--bg-secondary); color: var(--text-secondary); }
.badge-yellow  { background: var(--yellow-100); color: #92400e; }

/* Status-specific badges */
.status-APPROVED    { background: var(--green-100);  color: var(--green-600); }
.status-APPLIED     { background: var(--blue-100);   color: var(--blue-600); }
.status-ON\ VACATION { background: var(--purple-100); color: var(--purple-600); }
.status-ON\ TIME    { background: var(--teal-100);   color: var(--teal-600); }
.status-EXPIRED     { background: var(--red-100);    color: var(--red-600); }
.status-OTHER       { background: var(--bg-secondary); color: var(--text-secondary); }

/* EOS Reason badges */
.reason-Contract\ End { background: var(--blue-100);   color: var(--blue-600); }
.reason-Termination   { background: var(--red-100);    color: var(--red-600); }
.reason-Resignation   { background: var(--orange-100); color: var(--orange-600); }
.reason-Retirement    { background: var(--green-100);  color: var(--green-600); }
.reason-Other         { background: var(--bg-secondary); color: var(--text-secondary); }

/* Employee status */
.status-Active   { background: var(--green-100);  color: var(--green-600); }
.status-Inactive { background: var(--red-100);    color: var(--red-600); }

/* ─── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: overlayIn 0.2s ease;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  border: 1px solid var(--border);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-lg  { max-width: 640px; }
.modal-xl  { max-width: 860px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.modal-close svg { width: 16px; height: 16px; }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.modal-body form { display: flex; flex-direction: column; gap: 1rem; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── DROPZONE ───────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--sky-400);
  background: rgba(56,189,248,0.04);
  color: var(--sky-500);
}
.dropzone svg { width: 28px; height: 28px; }

.attachment-preview {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.attachment-preview svg { width: 18px; height: 18px; color: var(--sky-500); flex-shrink: 0; }
.attachment-preview a { color: var(--sky-500); font-weight: 500; }
.attachment-preview a:hover { text-decoration: underline; }

/* ─── PROFILE PAGE ───────────────────────────────────────────── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.profile-sidebar-card { padding: 2rem 1.5rem; }
.profile-avatar-section { text-align: center; margin-bottom: 1.5rem; }
.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--sky-500), var(--blue-600));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 3px solid var(--border);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-btn {
  position: absolute;
  bottom: -4px; right: -4px;
  width: 28px; height: 28px;
  background: var(--sky-500);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.avatar-upload-btn:hover { background: var(--blue-600); transform: scale(1.1); }
.avatar-upload-btn svg { width: 13px; height: 13px; }
.profile-avatar-section h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

.profile-meta { display: flex; flex-direction: column; gap: 0.75rem; }
.meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.meta-item svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }

.profile-form { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }

/* ─── ADMIN PANEL ────────────────────────────────────────────── */
.admin-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.admin-stats-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.system-stats { padding: 1.25rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sys-stat {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}
.sys-stat-val {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--sky-500);
}
.sys-stat-label { font-size: 0.78rem; color: var(--text-muted); }

/* ─── TOAST NOTIFICATIONS ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  border-left: 4px solid var(--sky-400);
}
.toast.success { border-left-color: var(--green-500); }
.toast.error   { border-left-color: var(--red-500); }
.toast.warning { border-left-color: var(--orange-500); }
.toast-icon { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--green-400); }
.toast.error   .toast-icon { color: var(--red-400); }
.toast.warning .toast-icon { color: var(--orange-400); }
.toast-out { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ─── VIEW MODAL DETAILS ─────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.detail-item { display: flex; flex-direction: column; gap: 0.25rem; }
.detail-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }
.detail-full { grid-column: 1 / -1; }

/* ─── LOADING SPINNER ────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h4 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.875rem; }

/* ─── VACATION TABLE SPECIFIC ────────────────────────────────── */
.vacation-table th, .vacation-table td { white-space: nowrap; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-side { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: flex; }
  .sidebar-overlay.visible { display: block; }
  .main-wrapper { margin-left: 0; }
  .menu-toggle { display: flex; }
  .profile-layout { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .auth-page.active { flex-direction: column; }
  .auth-left { width: 100%; padding: 2rem; min-height: auto; }
  .auth-hero h1 { font-size: 1.75rem; }
  .auth-stats { gap: 1.5rem; }
  .auth-right { padding: 1.5rem; }
  .auth-card { padding: 1.75rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-side { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .header-search { display: none; }
  .header-clock { display: none; }
  .modal-xl { max-width: 100%; }
  .modal-lg  { max-width: 100%; }
  .system-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-box input { width: 100%; }
  .top-header { padding: 0 1rem; }
  .auth-left { display: none; }
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-400); }

/* ─── SELECTION ──────────────────────────────────────────────── */
::selection { background: rgba(56,189,248,0.2); color: var(--text-primary); }

/* ─── PRINT ──────────────────────────────────────────────────── */
@media print {
  .sidebar, .top-header, .page-toolbar { display: none; }
  .main-wrapper { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}