/* MODERN POS SYSTEM - LIGHT THEME
   Modern UI/UX with responsive design, better accessibility and improved chart styling
   Version 2.0
*/

:root {
  /* Primary color palette */
  --primary-color: #2563eb;       /* Primary blue */
  --primary-hover: #1d4ed8;       /* Darker blue for hover states */
  --secondary-color: #10b981;     /* Success green */
  --danger-color: #ef4444;        /* Danger red */
  --warning-color: #f59e0b;       /* Warning orange */
  --info-color: #0ea5e9;          /* Info blue */
  
  /* Neutral colors */
  --bg-color: #f8fafc;            /* Light background */
  --card-bg: #ffffff;             /* Card background */
  --text-color: #1e293b;          /* Primary text */
  --text-muted: #64748b;          /* Secondary text */
  --border-color: #e2e8f0;        /* Border color */
  
  /* Interactive elements */
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-focus-border: #2563eb;
  --input-text: #1e293b;
  --input-placeholder: #94a3b8;
  
  /* Table styles */
  --table-header-bg: #f1f5f9;
  --table-border: #e2e8f0;
  --table-row-hover: #f8fafc;
  
  /* Sidebar */
  --sidebar-bg: #1e293b;
  --sidebar-text: #f8fafc;
  --sidebar-active: #2563eb;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
  
  /* Chart colors */
  --chart-primary: #2563eb;
  --chart-secondary: #10b981;
  --chart-tertiary: #f59e0b;
  --chart-quaternary: #ef4444;
  --chart-quinary: #8b5cf6;
  
  /* System */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Animation */
  --transition-fast: 150ms;
  --transition-normal: 250ms;
  --transition-slow: 350ms;
  
  /* Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
}

/* ================ BASE STYLES ================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Roboto', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* ================ TYPOGRAPHY ================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.page-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
}

p {
  margin-bottom: 1rem;
}

/* ================ LAYOUT ================ */
.wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

[dir="rtl"] .main-content {
  margin-right: 250px;
}

[dir="ltr"] .main-content {
  margin-left: 250px;
}

/* ================ SIDEBAR ================ */
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  overflow-y: auto;
  z-index: 100;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .sidebar {
  right: 0;
}

[dir="ltr"] .sidebar {
  left: 0;
}

.sidebar-sticky {
  position: sticky;
  top: 0;
  height: calc(100vh - 48px);
  padding: 1.5rem 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.sidebar h3 {
  color: var(--sidebar-text);
  padding: 0 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--sidebar-text);
  font-weight: 500;
  transition: all var(--transition-normal);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
}

[dir="rtl"] .sidebar .nav-link {
  justify-content: flex-end;
  border-right: 3px solid transparent;
  border-left: none;
}

[dir="ltr"] .sidebar .nav-link {
  justify-content: flex-start;
  border-left: 3px solid transparent;
  border-right: none;
}

.sidebar .nav-link i {
  font-size: 1rem;
  transition: transform var(--transition-normal);
}

[dir="rtl"] .sidebar .nav-link i {
  margin-left: 0.75rem;
}

[dir="ltr"] .sidebar .nav-link i {
  margin-right: 0.75rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: var(--sidebar-hover-bg);
}

.sidebar .nav-link.active {
  border-color: var(--primary-color);
}

[dir="rtl"] .sidebar .nav-link:hover,
[dir="rtl"] .sidebar .nav-link.active {
  border-right-color: var(--primary-color);
}

[dir="ltr"] .sidebar .nav-link:hover,
[dir="ltr"] .sidebar .nav-link.active {
  border-left-color: var(--primary-color);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
  transform: scale(1.1);
}

.sidebar-toggle {
  display: none;
  padding: 0.5rem 1rem;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin: 0.5rem;
}

/* Language selector */
select.Language {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem;
  margin: 0 auto 1.5rem;
  display: block;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all var(--transition-normal);
}

select.Language:hover,
select.Language:focus {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ================ CARDS ================ */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: none;
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Stat Cards */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-box {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  border-left: 4px solid var(--primary-color);
  display: flex;
  flex-direction: column;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-box.primary { border-color: var(--primary-color); }
.stat-box.success { border-color: var(--secondary-color); }
.stat-box.warning { border-color: var(--warning-color); }
.stat-box.danger { border-color: var(--danger-color); }
.stat-box.info { border-color: var(--info-color); }

.stat-box h3 {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.stat-box .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-box .stat-change {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  margin-top: auto;
}

.stat-box .stat-change.positive { color: var(--secondary-color); }
.stat-box .stat-change.negative { color: var(--danger-color); }

/* ================ FORMS ================ */
.form-control {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--input-text);
  background-color: var(--input-bg);
  background-clip: padding-box;
  border: 1px solid var(--input-border);
  border-radius: var(--radius);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-control:focus {
  color: var(--input-text);
  background-color: var(--input-bg);
  border-color: var(--input-focus-border);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-control::placeholder {
  color: var(--input-placeholder);
  opacity: 1;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ================ BUTTONS ================ */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: var(--radius);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-hover);
}

.btn-success {
  background-color: var(--secondary-color);
  color: white;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-warning {
  background-color: var(--warning-color);
  color: white;
}

.btn-info {
  background-color: var(--info-color);
  color: white;
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-link {
  color: var(--primary-color);
  background-color: transparent;
  padding: 0;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

.btn-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ================ TABLES ================ */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--text-color);
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-top: 1px solid var(--table-border);
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--table-border);
  background-color: var(--table-header-bg);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr:hover {
  background-color: var(--table-row-hover);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.025);
}

.table-bordered {
  border: 1px solid var(--table-border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--table-border);
}

/* ================ LOGIN PAGE STYLES ================ */
.login-container {
  max-width: 480px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background-color: var(--card-bg);
  border-top: 4px solid var(--primary-color);
  transition: all var(--transition-normal);
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.login-container h2 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.login-container h3 {
  color: var(--text-color);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.login-container h3::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
}

.login-container .form-group {
  margin-bottom: 1.5rem;
}

.login-container .form-control {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  transition: all var(--transition-normal);
}

.login-container .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.login-container label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--text-color);
}

.login-container .btn-primary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}

.login-container .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.login-container .btn-block {
  display: block;
  width: 100%;
}

.login-container .alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
}

.login-container .alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.login-container .logo-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-container .logo-container img {
  max-width: 120px;
  height: auto;
  margin: 0 auto;
  display: block;
  transition: all var(--transition-normal);
}

.login-container .logo-container img:hover {
  transform: scale(1.05);
}

/* Language selector styling */
.login-container select.form-control {
  background-color: var(--bg-color);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  height: 50px;
}

[dir="rtl"] .login-container select.form-control {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
  height: 50px;
}


/* Footer styling */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.login-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Responsive styles */
@media (max-width: 576px) {
  .login-container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .login-container h2 {
    font-size: 1.5rem;
  }
  
  .login-container h3 {
    font-size: 1.125rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.login-container {
  animation: fadeInUp 0.5s ease-out forwards;
}




/* ================ UTILITIES ================ */
/* Spacing */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.p-0 { padding: 0; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }

/* Flex utilities */
.d-flex { display: flex; }
.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--secondary-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.font-weight-bold { font-weight: 700; }

/* Background utilities */
.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--secondary-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-info { background-color: var(--info-color); }

/* ================ CHARTS ================ */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* ================ BADGE ================ */
.badge {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 75%;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--radius-full);
  background-color: var(--text-muted);
  color: white;
}

.badge-primary { background-color: var(--primary-color); }
.badge-success { background-color: var(--secondary-color); }
.badge-danger { background-color: var(--danger-color); }
.badge-warning { background-color: var(--warning-color); }
.badge-info { background-color: var(--info-color); }

/* ================ PAGINATION ================ */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: var(--radius);
}

.page-item:first-child .page-link {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.page-item:last-child .page-link {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: var(--primary-color);
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.page-link:hover {
  color: var(--primary-hover);
  background-color: var(--bg-color);
}

/* ================ LOADING SCREEN ================ */
#loading-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-color);
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#loading-screen .spinner {
  width: 60px;
  height: 60px;
  border: 6px dashed var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: dash-spin 1.2s linear infinite, dash-pulse 1.2s ease-in-out infinite alternate;
  margin-bottom: 20px;
}

#loading-screen .coins {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

#loading-screen .coin {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--warning-color);
  margin: 0 5px;
  animation: bounce 0.5s alternate infinite;
}

#loading-screen .coin:nth-child(2) {
  animation-delay: 0.1s;
}

#loading-screen .coin:nth-child(3) {
  animation-delay: 0.2s;
}

#loading-screen .loading-text {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color);
}

@keyframes dash-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes dash-pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-15px); }
}

/* ================ DARK MODE TOGGLE ================ */
.theme-toggle {
  position: fixed;
  top: 1rem;
  padding: 0.5rem;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: none;
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

[dir="rtl"] .theme-toggle {
  left: 1rem;
}

[dir="ltr"] .theme-toggle {
  right: 1rem;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 992px) {
  .sidebar {
    width: 220px;
  }
  
  [dir="rtl"] .main-content {
    margin-right: 220px;
  }
  
  [dir="ltr"] .main-content {
    margin-left: 220px;
  }
  
  .stats-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
    z-index: 1050;
  }
  
  [dir="rtl"] .sidebar {
    transform: translateX(100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  [dir="rtl"] .main-content,
  [dir="ltr"] .main-content {
    margin: 0;
    padding-top: 60px;
  }
  
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 1rem;
    z-index: 1030;
  }
  
  [dir="rtl"] .sidebar-toggle {
    right: 1rem;
  }
  
  [dir="ltr"] .sidebar-toggle {
    left: 1rem;
  }
  
  .stats-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  
  .page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 1rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .table th, 
  .table td {
    padding: 0.5rem;
  }
  
  .btn-toolbar {
    justify-content: center;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .chart-container {
    height: 250px;
  }
}

/* Accessibility and focus styles */
:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.form-control:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================ SCROLLBAR ================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ================ PRINT STYLES ================ */
@media print {
  .sidebar, 
  .btn-toolbar, 
  .no-print,
  .theme-toggle,
  .sidebar-toggle {
    display: none !important;
  }
  
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body {
    background-color: white !important;
    color: black !important;
  }
  
  .card, 
  .table, 
  .form-control {
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }
}