@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg-a: #f7fbff;
  --bg-b: #edf5ff;
  --ink: #102033;
  --muted: #5e738d;
  --line: #d7e6f8;
  --card: rgba(255, 255, 255, 0.95);
  --brand: #4a8fe8;
  --brand-strong: #2f72c9;
  --brand-soft: #eaf3ff;
  --ok: #2f9f7e;
  --error: #b53045;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 360px at 8% -16%, rgba(74, 143, 232, 0.16), transparent 60%),
    radial-gradient(760px 300px at 95% 0%, rgba(112, 178, 255, 0.13), transparent 62%),
    linear-gradient(180deg, var(--bg-a), var(--bg-b));
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(252, 254, 255, 0.9);
  border-bottom: 1px solid rgba(47, 114, 201, 0.16);
}

.nav-row {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}

.logo {
  color: var(--ink);
  text-decoration: none;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.main-nav a,
.login-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.42rem 0.6rem;
  border-radius: 9px;
  transition: color 160ms ease, background-color 160ms ease;
}

.main-nav a:hover,
.login-link:hover {
  color: var(--ink);
  background: rgba(74, 143, 232, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.add-listing-btn {
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, #5c9df0, #357ad4);
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  border-radius: 999px;
  padding: 0.56rem 0.9rem;
  transition: transform 140ms ease, filter 160ms ease;
}

.add-listing-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.page-shell {
  width: min(760px, calc(100% - 2rem));
  margin: 1.2rem auto 1.6rem;
  display: grid;
  gap: 0.9rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 16px 30px rgba(42, 101, 178, 0.12);
}

.profile-block {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.subtitle {
  margin-top: 0.48rem;
  color: var(--muted);
}

.auth-form {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.auth-form label,
fieldset > legend {
  display: grid;
  gap: 0.32rem;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  padding: 0.62rem 0.72rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #7d92aa;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(74, 143, 232, 0.2);
}

.primary-btn,
.secondary-btn,
.google-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 44px;
  padding: 0.64rem 1rem;
  cursor: pointer;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  font-weight: 700;
  transition: transform 130ms ease, filter 170ms ease, border-color 160ms ease, background-color 160ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 20px rgba(47, 114, 201, 0.22);
}

.primary-btn:hover,
.secondary-btn:hover,
.google-btn:hover {
  transform: translateY(-1px);
}

.secondary-btn,
.google-btn {
  color: #1a3857;
  background: #fff;
  border: 1px solid #cfe1f8;
}

.secondary-btn:hover,
.google-btn:hover {
  background: #f6faff;
}

.divider {
  margin: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.switch-link {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.text-link {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.status-message {
  margin-top: 0.75rem;
  min-height: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.status-message.error {
  color: var(--error);
}

.status-message.success {
  color: var(--ok);
}

.helper {
  margin-top: 0.5rem;
  color: var(--muted);
}

.gate-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.role-card {
  border: 1px solid #cfe1f8;
  border-radius: 12px;
  background: #fafdff;
  min-height: 54px;
  padding: 0.7rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 180ms ease, background-color 160ms ease;
}

.role-card:hover {
  border-color: rgba(74, 143, 232, 0.55);
  box-shadow: 0 10px 18px rgba(47, 114, 201, 0.12);
}

.role-card.selected {
  border-color: rgba(74, 143, 232, 0.85);
  background: #edf6ff;
  box-shadow: inset 0 0 0 1px rgba(74, 143, 232, 0.35);
}

.role-card input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.summary-grid {
  margin-top: 0.2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.summary-item {
  border-bottom: 1px solid var(--line);
  padding: 0.62rem 0.2rem;
}

.summary-item:last-child {
  border-bottom: 0;
}

.summary-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.summary-value {
  margin-top: 0.2rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

fieldset.sport-options {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  background: #f9fcff;
}

.sport-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.sport-grid label {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-weight: 500;
}

.sport-grid input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.listing-note {
  color: var(--muted);
  font-size: 0.88rem;
}

#profile-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#profile-logout-btn {
  min-width: 120px;
}

.footer-simple {
  margin: 1.2rem auto 1.6rem;
  width: min(760px, calc(100% - 2rem));
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 820px) {
  .nav-row {
    min-height: 72px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .page-shell {
    margin: 1rem auto 1.2rem;
    gap: 0.8rem;
  }

  .panel {
    border-radius: 15px;
    padding: 0.9rem;
  }

  .field-grid,
  .sport-grid,
  .role-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
