@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

/* Global Styles */
html, body {
  height: 100%;
}
body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  display: flex;
  flex-direction: column;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}
a:hover {
  color: #1d4ed8;
  text-decoration: none;
}

/* Custom Navigation Bar */
.navbar-custom {
  background-color: #0f172a !important;
  border-bottom: 1px solid #1e293b;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.navbar-custom .navbar-brand {
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}
.navbar-custom .nav-link {
  color: #94a3b8 !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  transition: all 0.15s ease-in-out;
}
.navbar-custom .nav-link:hover {
  color: #ffffff !important;
  background-color: #1e293b;
}
.navbar-custom .nav-item.active .nav-link,
.navbar-custom .nav-link.active {
  color: #ffffff !important;
  background-color: #1e293b;
}

/* UI Cards */
.card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.2s ease-in-out;
}
.card-header {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  color: #0f172a;
  padding: 0.85rem 1.25rem;
}
.card-body {
  padding: 1.25rem;
}
.card-footer {
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 0.75rem 1.25rem;
}

/* Custom Table Styles */
.table {
  width: 100%;
  margin-bottom: 0;
  color: #334155;
  border-collapse: separate;
  border-spacing: 0;
}
.table th,
.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-top: 1px solid #f1f5f9;
}
.table thead th {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}
.table-hover tbody tr:hover {
  background-color: #f8fafc;
}
.table-striped tbody tr:nth-of-type(odd) {
  background-color: #ffffff;
}
.table-striped tbody tr:nth-of-type(even) {
  background-color: #f8fafc;
}

/* Buttons redone with 5px radius */
.btn {
  font-weight: 600;
  border-radius: 5px !important;
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-sm {
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 5px !important;
}
.btn-primary {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}
.btn-secondary {
  background-color: #64748b;
  border-color: #64748b;
  color: #ffffff;
}
.btn-secondary:hover, .btn-secondary:focus {
  background-color: #475569;
  border-color: #475569;
  color: #ffffff;
}
.btn-outline-primary {
  color: #2563eb;
  border-color: #2563eb;
}
.btn-outline-primary:hover {
  background-color: #2563eb;
  color: #ffffff;
}
.btn-outline-info {
  color: #0284c7;
  border-color: #0284c7;
}
.btn-outline-info:hover {
  background-color: #0284c7;
  color: #ffffff;
}
.btn-outline-warning {
  color: #d97706;
  border-color: #d97706;
}
.btn-outline-warning:hover {
  background-color: #d97706;
  color: #ffffff;
}
.btn-outline-danger {
  color: #dc2626;
  border-color: #dc2626;
}
.btn-outline-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

/* Table Button Groups */
.btn-group, .table .btn-group {
  display: inline-flex;
  gap: 4px;
}
.btn-group > .btn, .table .btn-group > .btn {
  border-radius: 5px !important;
}

/* Form inputs & Dropdowns */
.form-control, select.form-control {
  border-radius: 5px !important;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.85rem;
  height: auto !important;
  min-height: 38px;
  line-height: 1.5 !important;
  font-size: 0.9rem;
  color: #1e293b;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
select.form-control {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  vertical-align: middle;
}
.form-control:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  color: #1e293b;
}

/* RTL Input Group Search Bar Directions & 5px Corners */
[dir="rtl"] .input-group > .form-control:first-child,
[dir="rtl"] .input-group > .custom-select:first-child {
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}
[dir="rtl"] .input-group > .input-group-append > .btn {
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
[dir="rtl"] .input-group > .input-group-append {
  margin-right: -1px;
}

/* Select2 Dropdown Styling Fixes */
.select2-container .select2-selection--single {
  height: 38px !important;
  border-radius: 5px !important;
  border: 1px solid #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 38px !important;
  padding-right: 10px !important;
  padding-left: 20px !important;
  color: #1e293b !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  left: 6px !important;
  right: auto !important;
}

/* Subtle Modern Badges */
.badge {
  font-weight: 600;
  padding: 0.35em 0.7em;
  border-radius: 5px !important;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.badge-success {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}
.badge-danger {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}
.badge-warning {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
}
.badge-info {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
}
.badge-secondary {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

/* Custom layout container */
.container, .container-fluid {
  max-width: 100%;
}

.container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.max-width-md {
  max-width: 600px;
}
.max-width-lg {
  max-width: 800px;
}
.w-48 {
  width: 48%;
}

/* Responsive Table & Zoom Handling */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.table {
  width: 100%;
  margin-bottom: 0;
  color: #334155;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

.table th,
.table td {
  padding: 0.85rem 1rem;
  vertical-align: middle !important;
  border-top: 1px solid #f1f5f9;
}

/* Prevent text wrapping breaking dates, badges, and action buttons */
.table th,
.table td,
.table .badge,
.table .btn-group,
.date-cell,
.action-cell {
  white-space: nowrap;
}

.table .btn-group {
  display: inline-flex;
  flex-wrap: nowrap;
}

.table .btn-group .btn {
  white-space: nowrap;
  padding: 0.3rem 0.65rem;
  font-size: 0.825rem;
}

/* Navbar zoom fixes */
.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  white-space: nowrap;
}

/* Pagination modern look */
.pagination .page-link {
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  margin: 0 2px;
  border-radius: 6px;
  white-space: nowrap;
}
.pagination .page-link:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}
.pagination .page-item.active .page-link {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.pagination .page-item.disabled .page-link {
  color: #cbd5e1;
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

/* Footer modern styles */
.footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}





