:root {
  --bg: #f4f2ea;
  --surface: #fffdf8;
  --line: #d8d2c4;
  --text: #0c3b33;
  --muted: #61756f;
  --accent: #0f5a46;
  --accent-soft: #dff0e7;
  --warning: #f59e0b;
  --success: #0a7f55;
  --danger: #b91c1c;
  font-family: "Public Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(15, 90, 70, 0.08), transparent 30%),
    linear-gradient(180deg, #f7f4ec 0%, #efe8d7 100%);
  color: var(--text);
}

button,
select,
input {
  font: inherit;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
select {
  min-height: 46px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}

.login-hero {
  background: linear-gradient(180deg, #0f5a46 0%, #1b6d59 100%);
  color: white;
  padding: 72px;
  display: grid;
  align-content: center;
  gap: 24px;
}

.hero-logo {
  width: 64px;
  border-radius: 8px;
}

.login-hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.1;
}

.login-hero p {
  max-width: 520px;
  margin: 0;
  font-size: 1.2rem;
  color: #d7efe5;
}

.login-panel {
  padding: 72px min(7vw, 88px);
  display: grid;
  align-content: center;
  gap: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f8f4eb 100%);
}

.login-panel h2 {
  margin: 0;
  font-size: 2.4rem;
}

.login-copy {
  color: var(--muted);
}

.login-button {
  min-height: 48px;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 0;
  text-align: left;
  font-weight: 700;
}

.demo-card p {
  margin: 6px 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sidebar {
  background: linear-gradient(180deg, #0f5a46 0%, #0c4a3b 100%);
  color: white;
  padding: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: grid;
  gap: 14px;
}

.brand-logo {
  width: 36px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.brand-title {
  margin: 0 0 14px;
  color: #d2f0e4;
  line-height: 1.4;
}

.pill {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.nav-list {
  margin-top: 36px;
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.main-shell {
  padding: 0 0 32px;
}

.topbar {
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-mini-title,
.page-heading h2,
.role-switcher h2,
.card h3,
.stat-card strong {
  margin: 0;
}

.profile-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-box p,
.page-heading p,
.stat-card p,
.transaction-item p,
.application-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ghost-button,
.solid-button,
select {
  border-radius: 12px;
  padding: 10px 14px;
}

.ghost-button,
select {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}

.solid-button {
  border: 0;
  background: var(--accent);
  color: white;
}

.role-switcher,
.content-grid {
  padding: 26px 28px 0;
}

.role-switcher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
  color: var(--success);
}

.stats-grid,
.dual-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.dual-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(117, 96, 64, 0.16);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(23, 41, 32, 0.06);
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
}

.bars {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.bar-row {
  display: grid;
  gap: 10px;
}

.bar-track {
  background: #e9e2d4;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f5a46, #14795f);
  border-radius: inherit;
}

.donut-shell {
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.donut {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  background: var(--surface);
  border-radius: 50%;
}

.donut-owner,
.donut-teller,
.donut-payment,
.donut-executive,
.donut-super_admin {
  background: conic-gradient(var(--warning) 0 60%, #1d4ed8 60% 78%, var(--accent) 78% 100%);
}

.donut-ministry_finance {
  background: conic-gradient(#b91c1c 0 66%, #a855f7 66% 84%, var(--accent) 84% 100%);
}

.donut-ministry_justice {
  background: conic-gradient(var(--accent) 0 52%, var(--warning) 52% 84%, #1d4ed8 84% 100%);
}

.legend,
.inline-actions,
.row-end {
  display: flex;
  gap: 10px;
  align-items: center;
}

.table-card,
.list-stack,
.application-list {
  display: grid;
  gap: 14px;
}

.transaction-item,
.application-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #ece5d8;
}

.status-chip {
  border-radius: 999px;
  padding: 6px 10px;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-chip.completed,
.status-chip.active {
  background: #dcfce7;
  color: var(--success);
}

.status-chip.paid {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-chip.pending {
  background: #fef3c7;
  color: #b45309;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #ece5d8;
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .topbar,
  .role-switcher,
  .transaction-item,
  .application-item,
  .login-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-hero,
  .login-panel {
    padding: 32px 20px;
  }
}
