/* =========================================================
   EyrieQ HR Portal — Production CSS
   Design: Glassmorphism · Space Grotesk + Fraunces
   ========================================================= */

/* ---------------------------------------------------------
   1. CSS Reset + Custom Properties
   --------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --color-bg:          #f1f5f9;
  --color-slate:       #0f172a;
  --color-slate-700:   #334155;
  --color-slate-500:   #64748b;
  --color-slate-300:   #cbd5e1;
  --color-slate-100:   #f1f5f9;
  --color-white:       #ffffff;
  --color-cyan:        #06b6d4;
  --color-cyan-dark:   #0891b2;
  --color-cyan-light:  #cffafe;
  --color-emerald:     #10b981;
  --color-emerald-dark:#059669;
  --color-amber:       #fbbf24;
  --color-amber-dark:  #d97706;
  --color-red:         #ef4444;
  --color-red-dark:    #dc2626;
  --color-purple:      #8b5cf6;

  /* Glass */
  --glass-bg:          rgba(255, 255, 255, 0.85);
  --glass-border:      rgba(255, 255, 255, 0.6);
  --glass-shadow:      0 4px 24px rgba(0, 0, 0, 0.07);
  --glass-blur:        blur(16px);
  --glass-radius:      20px;

  /* Layout */
  --sidebar-w:         260px;

  /* Typography */
  --font-body:         'Space Grotesk', system-ui, sans-serif;
  --font-heading:      'Fraunces', Georgia, serif;

  /* Motion */
  --transition:        0.2s ease;
  --transition-slow:   0.35s ease;
}

/* ---------------------------------------------------------
   2. Body / Background with gradient + orbs
   --------------------------------------------------------- */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-slate);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #e0f2fe 0%, #f1f5f9 50%, #fef9c3 100%);
  z-index: -2;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
}

.orb-a {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: -150px;
  right: -150px;
}

.orb-b {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #fbbf24 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

/* ---------------------------------------------------------
   3. App Layout
   --------------------------------------------------------- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  gap: 0;
}

/* ---------------------------------------------------------
   4. Sidebar
   --------------------------------------------------------- */
.sidebar {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: var(--glass-blur);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-emerald));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.28);
  padding: 14px 20px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
  color: white;
  background: rgba(6, 182, 212, 0.16);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-cyan);
  border-radius: 0 2px 2px 0;
}

.nav-link-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px 7px 46px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 400;
  transition: all var(--transition);
}

.nav-sub-link:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.04);
}

.nav-sub-link.active {
  color: var(--color-cyan);
}

.nav-sub-link::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-user {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-purple), var(--color-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-logout {
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 5px;
  border-radius: 6px;
  transition: color var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

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

/* ---------------------------------------------------------
   5. Main Content Area
   --------------------------------------------------------- */
.main-area {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.main-content {
  flex: 1;
  padding: 28px 32px 48px;
}

/* ---------------------------------------------------------
   6. Topbar
   --------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.topbar-breadcrumb {
  font-size: 0.8rem;
  color: var(--color-slate-500);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-slate);
}

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

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-slate);
  font-size: 1.25rem;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition);
}

.hamburger-btn:hover { background: rgba(0, 0, 0, 0.06); }

/* Overlay is hidden on desktop — position:fixed removes it from grid flow */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
}

.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-slate-700);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition);
}

.notif-bell-btn:hover { background: rgba(0, 0, 0, 0.06); }

.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  background: var(--color-red);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ---------------------------------------------------------
   7. Glass Panel
   --------------------------------------------------------- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-slate);
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--color-slate-500);
  margin-top: 2px;
}

/* ---------------------------------------------------------
   8. Metric Cards
   --------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--glass-radius) var(--glass-radius) 0 0;
}

.metric-card.accent-cyan::before    { background: linear-gradient(90deg, var(--color-cyan), var(--color-cyan-dark)); }
.metric-card.accent-emerald::before { background: linear-gradient(90deg, var(--color-emerald), var(--color-emerald-dark)); }
.metric-card.accent-amber::before   { background: linear-gradient(90deg, var(--color-amber), var(--color-amber-dark)); }
.metric-card.accent-red::before     { background: linear-gradient(90deg, var(--color-red), var(--color-red-dark)); }
.metric-card.accent-purple::before  { background: linear-gradient(90deg, var(--color-purple), #7c3aed); }

.metric-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-slate);
  line-height: 1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--color-slate-500);
  font-weight: 500;
}

/* ---------------------------------------------------------
   9. Data Tables
   --------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th {
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-slate-500);
  border-bottom: 1px solid var(--color-slate-300);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  vertical-align: middle;
  color: var(--color-slate-700);
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------------------------------------------------------
   10. Forms
   --------------------------------------------------------- */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-slate-700);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 13px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-slate);
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--color-slate-300);
  border-radius: 10px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--color-slate-300); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-slate-300);
}

/* ---------------------------------------------------------
   11. Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-cyan), var(--color-cyan-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-cyan-dark), #0e7490);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-emerald), var(--color-emerald-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-emerald-dark), #047857);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-red-dark), #b91c1c);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-slate-700);
  border: 1.5px solid var(--color-slate-300);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--color-slate-500);
}

.btn-amber {
  background: linear-gradient(135deg, var(--color-amber), var(--color-amber-dark));
  color: var(--color-slate);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.btn-sm  { padding: 6px 12px; font-size: 0.8125rem; border-radius: 8px; }
.btn-xs  { padding: 4px 9px;  font-size: 0.75rem;   border-radius: 6px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---------------------------------------------------------
   12. Badges
   --------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 100px;
}

.badge-pending   { background: rgba(251,191,36,0.15);  color: #b45309; }
.badge-approved  { background: rgba(16,185,129,0.12);  color: #065f46; }
.badge-rejected  { background: rgba(239,68,68,0.12);   color: #991b1b; }
.badge-cancelled { background: rgba(100,116,139,0.12); color: #475569; }
.badge-clocked-in  { background: rgba(6,182,212,0.12);    color: #0e7490; }
.badge-clocked-out { background: rgba(100,116,139,0.10);  color: #475569; }
.badge-on-break    { background: rgba(139,92,246,0.12);   color: #5b21b6; }
.badge-admin    { background: rgba(239,68,68,0.12);   color: #991b1b; }
.badge-manager  { background: rgba(139,92,246,0.12);  color: #5b21b6; }
.badge-employee { background: rgba(6,182,212,0.12);   color: #0e7490; }

/* ---------------------------------------------------------
   13. Modal Overlay + Box
   --------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: var(--glass-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-slate-500);
  font-size: 1.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background var(--transition);
  line-height: 1;
}

.modal-close:hover { background: rgba(0, 0, 0, 0.06); }

.modal-body   { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-slate-300);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------------------------------------------------------
   14. Status Dots
   --------------------------------------------------------- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.active  { background: var(--color-emerald); box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
.status-dot.away    { background: var(--color-amber);   box-shadow: 0 0 0 2px rgba(251,191,36,0.25); }
.status-dot.offline { background: var(--color-slate-300); }

.status-dot.active.pulse { animation: pulse-dot 2s infinite; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
  50%       { box-shadow: 0 0 0 5px rgba(16,185,129,0.1); }
}

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

.toast {
  background: var(--color-slate);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.3s ease;
}

.toast.toast-success { background: var(--color-emerald-dark); }
.toast.toast-error   { background: var(--color-red-dark); }
.toast.toast-warning { background: var(--color-amber-dark); color: var(--color-slate); }
.toast.toast-info    { background: var(--color-cyan-dark); }
.toast.fade-out      { animation: toast-out 0.3s ease forwards; }

@keyframes toast-in  { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform: translateX(0); } }
@keyframes toast-out { from { opacity:1; transform: translateX(0); }   to { opacity:0; transform: translateX(30px); } }

/* ---------------------------------------------------------
   16. Skeleton Loading
   --------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: 6px;
}

@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 4px; }

/* ---------------------------------------------------------
   17. Login Page
   --------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
}

.login-logo { text-align: center; margin-bottom: 28px; }

.login-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--color-cyan), var(--color-emerald));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  font-weight: 700;
  margin: 0 auto 12px;
}

.login-logo-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-slate);
}

.login-logo-tagline {
  font-size: 0.8rem;
  color: var(--color-slate-500);
}

/* ---------------------------------------------------------
   18. Tabs
   --------------------------------------------------------- */
.tab-group {
  display: flex;
  gap: 4px;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-item {
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 9px;
  border: none;
  background: none;
  color: var(--color-slate-500);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.tab-item:hover { color: var(--color-slate); }

.tab-item.active {
  background: white;
  color: var(--color-slate);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------------------------
   19. Notification Drawer
   --------------------------------------------------------- */
.notif-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 100vw;
  background: white;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.12);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.notif-drawer.open { transform: translateX(0); }

.notif-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,0.2);
}

.notif-drawer-backdrop.open { display: block; }

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-slate-300);
  flex-shrink: 0;
}

.notif-drawer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}

.notif-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid rgba(203, 213, 225, 0.4);
}

.notif-item:hover { background: rgba(6, 182, 212, 0.04); }
.notif-item.unread { background: rgba(6, 182, 212, 0.05); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-cyan);
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-item.read .notif-dot { visibility: hidden; }

.notif-content { flex: 1; min-width: 0; }
.notif-title   { font-size: 0.8125rem; font-weight: 600; color: var(--color-slate); margin-bottom: 2px; }
.notif-body    { font-size: 0.75rem; color: var(--color-slate-500); line-height: 1.4; }
.notif-time    { font-size: 0.7rem; color: var(--color-slate-300); margin-top: 4px; }

.notif-drawer-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--color-slate-300);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Utility / Misc
   --------------------------------------------------------- */
.page-header { margin-bottom: 28px; }

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-slate);
  line-height: 1.2;
}

.page-subtitle { font-size: 0.875rem; color: var(--color-slate-500); margin-top: 4px; }

.flex            { display: flex; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2           { gap: 8px; }
.gap-3           { gap: 12px; }
.gap-4           { gap: 16px; }
.flex-wrap       { flex-wrap: wrap; }
.mt-4            { margin-top: 16px; }
.mb-4            { margin-bottom: 16px; }

.empty-state      { text-align: center; padding: 48px 24px; color: var(--color-slate-500); }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.35; }
.empty-state-text { font-size: 0.9rem; }

.search-input-wrap          { position: relative; }
.search-input-wrap .search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--color-slate-500);
  font-size: 0.9rem; pointer-events: none;
}
.search-input-wrap .form-input { padding-left: 36px; }

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

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(6,182,212,0.2);
  border-top-color: var(--color-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.member-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-purple), var(--color-cyan));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.875rem; font-weight: 700; flex-shrink: 0;
}

.member-info  { flex: 1; min-width: 0; }
.member-name  { font-size: 0.875rem; font-weight: 600; color: var(--color-slate); }
.member-title { font-size: 0.75rem; color: var(--color-slate-500); }

.clock-display {
  font-family: 'Space Grotesk', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-slate);
  letter-spacing: 0.05em;
}

.clock-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-slate-500);
  margin-top: 4px;
}

.org-node {
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  min-width: 130px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.org-node:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.org-node.root  { border-color: var(--color-cyan); background: rgba(6,182,212,0.06); }
.org-node-name  { font-weight: 600; font-size: 0.8125rem; color: var(--color-slate); }
.org-node-role  { font-size: 0.7rem; color: var(--color-slate-500); margin-top: 2px; }

.org-tree-wrapper { overflow-x: auto; padding: 20px; }

.org-tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tree-children {
  display: flex;
  gap: 24px;
  justify-content: center;
  position: relative;
  padding-top: 28px;
  margin-top: 0;
}

.org-tree-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 28px;
  background: var(--color-slate-300);
  transform: translateX(-50%);
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(241,245,249,0.7);
  border-radius: 12px;
  border: 1px solid var(--color-slate-300);
  transition: background var(--transition);
}

.doc-card:hover { background: rgba(6,182,212,0.06); }
.doc-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-name { font-size: 0.875rem; font-weight: 500; color: var(--color-slate); }
.doc-meta { font-size: 0.75rem; color: var(--color-slate-500); }

.inline-edit-group { display: flex; align-items: center; gap: 6px; }

.inline-input {
  padding: 4px 8px;
  font-size: 0.8125rem;
  font-family: var(--font-body);
  border: 1.5px solid var(--color-slate-300);
  border-radius: 7px;
  outline: none;
  min-width: 0;
  transition: border-color var(--transition);
}

.inline-input:focus { border-color: var(--color-cyan); }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info    { background: rgba(6,182,212,0.1);  border:1px solid rgba(6,182,212,0.25);  color: #0e7490; }
.alert-success { background: rgba(16,185,129,0.1); border:1px solid rgba(16,185,129,0.25); color: #065f46; }
.alert-warning { background: rgba(251,191,36,0.1); border:1px solid rgba(251,191,36,0.3);  color: #92400e; }
.alert-error   { background: rgba(239,68,68,0.1);  border:1px solid rgba(239,68,68,0.25);  color: #991b1b; }

/* Section gap between panels */
.section-gap { margin-bottom: 24px; }

/* ---------------------------------------------------------
   20. Responsive
   --------------------------------------------------------- */
@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    z-index: 200;
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay.open { display: block; }
  .hamburger-btn { display: flex; }

  .main-content { padding: 20px 16px 32px; }
  .topbar { padding: 12px 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .notif-drawer { width: 100vw; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .tab-item { padding: 6px 10px; font-size: 0.75rem; }
}

/* ============================================================
   Missing utility classes — appended 2026-03-28
   ============================================================ */
.page-header { margin-bottom: 28px; }
.page-title { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--color-slate); margin-bottom: 4px; }
.page-subtitle { color: var(--color-slate-500); font-size: 0.9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.section-gap { margin-top: 24px; }
.clock-display { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700; text-align: center; color: var(--color-slate); letter-spacing: 0.05em; margin-bottom: 4px; }
.clock-label { font-size: 0.75rem; color: var(--color-slate-500); text-align: center; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.1em; }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state-text { color: var(--color-slate-500); font-size: 0.9rem; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--color-slate-300, #cbd5e1); border-top-color: var(--color-cyan, #06b6d4); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 0.875rem; margin-bottom: 16px; }
.alert-success { background: rgba(16,185,129,0.1); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.alert-error { background: rgba(239,68,68,0.1); color: #991b1b; border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: rgba(251,191,36,0.1); color: #92400e; border: 1px solid rgba(251,191,36,0.2); }
.pulse { animation: pulse-anim 1.5s ease-in-out infinite; }
@keyframes pulse-anim { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input { flex: 1; padding: 9px 13px; border: 1.5px solid var(--color-slate-300, #cbd5e1); border-radius: 10px; font-size: 0.875rem; outline: none; background: rgba(255,255,255,0.9); }
.search-input:focus { border-color: var(--color-cyan, #06b6d4); box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }
.tab-group { display: flex; gap: 4px; background: rgba(0,0,0,0.04); padding: 4px; border-radius: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-item { padding: 7px 14px; border: none; background: transparent; border-radius: 7px; cursor: pointer; font-size: 0.8125rem; font-weight: 500; color: var(--color-slate-500, #64748b); transition: all 0.15s; }
.tab-item.active { background: white; color: var(--color-slate, #1e293b); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.presence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.presence-card { background: var(--glass-bg, rgba(255,255,255,0.7)); border: 1px solid var(--glass-border, rgba(203,213,225,0.5)); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 12px; transition: transform 0.15s; }
.presence-card:hover { transform: translateY(-2px); }
.presence-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--color-purple, #8b5cf6), var(--color-cyan, #06b6d4)); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0; position: relative; }
.presence-status-dot { position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid white; }
.presence-status-dot.active { background: #10b981; }
.presence-status-dot.on-break { background: #f59e0b; }
.presence-status-dot.on-leave { background: var(--color-cyan, #06b6d4); }
.presence-status-dot.offline { background: #cbd5e1; }
.presence-name { font-weight: 600; font-size: 0.875rem; }
.presence-role { font-size: 0.75rem; color: var(--color-slate-500, #64748b); }
.presence-time { font-size: 0.7rem; color: #059669; font-weight: 500; }
.org-node { margin-left: 24px; border-left: 2px solid #cbd5e1; padding-left: 16px; margin-top: 8px; }
.org-card { display: inline-flex; align-items: center; gap: 10px; background: var(--glass-bg, rgba(255,255,255,0.7)); border: 1px solid var(--glass-border, rgba(203,213,225,0.5)); border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; box-shadow: var(--glass-shadow, 0 2px 8px rgba(0,0,0,0.06)); cursor: pointer; transition: all 0.15s; }
.org-card:hover { transform: translateY(-1px); border-color: var(--color-cyan, #06b6d4); }
.org-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--color-cyan, #06b6d4), var(--color-purple, #8b5cf6)); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.notif-drawer { position: absolute; top: 48px; right: 0; width: 340px; background: white; border: 1px solid #cbd5e1; border-radius: var(--glass-radius, 16px); box-shadow: 0 8px 32px rgba(0,0,0,0.15); z-index: 500; max-height: 480px; display: flex; flex-direction: column; }
.notif-drawer-header { padding: 16px; border-bottom: 1px solid #cbd5e1; display: flex; align-items: center; justify-content: space-between; }
.notif-drawer-title { font-weight: 700; font-size: 0.9rem; }
.notif-drawer-body { flex: 1; overflow-y: auto; }
.notif-drawer-footer { padding: 12px 16px; border-top: 1px solid #cbd5e1; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; transition: background 0.15s; }
.notif-item:hover { background: rgba(0,0,0,0.02); }
.notif-item.unread { background: rgba(6,182,212,0.04); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-cyan, #06b6d4); flex-shrink: 0; margin-top: 5px; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 0.8125rem; }
.notif-body { font-size: 0.78rem; color: var(--color-slate-500, #64748b); margin-top: 2px; }
.notif-time { font-size: 0.72rem; color: #94a3b8; margin-top: 4px; }
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-size: 0.875rem; font-weight: 500; box-shadow: 0 4px 20px rgba(0,0,0,0.15); animation: slideIn 0.3s ease; color: white; min-width: 260px; pointer-events: auto; }
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
.toast-warning { background: #f59e0b; color: #1e293b; }
.toast-info { background: #0891b2; }
.toast.fade-out { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOut { from { opacity: 1; } to { transform: translateX(100px); opacity: 0; } }
