/* ================================================================
   GlowTrack — Professional Dark-Blue Theme v2.0
   نظام التصميم الاحترافي الكامل
   ================================================================ */

/* ----------------------------------------------------------------
   المتغيرات (Design Tokens)
   ---------------------------------------------------------------- */
:root {
  /* ألوان الخلفية */
  --bg-base: #F1F5F9;
  --bg-secondary: #E8EDF5;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFF;
  --bg-input: #F8FAFC;

  /* الألوان الأساسية — احترافية */
  --color-primary: #1E40AF;
  --color-primary-light: #3B82F6;
  --color-accent: #0EA5E9;
  --color-success: #059669;
  --color-warning: #D97706;
  --color-danger: #DC2626;
  --color-info: #0891B2;

  /* التدرجات */
  --gradient-main: linear-gradient(135deg, #1E40AF, #0EA5E9);
  --gradient-sidebar: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  --gradient-card: linear-gradient(135deg, rgba(30, 64, 175, 0.03), rgba(14, 165, 233, 0.02));
  --gradient-hero: linear-gradient(135deg, #1E40AF 0%, #0EA5E9 50%, #059669 100%);

  /* النصوص */
  --text-primary: #0F172A;
  --text-secondary: #1E3A5F;
  --text-muted: #64748B;
  --text-sidebar: #CBD5E1;
  --text-sidebar-muted: #64748B;

  /* الحدود */
  --border-color: rgba(30, 64, 175, 0.12);
  --border-glow: rgba(14, 165, 233, 0.3);

  /* الظلال */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 2px 12px rgba(30, 64, 175, 0.08);
  --shadow-glow: 0 4px 20px rgba(30, 64, 175, 0.15);
  --shadow-sidebar: 2px 0 20px rgba(0, 0, 0, 0.25);

  /* الأبعاد */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* الانتقالات */
  --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 {
  direction: rtl;
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

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

/* ================================================================
   الشريط الجانبي — داكن احترافي
   ================================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gradient-sidebar);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* الشعار */
.sidebar-logo {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo .logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.sidebar-logo .logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-logo .logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.3px;
}

.sidebar-logo .logo-sub {
  font-size: 0.68rem;
  color: var(--text-sidebar-muted);
  margin-top: -1px;
}

/* معلومات المستخدم */
.sidebar-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.sidebar-user .user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #F1F5F9;
}

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

/* القائمة */
.sidebar-nav {
  flex: 1;
  padding: 14px 0;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 1.5px;
  padding: 14px 20px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-sidebar);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1px 10px;
  border-radius: var(--radius-sm);
}

.nav-item:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: white;
  background: var(--gradient-main);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item .nav-badge {
  margin-right: auto;
  background: var(--color-danger);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
}

/* الفوتر */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  color: #F87171;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-logout svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-logout:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #FCA5A5;
}

/* ================================================================
   المحتوى الرئيسي
   ================================================================ */
.main-content {
  margin-right: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* الهيدر العلوي */
.topbar {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

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

.topbar-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

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

/* زر الإشعارات */
.notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--color-primary);
  text-decoration: none;
}

.notif-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-btn:hover {
  border-color: var(--color-primary);
  background: rgba(30, 64, 175, 0.08);
  box-shadow: var(--shadow-glow);
}

.notif-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--color-danger);
  color: white;
  font-size: 0.58rem;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* منطقة الصفحة */
.page-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ================================================================
   البطاقات (Cards)
   ================================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: rgba(30, 64, 175, 0.2);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================================================
   بطاقات KPI
   ================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  cursor: default;
  box-shadow: var(--shadow-sm);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-color, var(--gradient-main));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(30, 64, 175, 0.2);
}

.kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--kpi-bg, rgba(30, 64, 175, 0.1));
}

.kpi-icon-wrap svg {
  width: 22px;
  height: 22px;
  stroke: var(--kpi-stroke, var(--color-primary));
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Legacy support */
.kpi-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  font-size: 0.77rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-change {
  font-size: 0.72rem;
  margin-top: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.kpi-change.up {
  color: var(--color-success);
}

.kpi-change.down {
  color: var(--color-danger);
}

/* ================================================================
   الأزرار
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--gradient-main);
  color: white;
  box-shadow: 0 3px 12px rgba(30, 64, 175, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(30, 64, 175, 0.45);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(30, 64, 175, 0.05);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  box-shadow: 0 3px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, #D97706, #B45309);
  color: white;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: var(--color-danger);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ================================================================
   الشارات (Badges)
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.badge-priority {
  background: color-mix(in srgb, var(--badge-color, #1E40AF) 14%, transparent);
  color: var(--badge-color, #1E40AF);
  border: 1px solid color-mix(in srgb, var(--badge-color, #1E40AF) 28%, transparent);
}

.badge-status {
  background: color-mix(in srgb, var(--badge-color, #1E40AF) 14%, transparent);
  color: var(--badge-color, #1E40AF);
  border: 1px solid color-mix(in srgb, var(--badge-color, #1E40AF) 28%, transparent);
}

/* ================================================================
   الجداول
   ================================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

.table thead tr {
  background: rgba(30, 64, 175, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.table th {
  padding: 12px 16px;
  text-align: right;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(30, 64, 175, 0.06);
  color: #334155;
  vertical-align: middle;
}

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

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

.table tbody tr:hover {
  background: rgba(30, 64, 175, 0.03);
}

/* ================================================================
   الأفاتار
   ================================================================ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: white;
  flex-shrink: 0;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.65rem;
}

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

.avatar-xl {
  width: 68px;
  height: 68px;
  font-size: 1.3rem;
}

/* ================================================================
   شريط التقدم
   ================================================================ */
.progress-bar {
  height: 6px;
  background: rgba(30, 64, 175, 0.1);
  border-radius: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 20px;
  background: var(--gradient-main);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-success .progress-fill {
  background: linear-gradient(90deg, #059669, #10B981);
}

.progress-warning .progress-fill {
  background: linear-gradient(90deg, #D97706, #F59E0B);
}

.progress-danger .progress-fill {
  background: linear-gradient(90deg, #DC2626, #F87171);
}

/* ================================================================
   النماذج (Forms)
   ================================================================ */
.form-group {
  margin-bottom: 18px;
}

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

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid rgba(30, 64, 175, 0.18);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all var(--transition);
  outline: none;
}

.form-control::placeholder {
  color: #94A3B8;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  background: #FFFFFF;
}

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

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

/* ================================================================
   Multi-Select Chips (لإسناد المهام لأكثر من شخص)
   ================================================================ */
.employee-picker {
  border: 1.5px solid rgba(30, 64, 175, 0.18);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  transition: all var(--transition);
}

.employee-picker:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  background: #FFFFFF;
}

.employee-picker-search {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border-color);
}

.employee-picker-search input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-primary);
}

.employee-picker-search input::placeholder {
  color: #94A3B8;
}

.employee-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.employee-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.employee-option:hover {
  background: rgba(30, 64, 175, 0.06);
}

.employee-option.selected {
  background: rgba(30, 64, 175, 0.1);
}

.employee-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.employee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  min-height: 44px;
  border-top: 1px solid var(--border-color);
}

.employee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  background: rgba(30, 64, 175, 0.1);
  border: 1px solid rgba(30, 64, 175, 0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
}

.employee-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.employee-chip button:hover {
  color: var(--color-danger);
}

/* ================================================================
   منطقة رفع الملفات
   ================================================================ */
.file-upload-area {
  border: 2px dashed rgba(30, 64, 175, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: rgba(30, 64, 175, 0.02);
  position: relative;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--color-primary);
  background: rgba(30, 64, 175, 0.06);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin: 0 auto 10px;
  opacity: 0.6;
}

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

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

.file-attachment-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.file-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.file-tab-btn.active {
  background: rgba(30, 64, 175, 0.08);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.file-tab-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* بطاقة الملف المرفق */
.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.file-card:hover {
  border-color: var(--color-primary);
  background: rgba(30, 64, 175, 0.04);
}

.file-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-card-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.file-card-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ================================================================
   جدول متابعة الموظفين في داشبورد المدير
   ================================================================ */
.employee-monitor-table .emp-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(30, 64, 175, 0.07);
  transition: background var(--transition);
}

.employee-monitor-table .emp-row:last-child {
  border-bottom: none;
}

.employee-monitor-table .emp-row:hover {
  background: rgba(30, 64, 175, 0.02);
}

.employee-monitor-table .emp-header {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr 1fr;
  gap: 16px;
}

/* Alert strip */
.alert-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.alert-strip svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.alert-strip.danger {
  background: rgba(220, 38, 38, 0.08);
  color: #991B1B;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-strip.warning {
  background: rgba(217, 119, 6, 0.08);
  color: #92400E;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.alert-strip.info {
  background: rgba(8, 145, 178, 0.08);
  color: #155E75;
  border: 1px solid rgba(8, 145, 178, 0.2);
}

/* ================================================================
   صفحة تسجيل الدخول
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F1F5F9 0%, #E8EDF5 50%, #EEF2FF 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.08) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.07) 0%, transparent 70%);
  bottom: -100px;
  left: -50px;
  pointer-events: none;
}

.auth-card {
  background: #FFFFFF;
  border: 1px solid rgba(30, 64, 175, 0.12);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(30, 64, 175, 0.1);
  position: relative;
  z-index: 1;
}

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

.auth-logo .logo-icon {
  width: 58px;
  height: 58px;
  background: var(--gradient-main);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.auth-logo .logo-icon svg {
  width: 28px;
  height: 28px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-logo h1 {
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 5px;
}

/* ================================================================
   Kanban Board
   ================================================================ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 200px;
}

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

.kanban-col-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-col-title svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kanban-col-count {
  background: rgba(30, 64, 175, 0.1);
  color: var(--color-primary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
}

.kanban-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

.kanban-card {
  background: #FFFFFF;
  border: 1px solid rgba(30, 64, 175, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: grab;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.12);
}

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

.kanban-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kanban-card-due {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-card-due svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.kanban-card-due.late {
  color: var(--color-danger);
}

/* ================================================================
   Toast Notifications
   ================================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #FFFFFF;
  border: 1px solid rgba(30, 64, 175, 0.12);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  box-shadow: 0 4px 20px rgba(30, 64, 175, 0.1);
  animation: slideInLeft 0.3s ease;
  color: var(--text-primary);
}

.toast svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.toast.success {
  border-right: 4px solid var(--color-success);
}

.toast.error {
  border-right: 4px solid var(--color-danger);
}

.toast.info {
  border-right: 4px solid var(--color-primary);
}

.toast.warning {
  border-right: 4px solid var(--color-warning);
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ================================================================
   Dropdown
   ================================================================ */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #FFFFFF;
  border: 1px solid rgba(30, 64, 175, 0.12);
  border-radius: var(--radius-md);
  min-width: 180px;
  box-shadow: 0 8px 30px rgba(30, 64, 175, 0.12);
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: all var(--transition);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.dropdown-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropdown-item:hover {
  background: rgba(30, 64, 175, 0.06);
  color: var(--color-primary);
}

/* ================================================================
   Modal
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

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

.modal {
  background: #FFFFFF;
  border: 1px solid rgba(30, 64, 175, 0.12);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: all var(--transition);
}

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

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

.modal-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: var(--color-danger);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-close:hover {
  background: rgba(220, 38, 38, 0.18);
}

/* ================================================================
   Grid & Utilities
   ================================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

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

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-gap-8 {
  gap: 8px;
}

.flex-gap-12 {
  gap: 12px;
}

.flex-gap-16 {
  gap: 16px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

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

.text-secondary {
  color: var(--text-secondary);
}

.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

.text-warning {
  color: var(--color-warning);
}

.text-primary-c {
  color: var(--color-primary);
}

.font-bold {
  font-weight: 700;
}

.font-black {
  font-weight: 900;
}

.text-sm {
  font-size: 0.82rem;
}

.text-xs {
  font-size: 0.72rem;
}

.text-lg {
  font-size: 1.05rem;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 18px 0;
}

/* ================================================================
   Alerts
   ================================================================ */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border-right: 4px solid;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.alert-success {
  background: #F0FDF4;
  border-color: var(--color-success);
  color: #14532D;
}

.alert-danger {
  background: #FEF2F2;
  border-color: var(--color-danger);
  color: #7F1D1D;
}

.alert-warning {
  background: #FFFBEB;
  border-color: var(--color-warning);
  color: #78350F;
}

.alert-info {
  background: #EFF6FF;
  border-color: var(--color-primary);
  color: #1E3A5F;
}

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

.status-dot.active {
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(5, 150, 105, 0.4);
}

.status-dot.inactive {
  background: #94A3B8;
}

.status-dot.on_leave {
  background: var(--color-warning);
}

/* ================================================================
   أداء نسبة الإنجاز — حلقي
   ================================================================ */
.perf-circle {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.perf-circle svg {
  transform: rotate(-90deg);
  width: 52px;
  height: 52px;
}

.perf-circle .circle-bg {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 4;
}

.perf-circle .circle-fill {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

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

/* ================================================================
   Scrollbar
   ================================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(30, 64, 175, 0.2);
  border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 64, 175, 0.35);
}

/* ================================================================
   Animations
   ================================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.35s ease forwards;
}

.animate-fade-right {
  animation: fadeInRight 0.35s ease forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Stagger children */
.stagger>*:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger>*:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger>*:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger>*:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger>*:nth-child(6) {
  animation-delay: 0.3s;
}

/* ================================================================
   Responsive & Mobile Professional Enhancements
   ================================================================ */

/* غطاء الخلفية للموبايل */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* تبويبات الكانبان للموبايل */
.kanban-mobile-tabs {
  display: none;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
.kanban-mobile-tabs::-webkit-scrollbar {
  display: none;
}
.kanban-tab-btn {
  flex: 1;
  min-width: 85px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all var(--transition);
}
.kanban-tab-btn.active {
  background: var(--gradient-main);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

/* الكروت البديلة للجداول على الجوال */
.mobile-cards-list {
  display: none;
  flex-direction: column;
  gap: 12px;
}
.mobile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}
.mobile-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: rgba(30, 64, 175, 0.2);
}
.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.mobile-card-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.mobile-card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.mobile-card-divider {
  height: 1px;
  background: rgba(30, 64, 175, 0.05);
  margin: 2px 0;
}

.mobile-bottom-nav {
  display: none;
}

/* قائمة مراقبة الموظفين المتجاوبة */
.emp-monitor-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.2fr 1.2fr 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}
.emp-monitor-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.2fr 1.2fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid rgba(30, 64, 175, 0.06);
  transition: background var(--transition);
}
.emp-monitor-row:hover {
  background: rgba(30, 64, 175, 0.025);
}

@media (max-width: 1280px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

@media (max-width: 992px) {
  .emp-monitor-header {
    display: none;
  }
  .emp-monitor-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }
  .emp-monitor-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  .emp-monitor-row > div::before {
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
  }
  .emp-monitor-row > div:last-child {
    align-items: flex-end;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 74px;
  }

  .sidebar {
    transform: translateX(100%);
  }

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

  .main-content {
    margin-right: 0;
  }

  .page-content {
    padding: 16px;
  }

  .kanban-mobile-tabs {
    display: flex;
  }

  .kanban-board {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  .kanban-board .kanban-col {
    display: none;
    width: 100%;
  }

  .kanban-board .kanban-col.active {
    display: flex;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* إخفاء الجداول وعرض الكروت */
  .table-wrapper {
    display: none !important;
  }
  .mobile-cards-list {
    display: flex;
  }

  #sidebar-toggle {
    display: flex !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav .nav-item {
    position: relative;
    min-height: 54px;
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
    text-align: center;
  }

  .mobile-bottom-nav .nav-item .nav-icon {
    width: 20px;
    height: 20px;
    margin: 0;
  }

  .mobile-bottom-nav .nav-item.active {
    background: rgba(30, 64, 175, 0.1);
    color: var(--color-primary);
  }

  .mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 3px;
    left: 18px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.62rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .emp-monitor-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .emp-monitor-row > div {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px dashed rgba(30, 64, 175, 0.05);
    padding-bottom: 6px;
  }
  .emp-monitor-row > div::before {
    margin-bottom: 0;
  }
  .emp-monitor-row > div:last-child {
    border-bottom: none;
    align-items: center;
  }
}

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

  .auth-card {
    padding: 28px 20px;
  }

  .topbar {
    padding: 0 16px;
  }

  .page-content {
    padding: 12px;
  }
}

/* ----------------------------------------------------------------
   PWA & Notifications Custom Styles
   ---------------------------------------------------------------- */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 16px 20px;
  z-index: 9999;
  animation: pwaSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 500px;
  margin: 0 auto;
}

@keyframes pwaSlideUp {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-install-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pwa-install-info {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
}

.pwa-install-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.pwa-install-title {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-align: right;
}

.pwa-install-desc {
  color: #94A3B8;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: right;
}

.pwa-install-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-pwa-action {
  padding: 8px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

/* زر مزامنة الإشعارات بالهيدر */
.pwa-sync-btn {
  transition: all 0.3s ease;
}

.pwa-sync-btn .sync-status-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
  border: 1px solid var(--bg-card);
  transition: background-color 0.3s ease;
}

.pwa-sync-btn.active {
  color: var(--color-success) !important;
}

.pwa-sync-btn.active .sync-status-dot {
  background-color: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.pwa-sync-btn.denied {
  color: var(--color-danger) !important;
}

.pwa-sync-btn.denied .sync-status-dot {
  background-color: var(--color-danger);
}

@media (min-width: 768px) {
  .pwa-install-banner {
    bottom: 24px;
    right: 24px;
    left: auto;
    width: 380px;
  }
  .pwa-install-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .pwa-install-info {
    flex: 1;
  }
  .pwa-install-actions {
    flex-direction: column;
    gap: 8px;
  }
}
