/* ==========================================================================
   نظام إدارة الأعمال والإنتاج - تصميم متطور فائق الجمال (Ultra-Modern UI)
   Pure CSS - RTL Arabic Layout - 100% Offline
   ========================================================================== */

:root {
  /* نظام الألوان المتناسق والفخم */
  --sidebar-bg: #1e293b;
  --sidebar-header: #0f172a;
  --sidebar-hover: #334155;
  --sidebar-active: #2563eb;
  --sidebar-text: #94a3b8;
  --sidebar-text-bright: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.07);

  --topbar-bg: #ffffff;
  --topbar-border: #e2e8f0;
  --topbar-text: #0f172a;

  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.25);
  
  --success: #059669;
  --success-hover: #047857;
  --success-light: #ecfdf5;
  
  --warning: #d97706;
  --warning-light: #fffbeb;
  
  --danger: #e11d48;
  --danger-hover: #be123c;
  --danger-light: #ffe4e6;
  
  --info: #0284c7;
  --info-light: #f0f9ff;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 14px 28px -4px rgba(0, 0, 0, 0.09), 0 6px 12px -2px rgba(0, 0, 0, 0.04);

  --sidebar-width: 270px;
  --topbar-height: 70px;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 15px;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  line-height: 1.6;
}

.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   الشريط الجانبي (Sidebar)
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.35);
  user-select: none;
}

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

.sidebar-header {
  height: var(--topbar-height);
  background-color: var(--sidebar-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.35rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--sidebar-text-bright);
}

.logo-icon-box {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-logo h1 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.btn-sidebar-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sidebar-close:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--sidebar-text-bright);
  transform: scale(1.05);
}

.sidebar-menu {
  list-style: none;
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  flex-grow: 1;
}

.menu-item {
  position: relative;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1.15rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.menu-link .icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition-fast);
}

.menu-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-bright);
  transform: translateX(-3px);
}

.menu-item.active .menu-link {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.sidebar-footer {
  padding: 1.15rem 1.35rem;
  border-top: 1px solid var(--sidebar-border);
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   الشريط العلوي (Topbar)
   ========================================================================== */
.main-wrapper {
  flex: 1;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  height: var(--topbar-height);
  background-color: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-xs);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.btn-sidebar-toggle {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  color: var(--text-main);
  cursor: pointer;
  padding: 0.55rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-sidebar-toggle:hover {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: var(--primary);
  transform: scale(1.05);
}

.btn-sidebar-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.3;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* بطاقة المستخدم العلوية (مطابقة للصورة بدقة فائقة) */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: #ffffff;
  border: 1px solid var(--topbar-border);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast);
}

.user-profile-badge:hover {
  box-shadow: var(--shadow-md);
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.user-role {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background-color: #e11d48;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

/* ==========================================================================
   منطقة المحتوى (Content Area)
   ========================================================================== */
.content-body {
  padding: 1.75rem;
  flex: 1;
}

/* بطاقة الترحيب المطابقة للصورة */
.welcome-banner {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--primary), #60a5fa);
}

.welcome-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  letter-spacing: -0.4px;
}

.welcome-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* شبكة بطاقات الأقسام الرئيسية */
.sections-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.35rem;
  margin-top: 1.5rem;
}

.section-nav-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.section-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.section-nav-card .icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.section-nav-card:hover .icon-box {
  transform: scale(1.1);
}

.section-nav-card.customers .icon-box { background: #eff6ff; color: #2563eb; }
.section-nav-card.work_orders .icon-box { background: #f3e8ff; color: #7c3aed; }
.section-nav-card.expenses .icon-box { background: #fff1f2; color: #e11d48; }
.section-nav-card.employees .icon-box { background: #ecfdf5; color: #059669; }
.section-nav-card.safes .icon-box { background: #fffbeb; color: #d97706; }
.section-nav-card.reports .icon-box { background: #f0fdfa; color: #0284c7; }

.section-nav-card .card-texts h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: var(--text-main);
}

.section-nav-card .card-texts p {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.section-nav-card .arrow-icon {
  margin-right: auto;
  color: var(--text-light);
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.section-nav-card:hover .arrow-icon {
  transform: translateX(-6px);
  color: var(--primary);
}

/* بطاقات المؤشرات والإحصائيات */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.stat-icon.primary { background: #eff6ff; color: #2563eb; }
.stat-icon.success { background: #ecfdf5; color: #059669; }
.stat-icon.warning { background: #fffbeb; color: #d97706; }
.stat-icon.danger { background: #fff1f2; color: #e11d48; }
.stat-icon.info { background: #f0f9ff; color: #0284c7; }

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

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

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

/* البطاقات العامة */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.75rem;
  overflow: hidden;
}

.card-header {
  padding: 1.25rem 1.6rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-body {
  padding: 1.5rem;
}

/* شريط الإجراءات والبحث */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  min-width: 280px;
  max-width: 420px;
  flex: 1;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 2.6rem 0.75rem 1.15rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* الأزرار العصرية */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

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

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #be123c, #9f1239);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

/* الجداول المنظمة والراقية */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.94rem;
}

.custom-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 800;
  padding: 0.95rem 1.15rem;
  border-bottom: 2px solid var(--card-border);
  white-space: nowrap;
}

.custom-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-main);
  vertical-align: middle;
}

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

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

/* الشارات والأوسمة (Badges) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-primary { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.badge-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-danger { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.badge-purple { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.badge-dark { background: #1e293b; color: #f8fafc; border: 1px solid #334155; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* تبويبات الفلترة السريعة */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-tab-btn {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.filter-tab-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
}

.filter-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.filter-tab-btn .count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

.filter-tab-btn.active .count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* النماذج والنوافذ المنبثقة (Modals & Forms) */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control[readonly] {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
}

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box, .modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.35rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

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

.modal-body {
  padding: 1.6rem;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1.15rem 1.6rem;
  border-top: 1px solid var(--card-border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* طبقة التعتيم للقائمة الجانبية */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 990;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ==========================================================================
   التوافق مع الشاشات والهواتف (Mobile Responsiveness)
   ========================================================================== */
@media (max-width: 992px) {
  .user-role {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 1rem;
  }

  .page-title {
    font-size: 1.05rem;
  }

  .user-name {
    display: none;
  }

  .user-profile-badge {
    padding: 0.3rem 0.6rem;
  }

  .content-body {
    padding: 1.15rem 0.85rem;
  }

  .welcome-banner {
    padding: 1.35rem;
  }

  .welcome-title {
    font-size: 1.2rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group {
    justify-content: stretch;
  }

  .btn-group .btn {
    flex: 1;
  }
}

/* ==========================================================================
   تنسيقات الطباعة (Print Styles - Matching User PDF)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .sidebar, .topbar, .btn, .btn-group, .action-bar, .modal-backdrop, .no-print {
    display: none !important;
  }

  .main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .content-body {
    padding: 0 !important;
  }

  .card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    margin-bottom: 1.5rem !important;
  }

  .custom-table {
    border: 2px solid #000000 !important;
    width: 100% !important;
  }

  .custom-table th, .custom-table td {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 6px 8px !important;
    font-size: 11pt !important;
  }

  .custom-table th {
    background-color: #f0f0f0 !important;
    font-weight: bold !important;
  }

  .print-only {
    display: block !important;
  }
}
