:root {
  color-scheme: light dark;
  --page-bg: #f5f3ee;
  --panel-bg: rgba(0, 0, 0, 0.25);
  --panel-alt: rgba(0, 0, 0, 0.25);
  --text-main: #252a22;
  --text-muted: #5f6858;
  --border-color: #d8ded0;
  --accent: #6f8562;
  --accent-strong: #43493d;
  --shadow-color: rgba(34, 40, 30, 0.12);
  --padding-large: 20px;
  --padding-small: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #171b16;
    --panel-bg: rgba(0, 0, 0, 0.25);
    --panel-alt: rgba(0, 0, 0, 0.25);
    --text-main: #f3f5ef;
    --text-muted: rgba(243, 245, 239, 0.7);
    --border-color: #4a5545;
    --accent: #7f9a70;
    --accent-strong: #d7dfcf;
    --shadow-color: rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body,
input,
button,
textarea,
select {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar main";
}

.topbar {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 10px;
  background: #000000;
  color: #ffffff;
  box-shadow: 0 10px 30px -24px var(--shadow-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 16px;
}

.brand-copy,
.topbar,
.topbar a {
  color: #ffffff;
}

.brand-subtitle {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.sidebar {
  grid-area: sidebar;
  padding: 0;
  background: var(--panel-alt);
}

.sidebar-title {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.nav-item + .nav-item {
  margin-top: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.nav-link:hover {
  background: rgba(0, 0, 0, 0.35);
}

.nav-link.active {
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 16px 28px -24px var(--shadow-color);
}

.nav-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex: 0 0 auto;
}

.app-icon {
  display: block;
  width: 100%;
  height: 100%;
}

.main-content {
  grid-area: main;
  padding: var(--padding-large);
  color: #111111;
}

.page-header {
  width: 100%;
  margin: 0 0 var(--padding-large);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: rgba(17, 17, 17, 0.7);
  font-size: 14px;
  line-height: 1.4;
}

.breadcrumb-link,
.breadcrumb-current {
  color: inherit;
}

.breadcrumb-separator {
  opacity: 0.6;
}

.page-title {
  margin: 0;
  color: #111111;
}

.site-footer {
  padding: var(--padding-large);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: rgba(17, 17, 17, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-size: 30px;
  text-transform: none;
}

h2 {
  font-size: 28px;
  text-transform: none;
}

h3 {
  font-size: 26px;
  text-transform: none;
}

h4 {
  font-size: 24px;
  text-transform: none;
}

.small {
  font-size: 14px;
}

.tiny {
  font-size: 12px;
}

.faint {
  opacity: 0.5;
}

.overlay {
  background: rgba(0, 0, 0, 0.25);
}

@media (max-width: 840px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "header"
      "sidebar"
      "main";
  }

  .sidebar {
    padding-top: 1rem;
  }

  .main-content {
    padding-top: var(--padding-small);
  }

  .site-footer {
    padding: var(--padding-small);
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-content {
    padding: var(--padding-small);
  }
}

@media (prefers-color-scheme: dark) {
  .main-content {
    color: #ffffff;
  }

  .breadcrumbs {
    color: rgba(255, 255, 255, 0.75);
  }

  .page-title {
    color: #ffffff;
  }

  .eyebrow {
    color: rgba(255, 255, 255, 0.8);
  }
}
