:root {
  color-scheme: light;
  --fsc-ink: #1c1e1a;
  --fsc-forest: #0f3a2b;
  --fsc-forest-bright: #1b5f46;
  --fsc-gold: #d2a34a;
  --fsc-sand: #f4efe6;
  --fsc-card: #ffffff;
  --fsc-muted: #6b6f6a;
  --fsc-border: rgba(18, 29, 22, 0.12);
  --fsc-shadow: 0 24px 48px rgba(18, 29, 22, 0.12);
  --fsc-radius: 18px;
  --fsc-radius-sm: 12px;
  --fsc-sidebar-width: 240px;
  --fsc-header-offset: 90px;
  --fsc-gradient: radial-gradient(circle at top, rgba(28, 80, 60, 0.18), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(210, 163, 74, 0.16), transparent 35%),
    linear-gradient(160deg, #f7f1e8 0%, #e6efe8 60%, #f5eee3 100%);
}

* {
  box-sizing: border-box;
}

body.app-body {
  font-family: "Newsreader", serif;
  color: var(--fsc-ink);
  background: var(--fsc-sand);
  margin: 0;
  min-height: 100vh;
  position: relative;
}

.app-bg {
  position: fixed;
  inset: 0;
  background: var(--fsc-gradient);
  z-index: -1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.nav-title,
.brand-text {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.02em;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 20px 0 14px;
  background: rgba(247, 241, 232, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(18, 29, 22, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fsc-forest);
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-text {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.1;
}

.btn-ghost {
  border: 1px solid rgba(18, 29, 22, 0.12);
  color: var(--fsc-forest);
  background: transparent;
  border-radius: 999px;
  padding: 8px 16px;
  font-family: "Space Grotesk", sans-serif;
}

.btn-ghost:hover {
  background: rgba(15, 58, 43, 0.08);
  color: var(--fsc-forest);
}

.btn-primary {
  background-color: var(--fsc-forest);
  border-color: var(--fsc-forest);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background-color: var(--fsc-forest-bright);
  border-color: var(--fsc-forest-bright);
}

.app-shell {
  padding: 24px 0 40px;
}

.app-nav {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--fsc-border);
  border-radius: var(--fsc-radius);
  padding: 12px;
  box-shadow: var(--fsc-shadow);
  position: sticky;
  top: 110px;
}

.nav-title {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--fsc-muted);
  margin: 6px 0 2px;
}

.app-nav .nav-link {
  color: var(--fsc-forest);
  padding: 3px 8px;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.app-nav .nav-link:hover {
  background: rgba(15, 58, 43, 0.08);
}

.app-nav .nav-link.active {
  background: var(--fsc-forest);
  color: #fff;
}

.search-bar {
  gap: 8px;
}

.search-bar input {
  border-radius: 999px;
  border: 1px solid rgba(18, 29, 22, 0.15);
  min-width: 220px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 6px;
  border: 2px solid rgba(210, 163, 74, 0.6);
}

.app-footer {
  padding: 24px 0 32px;
  color: var(--fsc-muted);
  font-size: 0.9rem;
}

.app-footer a {
  color: var(--fsc-forest);
  text-decoration: none;
}

.app-card {
  background: var(--fsc-card);
  border-radius: var(--fsc-radius);
  border: 1px solid var(--fsc-border);
  box-shadow: var(--fsc-shadow);
  padding: 24px;
}

.page-hero {
  border-radius: calc(var(--fsc-radius) + 6px);
  padding: 32px;
  background: linear-gradient(135deg, rgba(15, 58, 43, 0.9), rgba(13, 21, 16, 0.9)),
    url("/static/img/texture-dots.svg");
  color: #fff;
  position: relative;
  overflow: hidden;
}


.page-hero h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: 12px;
}

.page-section {
  animation: rise-in 0.6s ease forwards;
  opacity: 0;
}

.page-section.delay-1 {
  animation-delay: 0.1s;
}

.page-section.delay-2 {
  animation-delay: 0.2s;
}

.page-section.delay-3 {
  animation-delay: 0.3s;
}

@keyframes rise-in {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.app-public-main {
  padding: 40px 0 60px;
}

.auth-card {
  max-width: 480px;
  margin: 0 auto;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.stat-card {
  background: #fff;
  border-radius: var(--fsc-radius-sm);
  padding: 18px;
  border: 1px solid var(--fsc-border);
  box-shadow: 0 12px 24px rgba(18, 29, 22, 0.08);
}

.stat-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--fsc-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat-card strong {
  font-size: 1.8rem;
  color: var(--fsc-forest);
}

.table {
  border-color: var(--fsc-border);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.gallery-card {
  background: var(--fsc-card);
  border-radius: var(--fsc-radius-sm);
  border: 1px solid var(--fsc-border);
  box-shadow: 0 12px 24px rgba(18, 29, 22, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-media {
  border: 0;
  padding: 0;
  width: 100%;
  background: #f1f1f1;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card .gallery-media {
  cursor: zoom-in;
}

.gallery-meta {
  padding: 12px 14px 14px;
}

@media (min-width: 992px) {
  .app-shell {
    padding-left: var(--fsc-sidebar-width);
  }

  .app-footer {
    padding-left: var(--fsc-sidebar-width);
  }

  .app-shell > .row {
    margin-left: 0;
    margin-right: 0;
  }

  .app-sidebar {
    position: fixed;
    top: var(--fsc-header-offset);
    left: 0;
    bottom: 0;
    width: var(--fsc-sidebar-width);
    padding: 0 0 12px 18px;
    z-index: 1010;
  }

  .app-sidebar .offcanvas-lg {
    height: 100%;
    width: 100%;
  }

  .app-sidebar .offcanvas-header {
    display: none;
  }

  .app-sidebar .offcanvas-body {
    padding: 0;
    height: 100%;
    overflow-y: auto;
  }

  .app-nav {
    position: static;
    top: auto;
    max-height: none;
  }

  .app-main {
    flex: 0 0 100%;
    max-width: 100%;
  }

}

@media (max-width: 991px) {
  .app-nav {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border: none;
    padding: 16px 0;
  }

  .app-shell {
    padding: 16px 0 32px;
  }
}

@media (max-width: 575px) {
  .brand-text {
    display: none;
  }

  .search-bar input {
    min-width: 140px;
  }
}
