/* ── Brand Colors ── */
:root {
  --brand-dark: #378b33;
  --brand-light: #73c629;
  --brand-gradient: linear-gradient(135deg, #378b33, #73c629);
  --sidebar-bg: #1a2e1a;
  --sidebar-hover: #2a4a2a;
  --sidebar-border: #2a4a2a;
  --text-muted-sidebar: #a0c8a0;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  background: #f5f7f5;
  color: #2d2d2d;
}

/* ── Focus States ── */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-light);
}

.form-control:focus {
  border-color: var(--brand-light);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #2e7a2b, #65b324);
  box-shadow: 0 4px 12px rgba(55, 139, 51, 0.35);
  color: #fff;
}

.btn-success {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-success:hover {
  background: #2e7a2b;
  border-color: #2e7a2b;
}

/* ── Sidebar ── */
.sidebar {
  min-height: 100vh;
  background: var(--sidebar-bg);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.sidebar .brand {
  padding: 16px 20px;
  font-size: 1em;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar .brand img {
  height: 40px;
  width: auto;
}

.sidebar a {
  color: #d0e8d0;
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  font-size: 0.92em;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.sidebar a:hover {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--brand-light);
}

.sidebar a.active {
  background: var(--sidebar-hover);
  color: var(--brand-light);
  border-left-color: var(--brand-light);
  font-weight: 600;
}

.sidebar .user-info {
  padding: 12px 20px;
  color: var(--text-muted-sidebar);
  font-size: 0.85em;
}

.sidebar .btn-logout {
  color: #e8705a !important;
  padding: 12px 20px;
  text-decoration: none;
  border: none;
  background: none;
  font-size: 0.92em;
  transition: color 0.2s;
}

.sidebar .btn-logout:hover {
  color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.1);
}

/* ── Content Area ── */
.content-area {
  padding: 28px 32px;
  min-height: 100vh;
}

/* ── Cards ── */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  border-radius: 12px 12px 0 0 !important;
}

/* ── Tables ── */
.table {
  border-radius: 8px;
  overflow: hidden;
}

.table thead th {
  background: var(--brand-dark);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.9em;
  padding: 12px 16px;
}

.table tbody tr:hover {
  background: #e8f5e8;
}

.table tbody td {
  padding: 10px 16px;
  vertical-align: middle;
}

/* ── Login Page ── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7f5 0%, #e8f5e8 100%);
}

.login-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(55, 139, 51, 0.12);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-card .card-body {
  padding: 40px;
}

.login-logo {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto 24px;
}

/* ── Badges ── */
.badge.bg-success {
  background: var(--brand-dark) !important;
}

.badge.bg-primary {
  background: var(--brand-light) !important;
  color: #1a2e1a !important;
}

/* ── Links ── */
a {
  color: var(--brand-dark);
}

a:hover {
  color: #2e7a2b;
}

/* ── Alerts ── */
.alert-success {
  background: #e8f5e8;
  border-color: var(--brand-light);
  color: #1a4a1a;
}

/* ── Stat Cards (Dashboard) ── */
.stat-card {
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 4px 16px rgba(55, 139, 51, 0.2);
}

.stat-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9em;
}