:root {
  --primary: #1f4e79;
  --primary-dark: #163a5b;
  --accent: #c9a227; /* ذهبي الشعار */
  --bg: #f3f5f9;
  --sidebar-w: 250px;
}
* { font-family: 'Tajawal', Tahoma, sans-serif; }
body { background: var(--bg); font-size: 15px; }
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--primary); color: #fff;
  position: fixed; inset: 0 0 0 auto; overflow-y: auto; z-index: 1030; transition: transform .25s;
}
.sidebar .brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar .brand .brand-logo { width: 54px; height: 54px; flex-shrink: 0; }
.sidebar .brand .fw-bold { font-size: .92rem; line-height: 1.35; }
.sidebar .brand small { opacity: .75; }
.sidebar nav { padding: 8px 0 30px; }
.sidebar nav a { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.85); text-decoration: none; padding: 9px 18px; border-right: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: var(--primary-dark); color: #fff; border-right-color: var(--accent); }
.sidebar .nav-section { font-size: .75rem; opacity: .55; padding: 14px 18px 4px; }

.content { flex: 1; margin-right: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 1020; }
.page { padding: 20px; flex: 1; }
.footer { text-align: center; color: #888; font-size: .85rem; padding: 12px; }

.card { border: 0; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 700; border-radius: 12px 12px 0 0 !important; }
.stat { border-radius: 12px; padding: 18px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.stat .v { font-size: 1.6rem; font-weight: 700; }
.stat i { font-size: 2.4rem; opacity: .5; }
.bg-c1 { background: linear-gradient(135deg,#1f4e79,#2e75b6); }
.bg-c2 { background: linear-gradient(135deg,#198754,#2fb380); }
.bg-c3 { background: linear-gradient(135deg,#c0392b,#e55b4d); }
.bg-c4 { background: linear-gradient(135deg,#d48806,#f0a500); }
.bg-c5 { background: linear-gradient(135deg,#6f42c1,#9a6ee0); }
.bg-c6 { background: linear-gradient(135deg,#0f766e,#14a39a); }

.table { background: #fff; }
.table thead th { background: #f0f3f8; font-weight: 600; white-space: nowrap; }
.table td, .table th { vertical-align: middle; }
.mark-input { width: 80px; text-align: center; }
.form-label { font-weight: 500; font-size: .9rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1f4e79,#2e75b6); }
.login-card { width: 100%; max-width: 400px; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: none; }
  .content { margin-right: 0; }
}

.print-head { display: none !important; }
@media print {
  .sidebar, .no-print, .topbar, .footer, .btn, form.no-print { display: none !important; }
  .content { margin: 0; }
  .page { padding: 0; }
  .print-head { display: flex !important; }
  .card { box-shadow: none; }
  body { background: #fff; }
}
