:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  font-weight: 400;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-alt: #f1f3f7;
  --text: #1f2933;
  --muted: #6c7280;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
}

button,
a.primary,
a.ghost,
a.secondary {
  font: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 999px;
  padding: 0.55rem 1.4rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button {
  background: none;
}

.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.primary:hover {
  background: var(--primary-dark);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.secondary {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
}

button:disabled,
button:disabled:hover,
.ghost:disabled,
.primary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.topbar {
  width: min(1240px, 100% - 3rem);
  margin: 1.8rem auto 0;
  display: grid;
  grid-template-columns: 160px 1fr 160px 210px auto;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--primary);
}

.search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.03);
}

.search input {
  border: none;
  outline: none;
  width: 100%;
  font: inherit;
  color: var(--text);
}

.material-symbols-outlined {
  font-size: 1.2rem;
  color: var(--muted);
}

.filters select {
  width: 100%;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  font: inherit;
  color: var(--muted);
  background: var(--surface);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.page {
  width: min(1200px, 100% - 3rem);
  margin: 2.8rem auto 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.hero__content h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3.1rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero__content p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 33ch;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__card {
  background: var(--surface);
  border-radius: 28px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.hero__card .status {
  align-self: flex-start;
  background: #22c55e;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.hero__card img {
  width: 100%;
  height: 200px;
  border-radius: 20px;
  object-fit: cover;
}

.hero__card-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.hero__card-content p {
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.listing-form {
  margin-top: 3.5rem;
}

.listing-form__subtitle {
  color: var(--muted);
  margin-top: 0.4rem;
}

.listing-form__card {
  margin-top: 1.5rem;
  background: var(--surface);
  padding: 1.8rem;
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.listing-form__card--disabled {
  opacity: 0.6;
  backdrop-filter: blur(1px);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.form-row label,
.listing-form__card > label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 500;
  color: var(--text);
}

.form-row label.full,
.listing-form__card > label.full {
  grid-column: 1 / -1;
}

.listing-form__card input,
.listing-form__card select,
.listing-form__card textarea {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--text);
  resize: vertical;
}

.listing-form__card textarea {
  min-height: 120px;
}

.listing-form__message {
  font-size: 0.95rem;
  color: var(--muted);
  min-height: 1.1rem;
}

.section-header {
  margin-top: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h2 {
  font-size: 1.7rem;
  font-weight: 600;
}

.cards {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--surface);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.card__badge.green {
  color: #16a34a;
}

.card__badge.blue {
  color: #2563eb;
}

.card__badge.purple {
  color: #7c3aed;
}

.card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card__body h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card__body .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.card__body .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.card__body .description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.footer {
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}

.footer__content {
  width: min(1200px, 100% - 3rem);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.footer__note {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.12), transparent 55%),
    var(--bg);
}

.login {
  width: min(420px, 100% - 2.5rem);
}

.login__card {
  background: var(--surface);
  border-radius: 32px;
  padding: 2.5rem 2.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
}

.login__logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary);
}

.login__action {
  width: 100%;
}

.login__note {
  color: var(--muted);
  min-height: 1.2rem;
}

.login__link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

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

@media (max-width: 1024px) {
  .topbar {
    grid-template-columns: 140px 1fr;
    grid-template-areas:
      'logo actions'
      'search search'
      'filters filters';
    row-gap: 0.75rem;
  }

  .logo {
    grid-area: logo;
  }

  .search {
    grid-area: search;
  }

  .filters {
    grid-area: filters;
  }

  .actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    background: var(--surface);
  }

  .topbar,
  .page {
    width: min(100%, 100% - 2rem);
  }

  .actions {
    justify-content: flex-start;
  }

  .hero__content p {
    max-width: 100%;
  }

  .listing-form__card {
    padding: 1.4rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}
