/* ==========================================================================
   ERP CONNECT — DESIGN SYSTEM & STYLESHEET
   Aesthetics: Light surfaces, Navy typography, Muted teal accents, RTL
   ========================================================================== */

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

:root {
  /* Color Palette */
  --bg-main: #F4F7FA;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #EDF2F6;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-glass: rgba(255,255,255,.96);
  --bg-glass-input: #F8FAFC;

  /* Accents & Highlights */
  --accent-teal: #087F8C;
  --accent-teal-glow: rgba(8,127,140,.10);
  --accent-cyan: #176B87;
  --accent-cyan-glow: rgba(23,107,135,.10);
  --accent-purple: #52627E;
  --accent-blue: #345B84;

  /* State Colors */
  --status-pending: #936100;
  --status-pending-bg: rgba(245, 158, 11, 0.12);
  --status-approved: #18794E;
  --status-approved-bg: rgba(16, 185, 129, 0.12);
  --status-rejected: #C1373E;
  --status-rejected-bg: rgba(239, 68, 68, 0.12);
  --status-under-review: #176B87;
  --status-under-review-bg: rgba(0, 180, 216, 0.12);
  --status-changes: #A84E16;
  --status-changes-bg: rgba(249, 115, 22, 0.12);
  --status-cancelled: #6B7280;
  --status-cancelled-bg: rgba(107, 114, 128, 0.12);

  /* Text Colors */
  --text-primary: #172B4D;
  --text-secondary: #596B80;
  --text-muted: #596B80;
  --text-light: #405773;

  /* Borders & Shadows */
  --border-subtle: #DCE4ED;
  --border-glow: rgba(8,127,140,.3);
  --shadow-sm: 0 2px 8px rgba(23,43,77,.04);
  --shadow-md: 0 6px 20px rgba(23,43,77,.06);
  --shadow-lg: 0 18px 48px rgba(23,43,77,.12);
  --shadow-glow-teal: 0 4px 12px rgba(8,127,140,.1);
  --shadow-glow-cyan: 0 4px 12px rgba(23,107,135,.1);

  /* Typography */
  --font-arabic: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-latin: 'Outfit', sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ──────────────────────────────────────────────────────────────────────────
   Base & Reset
   ────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Mesh Gradients */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 201, 167, 0.08) 0%, rgba(7, 13, 30, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.07) 0%, rgba(7, 13, 30, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-teal);
}

/* ──────────────────────────────────────────────────────────────────────────
   App Shell Layout
   ────────────────────────────────────────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.app-sidebar {
  width: 270px;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  z-index: 50;
  transition: var(--transition-smooth);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-teal);
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #FFFFFF, var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 14px 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateX(-3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 201, 167, 0.16), rgba(0, 180, 216, 0.08));
  color: var(--accent-teal);
  border: 1px solid rgba(0, 201, 167, 0.3);
  box-shadow: var(--shadow-glow-teal);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 4px;
  background: var(--accent-teal);
}

.nav-icon {
  font-size: 18px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-right: auto;
  background: var(--accent-teal);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.nav-badge.amber {
  background: var(--status-pending);
  color: #FFFFFF;
}

/* User Card in Sidebar */
.sidebar-user {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #3B82F6, #9D4EDD);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
  border: 2px solid var(--border-subtle);
  flex-shrink: 0;
}

.avatar.lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

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

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  font-weight: 600;
}

.role-admin { background: rgba(239, 68, 68, 0.18); color: var(--status-rejected); }
.role-manager { background: rgba(0, 180, 216, 0.18); color: var(--accent-cyan); }
.role-hr { background: rgba(157, 78, 221, 0.18); color: var(--accent-purple); }
.role-employee { background: rgba(0, 201, 167, 0.18); color: var(--status-approved); }

/* Main Content Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* Top Navbar */
.app-header {
  height: 74px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

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

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

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

/* Persona Switcher Dropdown */
.persona-switcher-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.persona-switcher-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.persona-select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.persona-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 6px;
}

/* Notification Bell */
.notification-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 19px;
  transition: var(--transition-fast);
}

.notification-btn:hover {
  background: rgba(0, 201, 167, 0.15);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  box-shadow: var(--shadow-glow-teal);
}

.notification-count {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--status-rejected);
  color: white;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Page Content View */
.content-body {
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ──────────────────────────────────────────────────────────────────────────
   Glass Cards & Panels
   ────────────────────────────────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-lg);
}

.glass-card.interactive:hover {
  transform: translateY(-4px);
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-glow-teal), var(--shadow-lg);
}

/* Stats / KPI Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.teal {
  background: rgba(0, 201, 167, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(0, 201, 167, 0.3);
}

.stat-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-pending);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-approved);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.cyan {
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.stat-icon.purple {
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.stat-data {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-latin), var(--font-arabic);
  line-height: 1.1;
}

/* Quick Actions Strip */
.quick-actions-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.action-card {
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  cursor: pointer;
}

.action-card .action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.action-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.action-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Filter Bars & Segmented Controls
   ────────────────────────────────────────────────────────────────────────── */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.segmented-tabs {
  display: flex;
  background: var(--bg-surface-elevated);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-teal);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-teal);
}

.status-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.status-pill:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.status-pill.active {
  background: rgba(0, 201, 167, 0.15);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

.search-input-box {
  position: relative;
  min-width: 260px;
}

.search-input-box input {
  width: 100%;
  padding: 10px 38px 10px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.search-input-box input:focus {
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-glow-teal);
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

/* ──────────────────────────────────────────────────────────────────────────
   Request Cards (List view)
   ────────────────────────────────────────────────────────────────────────── */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.request-card {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}

.request-main {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.request-type-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.type-leave {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.type-suggestion {
  background: rgba(157, 78, 221, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.request-details {
  min-width: 0;
}

.request-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.request-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.request-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.request-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending { background: var(--status-pending-bg); color: var(--status-pending); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-approved { background: var(--status-approved-bg); color: var(--status-approved); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rejected { background: var(--status-rejected-bg); color: var(--status-rejected); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-under_review { background: var(--status-under-review-bg); color: var(--status-under-review); border: 1px solid rgba(0, 180, 216, 0.3); }
.badge-changes_requested { background: var(--status-changes-bg); color: var(--status-changes); border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-cancelled { background: var(--status-cancelled-bg); color: var(--status-cancelled); border: 1px solid rgba(107, 114, 128, 0.3); }

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Priority Chips */
.priority-chip {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.priority-urgent { background: rgba(239, 68, 68, 0.2); color: var(--status-rejected); border: 1px solid rgba(239, 68, 68, 0.4); }
.priority-high { background: rgba(249, 115, 22, 0.2); color: var(--status-changes); border: 1px solid rgba(249, 115, 22, 0.4); }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: var(--status-pending); border: 1px solid rgba(245, 158, 11, 0.4); }
.priority-low { background: rgba(16, 185, 129, 0.2); color: var(--status-approved); border: 1px solid rgba(16, 185, 129, 0.4); }

/* ──────────────────────────────────────────────────────────────────────────
   Buttons & Inputs
   ────────────────────────────────────────────────────────────────────────── */
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-cyan));
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-teal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 201, 167, 0.45);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--status-rejected);
}

.btn-danger:hover {
  background: var(--status-rejected);
  color: white;
}

.btn-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--status-pending);
}

.btn-warning:hover {
  background: var(--status-pending);
  color: #FFFFFF;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-arabic);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-glow-teal);
  background: var(--bg-surface);
}

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

/* Grid for leave type selector cards */
.leave-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.leave-type-card {
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.leave-type-card:hover {
  border-color: rgba(0, 201, 167, 0.4);
  transform: translateY(-2px);
}

.leave-type-card.selected {
  border-color: var(--accent-teal);
  background: rgba(0, 201, 167, 0.12);
  box-shadow: var(--shadow-glow-teal);
}

.leave-type-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.leave-type-name {
  font-size: 12.5px;
  font-weight: 700;
}

.leave-type-rem {
  font-size: 11px;
  color: var(--accent-teal);
  margin-top: 4px;
  font-weight: 600;
}

/* ──────────────────────────────────────────────────────────────────────────
   Timeline Component (Request Details & History)
   ────────────────────────────────────────────────────────────────────────── */
.timeline-box {
  position: relative;
  padding: 16px 0;
}

.timeline-box::before {
  content: '';
  position: absolute;
  top: 24px;
  bottom: 24px;
  right: 20px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-dot.active {
  background: var(--accent-teal);
  color: #FFFFFF;
  border-color: #FFFFFF;
  box-shadow: var(--shadow-glow-teal);
}

.timeline-content {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

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

.timeline-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ──────────────────────────────────────────────────────────────────────────
   Modals
   ────────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 30, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

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

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--status-rejected);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ──────────────────────────────────────────────────────────────────────────
   Notification Drawer
   ────────────────────────────────────────────────────────────────────────── */
.notification-drawer {
  position: fixed;
  top: 0;
  left: -400px;
  width: 380px;
  height: 100vh;
  background: var(--bg-surface);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid var(--border-subtle);
  z-index: 90;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-drawer.open {
  left: 0;
}

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

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}

.notification-card.unread {
  border-right: 4px solid var(--accent-teal);
  background: rgba(0, 201, 167, 0.08);
}

.notification-card:hover {
  background: var(--bg-card-hover);
}

.notif-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.notif-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

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

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideToast 0.3s ease;
}

.toast.success { border-color: var(--status-approved); color: var(--status-approved); }
.toast.error { border-color: var(--status-rejected); color: var(--status-rejected); }

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

/* Responsive adjustments */
@media (max-width: 900px) {
  .app-sidebar {
    position: fixed;
    right: -280px;
  }
  .app-sidebar.mobile-open {
    right: 0;
  }
  .content-body {
    padding: 20px 16px;
  }
}

/* Daily task calendar */
.task-calendar { margin: 0 0 24px; padding: 18px; border: 1px solid var(--border-subtle); border-radius: 20px; background: var(--bg-surface); }
.task-calendar-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.task-calendar-heading input { color-scheme: dark; padding: 8px; border: 1px solid var(--border-subtle); border-radius: 10px; background: transparent; color: var(--text-primary); font: inherit; }
.task-days { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.task-day { flex: 0 0 72px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--bg-card); color: var(--text-secondary); font: inherit; cursor: pointer; }
.task-day strong { font-size: 23px; }
.task-day.selected { background: var(--accent-teal); color: #FFFFFF; border-color: var(--accent-teal); }
.task-calendar p { color: var(--text-muted); font-size: 12px; margin-top: 10px; }

/* Calm, consistent work surfaces. */
body::before, body::after { display: none; }
.brand-text h1 { background: none; color: var(--text-primary); -webkit-text-fill-color: var(--text-primary); }
.btn-primary { background: var(--accent-teal); }
.btn-success { background: var(--status-approved); }
.btn-danger:hover { background: var(--status-rejected); }
.user-avatar, .avatar { background: var(--text-primary); }
.role-admin, .role-manager, .role-hr, .role-employee { background: var(--bg-surface-elevated); color: var(--text-secondary); }
