:root {
  --sidebar-w: 230px;
  --brand: #2f6f4f;
  --brand-dark: #234f38;
  --bg: #f4f6f5;
}

* { box-sizing: border-box; }
body { background: var(--bg); font-family: 'Segoe UI', Arial, sans-serif; }

/* ---------- Login page ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Updated file extension to .jpeg and used the correct relative path */
    background: url('../ban1.jpeg') no-repeat center center fixed;
    background-size: cover;
}
.login-wrap { width: 100%; max-width: 400px; padding: 16px; }
.login-card { border: none; border-radius: 14px; }
.login-logo {
  width: 56px; height: 56px; margin: 0 auto;
  background: var(--brand); color: #fff;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px;
}

/* ---------- App layout ---------- */
.app-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--brand-dark);
  color: #fff;
  min-height: 100vh;
  flex-shrink: 0;
}
.sidebar-brand {
  padding: 18px 16px;
  font-weight: 700;
  font-size: 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar .nav-link {
  color: rgba(255,255,255,.8);
  padding: 12px 18px;
  border-left: 3px solid transparent;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .nav-link.active {
  background: rgba(255,255,255,.12);
  border-left-color: #ffc107;
  color: #fff;
  font-weight: 600;
}
.sidebar .nav-link i { margin-right: 8px; width: 18px; display: inline-block; }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; height: 60px; border-bottom: 1px solid #e5e5e5; }
.app-content { flex: 1; }

/* ---------- Dashboard cards ---------- */
.stat-card { border: none; border-radius: 12px; color: #fff; }
.stat-card .stat-icon { font-size: 30px; opacity: .85; }
.stat-card.bg-1 { background: linear-gradient(135deg,#2f6f4f,#3f8e66); }
.stat-card.bg-2 { background: linear-gradient(135deg,#1d6fa5,#2f8fce); }
.stat-card.bg-3 { background: linear-gradient(135deg,#b5862b,#d6a23e); }
.stat-card.bg-4 { background: linear-gradient(135deg,#9c3b3b,#c24f4f); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data-table th { white-space: nowrap; font-size: 13px; background: #eef2ef; }
table.data-table td { font-size: 13px; white-space: nowrap; }
.search-box .form-control { border-radius: 0 6px 6px 0; }
.search-box .input-group-text { background: #fff; border-radius: 6px 0 0 6px; }

/* responsive sidebar */
@media (max-width: 767px) {
  .sidebar { position: fixed; left: -250px; top: 0; z-index: 1050; transition: left .2s; }
  .sidebar.show { left: 0; }
}
