html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: linear-gradient(135deg, #f8fafc 0%, #e3e9f7 100%);
  color: #222;
  line-height: 1.8;
  padding-bottom: 0 !important;
}

header, .navbar {
  background: linear-gradient(90deg, #1a237e 60%, #ffd700 100%) !important;
  box-shadow: 0 2px 8px rgba(26,35,126,0.08);
}

.navbar .navbar-brand, .navbar .nav-link, .footer {
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.navbar .nav-link.active, .navbar .nav-link:hover {
  color: #ffd700 !important;
  text-shadow: 0 1px 4px #1a237e22;
}

/* تحسين الأزرار */
.btn-primary, .btn-lg, .btn-secondary {
  border-radius: 2.5rem !important;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.9rem 2.5rem;
  margin: 0.5rem 0.5rem;
  box-shadow: 0 2px 8px #1a237e22;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(90deg, #1a237e 60%, #3949ab 100%);
  color: #fff;
  border: none;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(90deg, #ffd700 60%, #1a237e 100%);
  color: #1a237e;
  box-shadow: 0 4px 16px #ffd70044;
}
.btn-secondary {
  background: #fff;
  color: #1a237e;
  border: 1.5px solid #1a237e;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #ffd700;
  color: #1a237e;
}

footer, .footer {
  background: linear-gradient(90deg, #1a237e 60%, #ffd700 100%);
  color: #fff;
  padding: 0.3rem 0 0.3rem 0;
  text-align: center;
  border-radius: 1.2rem 1.2rem 0 0;
  margin-top: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 -4px 24px #1a237e22;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 32px;
  position: static;
}
footer a, .footer a {
  color: #ffd700;
  font-weight: 700;
  text-decoration: underline;
  transition: color 0.2s;
}
footer a:hover, .footer a:focus {
  color: #fff;
  text-decoration: none;
}

/* تحسين البطاقات */
.card, .modal-content {
  border-radius: 2.5rem;
  box-shadow: 0 8px 32px rgba(26,35,126,0.10);
  border: none;
  background: #fff;
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  margin-top: 2.5rem;
  transition: box-shadow 0.2s;
}
.card + .card, .modal-content + .modal-content {
  margin-top: 2.5rem;
}
.card:hover, .modal-content:hover {
  box-shadow: 0 12px 40px rgba(26,35,126,0.18);
}

/* تحسين العناوين */
h1, h2, h3, h4, h5, h6 {
  color: #1a237e;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin-bottom: 2rem;
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

/* أيقونات للعناوين (مثال) */
h1:before { content: "\1F4C4 "; font-size: 1.5em; }

/* تحسين الجداول */
.table {
  width: 100% !important;
  max-width: 100vw;
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 16px #1a237e11;
  font-size: 1.08rem;
  margin-bottom: 2.5rem;
  margin-top: 2.5rem;
}
.table th {
  background: linear-gradient(90deg, #e3e9f7 60%, #fff 100%);
  color: #1a237e;
  font-weight: 800;
  border-bottom: 2px solid #ffd70044;
}
.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f8fafc;
}
.table-hover tbody tr:hover {
  background-color: #fffde7;
  transition: background 0.2s;
}
.table td, .table th {
  vertical-align: middle;
  padding: 1.3rem 1rem;
  text-align: center !important;
}

/* تحسين الأزرار */
.btn-primary {
  background: linear-gradient(90deg, #1a237e 60%, #3949ab 100%);
  border: none;
  border-radius: 2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px #1a237e22;
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(90deg, #3949ab 60%, #ffd700 100%);
  color: #1a237e;
}

.btn-secondary {
  background: #fff;
  color: #1a237e;
  border: 1px solid #1a237e;
  border-radius: 2rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover, .btn-secondary:focus {
  background: #ffd700;
  color: #1a237e;
}

/* تحسين الحقول */
.form-control, .form-select {
  border-radius: 2.5rem;
  border: 1.5px solid #b0bec5;
  background: #f8fafc;
  font-size: 1.12rem;
  padding: 0.9rem 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}
.form-control:focus, .form-select:focus {
  border-color: #ffd700;
  box-shadow: 0 0 0 0.15rem #ffd70055;
}
.form-group {
  margin-bottom: 2rem;
}

/* تحسين الهوامش */
.container, .main, .jumbotron {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

::-webkit-scrollbar {
  width: 10px;
  background: #e3e9f7;
}
::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 5px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

body, main, .container, .jumbotron, .card, .modal-content, h1, h2, h3, h4, h5, h6, .table, form, .btn, .footer {
  text-align: center !important;
}

.table td, .table th {
  text-align: center !important;
}

form .form-group, form .form-control, form label {
  text-align: center !important;
}

.navbar-nav {
  flex-direction: row !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.7rem;
  list-style: none !important;
  padding-right: 0 !important;
  margin-bottom: 0 !important;
}
.navbar-nav .nav-item {
  display: inline-block !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nav-btn {
  background: #1a237e;
  color: #fff !important;
  border: 2px solid #1a237e;
  border-radius: 2rem;
  padding: 0.5rem 1.5rem;
  margin: 0 0.2rem;
  font-weight: 700;
  font-size: 1.08rem;
  box-shadow: 0 2px 8px #1a237e22;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  text-decoration: none !important;
  display: inline-block;
}
.nav-btn:hover, .nav-btn.active, .nav-btn:focus {
  background: linear-gradient(90deg, #3949ab 60%, #ffd700 100%);
  color: #1a237e !important;
  border-color: #ffd700;
  box-shadow: 0 4px 16px #ffd70044;
  text-decoration: none !important;
}
#logout.nav-link.btn {
  background: #c62828;
  color: #fff !important;
  border: 2px solid #c62828;
  border-radius: 2rem;
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  font-size: 1.08rem;
  box-shadow: 0 2px 8px #c6282822;
  transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
  margin: 0 0.2rem;
  text-decoration: none !important;
  display: inline-block;
}
#logout.nav-link.btn:hover, #logout.nav-link.btn:focus {
  background: linear-gradient(90deg, #b71c1c 60%, #ffd700 100%);
  color: #c62828 !important;
  border-color: #ffd700;
  box-shadow: 0 4px 16px #ffd70044;
}
.navbar .nav-link {
  border-bottom: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .container, .main, .jumbotron, .card, .modal-content {
    padding: 1.2rem 0.5rem;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
  }
  .table th, .table td {
    padding: 0.7rem 0.2rem;
    font-size: 1rem;
  }
  .btn-primary, .btn-lg, .btn-secondary {
    padding: 0.7rem 1.2rem;
    font-size: 1rem;
  }
  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.2rem;
    margin-top: 1.2rem;
  }
}