@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
body { background: #ffffff; color: #1e293b; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: rgba(255,255,255,0.15); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.22); color: #fff; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: #64748b; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: #f0faf5; color: #00A859; }
.sidebar-link.active {
  background: #e6f7ef; color: #00874a;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #00A859;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid #e8f5ee;
  border-radius: 14px;
  padding: 18px;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,168,89,0.1);
  border-color: #6ee7a6;
  transform: translateY(-2px);
}

/* ── Stat card ───────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid #e8f5ee;
  border-radius: 14px;
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: #e6f7ef;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red   { background: #fee2e2; color: #b91c1c; }
.badge-gray  { background: #f1f5f9; color: #475569; }
.badge-teal  { background: #d1fae5; color: #065f46; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: #00A859; color: #fff;
  padding: 8px 18px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: #008f4c; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: #f0faf5; color: #00874a;
  padding: 8px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  border: 1px solid #bbf0d3; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { background: #dcfce7; }

.btn-ghost {
  background: transparent; color: #64748b;
  padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 500;
  border: 1px solid #e2e8f0; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn-ghost:hover { background: #f8fafc; color: #1e293b; }

/* ── Input ───────────────────────────────────────────────────────────────── */
.input {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid #d1ead9; border-radius: 9px;
  font-size: 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff; color: #1e293b;
}
.input:focus {
  border-color: #00A859;
  box-shadow: 0 0 0 3px rgba(0,168,89,0.1);
}
.input::placeholder { color: #94a3b8; }
select.input { cursor: pointer; }

/* ── Section title ───────────────────────────────────────────────────────── */
.section-title {
  font-size: 15px; font-weight: 700; color: #0f172a;
  padding-left: 12px;
  border-left: 3px solid #00A859;
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #f0faf5;
  text-align: left; padding: 11px 16px;
  font-size: 11px; font-weight: 700;
  color: #00874a; text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid #d1ead9;
}
.data-table td {
  padding: 13px 16px; font-size: 13px;
  border-bottom: 1px solid #f0faf5;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fffe; }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #991b1b; border-radius: 9px;
  padding: 11px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 20px;
}
.alert-success {
  background: #f0faf5; border: 1px solid #bbf0d3;
  color: #166534; border-radius: 9px;
  padding: 11px 14px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Page wrapper ────────────────────────────────────────────────────────── */
.page-layout {
  display: flex;
  min-height: calc(100vh - 56px);
}
.page-sidebar {
  width: 210px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8f5ee;
  padding: 16px 10px;
}
.page-main { flex: 1; padding: 28px; min-width: 0; background: #f8fffe; }

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
  background: #fff; border: 1px solid #e8f5ee;
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  background: #f0faf5;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  width: 100%; max-width: 400px; overflow: hidden;
}
.login-header {
  background: linear-gradient(135deg, #00A859 0%, #007a42 100%);
  padding: 32px 32px 28px; text-align: center;
}
.login-body { padding: 32px; }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: rgba(255,255,255,0.2); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 0.75s linear infinite; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f0faf5; }
::-webkit-scrollbar-thumb { background: #6ee7a6; border-radius: 3px; }
