:root {
  --primary: #2c5aa0;
  --primary-dark: #1e3d6f;
  --accent: #17a2b8;
  --bg-soft: #f4f6f9;
  --sidebar-width: 250px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg-soft);
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- LOGIN ---------- */
.login-body {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, var(--accent));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrapper { width: 100%; padding: 20px; }
.login-card {
  background: #fff;
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 32px;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand i { font-size: 42px; color: var(--primary); margin-bottom: 10px; }
.login-brand h4 { font-size: 18px; color: var(--primary-dark); font-weight: 700; margin-top: 8px; }

/* ---------- LAYOUT ---------- */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease;
  z-index: 1050;
}
.sidebar-brand {
  padding: 22px 20px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar-brand i { font-size: 22px; }
.sidebar-nav { list-style: none; padding: 14px 10px; margin: 0; flex: 1; overflow-y: auto; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14.5px;
  transition: background .15s;
}
.sidebar-nav li a i { width: 18px; text-align: center; }
.sidebar-nav li a:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-nav li.active a { background: #fff; color: var(--primary-dark); font-weight: 600; }
.sidebar-footer { padding: 16px 20px; font-size: 12px; color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.15); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040; }

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: #fff;
  padding: 14px 24px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.topbar-title { color: var(--primary-dark); font-weight: 700; }

.page-content { padding: 24px; flex: 1; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-overlay.show { display: block; }
}

/* ---------- CARDS / DASHBOARD ---------- */
.stat-card {
  border: none;
  border-radius: 14px;
  color: #fff;
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.stat-card i.bg-icon {
  position: absolute;
  right: 12px; top: 8px;
  font-size: 60px;
  opacity: .18;
}
.stat-card h3 { font-size: 30px; font-weight: 700; margin: 6px 0 0; }
.stat-card span.label { font-size: 13px; opacity: .9; text-transform: uppercase; letter-spacing: .5px; }
.stat-card.c1 { background: linear-gradient(135deg,#2c5aa0,#4d7fc9); }
.stat-card.c2 { background: linear-gradient(135deg,#17a2b8,#3fc7db); }
.stat-card.c3 { background: linear-gradient(135deg,#e67e22,#f5a35e); }
.stat-card.c4 { background: linear-gradient(135deg,#c0392b,#e0685c); }
.stat-card.c5 { background: linear-gradient(135deg,#27ae60,#58cc8b); }
.stat-card.c6 { background: linear-gradient(135deg,#6c5ce7,#a29bfe); }

.chart-card, .table-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.chart-card h6, .table-card h6 { font-weight: 700; color: var(--primary-dark); margin-bottom: 16px; }

/* ---------- FORMS / TABLES ---------- */
.form-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  margin-bottom: 24px;
}
.form-card h6 { font-weight: 700; color: var(--primary-dark); border-bottom: 2px solid var(--bg-soft); padding-bottom: 10px; margin-bottom: 18px; }

.table-responsive-wrapper { overflow-x: auto; }
table.data-table thead { background: var(--primary-dark); color: #fff; }
table.data-table thead th { white-space: nowrap; font-size: 13px; font-weight: 600; vertical-align: middle; }
table.data-table td { vertical-align: middle; font-size: 13.5px; }
table.data-table tbody tr:hover { background: #f0f4fa; }

.section-block {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fafbfd;
}
.section-block .section-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  font-size: 14.5px;
}
.section-block .section-title i { margin-right: 6px; }

.badge { font-weight: 500; font-size: 11.5px; padding: 5px 9px; }

footer.app-footer { text-align:center; padding:14px; color:#8a94a6; font-size:12px; }
