:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-strong: #101826;
  --ink: #0f172a;
  --muted: #4b5563;
  --brand: #f97316;
  --brand-2: #14b8a6;
  --ring: rgba(20, 184, 166, 0.28);
  --shadow: 0 14px 38px rgba(15, 23, 42, 0.1);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 320px at 10% -10%, rgba(249, 115, 22, 0.15), transparent 55%),
    radial-gradient(900px 380px at 100% -20%, rgba(20, 184, 166, 0.18), transparent 52%),
    var(--bg);
  min-height: 100vh;
}

.shell {
  width: min(1240px, 100% - 36px);
  margin: 0 auto;
  padding: 26px 0 28px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  animation: slideDown 450ms ease-out;
}

.brand-link {
  text-decoration: none;
}

.brand {
  font-size: clamp(1.15rem, 2.3vw, 1.55rem);
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--panel-strong);
}

.brand span {
  color: var(--brand);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.notice {
  background: rgba(20, 184, 166, 0.1);
  color: #0b5250;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
}

.auth-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 6px 8px;
}

.auth-block.authenticated {
  padding: 0;
  border: 0;
  background: transparent;
}

.auth-user {
  font-size: 0.86rem;
  color: #0b1324;
  font-weight: 700;
  padding: 0 6px;
}

.auth-link,
.auth-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.auth-link:hover,
.auth-link-button:hover {
  background: #f8fafc;
}

.auth-link-button {
  font-family: inherit;
}

.logout-button {
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.25);
  background: #fff1f2;
}

.account {
  position: relative;
}

.account-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.avatar-image,
.avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: block;
}

.avatar-image {
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  border: 2px solid #ffffff;
  background: linear-gradient(160deg, #1d4ed8, #0f766e);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, 92vw);
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
  padding: 12px;
  z-index: 24;
}

.account-menu.hidden {
  display: none;
}

.account-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.menu-avatar {
  width: 42px;
  height: 42px;
}

.account-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0b1324;
}

.account-email {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: #475569;
}

.account-email:empty {
  display: none;
}

.menu-actions {
  display: grid;
  gap: 8px;
}

.menu-action,
.menu-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.menu-action:hover,
.menu-action-button:hover {
  background: #eef2f7;
}

.menu-action-button {
  font-family: inherit;
}

.menu-action-button.logout {
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.22);
  background: #fff1f2;
}

.full-width {
  width: 100%;
}

.inline-form {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-content {
  min-height: calc(100vh - 180px);
}

.hero {
  background: linear-gradient(120deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  color: #e5e7eb;
  border-radius: 20px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  animation: fadeIn 600ms ease;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  color: #f8fafc;
}

.hero p {
  margin: 8px 0 0;
  color: #cbd5e1;
  max-width: 760px;
  line-height: 1.5;
}

.footer {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.footer-links {
  display: inline-flex;
  gap: 12px;
}

.footer-links a {
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-copy {
  text-align: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.footer-notice {
  text-align: right;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0b5250;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-notice {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(1240px, 100% - 20px);
  }

  .notice {
    border-radius: 12px;
  }
}
