:root {
  --shell-ink: #1f2937;
  --shell-muted: #6b7280;
  --shell-line: rgba(148, 163, 184, 0.28);
  --shell-card: rgba(255, 252, 247, 0.86);
  --shell-card-strong: rgba(255, 255, 255, 0.96);
  --shell-accent: #9f2f2f;
  --shell-accent-soft: #f3dfcf;
  --shell-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.app-shell {
  width: min(100%, 1440px);
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.side-menu {
  width: 230px;
  flex: 0 0 230px;
  position: sticky;
  top: 18px;
  padding: 16px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 243, 0.82)),
    var(--shell-card);
  border: 1px solid var(--shell-line);
  box-shadow: var(--shell-shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
  font-family: 'Be Vietnam Pro', sans-serif;
}

.side-menu::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 96px;
  background:
    radial-gradient(circle at top left, rgba(159, 47, 47, 0.15), transparent 60%),
    radial-gradient(circle at top right, rgba(212, 160, 23, 0.18), transparent 55%);
  pointer-events: none;
}

.side-menu-title,
.side-menu-subtitle,
.side-menu-links {
  position: relative;
  z-index: 1;
}

.side-menu-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-accent);
  margin-bottom: 8px;
}

.side-menu-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--shell-muted);
  margin-bottom: 18px;
  max-width: 20ch;
}

.side-menu-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: page-link;
}

.side-menu-links a {
  counter-increment: page-link;
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px 10px 54px;
  border-radius: 18px;
  text-decoration: none;
  color: var(--shell-ink);
  background: var(--shell-card-strong);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  font-family: 'Be Vietnam Pro', sans-serif;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.side-menu-links a::before {
  content: counter(page-link, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--shell-accent);
  background: var(--shell-accent-soft);
}

.side-menu-links a:hover,
.side-menu-links a.active {
  color: #fff;
  background: linear-gradient(135deg, #8f2d2d, #c7672d);
  border-color: transparent;
  box-shadow: 0 16px 26px rgba(159, 47, 47, 0.26);
  transform: translateX(6px);
}

.side-menu-links a:hover::before,
.side-menu-links a.active::before {
  color: #7d2323;
  background: rgba(255, 245, 235, 0.92);
}

.page-main {
  flex: 1;
  min-width: 0;
}

.page-main--center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-main > .container,
.page-main > .wrap {
  position: relative;
}

@media (max-width: 980px) {
  .app-shell {
    flex-direction: column;
    gap: 18px;
  }

  .side-menu {
    width: 100%;
    flex-basis: auto;
    position: static;
    padding: 16px;
    border-radius: 24px;
  }

  .side-menu-subtitle {
    max-width: none;
  }

  .side-menu-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-menu-links a {
    flex: 1 1 220px;
  }

  .side-menu-links a:hover,
  .side-menu-links a.active {
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .side-menu {
    border-radius: 20px;
  }

  .side-menu-links a {
    min-height: 48px;
    padding-left: 50px;
    font-size: 13px;
  }

  .side-menu-links a::before {
    width: 28px;
    height: 28px;
  }
}
