:root {
  --accent: #c46f8f;
  --accent2: #c9a24b;
  --bg: #fff7fa;
  --fg: #4a3b40;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --rose-50: var(--bg);
  --rose-100: color-mix(in srgb, var(--accent) 12%, white);
  --rose-200: color-mix(in srgb, var(--accent) 28%, white);
  --rose-400: color-mix(in srgb, var(--accent) 72%, white);
  --rose-500: color-mix(in srgb, var(--accent) 86%, white);
  --rose-600: var(--accent);
  --gold-300: color-mix(in srgb, var(--accent2) 40%, white);
  --gold-400: color-mix(in srgb, var(--accent2) 65%, white);
  --gold-500: var(--accent2);
  --gold-600: color-mix(in srgb, var(--accent2) 82%, black);
  --ink: var(--fg);
  --ink-soft: color-mix(in srgb, var(--fg) 62%, white);

  --white: #ffffff;
  --danger: #b3525f;
  --shadow: 0 10px 30px rgba(164, 108, 132, 0.14);
  --shadow-soft: 0 4px 14px rgba(164, 108, 132, 0.10);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 100% -10%, var(--rose-100), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, var(--rose-100), transparent 55%),
    var(--rose-50);
  line-height: 1.6;
}

a { color: var(--rose-600); }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

p { margin: 0 0 1em; }

/* header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--rose-600);
  background: linear-gradient(90deg, var(--rose-600), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo { max-height: 46px; width: auto; display: block; }

.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--rose-600); }

/* hero */
.hero {
  position: relative;
  margin: 18px 0 8px;
  padding: 64px 40px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 241, 0.7)),
    linear-gradient(120deg, var(--rose-200), var(--gold-300));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero.has-bg {
  background-image:
    linear-gradient(135deg, color-mix(in srgb, var(--bg) 78%, transparent), color-mix(in srgb, var(--bg) 52%, transparent)),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 192, 122, 0.55), transparent 65%);
}

.hero-inner { position: relative; max-width: 620px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-600);
  margin: 0 0 8px;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--rose-600), var(--gold-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 26px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* buttons */
.btn {
  display: inline-block;
  border: 0;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(120deg, var(--rose-600), var(--gold-500));
  box-shadow: var(--shadow-soft);
}

.btn-ghost {
  color: var(--rose-600);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--rose-200);
}

.btn-danger { color: var(--white); background: var(--danger); }
.btn-small { padding: 7px 14px; font-size: 0.85rem; }

.btn[disabled] { opacity: 0.4; cursor: default; transform: none; }

/* sections */
.section { padding: 44px 0; }

.section.narrow { max-width: 460px; }

.section h2 {
  font-size: 1.7rem;
  margin: 0 0 18px;
  color: var(--ink);
}

.section h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--rose-500), var(--gold-400));
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.link-more { text-decoration: none; font-weight: 600; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--rose-200);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.card.card-media { padding: 0; overflow: hidden; }
.card.card-media h3, .card.card-media p { padding-left: 22px; padding-right: 22px; }
.card.card-media h3 { margin-top: 16px; }
.card.card-media p:last-child { padding-bottom: 18px; }

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

.card h3 { margin: 0 0 8px; color: var(--rose-600); }

.contact .contacts { list-style: none; padding: 0; margin: 0; }
.contact .contacts li { margin: 6px 0; }
.contact-label { font-weight: 600; }

.muted { color: var(--ink-soft); }

/* gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.gallery-item {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--rose-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  background: var(--rose-100);
}

.gallery-item figcaption {
  padding: 10px 14px 14px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* forms */
.form { display: grid; gap: 16px; max-width: 560px; }

.form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.form input[type="text"],
.form input[type="password"],
.form input[type="number"],
.form input[type="file"],
.form textarea,
.form select {
  padding: 11px 14px;
  border: 1px solid var(--rose-200);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.form textarea { resize: vertical; }

.form input:focus, .form textarea:focus, .form select:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose-500) 25%, transparent);
}

.form-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: none; }
.form-inline input[type="file"] { width: auto; }
.form-inline input[type="text"] { width: auto; min-width: 220px; }

.inline-form { margin: 0; display: inline-flex; gap: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.color-grid input[type="color"] { width: 100%; height: 46px; padding: 2px; }

/* alerts */
.alert { padding: 12px 16px; border-radius: 12px; font-weight: 600; }

.alert-ok { background: #e9f6ee; color: #2f7d4f; border: 1px solid #bfe3cd; }
.alert-error { background: #fdecef; color: var(--danger); border: 1px solid #f3c6cd; }

/* footer */
.site-footer {
  margin-top: 40px;
  padding: 26px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
  border-top: 1px solid var(--rose-200);
}

/* ===== admin ===== */
.admin-body { background: #f3eff1; }

.admin { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }

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

.admin-title { font-size: 1.5rem; margin: 0; }

.admin-top-actions { display: flex; gap: 10px; align-items: center; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 20px;
  border-bottom: 1px solid var(--rose-200);
}

.tab {
  padding: 9px 16px;
  border-radius: 12px 12px 0 0;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.tab:hover { background: var(--rose-100); }

.tab-active {
  background: var(--white);
  color: var(--rose-600);
  border: 1px solid var(--rose-200);
  border-bottom-color: var(--white);
  margin-bottom: -1px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--rose-200);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.panel h2 { font-size: 1.15rem; margin: 0 0 14px; }

.hint { color: var(--ink-soft); font-size: 0.88rem; }

.danger-zone { border-color: #f3c6cd; }

.item {
  border: 1px solid var(--rose-200);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fffdfe;
}

.item-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.item-head strong { flex: 1 1 auto; }

.drag-handle {
  cursor: grab;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  user-select: none;
  flex: 0 0 auto;
}
.drag-handle:hover { background: var(--rose-100); color: var(--gold-600, #a9863f); }
.drag-handle:active { cursor: grabbing; }

.dragging {
  opacity: 0.55;
  outline: 2px dashed var(--gold-500, #c9a85c);
  outline-offset: 2px;
}

.item-tools { display: flex; gap: 8px; align-items: center; }

.media-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

.thumb-sm { height: 54px; width: auto; border-radius: 8px; border: 1px solid var(--rose-200); margin: 6px 0; }
.thumb-lg { max-width: 320px; width: 100%; border-radius: 12px; border: 1px solid var(--rose-200); margin: 6px 0; }

.badge { font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.badge-on { background: #e9f6ee; color: #2f7d4f; }
.badge-off { background: #f0edee; color: var(--ink-soft); }

.gallery-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-admin-item {
  border: 1px solid var(--rose-200);
  border-radius: 12px;
  padding: 10px;
  background: #fffdfe;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-admin-item .drag-handle { align-self: flex-start; }

.gallery-admin-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--rose-100);
}

.gallery-admin-item .form { gap: 8px; max-width: none; }

/* metrics */
.metrics-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.metrics-head h2 { margin-bottom: 14px; }

.metrics-updated { color: var(--ink-soft); font-size: 0.82rem; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.metric {
  border: 1px solid var(--rose-200);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fffdfe;
}

.metric-label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }

.metric-value { font-size: 1.35rem; font-weight: 700; color: var(--rose-600); margin: 4px 0 2px; }

.metric-sub { font-size: 0.8rem; color: var(--ink-soft); }

.metric-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--rose-100);
  margin-top: 10px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--rose-500);
  transition: width 0.4s ease;
}

.metric-bar-fill.metric-warn { background: #e0a53a; }
.metric-bar-fill.metric-critical { background: var(--danger); }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding: 44px 24px; }
  .site-header { flex-direction: column; align-items: flex-start; }
}
