:root {
  --primary: #1a5276;
  --secondary: #2e86c1;
  --accent: #d4e6f1;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #eef2f7;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, #1a5276 0%, #0e3460 100%);
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 15px rgba(0,0,0,0.15);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}

/* ===== LOGO PNG ===== */
.sidebar-logo {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.sidebar-brand h6 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 3px;
}
.sidebar-brand small {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 10.5px;
  line-height: 1.5;
}

.nav-section-title {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 14px 20px 6px;
}

.sidebar-nav { padding: 4px 10px; }

.sidebar .nav-link,
.sidebar-nav .nav-link {
  color: rgba(255,255,255,0.78);
  padding: 11px 14px;
  border-radius: 8px;
  margin: 2px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar .nav-link i,
.sidebar-nav .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.sidebar .nav-link:hover,
.sidebar-nav .nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.sidebar .nav-link.active,
.sidebar-nav .nav-link.active {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-weight: 600;
  border-left: 3px solid #5dade2;
  padding-left: 11px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== MAIN ===== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}
.topbar {
  background: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e8f0;
  position: sticky;
  top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.topbar-title h5 {
  font-size: 17px; font-weight: 700;
  color: var(--primary); margin: 0;
}
.topbar-title small { color: #888; font-size: 12px; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-user .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--secondary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.page-content { padding: 22px 24px; }

/* ===== CARDS ===== */
.card {
  background: #fff; border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  margin-bottom: 20px;
}
.card-header-custom {
  background: var(--primary); color: #fff;
  padding: 14px 20px;
  border-radius: 12px 12px 0 0;
  font-weight: 700; font-size: 14px;
}
.stat-card {
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  border-radius: 12px; background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  height: 100%;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-info p { margin: 0; color: #888; font-size: 12px; }
.stat-info h3 { margin: 0; font-size: 26px; font-weight: 800; }

/* ===== TABLE ===== */
.table thead th {
  background: var(--primary); color: #fff;
  border: none; font-size: 13px; font-weight: 600;
  padding: 10px 12px;
}
.table td { padding: 9px 12px; font-size: 13px; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f0f6fc; }

/* ===== FORM ===== */
.form-label { font-weight: 600; font-size: 13px; color: #444; margin-bottom: 4px; }
.form-control, .form-select {
  border-radius: 8px; border: 1.5px solid #d0dce8;
  font-size: 13px; padding: 8px 12px; transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(46,134,193,0.15);
}
.btn { border-radius: 8px; font-size: 13px; font-weight: 600; padding: 8px 18px; }
.btn-primary { background: var(--secondary); border-color: var(--secondary); }
.btn-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ===== BADGE ===== */
.badge { font-size: 11px; padding: 4px 10px; border-radius: 20px; }

/* ===== LOGIN ===== */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a5276 0%, #2e86c1 60%, #85c1e9 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff; border-radius: 18px;
  width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}
.login-header {
  background: linear-gradient(135deg, #1a5276, #2e86c1);
  padding: 32px 28px; text-align: center; color: #fff;
}
.login-body { padding: 32px 28px; }

/* ===== ALERT ===== */
.alert { border-radius: 10px; font-size: 13px; border: none; }
.alert-success { background: #d5f5e3; color: #1e8449; }
.alert-danger  { background: #fde8e8; color: #c0392b; }

/* ===== DATATABLES ===== */
div.dataTables_wrapper div.dataTables_filter input {
  border-radius: 8px !important;
  border: 1.5px solid #d0dce8 !important;
  font-size: 13px !important; padding: 5px 10px !important;
}
div.dataTables_wrapper div.dataTables_length select {
  border-radius: 8px !important;
  border: 1.5px solid #d0dce8 !important;
  font-size: 13px !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrapper { margin-left: 0; }
}

/* ===== PRINT ===== */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
}   