/* Law Per Se — design tokens for authenticated chrome */

:root {
  --brand-navy: #0e3056;
  --brand-blue: #1e40af;
  --brand-blue-hover: #1e3a8a;
  --brand-surface: #f8fafc;
  --brand-border: #e5e7eb;
  --brand-header-h: 68px;
  --brand-radius: 1rem;
  --brand-radius-lg: 1.5rem;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
}

/* Shared sticky app header */
#app-shell nav.app-shell-nav {
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

#app-shell .app-shell-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--brand-header-h);
  gap: 1rem;
}

#app-shell .app-shell-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
}

#app-shell .app-shell-logo img {
  height: 2.75rem;
  width: auto;
}

#app-shell .app-shell-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

#app-shell .app-shell-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

@media (min-width: 1024px) {
  #app-shell .app-shell-links {
    display: flex;
  }
}

#app-shell .app-shell-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-navy);
  padding: 0.35rem 0.55rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

#app-shell .app-shell-link:hover {
  color: var(--brand-blue);
  background: #f1f5f9;
}

#app-shell .app-shell-link.is-active {
  color: var(--brand-blue);
  font-weight: 600;
  background: #eff6ff;
}

#app-shell .app-shell-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

#app-shell .app-shell-welcome {
  display: none;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #4b5563;
}

@media (min-width: 640px) {
  #app-shell .app-shell-welcome {
    display: flex;
  }
}

#app-shell .app-shell-welcome strong {
  color: var(--brand-navy);
  font-weight: 600;
}

#app-shell .app-shell-logout {
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  border: 1px solid var(--brand-border);
  border-radius: 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

#app-shell .app-shell-logout:hover {
  border-color: #fecaca;
  color: #dc2626;
  background: #fef2f2;
}

/* Mobile tools menu */
#app-shell .app-shell-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--brand-border);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--brand-navy);
  cursor: pointer;
}

@media (min-width: 1024px) {
  #app-shell .app-shell-menu-btn {
    display: none;
  }
}

#app-shell .app-shell-mobile {
  display: none;
  border-top: 1px solid var(--brand-border);
  background: #fff;
  padding: 0.5rem 1.5rem 0.75rem;
  flex-wrap: wrap;
  gap: 0.25rem;
}

#app-shell .app-shell-mobile.is-open {
  display: flex;
}

/* Pages that stick content under the shell */
.sticky-under-shell {
  position: sticky;
  top: var(--brand-header-h);
}
