﻿:root {
  --bg: #f4eee6;
  --bg-soft: #efe6dc;
  --surface: #fffaf5;
  --surface-alt: #f8f1e7;
  --line: #d8c8b8;
  --ink: #2f2320;
  --muted: #6f5d55;
  --brand: #8b4a2f;
  --brand-dark: #612f1d;
  --ok: #2f6a45;
  --danger: #8a2d2d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 20%, #fff8ee 0%, transparent 38%),
    radial-gradient(circle at 84% 0%, #f0dfcf 0%, transparent 35%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 245, 0.88);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: Garamond, "Times New Roman", serif;
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.main-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line);
  background: #f2e7db;
}

.main-nav a.active {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: #f6e8da;
}

.btn-primary {
  background: var(--brand);
  color: #fffaf5;
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fffaf5;
  border-color: var(--brand-dark);
}

.btn-danger {
  border-color: #c58f8f;
  color: var(--danger);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 34px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: stretch;
}

.panel {
  background: rgba(255, 250, 245, 0.85);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 14px 30px rgba(47, 35, 32, 0.08);
}

.panel h1,
.panel h2 {
  margin: 0 0 8px;
}

.panel p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  border: 1px dashed #c8b09b;
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 12px;
}

.kpi strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 4px 10px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fbf4ea;
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.session-pill {
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f9efe4;
}

.filters {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdb8a3;
  border-radius: 10px;
  padding: 10px;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 0.96rem;
  background: #fffaf4;
  color: var(--ink);
}

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

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

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

.price {
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.05rem;
}

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

.admin-only {
  display: none;
}

.admin-only.visible {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 14, 9, 0.44);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 14px;
}

.login-modal.open {
  display: flex;
}

.login-box {
  width: min(460px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffaf5;
  padding: 18px;
}

.login-box h2 {
  margin: 0 0 8px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

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

.alert {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--danger);
}

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

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nav-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    align-items: center;
  }

  .main-nav {
    justify-content: center;
  }

  .filters,
  .form-grid,
  .catalog-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .top-row {
    flex-direction: column;
    align-items: stretch;
  }
}
