:root {
  --admin-brand: #166534;
  --admin-brand-dark: #14532d;
  --admin-line: #dbe7df;
  --admin-ink: #1f2937;
  --admin-muted: #64748b;
  --admin-paper: #fff;
  --admin-bg: #f8fafc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--admin-ink);
  background: var(--admin-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
}

.admin-shell-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.admin-shell-sidebar {
  background: linear-gradient(180deg, var(--admin-brand-dark), var(--admin-brand));
  color: #fff;
  padding: 18px 0;
  overflow-y: auto;
}

.admin-shell-brand {
  display: block;
  padding: 0 20px 18px;
  color: #fff;
  text-decoration: none;
  font-weight: 760;
  line-height: 1.35;
}

.admin-shell-brand span {
  display: block;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 520;
}

.admin-shell-title {
  padding: 14px 20px 8px;
  color: #fff;
  font-weight: 800;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.admin-shell-gap { height: 8px; }

.admin-shell-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  font-weight: 650;
}

.admin-shell-nav a.child {
  min-height: 38px;
  padding-left: 42px;
  font-size: 14px;
  color: rgba(255, 255, 255, .82);
}

.admin-shell-nav a.active,
.admin-shell-nav a:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.admin-shell-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.admin-shell-header {
  background: var(--admin-paper);
  border-bottom: 1px solid var(--admin-line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-shell-heading h1,
.admin-shell-header h1 {
  margin: 0;
  font-size: 20px;
  color: var(--admin-brand-dark);
}

.admin-shell-muted {
  color: var(--admin-muted);
  font-size: 13px;
  margin-top: 3px;
}

.admin-shell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-shell-lang {
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  background: #fff;
  color: var(--admin-brand-dark);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-shell-menu-button {
  display: none;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-brand-dark);
  padding: 8px 10px;
  font-weight: 750;
}

.admin-shell-frame {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 68px);
  border: 0;
  background: #fff;
}

.admin-shell-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
  opacity: .92;
}

.admin-shell-icon::before,
.admin-shell-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}

.icon-home::before { left: 2px; top: 7px; width: 12px; height: 8px; border: 1.7px solid currentColor; border-top: 0; border-radius: 1px; }
.icon-home::after { left: 3px; top: 2px; width: 10px; height: 10px; border-left: 1.7px solid currentColor; border-top: 1.7px solid currentColor; transform: rotate(45deg); }
.icon-user::before { left: 5px; top: 2px; width: 6px; height: 6px; border: 1.7px solid currentColor; border-radius: 50%; }
.icon-user::after { left: 2px; top: 10px; width: 12px; height: 5px; border: 1.7px solid currentColor; border-radius: 8px 8px 2px 2px; }
.icon-book::before { left: 2px; top: 2px; width: 12px; height: 12px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-book::after { left: 6px; top: 3px; height: 10px; border-left: 1.7px solid currentColor; }
.icon-finance::before { left: 2px; top: 2px; width: 12px; height: 12px; border: 1.7px solid currentColor; border-radius: 50%; }
.icon-finance::after { content: "$"; left: 5px; top: 0; font-size: 12px; font-weight: 800; line-height: 16px; }
.icon-content::before { left: 3px; top: 2px; width: 10px; height: 12px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-content::after { left: 5px; top: 6px; width: 6px; height: 1.7px; background: currentColor; box-shadow: 0 3px 0 currentColor; }
.icon-list::before { left: 3px; top: 3px; width: 10px; height: 10px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-refresh::before { content: "↻"; left: 1px; top: -2px; font-size: 16px; font-weight: 800; line-height: 16px; }
.icon-add::before, .icon-add::after { background: currentColor; border-radius: 1px; }
.icon-add::before { left: 3px; top: 7px; width: 10px; height: 2px; }
.icon-add::after { left: 7px; top: 3px; width: 2px; height: 10px; }
.icon-return::before { left: 3px; top: 2px; width: 10px; height: 12px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-return::after { left: 6px; top: 5px; width: 6px; height: 4px; border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(-45deg); }
.icon-dashboard::before { left: 2px; bottom: 2px; width: 2.5px; height: 6px; background: currentColor; box-shadow: 5px -3px 0 currentColor, 10px -1px 0 currentColor; }
.icon-giving::before { left: 2px; top: 3px; width: 12px; height: 9px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-giving::after { left: 5px; top: 7px; width: 6px; height: 1.7px; background: currentColor; }
.icon-deposit::before { left: 2px; top: 5px; width: 12px; height: 8px; border: 1.7px solid currentColor; border-radius: 1px; }
.icon-deposit::after { left: 4px; top: 2px; width: 8px; height: 4px; border: 1.7px solid currentColor; border-bottom: 0; }
.icon-expense::before { left: 3px; top: 2px; width: 10px; height: 12px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-expense::after { left: 5px; top: 6px; width: 6px; height: 1.7px; background: currentColor; transform: rotate(-25deg); }
.icon-receipt::before { left: 3px; top: 2px; width: 10px; height: 12px; border: 1.7px solid currentColor; border-radius: 2px; }
.icon-receipt::after { left: 5px; top: 5px; width: 6px; height: 1.7px; background: currentColor; box-shadow: 0 3px 0 currentColor, 0 6px 0 currentColor; }
.icon-report::before { left: 2px; bottom: 2px; width: 12px; height: 12px; border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; }
.icon-report::after { left: 4px; top: 4px; width: 9px; height: 6px; border-top: 1.7px solid currentColor; border-right: 1.7px solid currentColor; transform: skew(-18deg); }
.icon-key::before { left: 1px; top: 5px; width: 7px; height: 7px; border: 1.7px solid currentColor; border-radius: 50%; }
.icon-key::after { left: 8px; top: 8px; width: 7px; height: 1.7px; background: currentColor; box-shadow: 4px 0 0 currentColor, 4px 3px 0 currentColor; }

.admin-shell-nav a.child .admin-shell-icon {
  width: 14px;
  height: 14px;
  opacity: .8;
}

@media (max-width: 860px) {
  .admin-shell-layout { grid-template-columns: 1fr; }
  .admin-shell-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: min(82vw, 290px);
    transform: translateX(-105%);
    transition: transform .18s ease;
    box-shadow: 18px 0 40px rgba(15, 23, 42, .22);
  }
  body.admin-shell-menu-open .admin-shell-sidebar { transform: translateX(0); }
  .admin-shell-menu-button { display: inline-flex; }
  .admin-shell-header { align-items: flex-start; flex-direction: column; }
  .admin-shell-actions { width: 100%; justify-content: space-between; }
  .admin-shell-frame { min-height: 72vh; }
}
