:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #637089;
  --line: #e4e8f1;
  --dark: #111827;
  --accent: #ff7a18;
  --accent-soft: #fff3e8;
  --danger: #b42318;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner, .footer-inner, .section-header, .topnav { display: flex; align-items: center; }
.topbar-inner, .footer-inner, .section-header { justify-content: space-between; gap: 16px; }
.topbar-inner { min-height: 72px; }
.brand { font-weight: 700; font-size: 1.1rem; }
.topnav { gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer;
}
.btn-dark { background: var(--dark); color: white; }
.btn-light { background: white; color: var(--dark); border-color: var(--line); }
.btn-full { width: 100%; }
.hero {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 42%, #fff1dd 100%);
  padding: 42px 0 36px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; margin: 14px 0; }
.hero p { color: var(--muted); max-width: 720px; }
.pill, .badge, .category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 8px 14px; font-weight: 700;
}
.pill { background: white; border: 1px solid #ffd7b0; color: #8a4b0f; }
.badge { background: var(--accent-soft); color: #9a4a09; font-size: .85rem; }
.searchbox {
  margin-top: 22px; display: grid; grid-template-columns: 1.2fr .7fr auto; gap: 12px;
  background: white; padding: 14px; border-radius: 24px; box-shadow: var(--shadow);
}
input, select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: white; color: var(--text);
}
.hero-side { display: grid; gap: 14px; }
.stat-card, .card, .login-card, .admin-form, .empty-box {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card { padding: 22px; }
.stat-card strong { display: block; font-size: 2rem; }
.stat-card span, .muted, .section-header p, .footer p, .info-list { color: var(--muted); }
.page-section { padding: 24px 0; }
.categories { display: flex; gap: 10px; flex-wrap: wrap; }
.category-chip { background: white; border: 1px solid var(--line); }
.category-chip.active { background: var(--dark); color: white; border-color: var(--dark); }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-grid-featured { grid-template-columns: repeat(3, 1fr); }
.card { overflow: hidden; }
.card img { width: 100%; height: 220px; object-fit: cover; background: #f0f2f7; }
.card-body { padding: 18px; }
.card h3 { margin: 10px 0 8px; font-size: 1.2rem; }
.card p { margin: 0 0 14px; color: var(--muted); }
.card-top { display: flex; justify-content: space-between; gap: 12px; }
.rating { white-space: nowrap; font-weight: 700; }
.meta-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.info-list { list-style: none; padding: 0; margin: 0 0 16px; }
.info-list li { margin-bottom: 6px; }
.card-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.footer { border-top: 1px solid var(--line); background: white; margin-top: 30px; }
.footer-inner { min-height: 90px; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .admin-form { width: min(560px, 100%); padding: 28px; }
.login-card h1, .section-header h1, .section-header h2 { margin: 0 0 6px; }
.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 16px; }
.alert-error { background: #fff1f2; color: #b42318; border: 1px solid #fecdd3; }
.text-link, .link-button { color: #0f4cbd; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.danger-link { color: var(--danger); }
.admin-table-wrap { overflow: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.actions-cell { display: flex; gap: 12px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.full-width { grid-column: 1 / -1; }
.checkbox-row { display: flex; gap: 20px; flex-wrap: wrap; margin: 16px 0 22px; }
@media (max-width: 980px) {
  .hero-grid, .cards-grid, .cards-grid-featured, .form-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .hero-grid, .cards-grid, .cards-grid-featured, .searchbox, .form-grid { grid-template-columns: 1fr; }
  .topbar-inner, .section-header, .footer-inner { align-items: flex-start; flex-direction: column; }
  .card img { height: 210px; }
}
