﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #525252;
  --border: #e4d8ca;
  --primary: #b84f2b;
  --primary-soft: #f5e1d8;
  --accent: #b84f2b;
  --accent-soft: #f5e1d8;
  --shadow: 0 20px 50px rgba(33, 31, 37, 0.08);
  --card-border: rgba(184, 79, 43, 0.15);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, rgba(184, 79, 43, 0.1), transparent 25%), var(--bg);
  color: var(--text);
}

body.dark {
  --bg: #121827;
  --surface: #1d2639;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #334155;
  --primary: #f7a17d;
  --primary-soft: #29354d;
  --accent: #f7a17d;
  --accent-soft: #29354d;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.32);
  --card-border: rgba(247, 161, 125, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

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

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

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 1rem;
  z-index: 1;
}

body.dark .app-header {
  background: rgba(28, 39, 61, 0.96);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: var(--accent-soft);
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.app-header h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  line-height: 1.05;
}

.header-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 3px solid rgba(184, 79, 43, 0.3);
  outline-offset: 3px;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  padding: 0.95rem 1.5rem;
  font-weight: 700;
}

.secondary-button,
.toggle-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.95rem 1.35rem;
}

body.dark .secondary-button,
body.dark .toggle-button {
  color: var(--text);
  border-color: var(--border);
}

.main-content {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

body.dark .panel {
  background: #182139;
}

.intro-panel {
  display: grid;
  gap: 1rem;
}

.intro-panel h2 {
  margin: 0;
  font-size: clamp(2.1rem, 3.5vw, 3.4rem);
}

.intro-panel p {
  max-width: 720px;
  line-height: 1.8;
  color: var(--muted);
}

.restaurant-form {
  display: grid;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  gap: 0.5rem;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--primary-soft);
  padding: 1rem 1.1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 79, 43, 0.12);
}

textarea {
  min-height: 140px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.filter-panel .filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.filter-pill {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-width: 200px;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0.85rem 1rem;
}

.filter-pill span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.filter-pill select {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

.filter-pill select:focus {
  outline: none;
}

.list-panel .section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}

.list-panel h2 {
  margin: 0;
}

.list-panel p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 28px;
  border-top: 5px solid var(--accent);
  background: var(--primary-soft);
  box-shadow: 0 16px 40px rgba(33, 31, 37, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(33, 31, 37, 0.14);
}

body.dark .card {
  background: rgba(255, 255, 255, 0.05);
}

.card-content {
  display: grid;
  gap: 0.95rem;
  padding: 1.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(184, 79, 43, 0.15);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.card-details {
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.card-details p {
  margin: 0;
}

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

.card-actions button {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 120px;
}

.visited-button {
  background: var(--accent);
  color: white;
}

.delete-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.card:not(:has(.visited-button)) {
  opacity: 0.92;
}

.card:not(:has(.visited-button)) .badge {
  background: rgba(74, 159, 103, 0.16);
  color: #4f7727;
}

.empty-state {
  margin: 1.25rem 0 0;
  padding: 2rem;
  border-radius: 24px;
  text-align: center;
  background: var(--primary-soft);
  color: var(--muted);
  border: 1px dashed var(--border);
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .filter-panel .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions {
    justify-content: stretch;
  }
}
