.app-root {
  padding: 20px;
}

.layout-shell {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 20px;
}

.sidebar-panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  padding: 12px 16px 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  display: block;
  width: 100%;
  max-width: 79px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.16));
}

.brand-wordmark {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.sidebar-brand h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.sidebar-copy {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
}

.sidebar-actions {
  margin-top: 16px;
  padding-top: 6px;
  display: grid;
  gap: 10px;
}

.dev-auth-badge {
  margin-top: 14px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  min-height: 46px;
  box-sizing: border-box;
  border-radius: 11px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(104, 130, 161, 0.14);
  color: var(--accent-hover);
  font-size: 0.99rem;
  font-weight: 660;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 1px 2px rgba(15, 23, 42, 0.02);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.sidebar-link:hover {
  background: #f6fbfd;
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 14px rgba(15, 23, 42, 0.045);
}

.sidebar-link:focus-visible,
.sidebar-utility-link:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.sidebar-link-active {
  background: linear-gradient(135deg, #18746d 0%, #1a6778 100%);
  border-color: rgba(15, 118, 110, 0.34);
  color: white;
  font-weight: 680;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 14px rgba(15, 118, 110, 0.14);
}

.sidebar-link-active:hover {
  background: linear-gradient(135deg, #18746d 0%, #1a6778 100%);
  border-color: rgba(15, 118, 110, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 14px rgba(15, 118, 110, 0.14);
}

.sidebar-utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 2px 14px 1px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 580;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 140ms ease, opacity 140ms ease;
}

.sidebar-utility-link:hover {
  color: var(--accent-hover);
  opacity: 0.92;
}

.content-shell {
  min-width: 0;
}

.app-shell {
  width: 100%;
  max-width: 1200px;
}

.page-header {
  margin-bottom: 20px;
}

.app-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.app-page-header-copy {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  padding-top: 10px;
}

.app-page-header-copy::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ca02b 0%, rgba(108, 160, 43, 0.18) 100%);
}

.app-page-header h1 {
  margin: 0;
  color: #233755;
  font-size: clamp(2.15rem, 4vw, 2.55rem);
  line-height: 1.05;
  font-weight: 860;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.app-page-header-title-main {
  color: #233755;
}

.app-page-header-title-accent {
  color: #6ca02b;
}

.app-page-header-subtitle {
  margin: 8px 0 0;
  max-width: 64ch;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.app-page-header-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 12px;
  min-width: min-content;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: #2563eb;
  font-weight: 700;
}

.lede {
  margin: 0;
  max-width: 56ch;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  align-items: center;
}

.feedback-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 25;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, #155e75 100%);
  color: white;
  font-size: 1.55rem;
  font-weight: 800;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.feedback-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.26);
  filter: saturate(1.05);
}

.feedback-trigger:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .app-root {
    padding: 24px 14px 40px;
  }

  .layout-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sidebar {
    position: static;
  }

  .page-header {
    margin-bottom: 18px;
  }

  .app-page-header {
    flex-direction: column;
    align-items: start;
    gap: 16px;
  }

  .app-page-header-copy {
    padding-top: 8px;
  }

  .app-page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .feedback-trigger {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}
