/* ==========================================
   PharmaSUD Design System v7.2.0
   Cloud Design — IBM Plex Sans + Blue #1AA7EC
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ─── Primary Blues ─── */
  --primary-blue:       #1AA7EC;
  --primary-blue-dark:  #1E2F97;
  --primary-blue-light: #4ADEDE;
  --accent-sky:         #0EA5E9;

  /* ─── Surfaces ─── */
  --background:         #F6F8FA;
  --surface:            #FFFFFF;
  --surface-hover:      #F8FAFC;
  --surface-blue-tint:  #EFF6FF;
  --border:             #EEF2F6;
  --border-light:       #F1F5F9;

  /* ─── Text ─── */
  --text-primary:       #0F172A;
  --text-secondary:     #64748B;
  --text-tertiary:      #94A3B8;
  --text-muted:         #CBD5E1;

  /* ─── Semantic Colors ─── */
  --success:            #16A34A;
  --warning:            #F59E0B;
  --danger:             #DC2626;
  --info:               #0284C7;

  /* ─── Layout ─── */
  --sidebar-width:      248px;
  --topbar-height:      70px;

  /* ─── Fonts ─── */
  --font-sans:          'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-arabic:        'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --font-mono:          'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* ─── Radius ─── */
  --radius-sm:          8px;
  --radius:             11px;
  --radius-lg:          16px;
  --radius-xl:          20px;

  /* ─── Shadows ─── */
  --shadow-sm:          0 1px 2px rgba(15,23,42,0.04);
  --shadow:             0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:          0 4px 6px -1px rgba(15,23,42,0.06), 0 2px 4px -2px rgba(15,23,42,0.04);
  --shadow-lg:          0 10px 15px -3px rgba(15,23,42,0.06), 0 4px 6px -4px rgba(15,23,42,0.04);
  --shadow-xl:          0 30px 70px -28px rgba(15,23,42,0.32);

  /* ─── Transitions ─── */
  --transition:         150ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-smooth:        cubic-bezier(0.22, 1, 0.36, 1);

  /* ─── Gradients ─── */
  --main-gradient:      linear-gradient(160deg, #1E2F97 0%, #1AA7EC 55%, #4ADEDE 100%);
  --splash-gradient:    linear-gradient(160deg, #1E2F97 0%, #1AA7EC 50%, #4ADEDE 100%);
}

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

html, body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--background);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ─── Selection ─── */
::selection {
  background: var(--primary-blue);
  color: #fff;
}

/* ─── Focus Ring ─── */
:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* ─── Typography ─── */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.text-blue      { color: var(--primary-blue); }

/* ─── Font Utilities ─── */
.font-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.animate-fade-in     { animation: fadeIn 0.3s ease forwards; }
.animate-fade-up     { animation: fadeUp 0.4s var(--ease-smooth) forwards; }
.animate-fade-down   { animation: fadeDown 0.3s ease forwards; }
.animate-scale-in    { animation: scaleIn 0.3s var(--ease-smooth) forwards; }
.animate-slide-right { animation: slideInRight 0.3s var(--ease-smooth) forwards; }
.animate-slide-left  { animation: slideInLeft 0.3s var(--ease-smooth) forwards; }

/* ─── Card Component ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ─── Metric Card ─── */
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.metric-card .metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.metric-card .metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.metric-card .metric-icon.blue {
  background: #DBEAFE;
  color: var(--primary-blue);
}
.metric-card .metric-icon.cyan {
  background: #E0F2FE;
  color: var(--info);
}
.metric-card .metric-icon.yellow {
  background: #FEF3C7;
  color: #D97706;
}
.metric-card .metric-icon.red {
  background: #FEE2E2;
  color: var(--danger);
}
.metric-card .metric-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 5px;
}
.metric-card .metric-value {
  font: 700 25px/1 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.metric-card .metric-value .unit {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 600;
}
.metric-card .metric-badge {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.metric-card .metric-badge.success {
  color: var(--success);
  background: #ECFDF5;
}
.metric-card .metric-badge.warning {
  color: #D97706;
  background: #FFFbeb;
}
.metric-card .metric-badge.danger {
  color: var(--danger);
  background: #FEF2F2;
}

/* ─── Button Component ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(26, 167, 236, 0.55);
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-tertiary);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* ─── Input Component ─── */
.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(26, 167, 236, 0.12);
}
.input::placeholder {
  color: var(--text-tertiary);
}

/* ─── Badge Component ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: #ECFDF5; color: #15803D; }
.badge-warning { background: #FFFbeb; color: #B45309; }
.badge-danger  { background: #FEF2F2; color: #B91C1C; }
.badge-info    { background: #DBEAFE; color: var(--primary-blue); }
.badge-gray    { background: var(--surface-hover); color: var(--text-secondary); }

/* ─── Status Dots ─── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.success { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.danger  { background: var(--danger); }
.status-dot.info    { background: var(--primary-blue); }

/* ─── Table Component ─── */
.table-container {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: right;
  padding: 12px 16px;
  font: 600 11px var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid #F6F8FA;
  color: var(--text-primary);
  vertical-align: middle;
}
.table tr:hover td {
  background: #F8FAFC;
}
.table tr:last-child td {
  border-bottom: none;
}

/* ─── Modal/Dialog ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  margin: 20px;
  transform: scale(0.95);
  transition: transform 0.2s var(--ease-smooth);
}
.modal-overlay.open .modal {
  transform: scale(1);
}

/* ─── Toast Component ─── */
.toast-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideInLeft 0.3s var(--ease-smooth);
}
.toast.success { background: #065F46; color: #6EE7B7; }
.toast.error   { background: #7F1D1D; color: #FCA5A5; }
.toast.warning { background: #78350F; color: #FCD34D; }

/* ─── Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface-hover) 50%, var(--border) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Page Header ─── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
}
.page-title {
  font: 700 26px/1.1 var(--font-sans);
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.page-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ─── Brand Logo ─── */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-logo .brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--primary-blue);
  position: relative;
  flex-shrink: 0;
}
.brand-logo .brand-icon::before,
.brand-logo .brand-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 3px;
}
.brand-logo .brand-icon::before {
  width: 18px;
  height: 5.5px;
}
.brand-logo .brand-icon::after {
  width: 5.5px;
  height: 18px;
}
.brand-logo .brand-text {
  font: 700 18px/1 var(--font-sans);
  letter-spacing: -0.02em;
}
.brand-logo .brand-text span {
  color: var(--primary-blue);
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}
.sidebar .nav-section {
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 14px 10px 10px;
}
.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}
.sidebar .nav-item:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.sidebar .nav-item.active {
  background: var(--primary-blue);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(26, 167, 236, 0.55);
}
.sidebar .nav-item .badge {
  margin-left: auto;
  background: #FEF2F2;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}
.sidebar .user-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
}
.sidebar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.sidebar .user-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .user-role {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ─── Topbar ─── */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 18px;
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 90;
}
.topbar .search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 380px;
  height: 42px;
  padding: 0 14px;
  border-radius: 11px;
  background: var(--background);
  color: var(--text-tertiary);
  font-size: 14px;
}
.topbar .search-box kbd {
  margin-left: auto;
  font: 500 11px var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
}
.topbar .actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.topbar .icon-btn:hover {
  background: var(--surface-hover);
}
.topbar .lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
}
.topbar .lang-toggle span {
  padding: 7px 12px;
  color: var(--text-secondary);
}
.topbar .lang-toggle span.active {
  background: var(--primary-blue);
  color: #fff;
}

/* ─── Main Content ─── */
.main-content {
  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 28px) 28px 28px;
  min-height: 100vh;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(100%);
    -webkit-transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
    z-index: 200;
    background: #FFFFFF !important;
    border-right: 1px solid #E2E8F0 !important;
  }
  .sidebar.open {
    transform: translateX(0);
    -webkit-transform: translateX(0);
    background: #FFFFFF !important;
    border-right: 1px solid #E2E8F0 !important;
  }

  /* Dark mode sidebar overrides INSIDE mobile media query to beat !important */
  body.dark-mode .sidebar {
    background: #0F1A2E !important;
    border-right-color: #1E293B !important;
  }
  body.dark-mode .sidebar.open {
    background: #0F1A2E !important;
    border-right-color: #1E293B !important;
  }
  .topbar {
    left: 0;
    right: 0;
    padding: 0 12px;
    gap: 8px;
  }
  .main-content {
    margin-left: 0;
    margin-right: 0;
  }

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

  /* Mobile hamburger button - FIRST child (RTL: rightmost) */
  .mobile-menu-btn {
    display: flex !important;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .mobile-menu-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
  }
  .mobile-menu-btn svg {
    width: 22px;
    height: 22px;
  }
  .mobile-menu-btn.active svg {
    transform: rotate(90deg);
  }

  /* Search box - flexible width */
  .topbar .search-box {
    flex: 1;
    max-width: none;
    height: 40px;
    padding: 0 12px;
    min-width: 0;
  }
  .topbar .search-box span {
    display: none;
  }
  .topbar .search-box::after {
    content: "ابحث";
    color: var(--text-tertiary);
    font-size: 14px;
  }
  .topbar .search-box kbd {
    display: none;
  }
  .topbar .search-box i[data-lucide="search"] {
    flex-shrink: 0;
  }

  /* Actions container */
  .topbar .actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
    flex-shrink: 0;
  }

  /* Hide language toggle on mobile */
  .topbar .lang-toggle {
    display: none !important;
  }

  /* Icon buttons - compact */
  .topbar .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .topbar .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Sidebar overlay */
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    z-index: 150;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .sidebar-overlay.visible {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 8px;
    gap: 6px;
  }
  .topbar .search-box {
    height: 38px;
    padding: 0 10px;
  }
  .topbar .icon-btn {
    width: 38px;
    height: 38px;
  }
  .mobile-menu-btn {
    width: 38px;
    height: 38px;
  }
}

/* ==========================================
   Dark Mode — unified body.dark-mode approach
   ========================================== */
body.dark-mode {
  background: #0F172A;
  color: #E2E8F0;
}
body.dark-mode * {
  border-color: #1E293B !important;
}
body.dark-mode .sidebar {
  /* Mobile overrides handled in @media (max-width: 1024px) above */
  /* Desktop styles below */
  background: #0F1A2E;
  border-right-color: #1E293B;
}
body.dark-mode .sidebar .brand .name {
  color: #fff;
}
body.dark-mode .sidebar .nav-item {
  color: #94A3B8;
}
body.dark-mode .sidebar .nav-item:hover {
  background: #111C2E;
  color: #F1F5F9;
}
body.dark-mode .sidebar .nav-item.active {
  background: #1AA7EC;
  color: #fff;
}
body.dark-mode .sidebar .nav-section {
  color: #64748B;
}
body.dark-mode .sidebar .user-card {
  border-color: #1E293B;
}
body.dark-mode .sidebar .user-name {
  color: #F1F5F9;
}
body.dark-mode .sidebar .user-role {
  color: #64748B;
}
body.dark-mode .sidebar .user-avatar {
  background: #1AA7EC;
}
body.dark-mode .topbar {
  background: #0F1A2E;
  border-bottom-color: #1E293B;
}
body.dark-mode .page-title {
  color: #F1F5F9;
}
body.dark-mode .page-subtitle {
  color: #94A3B8;
}
body.dark-mode .search-box {
  background: #1E293B;
  color: #64748B;
}
body.dark-mode .search-box input {
  color: #E2E8F0;
  background: transparent;
}
body.dark-mode .search-input {
  background: #1E293B;
}
body.dark-mode .search-input input {
  color: #E2E8F0;
  background: transparent;
}
body.dark-mode .icon-btn {
  border-color: #334155;
  color: #94A3B8;
}
body.dark-mode .icon-btn:hover {
  background: #1E293B;
  color: #F1F5F9;
}
body.dark-mode .theme-toggle,
body.dark-mode .notif-btn,
body.dark-mode .lang-toggle {
  border-color: #334155;
  background: #1E293B;
  color: #94A3B8;
}
body.dark-mode .lang-toggle span.active {
  background: #1AA7EC;
  color: #fff;
}
body.dark-mode .btn-secondary {
  background: #1E293B;
  border-color: #1E293B;
  color: #E2E8F0;
}
body.dark-mode .btn-ghost:hover {
  background: #1E293B;
}
body.dark-mode .card {
  background: #1E293B;
  border-color: #334155;
}
body.dark-mode .card:hover {
  border-color: #475569;
}
body.dark-mode .card-title {
  color: #F1F5F9;
}
body.dark-mode .card-subtitle {
  color: #94A3B8;
}
body.dark-mode .metric-card {
  background: #1A2332;
  border-color: #1E293B;
}
body.dark-mode .metric-card .metric-label {
  color: #64748B;
}
body.dark-mode .metric-card .metric-value {
  color: #F1F5F9;
}
body.dark-mode .metric-card .metric-value .unit {
  color: #64748B;
}
body.dark-mode .metric-icon.blue {
  background: rgba(26,167,236,0.15);
  color: #38BDF8;
}
body.dark-mode .metric-icon.cyan {
  background: rgba(2,132,199,0.15);
  color: #38BDF8;
}
body.dark-mode .metric-icon.yellow {
  background: rgba(217,119,6,0.15);
  color: #FCD34D;
}
body.dark-mode .metric-icon.red {
  background: rgba(220,38,38,0.15);
  color: #FCA5A5;
}
body.dark-mode .table th {
  color: #64748B;
  border-bottom-color: #1E293B;
}
body.dark-mode .table td {
  color: #CBD5E1;
  border-bottom-color: #1A2332;
}
body.dark-mode .table tr:hover td {
  background: #1A2332;
}
body.dark-mode .modal {
  background: #1E293B;
}
body.dark-mode .modal h2 {
  color: #F1F5F9;
}
body.dark-mode .modal-input {
  background: #111C2E;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .form-input {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .form-input::placeholder {
  color: #64748B;
}
body.dark-mode .form-textarea {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .form-textarea::placeholder {
  color: #64748B;
}
body.dark-mode .emp-card {
  background: #1A2332;
  border-color: #1E293B;
}
body.dark-mode .emp-card:hover {
  border-color: #1AA7EC;
}
body.dark-mode .emp-name {
  color: #F1F5F9;
}
body.dark-mode .emp-action-btn {
  background: #1E293B;
  border-color: #334155;
  color: #94A3B8;
}
body.dark-mode .emp-action-btn.toggle-on {
  background: #113333;
  color: #6EE7B7;
}
body.dark-mode .emp-action-btn.toggle-off {
  background: #332211;
  color: #FCD34D;
}
body.dark-mode .empty-icon {
  background: #1A3A5C;
  color: #38BDF8;
}
body.dark-mode .empty-title {
  color: #F1F5F9;
}
body.dark-mode .empty-desc {
  color: #64748B;
}
body.dark-mode .badge {
  background: #334155;
  color: #94A3B8;
}
body.dark-mode .badge-success {
  background: #113322;
  color: #6EE7B7;
}
body.dark-mode .badge-warning {
  background: #332211;
  color: #FCD34D;
}
body.dark-mode .badge-danger {
  background: #331111;
  color: #FCA5A5;
}
body.dark-mode .badge-info {
  background: #1A3A5C;
  color: #38BDF8;
}
body.dark-mode .badge-gray {
  background: #334155;
  color: #94A3B8;
}
body.dark-mode .dot {
  background: #DC2626;
}
body.dark-mode .btn-primary {
  background: #1AA7EC;
  color: #fff;
}
body.dark-mode .loading-state {
  color: #94A3B8;
}
body.dark-mode .error-state {
  color: #FCA5A5;
}
body.dark-mode .initial-state {
  color: #94A3B8;
}
body.dark-mode .initial-state svg {
  color: #475569;
}
body.dark-mode .med-card {
  background: #1A2332;
  border-color: #1E293B;
}
body.dark-mode .med-card:hover {
  border-color: #475569;
}
body.dark-mode .pos-products {
  background: #0F172A;
}
body.dark-mode .pos-cart {
  background: #1E293B;
}
body.dark-mode .pos-cart .cart-header {
  border-bottom-color: #334155;
}
body.dark-mode .search-area input {
  background: #1E293B;
  color: #E2E8F0;
  border-color: #334155;
}
body.dark-mode .search-area input:focus {
  border-color: #1AA7EC;
}
body.dark-mode .btn-scan {
  background: #1AA7EC;
  color: #fff;
}
body.dark-mode .quick-med-btn {
  background: #1E293B;
  color: #94A3B8;
  border-color: #334155;
}
body.dark-mode .quick-med-btn:hover {
  background: #1AA7EC;
  color: #fff;
}
body.dark-mode .invoice-row {
  border-bottom-color: #1E293B;
}
body.dark-mode .cart-item {
  border-bottom-color: #1E293B;
}
body.dark-mode .input-field {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .input-field:focus {
  border-color: #1AA7EC;
}
body.dark-mode .select-field {
  background: #1E293B;
  border-color: #334155;
  color: #E2E8F0;
}
body.dark-mode .stat-number {
  color: #F1F5F9;
}
body.dark-mode .skeleton {
  background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
}
body.dark-mode .prof-report-row {
  border-bottom-color: #1E293B;
}
body.dark-mode .chips-bar {
  background: #1E293B;
}
body.dark-mode .chip {
  background: #111C2E;
  border-color: #334155;
  color: #94A3B8;
}
body.dark-mode .chip.active {
  background: #1AA7EC;
  color: #fff;
  border-color: #1AA7EC;
}
