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

:root {
  --bg: #f7f9f4;
  --bg-ink: #121812;
  --panel: #ffffff;
  --panel-ink: #121812;
  --accent: #e85b1f;
  --accent-strong: #cf4c15;
  --accent-cool: #0f6b2e;
  --border: #e4efe4;
  --muted: #5b6b5b;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  color: var(--bg-ink);
  background: radial-gradient(circle at 20% 20%, #eaf6e4 0%, #f7f9f4 55%, #f1f6f1 100%);
}

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

.app-sidebar {
  background: #081b0f;
  color: #ecf7ec;
  padding: 28px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 20px;
  line-height: 1;
}

.brand-subtitle {
  font-size: 12px;
  color: rgba(246, 239, 231, 0.7);
}

.nav-group {
  display: grid;
  gap: 10px;
}

.nav-link {
  color: rgba(236, 247, 236, 0.9);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.app-main {
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(247, 249, 244, 0.9);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: white;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.topbar-title {
  font-weight: 600;
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chip {
  border: none;
  background: rgba(15, 107, 46, 0.15);
  color: var(--accent-cool);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.user-pill {
  display: flex;
  gap: 10px;
  align-items: center;
  background: white;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffe6d7;
  color: #8a3c10;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 12px;
}

.app-content {
  padding: 28px;
  display: grid;
  gap: 24px;
}

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

.page-header h1 {
  margin: 0;
  font-size: 30px;
  font-family: "Fraunces", serif;
}

.muted {
  color: var(--muted);
  margin-top: 6px;
}

.page-actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: none;
  background: var(--accent);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn.secondary {
  background: white;
  color: var(--panel-ink);
  border: 1px solid var(--border);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 12px;
}

.stat {
  font-size: 28px;
  font-weight: 700;
  margin-top: 8px;
}

.table {
  display: grid;
  gap: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.8fr;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f5faf4;
}

.table-row.header {
  background: #ecf3ea;
  font-weight: 600;
}

.badge {
  background: rgba(241, 91, 58, 0.15);
  color: var(--accent-strong);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.green {
  background: rgba(31, 138, 112, 0.15);
  color: var(--accent-cool);
}

.panel-grid {
  display: grid;
  gap: 14px;
}

.panel-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 10px;
}

.panel-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.auth-body {
  background: radial-gradient(circle at top, #0f2616 0%, #09140b 100%);
  color: white;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.auth-shell {
  width: min(880px, 92vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #0f1b12;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.auth-visual {
  padding: 40px;
  background: linear-gradient(160deg, #1f7a3b 0%, #0f6b2e 55%, #0b4e20 100%);
  color: white;
  display: grid;
  gap: 12px;
}

.auth-visual h2 {
  font-family: "Fraunces", serif;
  font-size: 28px;
  margin: 0;
}

.auth-form {
  padding: 40px;
  display: grid;
  gap: 18px;
}

.input {
  display: grid;
  gap: 6px;
}

.input input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #1d2a1f;
  background: #111b13;
  color: white;
}

.auth-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.link {
  color: #ffcfb0;
  text-decoration: none;
  font-weight: 600;
}

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

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 20;
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }
}
