/* Al Sadaah CHS - Global Styles */
:root {
  --brand-blue: #1E4D8C;
  --brand-accent: #2E75B6;
  --sidebar-bg: #1E4D8C;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;
  --topbar-height: 56px;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); font-size: 0.9rem; background-color: #f4f6f9; color: #333; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); }

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: sticky;
  top: 0;
  flex-shrink: 0;
  transition: width 0.25s ease;
  z-index: 100;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-role,
.sidebar.collapsed span,
.sidebar.collapsed .menu-label { display: none !important; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 0.75rem; }

.brand-icon { width: 36px; height: 36px; background: rgba(255,255,255,0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; color: #fff; line-height: 1.2; }
.brand-role { font-size: 0.68rem; color: rgba(255,255,255,0.6); }

.menu-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; color: rgba(255,255,255,0.45); text-transform: uppercase; }

.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.75rem; border-radius: 8px;
  color: rgba(255,255,255,0.75); text-decoration: none;
  transition: all 0.18s ease; margin-bottom: 2px;
  font-size: 0.85rem;
}
.sidebar-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar-link.active { background: rgba(255,255,255,0.22); color: #fff; font-weight: 600; }
.sidebar-link i { font-size: 1.05rem; min-width: 20px; text-align: center; }

/* === MAIN LAYOUT === */
.wrapper { min-height: 100vh; }
.main-content { min-width: 0; }

.topbar { height: var(--topbar-height); background: #fff; }
.page-content { background: #f4f6f9; }

/* === STAT CARDS === */
.stat-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important; }
.stat-icon { min-width: 52px; min-height: 52px; display: flex; align-items: center; justify-content: center; }

/* === CARDS === */
.card { border-radius: 12px !important; }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* === TABLES === */
.table thead th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; color: #555; }
.table tbody tr:hover { background-color: #f8fbff; }

/* === UPLOAD DROPZONE === */
.upload-dropzone { transition: background 0.2s, border-color 0.2s; }
.upload-dropzone:hover { background: #e0f0ff !important; }

/* === AVATAR === */
.avatar-sm { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: rgba(255,255,255,0.7); }

/* === BADGES (status) === */
.badge { font-weight: 500; letter-spacing: 0.02em; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-collapsed-width); }
  .sidebar .brand-name, .sidebar .brand-role, .sidebar span, .sidebar .menu-label { display: none !important; }
  .sidebar .sidebar-link { justify-content: center; }
}

/* === BUTTONS === */
.btn { border-radius: 8px; font-weight: 500; font-size: 0.85rem; }
.btn-primary { background-color: var(--brand-blue); border-color: var(--brand-blue); }
.btn-primary:hover { background-color: #163d70; border-color: #163d70; }

/* === LOGIN PAGE === */
.login-body { background: linear-gradient(135deg, #1E4D8C 0%, #2E75B6 50%, #5BA3D9 100%); }

/* === FORM CONTROLS === */
.form-control, .form-select { border-radius: 8px; font-size: 0.875rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 0.2rem rgba(46,117,182,0.2); }
