@import 'https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Serif+Bengali:wght@400;600&display=swap';
@import 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css';
@import 'https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css';

/* ═══════════════════════════════════════════════════════════════
   STIPEND MANAGEMENT SYSTEM — Global Stylesheet
   Bangladesh Government Education Theme
═══════════════════════════════════════════════════════════════ */

:root {
  --primary:        #006A4E;  /* BD Green */
  --primary-dark:   #004d38;
  --primary-light:  #e6f4ef;
  --accent:         #F42A41;  /* BD Red */
  --accent-light:   #fde8eb;
  --gold:           #D4AF37;
  --sidebar-bg:     #00533d;
  --sidebar-text:   rgba(255,255,255,0.88);
  --sidebar-hover:  rgba(255,255,255,0.12);
  --sidebar-active: rgba(255,255,255,0.18);
  --sidebar-width:  260px;
  --topbar-height:  64px;
  --body-bg:        #f4f7f5;
  --card-bg:        #ffffff;
  --text-dark:      #1a2e27;
  --text-muted:     #6c757d;
  --border-color:   #dee2e6;
  --shadow-sm:      0 2px 8px rgba(0,106,78,.08);
  --shadow-md:      0 4px 20px rgba(0,106,78,.12);
  --radius:         12px;
  --radius-sm:      8px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--body-bg);
  color: var(--text-dark);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bbb; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #00533d 0%, #003d2e 100%);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
}

.sidebar-brand .brand-logo {
  width: 44px; height: 44px;
  background: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.sidebar-brand .brand-title {
  color: white;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-brand .brand-subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }

.nav-section-title {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4);
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.2s;
  position: relative;
}

.sidebar-nav .nav-link i {
  width: 20px;
  font-size: 16px;
  opacity: 0.85;
  flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: white;
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active);
  color: white;
  font-weight: 600;
}

.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer .user-info {
  display: flex; align-items: center; gap: 10px;
}

.sidebar-footer .user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.sidebar-footer .user-name {
  font-size: 13px; font-weight: 600; color: white; line-height: 1.2;
}

.sidebar-footer .user-role {
  font-size: 11px; color: rgba(255,255,255,0.55);
}

/* ─── Main Content ──────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar .page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.topbar .breadcrumb {
  font-size: 12px;
  margin: 0;
  color: var(--text-muted);
}

.topbar .breadcrumb-item.active { color: var(--text-muted); }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.topbar-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: all 0.2s;
}

.topbar-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ─── Page Content ──────────────────────────────────────────── */
.page-content { padding: 28px; flex: 1; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dark);
}

.card-body { padding: 20px; }

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: white;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.stat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.green   { background: var(--primary-light); color: var(--primary); }
.stat-icon.red     { background: var(--accent-light);  color: var(--accent); }
.stat-icon.gold    { background: #fdf8e6;              color: var(--gold); }
.stat-icon.blue    { background: #e8f0fe;              color: #1967d2; }
.stat-icon.purple  { background: #f3e8fd;              color: #7b1fa2; }
.stat-icon.orange  { background: #fff3e0;              color: #e65100; }

.stat-value { font-size: 28px; font-weight: 800; color: var(--text-dark); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-sub   { font-size: 11px; color: var(--text-muted); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,106,78,0.3);
}

.btn-danger {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table-card { border-radius: var(--radius); overflow: hidden; }

.table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  background: #f8faf9;
  border-bottom: 2px solid var(--border-color);
  padding: 12px 16px;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f3f1;
  font-size: 13.5px;
}

.table tbody tr:hover { background: #f8faf9; }
.table tbody tr:last-child td { border-bottom: none; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge { font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 20px; }

.badge.bg-success   { background: #d4edda !important; color: #155724 !important; }
.badge.bg-danger    { background: #f8d7da !important; color: #721c24 !important; }
.badge.bg-warning   { background: #fff3cd !important; color: #856404 !important; }
.badge.bg-info      { background: #d1ecf1 !important; color: #0c5460 !important; }
.badge.bg-primary   { background: #cce5e0 !important; color: var(--primary) !important; }
.badge.bg-secondary { background: #e2e3e5 !important; color: #383d41 !important; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: 13px; color: var(--text-dark); margin-bottom: 6px; }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border-color);
  font-size: 14px;
  padding: 9px 14px;
  transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,106,78,0.12);
}

.form-section {
  background: #f8faf9;
  border: 1px solid #e0ebe7;
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); border: none; font-size: 13.5px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger  { background: #f8d7da; color: #721c24; }
.alert-info    { background: #d1ecf1; color: #0c5460; }
.alert-warning { background: #fff3cd; color: #856404; }

/* ─── Status Timeline ────────────────────────────────────────── */
.status-timeline { list-style: none; padding: 0; position: relative; }
.status-timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border-color);
}

.status-timeline li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  position: relative;
}

.timeline-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.done    { background: var(--primary); color: white; }
.timeline-dot.pending { background: #e9ecef; color: #adb5bd; }
.timeline-dot.current { background: var(--gold); color: var(--primary-dark); }
.timeline-dot.rejected{ background: var(--accent); color: white; }

/* ─── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #00533d 0%, #003d2e 50%, #1a2e27 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.login-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 32px;
  text-align: center;
  color: white;
}

.login-header .flag-emblem {
  width: 60px; height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}

.login-header h1 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.login-header p  { font-size: 12px; opacity: 0.75; margin: 0; }

.login-body { padding: 32px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .page-content { padding: 16px; }
}

/* ─── Misc Utilities ─────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-light    { background: var(--primary-light) !important; }
.divider-text {
  display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border-color);
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.page-header-title { font-size: 22px; font-weight: 800; color: var(--text-dark); margin: 0; }
.page-header-sub   { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i    { font-size: 48px; opacity: 0.3; margin-bottom: 16px; }
.empty-state h5   { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.empty-state p    { font-size: 13px; }

.avatar-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}

/* ─── Card Footer ─────────────────────────────────────────────── */
.card-footer {
  background: #f8faf9;
  border-top: 1px solid var(--border-color);
  padding: 12px 20px;
  font-size: 13px;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination { margin: 0; }
.pagination .page-item .page-link {
  color: var(--primary);
  border-color: var(--border-color);
  border-radius: var(--radius-sm) !important;
  font-size: 13px;
  padding: 5px 10px;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.pagination .page-item .page-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-content { border-radius: var(--radius); border: none; box-shadow: var(--shadow-md); }
.modal-header  { border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; padding: 16px 20px; }
.modal-footer  { border-top: 1px solid var(--border-color); padding: 12px 20px; }
.modal-body    { padding: 20px; }

/* ─── Form check switches ────────────────────────────────────── */
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; }

/* ─── Stipend amount highlight ──────────────────────────────── */
.amount-cell { font-weight: 700; color: var(--primary); font-size: 15px; }

