:root {
  --primary: #0b8a3d;
  --primary-dark: #076429;
  --bg: #f4f6f5;
  --card: #ffffff;
  --border: #e6e8e6;
  --text: #1b1b1b;
  --text-grey: #7a7a7a;
  --danger: #e53935;
  --sidebar-w: 230px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { text-decoration: none; color: inherit; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: #0e2417;
  color: #fff;
  flex-shrink: 0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 20px 20px;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}
.sidebar .brand span { display: block; font-size: 12px; font-weight: 400; opacity: 0.7; }
.sidebar nav { flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active { background: var(--primary); color: #fff; border-left-color: #fff; }
.sidebar .logout { padding: 14px 20px; font-size: 13px; color: rgba(255,255,255,0.6); border-top: 1px solid rgba(255,255,255,0.1); }

.main { flex: 1; padding: 24px 28px; max-width: calc(100% - var(--sidebar-w)); }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.topbar h1 { font-size: 22px; margin: 0; }
.topbar .date { color: var(--text-grey); font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.stat-card .label { color: var(--text-grey); font-size: 13px; margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; }
.stat-card.revenue .value { color: var(--primary); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--text-grey); font-weight: 600; font-size: 13px; }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.badge.Pending, .badge.Confirmed { background: #fff3e0; color: #e65100; }
.badge.Packed { background: #e3f2fd; color: #1565c0; }
.badge.Ongoing, .badge['Out for Delivery'] { background: #ede7f6; color: #4527a0; }
.badge.Delivered { background: #e8f5e9; color: var(--primary); }
.badge.Cancelled { background: #ffebee; color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
.field { margin-bottom: 14px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.login-card {
  background: #fff;
  width: 360px;
  padding: 32px;
  border-radius: 16px;
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card p { color: var(--text-grey); margin: 0 0 20px; font-size: 13px; }

.section-list .section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { display: none; }
.slider { position: absolute; inset: 0; background: #ccc; border-radius: 24px; cursor: pointer; transition: .2s; }
.slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s; }
input:checked + .slider { background: var(--primary); }
input:checked + .slider::before { transform: translateX(18px); }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1b1b1b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: .25s;
  pointer-events: none;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 70px; }
  .sidebar .brand span, .sidebar nav a span.label { display: none; }
  .main { max-width: calc(100% - 70px); }
}
