:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #20201d;
  --muted: #696861;
  --line: #e6e0d7;
  --accent: #53745a;
  --accent-dark: #2f5338;
  --soft: #eef2ec;
  --warm: #c99f74;
  --danger: #a33d3d;
  --shadow: 0 18px 50px rgba(35, 32, 28, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(20px, 5vw, 72px);
  background: rgba(251, 250, 247, .88);
  border-bottom: 1px solid rgba(230, 224, 215, .72);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  gap: 0;
}

.brand strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.ghost,
.primary,
.danger {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
}

.nav a,
.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.primary {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

.danger {
  background: #fff;
  color: var(--danger);
  border-color: rgba(163, 61, 61, .35);
}

.hero {
  position: relative;
  min-height: min(680px, calc(100vh - 28px));
  display: flex;
  align-items: center;
  padding: clamp(64px, 10vw, 118px) clamp(20px, 5vw, 72px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(251, 250, 247, .97) 0%, rgba(251, 250, 247, .86) 38%, rgba(251, 250, 247, .32) 72%),
    url("assets/klinika-hero.png") center right / cover no-repeat;
}

.hero-content {
  position: relative;
  width: min(650px, 100%);
  padding-bottom: 40px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.04;
  margin: 0;
}

h1 {
  font-size: clamp(46px, 7vw, 86px);
  max-width: 620px;
  text-wrap: balance;
}

h2 {
  font-size: clamp(34px, 4vw, 54px);
  text-wrap: balance;
}

h3 {
  font-size: 28px;
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 19px;
  margin: 22px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(620px, calc(100% - 40px));
  margin: -48px auto 0;
  position: relative;
}

.stat {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 22px;
}

.stat span {
  color: var(--muted);
  font-size: 14px;
}

.section {
  padding: clamp(72px, 8vw, 110px) clamp(20px, 5vw, 72px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin: 0 auto 32px;
  max-width: 1120px;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto 28px;
}

.search {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab {
  min-height: 48px;
  white-space: nowrap;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.price-list {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.price-category {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, #fff, var(--soft));
}

.category-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.count {
  color: var(--accent-dark);
  font-weight: 700;
  align-self: start;
}

.price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 18px;
  align-items: center;
  padding: 19px 26px;
  border-top: 1px solid var(--line);
}

.price-row:first-of-type {
  border-top: 0;
}

.price-row strong {
  display: block;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.price-row span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

.price-row .item-note {
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

.discount-badge {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 8px !important;
  padding: 4px 8px;
  border: 1px solid rgba(208, 170, 112, .45);
  border-radius: 6px;
  color: var(--accent-dark) !important;
  background: rgba(208, 170, 112, .12);
  font-size: 12px !important;
  font-weight: 800;
}

.price {
  color: var(--accent-dark);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.notice {
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 18px 20px;
  border-left: 3px solid var(--warm);
  background: #fff;
  color: var(--muted);
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 72px);
  background: var(--accent-dark);
  color: #fff;
}

.contact-band p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .72);
  overflow-wrap: anywhere;
}

.contact-band .primary {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
}

.footer {
  padding: 22px clamp(20px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.admin-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 34px 20px 80px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.25;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  resize: vertical;
}

.admin-category {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-top: 16px;
  background: #fbfaf7;
}

.admin-category.is-dragging {
  opacity: .55;
}

.admin-category.is-category-drop-before {
  border-top: 4px solid var(--accent);
}

.admin-category.is-category-drop-after {
  border-bottom: 4px solid var(--accent);
}

.admin-category-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-list-head h2 {
  margin: 0;
}

.category-drag-handle {
  min-height: 100%;
  width: 42px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #efe4d4;
  color: #806033;
  cursor: grab;
  font-weight: 800;
}

.category-drag-handle:active {
  cursor: grabbing;
}

.category-remove-btn {
  min-height: 42px;
  border: 1px solid rgba(163, 61, 61, .35);
  border-radius: 6px;
  padding: 9px 12px;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-items {
  display: grid;
  gap: 10px;
  min-height: 56px;
  padding: 6px;
  border: 1px dashed transparent;
  border-radius: 8px;
}

.admin-item-card {
  box-shadow: 0 10px 24px rgba(35, 32, 28, .05);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-item-card:hover {
  border-color: rgba(208, 170, 112, .45);
  box-shadow: 0 14px 30px rgba(35, 32, 28, .08);
}

.admin-item-card.is-dragging {
  opacity: .55;
}

.admin-item-card.is-drop-before {
  border-top: 3px solid var(--accent);
}

.admin-items.is-drop-target {
  border-color: rgba(208, 170, 112, .6);
  background: rgba(208, 170, 112, .08);
}

.admin-item-fields {
  display: grid;
  gap: 10px;
}

.admin-item-main {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(96px, 140px);
  gap: 10px;
}

.admin-item-meta {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(130px, .45fr) minmax(180px, .85fr);
  gap: 10px;
}

.item-name-input {
  font-weight: 700;
}

.item-price-input {
  font-weight: 800;
  text-align: right;
}

.drag-handle {
  min-height: 86px;
  width: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f7f2e8;
  color: #806033;
  cursor: grab;
  font-weight: 800;
}

.drag-handle:active {
  cursor: grabbing;
}

.small-btn {
  min-height: 40px;
  width: 42px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.admin-actions,
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.json-box {
  width: 100%;
  min-height: 180px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.empty {
  padding: 34px;
  text-align: center;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: #fff;
  border-radius: 8px;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(251, 250, 247, .96), rgba(251, 250, 247, .72)),
    url("assets/klinika-hero.png") center / cover no-repeat;
}

.login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-panel h1 {
  font-size: 44px;
}

.login-error {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-header {
    align-items: start;
    flex-direction: column;
    gap: 14px;
    padding: 14px 18px;
    position: static;
  }

  .brand strong {
    font-size: 26px;
  }

  .brand span {
    font-size: 11px;
  }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nav a {
    min-height: 40px;
    padding: 9px 10px;
    text-align: center;
  }

  .hero {
    min-height: 520px;
    align-items: end;
    padding: 42px 18px 58px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(251, 250, 247, .52), rgba(251, 250, 247, .98) 66%),
      url("assets/klinika-hero.png") center / cover no-repeat;
  }

  .hero-content {
    padding-bottom: 0;
  }

  h1 {
    font-size: 48px;
    max-width: 360px;
  }

  h2 {
    font-size: 36px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .hero-actions .primary {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: 58px 16px;
  }

  .section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .stats,
  .toolbar,
  .admin-grid,
  .admin-row,
  .admin-category-head,
  .admin-list-head,
  .admin-item-fields,
  .admin-item-main,
  .admin-item-meta {
    grid-template-columns: 1fr;
  }

  .admin-list-head {
    display: grid;
    align-items: stretch;
  }

  .admin-row {
    position: relative;
  }

  .drag-handle,
  .category-drag-handle,
  .category-remove-btn,
  .small-btn {
    width: 100%;
    min-height: 42px;
  }

  .item-price-input {
    text-align: left;
  }

  .stats {
    width: calc(100% - 32px);
    margin-top: -34px;
    gap: 10px;
  }

  .stat {
    padding: 18px 14px;
  }

  .toolbar {
    gap: 12px;
  }

  .tabs {
    width: 100%;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .tab {
    min-height: 44px;
    scroll-snap-align: start;
  }

  .category-head,
  .price-row {
    grid-template-columns: 1fr;
  }

  .category-head {
    padding: 20px 18px;
  }

  .count {
    justify-self: start;
  }

  .price-row {
    gap: 8px;
    padding: 17px 18px;
  }

  .price {
    text-align: left;
  }

  .notice {
    margin-top: 22px;
    padding: 16px;
  }

  .contact-band {
    grid-template-columns: 1fr;
    padding: 42px 18px;
  }

  .footer {
    padding: 20px 18px;
  }
}

@media (max-width: 420px) {
  .brand strong {
    font-size: 24px;
  }

  .hero {
    min-height: 500px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .eyebrow {
    font-size: 12px;
    margin-bottom: 14px;
  }

  .stat strong {
    font-size: 20px;
  }

  .stat span {
    font-size: 13px;
  }
}

/* Layout proposal 2: premium contrast */
:root {
  --bg: #151611;
  --ink: #f7f3ea;
  --muted: #b9b2a6;
  --line: rgba(255, 255, 255, .14);
  --accent: #d0aa70;
  --accent-dark: #a97c42;
  --soft: rgba(208, 170, 112, .12);
  --warm: #e1c494;
}

.site-header {
  background: rgba(21, 22, 17, .88);
  border-bottom-color: rgba(255, 255, 255, .12);
}

.primary {
  background: var(--accent);
  color: #16140f;
  border-color: var(--accent);
}

.hero {
  justify-content: center;
  text-align: center;
}

.hero::before {
  background:
    linear-gradient(180deg, rgba(21, 22, 17, .78), rgba(21, 22, 17, .58)),
    url("assets/klinika-hero.png") center / cover no-repeat;
}

.hero-content {
  width: min(760px, 100%);
}

h1 {
  font-size: clamp(52px, 8vw, 104px);
  max-width: 760px;
}

.hero-actions {
  justify-content: center;
}

.stat {
  background: rgba(255, 255, 255, .08);
}

.section {
  background: #f8f5ef;
  color: #211f1a;
}

.section .eyebrow,
.section .price,
.section .count {
  color: #806033;
}

.section-head p,
.price-row span,
.notice {
  color: #625d52;
}

.section .discount-badge {
  color: #806033 !important;
  background: rgba(128, 96, 51, .1);
  border-color: rgba(128, 96, 51, .28);
}

.section .item-note {
  color: #70695e !important;
}

.contact-band {
  background: #0f100c;
}

@media (max-width: 820px) {
  .hero {
    text-align: left;
  }

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