:root {
  --bw-primary: #10403B;
  --bw-primary-light: #16564f;
  --bw-accent: #E9B44C;
  --bw-bg: #F5F6F5;
  --bw-card: #ffffff;
  --bw-text: #1c2b28;
  --bw-muted: #6b7a77;
  --bw-danger: #c0392b;
  --bw-success: #1e8f4e;
  --bw-radius: 14px;
}

* { box-sizing: border-box; }

body {
  background: var(--bw-bg);
  color: var(--bw-text);
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}

/* ---------- Layout ---------- */
.bw-wrapper { display: flex; min-height: 100vh; }

.bw-sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--bw-primary), var(--bw-primary-light));
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.bw-sidebar .brand {
  padding: 22px 20px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.bw-sidebar .brand span { color: var(--bw-accent); }
.bw-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.85);
  padding: 11px 20px;
  text-decoration: none;
  font-size: 14.5px;
  border-left: 3px solid transparent;
  transition: .15s;
}
.bw-sidebar nav a:hover, .bw-sidebar nav a.active {
  background: rgba(255,255,255,.08);
  border-left-color: var(--bw-accent);
  color: #fff;
}
.bw-sidebar nav .section-label {
  padding: 16px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.45);
}

.bw-main { flex: 1; min-width: 0; }
.bw-topbar {
  background: var(--bw-card);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  position: sticky;
  top: 0;
  z-index: 10;
}
.bw-topbar .title { font-size: 18px; font-weight: 600; }
.bw-content { padding: 24px; }

/* ---------- Cards ---------- */
.bw-card {
  background: var(--bw-card);
  border-radius: var(--bw-radius);
  padding: 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  margin-bottom: 20px;
}
.bw-stat {
  border-radius: var(--bw-radius);
  padding: 18px 20px;
  color: #fff;
}
.bw-stat h3 { font-size: 24px; margin: 4px 0 0; }
.bw-stat span { font-size: 13px; opacity: .85; }
.bg-c1 { background: linear-gradient(135deg,#10403B,#1c6b61); }
.bg-c2 { background: linear-gradient(135deg,#E9B44C,#c9922c); }
.bg-c3 { background: linear-gradient(135deg,#2f6fa8,#1c4e7a); }
.bg-c4 { background: linear-gradient(135deg,#c0392b,#8e2a20); }

/* ---------- Tables ---------- */
.table-bw thead th {
  background: var(--bw-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border: none;
}
.table-bw td, .table-bw th { vertical-align: middle; padding: 10px 14px; }
.table-bw tbody tr:hover { background: #f1f7f6; }

.btn-bw {
  background: var(--bw-primary);
  color: #fff;
  border: none;
}
.btn-bw:hover { background: var(--bw-primary-light); color: #fff; }
.btn-accent { background: var(--bw-accent); border: none; color: #10403B; font-weight: 600; }

.badge-active { background: var(--bw-success); }
.badge-due { background: var(--bw-danger); }
.badge-pending { background: #d68910; }

/* ---------- Login ---------- */
.bw-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bw-primary), #1c6b61);
}
.bw-login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

@media print {
  .bw-sidebar, .bw-topbar, .no-print { display: none !important; }
  .bw-content { padding: 0; }
}

@media (max-width: 900px) {
  .bw-sidebar { position: fixed; left: -260px; z-index: 999; transition: .2s; }
  .bw-sidebar.open { left: 0; }
  .bw-main { width: 100%; }
}
