html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
    background-color: #f8f9fa;
    margin-bottom: 60px;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    color: #222;
}

@media (min-width: 768px) {
  html {
    font-size: 17px;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }
  .container, .container-fluid {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }
  .card, .table, .form-control, .btn {
    font-size: 1em !important;
  }
  .btn, .btn-lg, .btn-primary, .btn-success, .btn-danger, .btn-outline-primary, .btn-outline-danger {
    padding: 0.9rem 1.4rem !important;
    font-size: 1.1em !important;
    border-radius: 0.7rem !important;
  }
  .table-responsive {
    overflow-x: auto;
  }
}

.btn, .btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 1.1em;
    border-radius: 0.6rem;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-control, .form-select {
    min-height: 48px;
    font-size: 1em;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
}

label, .form-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 1em;
}

.card {
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border-radius: 1.2rem;
}

.card-header, .table thead th {
    font-size: 1.1em;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.table {
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}
.table th, .table td {
    vertical-align: middle !important;
    padding: 12px 6px !important;
    font-size: 1em;
}
/* Default table header - only apply when no Bootstrap class is used */
.table:not(.table-dark):not(.table-primary):not(.table-warning):not(.table-success):not(.table-danger):not(.table-info) thead:not(.table-dark):not(.table-primary):not(.table-warning):not(.table-success):not(.table-danger):not(.table-info):not([class*="bg-"]) th {
    background: #f8f9fa;
    color: #333;
}
/* Ensure Bootstrap table header classes work correctly */
.table thead.table-dark th {
    background-color: #212529 !important;
    color: #fff !important;
}
.table thead.table-primary th {
    background-color: #0d6efd !important;
    color: #fff !important;
}
.table thead.table-warning th {
    background-color: #ffc107 !important;
    color: #333 !important;
}
.table thead.table-success th {
    background-color: #198754 !important;
    color: #fff !important;
}
.table thead.table-danger th {
    background-color: #dc3545 !important;
    color: #fff !important;
}
.table thead.table-info th {
    background-color: #0dcaf0 !important;
    color: #333 !important;
}
.table tfoot.table-warning td {
    background-color: #ffc107 !important;
    color: #333 !important;
}
.table tbody tr:nth-child(even) {
    background-color: #f4f6fa;
}
.table-responsive {
    overflow-x: auto;
}

.navbar {
    background-color: #343a40;
}

.navbar-brand, .nav-link, .footer {
    color: #ffffff !important;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    font-size: 1.08em;
}

.navbar-brand:hover, .nav-link:hover {
    color: #adb5bd !important;
}

.footer {
    background-color: #343a40;
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 1em;
}

.hero-section {
    background: url('https://via.placeholder.com/1200x400') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 100px 0;
    text-align: center;
    border-radius: 1.5rem;
}

.info-card {
    margin: 20px 0;
    border-radius: 1.2rem;
}

/* Touch-friendly enhancements */
input[type='radio'], input[type='checkbox'] {
    width: 1.3em;
    height: 1.3em;
}

select, .form-select {
    min-height: 48px;
    font-size: 1em;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
}

/* General spacing for all elements */
*[class^="col-"], .row, .container, .container-fluid {
    margin-bottom: 12px !important;
}

/* Responsive RTL tweaks */
html[dir="rtl"] .form-control, html[dir="rtl"] .form-label, html[dir="rtl"] .btn {
    text-align: right;
}

::-webkit-input-placeholder { color: #bbb; }
::-moz-placeholder { color: #bbb; }
:-ms-input-placeholder { color: #bbb; }
::placeholder { color: #bbb; }

/* تحسين ألوان النصوص لتكون أوضح */
.text-warning {
    color: #b8860b !important; /* ذهبي داكن أوضح */
}
.text-muted {
    color: #6c757d !important;
}

/* تحسين ظهور الأزرار في الجداول */
.table .btn-outline-primary,
.table .btn-outline-secondary,
.table .btn-outline-success,
.table .btn-outline-danger {
    border-width: 2px;
}

/* تحسين ألوان الـ badges */
.badge.bg-warning {
    color: #333 !important;
}

/* تحسين ظهور النصوص في tfoot */
.table tfoot td {
    color: #333;
}
.table tfoot .text-danger {
    color: #dc3545 !important;
}
.table tfoot .text-primary {
    color: #0d6efd !important;
}
.table tfoot .text-warning {
    color: #b8860b !important;
}