/* Professional Dashboard - Dark Mode Only - Based on bustani-charity-dashboard-main Design System */

/* ============================================
   CSS VARIABLES - Design System
   ============================================ */

:root {
  /* Primary Colors */
  --primary-green: #468BE5;
  --primary-green-dark: #3a7bc8;
  
  /* Background Colors - Dark Theme Only */
  --bg-light: #111827;
  --bg-white: #1f2937;
  
  /* Text Colors */
  --text-dark: #f9fafb;
  --text-gray: #d1d5db;
  --text-light-gray: #9ca3af;
  
  /* Border Colors */
  --border-color: #374151;
  
  /* Shadow System */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  
  /* Spacing System - Based on 4px grid */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* Typography Scale */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */
  --font-size-5xl: 3rem;        /* 48px */
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  
  /* Animation Timing */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-slower: 750ms;
  
  /* Animation Easing */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Dimensions */
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 64px;
  --header-height: 64px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ============================================
   BASE STYLES
   ============================================ */

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

html {
  background-color: var(--bg-light);
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* RTL Support */
[dir="rtl"] body {
  direction: rtl;
  font-family: 'Noto Kufi Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

[dir="ltr"] body {
  direction: ltr;
  font-family: 'Saira', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-dark);
  margin: 0;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-dark);
  margin: 0;
}

small, .text-sm {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.text-xs {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* ============================================
   LINKS
   ============================================ */

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--primary-green-dark);
  text-decoration: underline;
}

/* ============================================
   CARD STYLES
   ============================================ */

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
}

.card-body {
  color: var(--text-dark);
  padding: var(--spacing-lg);
}

/* ============================================
   TABLE STYLES
   ============================================ */

.table {
  color: var(--text-dark);
  margin-bottom: 0;
  width: 100%;
}

thead th {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
  color: var(--text-dark);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
  padding: var(--spacing-sm) var(--spacing-md);
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--duration-fast) var(--ease-out);
}

tbody tr:hover {
  background: var(--bg-light);
}

tbody td {
  padding: var(--spacing-sm) var(--spacing-md);
  vertical-align: middle;
  font-size: var(--font-size-sm);
}

/* جدول متناسق مع ألوان لوحة التحكم (داكن) */
.dashboard-table-wrap {
  background: var(--bg-white);
}
.dashboard-table,
.dashboard-table thead,
.dashboard-table tbody,
.dashboard-table th,
.dashboard-table td {
  background: var(--bg-white) !important;
  color: var(--text-dark) !important;
  border-color: var(--border-color) !important;
}
.dashboard-table thead th {
  background: var(--bg-light) !important;
  color: var(--text-dark) !important;
  border-bottom: 2px solid var(--border-color) !important;
}
.dashboard-table tbody tr {
  background: var(--bg-white) !important;
}
.dashboard-table tbody tr:hover {
  background: var(--bg-light) !important;
}
.dashboard-table tbody td {
  color: var(--text-dark) !important;
  border-color: var(--border-color) !important;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control,
.form-select {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  transition: border-color var(--duration-fast) var(--ease-out), 
              box-shadow var(--duration-fast) var(--ease-out);
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-white);
  border-color: var(--primary-green);
  color: var(--text-dark);
  box-shadow: 0 0 0 3px rgba(70, 139, 229, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-light-gray);
}

.form-label {
  color: var(--text-dark);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  margin-bottom: 0.375rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  transition: all var(--duration-fast) var(--ease-out);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-primary {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-green-dark);
  border-color: var(--primary-green-dark);
  color: #ffffff;
}

.btn-success {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.btn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.btn-warning {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
}

.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
  color: #ffffff;
}

.btn-info {
  background: #06b6d4;
  border-color: #06b6d4;
  color: #ffffff;
}

.btn-info:hover {
  background: #0891b2;
  border-color: #0891b2;
  color: #ffffff;
}

.btn-outline-primary {
  color: var(--primary-green);
  border-color: var(--primary-green);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-green);
  color: #ffffff;
}

.btn-outline-danger {
  color: #ef4444;
  border-color: #ef4444;
  background: transparent;
}

.btn-outline-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  color: var(--text-dark);
}

/* ============================================
   MODAL
   ============================================ */

.modal-content {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: var(--spacing-lg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
  color: var(--text-dark);
  padding: var(--spacing-xl);
}

.modal-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-lg);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal-title {
  color: var(--text-dark);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xl);
}

.btn-close {
  filter: invert(1) brightness(2);
  opacity: 0.7;
  transition: opacity var(--duration-fast) var(--ease-out);
}

.btn-close:hover {
  opacity: 1;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.navbar-brand {
  color: var(--text-dark) !important;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-lg);
}

.nav-link {
  color: var(--text-gray) !important;
  transition: color var(--duration-fast) var(--ease-out);
  font-weight: var(--font-weight-medium);
  padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-green) !important;
}

/* ============================================
   DROPDOWN
   ============================================ */

.dropdown-menu {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
}

.dropdown-item {
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast) var(--ease-out);
  font-size: var(--font-size-sm);
}

.dropdown-item:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ============================================
   PAGINATION
   ============================================ */

.page-link {
  background: var(--bg-white);
  border-color: var(--border-color);
  color: var(--text-dark);
  border-radius: var(--radius);
  margin: 0 0.125rem;
  transition: all var(--duration-fast) var(--ease-out);
  font-size: var(--font-size-sm);
}

.page-link:hover {
  background: var(--bg-light);
  color: var(--text-dark);
  border-color: var(--border-color);
}

.page-item.active .page-link {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #ffffff;
}

/* ============================================
   BADGE
   ============================================ */

.badge {
  font-weight: var(--font-weight-medium);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
}

.badge-primary {
  background: var(--primary-green);
  color: #ffffff;
}

.badge-success {
  background: #10b981;
  color: #ffffff;
}

.badge-danger {
  background: #ef4444;
  color: #ffffff;
}

.badge-warning {
  background: #f59e0b;
  color: #ffffff;
}

.badge-info {
  background: #06b6d4;
  color: #ffffff;
}

.badge-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

/* ============================================
   ALERT
   ============================================ */

.alert {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md) var(--spacing-lg);
}

.alert-primary {
  background: rgba(70, 139, 229, 0.1);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

.alert-info {
  background: rgba(6, 182, 212, 0.1);
  border-color: #06b6d4;
  color: #06b6d4;
}

/* ============================================
   SWEETALERT DARK MODE
   ============================================ */

.swal2-popup {
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-lg) !important;
}

.swal2-title {
  color: var(--text-dark) !important;
  font-weight: var(--font-weight-semibold) !important;
}

.swal2-html-container {
  color: var(--text-gray) !important;
  font-size: var(--font-size-base) !important;
}

.swal2-input,
.swal2-textarea,
.swal2-select {
  background: var(--bg-white) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-dark) !important;
  border-radius: var(--radius) !important;
}

.swal2-input:focus,
.swal2-textarea:focus,
.swal2-select:focus {
  border-color: var(--primary-green) !important;
  box-shadow: 0 0 0 3px rgba(70, 139, 229, 0.1) !important;
}

.swal2-confirm {
  background: var(--primary-green) !important;
  color: #ffffff !important;
  font-weight: var(--font-weight-medium) !important;
  border-radius: var(--radius) !important;
  padding: 0.625rem 1.25rem !important;
  border: none !important;
}

.swal2-confirm:hover {
  background: var(--primary-green-dark) !important;
}

.swal2-cancel {
  background: var(--bg-light) !important;
  color: var(--text-dark) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius) !important;
  padding: 0.625rem 1.25rem !important;
  font-weight: var(--font-weight-medium) !important;
}

.swal2-cancel:hover {
  background: var(--border-color) !important;
}

.swal2-icon {
  border-color: var(--border-color) !important;
}

.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

.swal2-icon.swal2-info {
  border-color: #06b6d4 !important;
  color: #06b6d4 !important;
}

/* ============================================
   SCROLLBAR - HIDDEN
   ============================================ */

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  -webkit-appearance: none !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
html {
  scrollbar-width: none !important;  /* Firefox */
  -ms-overflow-style: none !important;  /* IE and Edge */
}

body {
  scrollbar-width: none !important;  /* Firefox */
  -ms-overflow-style: none !important;  /* IE and Edge */
}

/* Ensure scroll functionality still works with mouse wheel */
* {
  scrollbar-width: none !important;  /* Firefox */
  -ms-overflow-style: none !important;  /* IE and Edge */
}

/* Hide scrollbar on all elements with overflow */
*::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  -webkit-appearance: none !important;
}

/* Hide scrollbar on specific elements */
*::-webkit-scrollbar-track {
  display: none !important;
}

*::-webkit-scrollbar-thumb {
  display: none !important;
}

*::-webkit-scrollbar-button {
  display: none !important;
}

*::-webkit-scrollbar-corner {
  display: none !important;
}

/* Hide scrollbar on elements with overflow */
*[style*="overflow"]::-webkit-scrollbar,
*[style*="overflow-y"]::-webkit-scrollbar,
*[style*="overflow-x"]::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

/* Hide scrollbar on all scrollable elements */
div::-webkit-scrollbar,
nav::-webkit-scrollbar,
aside::-webkit-scrollbar,
main::-webkit-scrollbar,
section::-webkit-scrollbar,
article::-webkit-scrollbar,
ul::-webkit-scrollbar,
ol::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
}

/* Hide scrollbar on elements with no-scrollbar class */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  -webkit-appearance: none !important;
}

.no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted-custom {
  color: var(--text-light-gray) !important;
}

.border-custom {
  border-color: var(--border-color) !important;
}

.bg-custom {
  background-color: var(--bg-white) !important;
}

/* Loading Spinner */
.spinner-border {
  border-color: var(--primary-green);
  border-right-color: transparent;
}

/* Stats Card */
.stats-card {
  transition: box-shadow var(--duration-fast) var(--ease-out);
}

.stats-card:hover {
  box-shadow: var(--shadow-md);
}

.stats-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Status Indicators */
.status-active {
  color: #10b981;
}

.status-completed {
  color: var(--primary-green);
}

.status-pending {
  color: #f59e0b;
}

/* Sidebar Toggle */
.sidebar-toggle {
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background-color var(--duration-fast) var(--ease-out);
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.sidebar-toggle:hover {
  background: var(--border-color);
}

/* Progress Bar */
.progress {
  background: var(--bg-light);
  border-radius: var(--radius);
  height: 8px;
}

.progress-bar {
  background: var(--primary-green);
  border-radius: var(--radius);
  transition: width var(--duration-normal) var(--ease-out);
}

/* Form Check */
.form-check-input {
  background: var(--bg-white);
  border-color: var(--border-color);
  border-radius: 4px;
  transition: all var(--duration-fast) var(--ease-out);
}

.form-check-input:checked {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.form-check-label {
  color: var(--text-dark);
  font-weight: var(--font-weight-normal);
}

/* Tabs */
.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  color: var(--text-gray);
  border: none;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.75rem 1.25rem;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: -1px;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-green);
  background: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--primary-green);
  background: var(--bg-white);
  border-bottom: 2px solid var(--primary-green);
  font-weight: var(--font-weight-medium);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(70, 139, 229, 0.1);
}

/* Selection */
::selection {
  background: rgba(70, 139, 229, 0.2);
  color: var(--text-dark);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

.m-0 { margin: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* ============================================
   ELEVATION SYSTEM
   ============================================ */

.elevation-0 { box-shadow: none; }
.elevation-1 { box-shadow: var(--shadow-xs); }
.elevation-2 { box-shadow: var(--shadow-sm); }
.elevation-3 { box-shadow: var(--shadow-md); }
.elevation-4 { box-shadow: var(--shadow-lg); }
.elevation-5 { box-shadow: var(--shadow-xl); }
.elevation-6 { box-shadow: var(--shadow-2xl); }

/* ============================================
   INPUT GROUP
   ============================================ */

.input-group-text {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  border-radius: var(--radius) 0 0 var(--radius);
}

.input-group .form-control {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group .form-control:focus {
  z-index: 3;
}

/* ============================================
   BUTTON GROUP
   ============================================ */

.btn-group .btn {
  border-radius: 0;
}

.btn-group .btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.btn-group .btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
}

.btn-group-vertical .btn {
  border-radius: 0;
}

.btn-group-vertical .btn:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.btn-group-vertical .btn:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================
   NEON LINES BACKGROUND ANIMATION
   ============================================ */

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

/* Neon Lines Background Effect */
.neon-lines-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.15;
}

.neon-line {
  position: absolute;
  width: 2px;
  height: 200%;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--primary-green),
    transparent
  );
  box-shadow:
    0 0 10px rgba(70, 139, 229, 0.5),
    0 0 20px rgba(70, 139, 229, 0.3),
    0 0 30px rgba(70, 139, 229, 0.2);
  animation: neonLineMove 20s linear infinite;
  border-radius: 2px;
}

.neon-line-1 {
  left: 20%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.neon-line-2 {
  left: 50%;
  animation-delay: -8s;
  animation-duration: 28s;
}

.neon-line-3 {
  left: 80%;
  animation-delay: -15s;
  animation-duration: 22s;
}

/* Curved corners effect */
.neon-line::before,
.neon-line::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-green);
  border-radius: 50%;
  box-shadow:
    0 0 10px rgba(70, 139, 229, 0.8),
    0 0 20px rgba(70, 139, 229, 0.5);
  opacity: 0;
  animation: neonCorner 20s linear infinite;
}

.neon-line::before {
  top: -10px;
  left: -9px;
}

.neon-line::after {
  bottom: -10px;
  left: -9px;
}

@keyframes neonLineMove {
  0% {
    transform: translateY(-100%) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes neonCorner {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  5%, 95% {
    opacity: 0;
    transform: scale(0);
  }
  10%, 90% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Ensure dashboard content is above neon lines */
.dashboard {
  position: relative;
  z-index: 1;
}

/* ============================================
   OVERFLOW FIXES
   ============================================ */

/* Prevent content from overflowing viewport width */
* {
  max-width: 100%;
}

/* Fix container overflow */
.container-fluid {
  max-width: 100%;
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
  overflow-x: hidden;
}

/* Fix card overflow */
.card {
  max-width: 100%;
  overflow: hidden;
}

.card-body {
  max-width: 100%;
  overflow-x: auto;
}

/* Fix table overflow */
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  max-width: 100%;
  min-width: 100%;
}

/* Fix form overflow */
.form-control,
.form-select {
  max-width: 100%;
}

/* Fix button overflow */
.btn {
  max-width: 100%;
  white-space: nowrap;
}

/* Fix modal overflow */
.modal-content {
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Fix row overflow */
.row {
  max-width: 100%;
  margin-left: calc(-1 * var(--spacing-lg));
  margin-right: calc(-1 * var(--spacing-lg));
}

/* Fix column overflow */
.col-12,
.col-md-6,
.col-md-4,
.col-md-3,
.col-lg-4,
.col-lg-3 {
  max-width: 100%;
  padding-left: var(--spacing-lg);
  padding-right: var(--spacing-lg);
}

/* Fix pagination overflow */
.pagination {
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

/* Fix badge overflow */
.badge {
  max-width: 100%;
  white-space: nowrap;
}

/* Fix text overflow */
h1, h2, h3, h4, h5, h6 {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

p {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Fix link overflow */
a {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Fix alert overflow */
.alert {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Fix nav tabs overflow */
.nav-tabs {
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

/* Fix dropdown overflow */
.dropdown-menu {
  max-width: 100%;
  overflow-x: auto;
}

/* Fix input group overflow */
.input-group {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
}

/* Fix button group overflow */
.btn-group {
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
}

/* Reduce opacity on mobile for better performance */
@media (max-width: 768px) {
  .neon-lines-container {
    opacity: 0.1;
  }
  
  .neon-line {
    width: 1px;
  }
  
  .neon-line::before,
  .neon-line::after {
    width: 14px;
    height: 14px;
  }
}
