@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  color-scheme: light;
  --ink: #20241f;
  --ink-soft: #60645c;
  --paper: #f8f5ef;
  --canvas: #dcd5ca;
  --card: #eee7dc;
  --card-deep: #e4dbcf;
  --line: rgba(32, 36, 31, 0.14);
  --accent: #b9664b;
  --accent-dark: #8f4b38;
  --olive: #697460;
  --white: #fffdf9;
  --radius-lg: 28px;
  --radius-md: 17px;
  --shadow: 0 18px 40px rgba(39, 31, 24, 0.09);
  --telegram-top-inset: 0px;
  --telegram-bottom-inset: 0px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--canvas); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(185, 102, 75, 0.35);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(32, 36, 31, 0.05), 0 30px 80px rgba(39, 31, 24, 0.12);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: calc(78px + var(--telegram-top-inset));
  padding: max(14px, calc(env(safe-area-inset-top) + var(--telegram-top-inset))) 20px 14px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
}

.brand { display: grid; justify-items: center; text-decoration: none; color: var(--ink); line-height: 1; }
.brand__kicker, .eyebrow, .status-date, .heading-count {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brand__kicker { color: var(--ink-soft); font-size: 9px; margin-bottom: 5px; }
.brand__name { font-size: 21px; font-weight: 800; letter-spacing: .18em; padding-left: .18em; }

.icon-button, .back-button, .round-arrow {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.icon-button:hover, .back-button:hover, .round-arrow:hover { transform: translateY(-2px); background: var(--white); border-color: rgba(32,36,31,.3); }
.icon-button { position: relative; width: 40px; height: 40px; border-radius: 50%; padding: 0; }
.icon-button svg { width: 19px; height: 19px; }
.icon-button--ghost { border: 0; background: transparent; }
.avatar-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: Georgia, serif; font-size: 14px; font-style: italic; }
.notification-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; right: 4px; top: 4px; background: var(--accent); border: 2px solid var(--paper); }

main { padding: 10px 18px calc(108px + env(safe-area-inset-bottom) + var(--telegram-bottom-inset)); }
body.is-telegram .app-shell { min-height: 100dvh; }
.screen { display: none; animation: screen-in .34s ease both; }
.screen.is-active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.hero-card { position: relative; display: grid; gap: 0; overflow: hidden; min-height: 500px; border-radius: var(--radius-lg); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.hero-card__visual { position: absolute; inset: 0 0 43% 0; background: radial-gradient(circle at 72% 22%, rgba(255,225,187,.45), transparent 20%), linear-gradient(145deg, #a65f48 0%, #c69169 43%, #e1b994 100%); overflow: hidden; }
.hero-card__visual::before, .hero-card__visual::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); transform: rotate(-12deg); }
.hero-card__visual::before { width: 240px; height: 240px; right: -34px; top: 26px; box-shadow: -18px 14px 0 -17px rgba(255,255,255,.25), -36px 28px 0 -34px rgba(255,255,255,.2), -54px 42px 0 -51px rgba(255,255,255,.16); }
.hero-card__visual::after { width: 175px; height: 175px; left: -55px; top: -58px; box-shadow: 14px 10px 0 -13px rgba(255,255,255,.27), 28px 20px 0 -26px rgba(255,255,255,.21); }
.hero-card__stamp { position: absolute; top: 23px; left: 22px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.52); border-radius: 999px; font-family: 'DM Mono', monospace; font-size: 10px; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase; }
.hero-card__material { position: absolute; right: 20px; bottom: 16px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hero-card__content { position: relative; z-index: 1; align-self: end; padding: 30px 24px 25px; background: linear-gradient(180deg, rgba(32,36,31,0) 0%, rgba(32,36,31,.86) 16%, var(--ink) 36%); }
.hero-card h1 { max-width: 380px; margin: 8px 0 12px; color: var(--paper); font-family: 'Playfair Display', Georgia, serif; font-size: clamp(38px, 10vw, 56px); font-weight: 500; letter-spacing: -.04em; line-height: .98; }
.hero-card h1 em { color: #dfad82; font-weight: 500; }
.eyebrow { margin: 0; color: var(--ink-soft); font-weight: 500; }
.hero-card .eyebrow { color: rgba(248,245,239,.66); }
.hero-card__description { max-width: 350px; margin: 0 0 22px; color: rgba(248,245,239,.73); font-size: 14px; }

.primary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; padding: 0 15px 0 18px; border: 1px solid transparent; border-radius: 999px; background: var(--accent); color: #fffaf4; font-size: 14px; font-weight: 700; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.primary-button:hover { transform: translateY(-2px); background: var(--accent-dark); box-shadow: 0 9px 18px rgba(143,75,56,.25); }
.button-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 18px; font-weight: 400; }
.primary-button--wide { width: 100%; min-height: 55px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 34px 2px 15px; }
h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 28px; font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
h3 { margin: 4px 0 5px; font-size: 17px; line-height: 1.15; }
.text-button { padding: 6px 0; border: 0; background: none; color: var(--accent-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.text-button span { display: inline-block; margin-left: 5px; font-size: 16px; transition: transform .2s ease; }
.text-button:hover span { transform: translateX(3px); }
.section-note { margin: -7px 2px 14px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }

.chip-row { display: flex; gap: 7px; overflow-x: auto; margin: 0 -2px 17px; padding: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 12px; white-space: nowrap; transition: .2s ease; }
.chip:hover, .chip.is-selected { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-card { display: flex; flex-direction: column; min-width: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(39, 31, 24, .09); }
.product-card__visual { position: relative; min-height: 176px; padding: 12px; display: flex; align-items: end; background: var(--card-deep); overflow: hidden; }
.product-card__visual::before { content: ''; position: absolute; inset: 20% -10% -28% 30%; border: 1px solid rgba(32,36,31,.2); border-radius: 47% 53% 44% 56%; transform: rotate(-20deg); box-shadow: -10px 8px 0 -9px rgba(32,36,31,.2), -20px 16px 0 -18px rgba(32,36,31,.17), -30px 24px 0 -27px rgba(32,36,31,.14); }
.product-card__visual::after { content: 'SVG'; position: absolute; right: 11px; top: 11px; padding: 5px 7px; border: 1px solid rgba(32,36,31,.22); border-radius: 999px; color: rgba(32,36,31,.62); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.product-card__visual--terracotta { background: #c89570; }
.product-card__visual--graphite { background: #97948a; }
.product-card__visual--olive { background: #aeb19d; }
.product-card__visual--cream { background: #e8d7bd; }
.product-card__visual { width: 100%; border: 0; text-align: left; cursor: pointer; }
.product-card__visual-icon { position: absolute; z-index: 1; inset: 23px 8px 5px 32%; display: grid; place-items: center; }
.product-card__visual-icon svg { display: block; width: min(100%, 170px); height: 100%; filter: drop-shadow(0 12px 10px rgba(32,36,31,.12)); }
.discount-badge { position: absolute; z-index: 2; right: 11px; bottom: 11px; padding: 5px 7px; border-radius: 999px; background: var(--accent); color: #fffaf4; font-family: 'DM Mono', monospace; font-size: 9px; font-weight: 500; letter-spacing: .04em; }
.product-card__label { position: relative; z-index: 1; padding: 5px 8px; border-radius: 999px; background: rgba(255,253,249,.73); color: var(--ink); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.product-card__body { display: grid; gap: 8px; padding: 13px 13px 14px; }
.product-card__body h3 { margin: 0; font-family: 'Playfair Display', Georgia, serif; font-size: 22px; font-weight: 500; }
.product-card__body p { min-height: 38px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.product-card__price { font-weight: 800; }
.product-card__action { width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 17px; transition: .2s ease; }
.product-card__action:hover { border-color: var(--accent); background: var(--accent); color: white; }
.price-stack { display: grid; gap: 1px; }
.price-stack del { color: var(--ink-soft); font-size: 10px; }

.note-card { display: grid; grid-template-columns: 38px 1fr 40px; align-items: center; gap: 12px; margin-top: 26px; padding: 16px; border-radius: var(--radius-md); background: var(--card); }
.note-card__seal { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; font-size: 18px; color: var(--accent-dark); }
.note-card p:not(.eyebrow) { margin: 0; color: var(--ink-soft); font-size: 12px; }
.round-arrow { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); font-size: 19px; }

.page-heading { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; margin: 13px 2px 17px; }
.page-heading h1 { margin: 3px 0 0; font-family: 'Playfair Display', Georgia, serif; font-size: 36px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.back-button { width: 38px; height: 38px; border-radius: 50%; font-size: 20px; }
.heading-count { color: var(--ink-soft); white-space: nowrap; }
.page-lead { max-width: 460px; margin: 0 2px 18px; color: var(--ink-soft); font-size: 14px; }
.chip-row--catalog { margin-bottom: 21px; }

.selection-summary { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0 0 21px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.selection-summary__visual { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 14px; background: #c89570; color: rgba(32,36,31,.62); font-size: 21px; }
.selection-summary__visual--neutral { background: var(--card-deep); }
.selection-summary__visual svg { width: 58px; height: 58px; }
.selection-summary strong, .selection-summary span { display: block; }
.selection-summary strong { margin: 2px 0 3px; font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 500; }
.selection-summary span:not(.eyebrow) { color: var(--ink-soft); font-size: 11px; line-height: 1.3; }

.order-form { display: grid; gap: 21px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin: 0 0 12px; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
.field, .upload-field { display: grid; gap: 6px; margin-bottom: 12px; }
.field > span, .upload-field strong { font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); transition: border .2s ease, box-shadow .2s ease; }
.field textarea { min-height: 82px; padding-top: 12px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9c9c94; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(32,36,31,.34); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.upload-field { grid-template-columns: 34px 1fr; align-items: center; min-height: 64px; margin: 4px 0 0; padding: 10px 12px; border: 1px dashed rgba(32,36,31,.34); border-radius: 13px; background: rgba(255,255,255,.33); cursor: pointer; }
.upload-field input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-field__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card); color: var(--accent-dark); font-size: 21px; }
.upload-field small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
.order-total { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 15px 0 4px; border-top: 1px solid var(--line); }
.order-total span, .order-total small { display: block; }
.order-total span { font-size: 13px; font-weight: 700; }
.order-total small { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.order-total strong { color: var(--accent-dark); font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; white-space: nowrap; }
.form-hint { margin: -7px 4px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; text-align: center; }

.empty-state { display: grid; justify-items: center; gap: 9px; padding: 44px 20px; border: 1px dashed var(--line); border-radius: var(--radius-md); text-align: center; }
.empty-state--compact { grid-column: 1 / -1; padding: 25px 16px; }
.empty-state__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--card); color: var(--accent-dark); font-size: 24px; }
.empty-state h2 { font-size: 24px; }
.empty-state p { max-width: 280px; margin: 0; color: var(--ink-soft); font-size: 13px; }
.order-list { display: grid; gap: 11px; margin-bottom: 22px; }
.order-card { display: grid; gap: 12px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); text-align: left; transition: .2s ease; }
.order-card:hover { border-color: rgba(32,36,31,.35); transform: translateY(-2px); }
.order-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-card__number { color: var(--ink-soft); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .08em; }
.order-card__date { color: var(--ink-soft); font-size: 11px; }
.order-card__main { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; }
.order-card__visual { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--card-deep); font-size: 17px; }
.order-card__main strong { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 18px; font-weight: 500; }
.order-card__main small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
.order-card__chevron { color: var(--accent-dark); font-size: 20px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: rgba(105,116,96,.12); color: #516148; font-size: 11px; font-weight: 700; }
.status-pill__dot { width: 6px; height: 6px; border-radius: 50%; background: #73866a; }

.status-card { padding: 19px 16px 9px; border-radius: var(--radius-lg); background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.status-card__topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.status-date { color: rgba(248,245,239,.55); }
.status-card h2 { margin: 26px 0 6px; color: var(--paper); font-size: 30px; }
.status-card > p { margin: 0; color: rgba(248,245,239,.68); font-size: 13px; }
.status-timeline { position: relative; display: grid; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; }
.status-timeline::before { content: ''; position: absolute; top: 13px; bottom: 39px; left: 8px; width: 1px; background: rgba(248,245,239,.2); }
.status-timeline li { position: relative; display: grid; grid-template-columns: 17px 1fr; gap: 12px; min-height: 71px; color: rgba(248,245,239,.42); }
.status-timeline li.is-done, .status-timeline li.is-current { color: var(--paper); }
.timeline-dot { position: relative; z-index: 1; width: 17px; height: 17px; margin-top: 5px; border: 1px solid rgba(248,245,239,.35); border-radius: 50%; background: var(--ink); }
.is-done .timeline-dot { border-color: #97a68e; background: #97a68e; box-shadow: inset 0 0 0 4px var(--ink); }
.is-current .timeline-dot { border-color: #dfa27f; background: #dfa27f; box-shadow: 0 0 0 4px rgba(223,162,127,.18); }
.status-timeline strong { display: block; font-size: 14px; }
.status-timeline small { display: block; max-width: 300px; margin-top: 3px; font-size: 11px; line-height: 1.45; }
.status-note { display: flex; align-items: center; gap: 10px; margin: 14px 2px 0; padding: 12px 13px; border-radius: 13px; background: var(--card); color: var(--ink-soft); }
.status-note span { color: var(--accent-dark); font-size: 20px; }
.status-note p { margin: 0; font-size: 12px; }

.bottom-nav { position: fixed; z-index: 30; bottom: 0; left: 50%; display: grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 560px); padding: 8px 12px max(11px, calc(env(safe-area-inset-bottom) + var(--telegram-bottom-inset))); transform: translateX(-50%); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 93%, transparent); backdrop-filter: blur(14px); }
.bottom-nav__item { display: grid; justify-items: center; gap: 3px; min-height: 50px; padding: 4px; border: 0; background: transparent; color: var(--ink-soft); font-size: 10px; transition: .2s ease; }
.bottom-nav__item.is-active, .bottom-nav__item:hover { color: var(--accent-dark); }
.nav-icon { display: grid; place-items: center; width: 22px; height: 22px; line-height: 1; }
.nav-icon svg { width: 21px; height: 21px; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom) + var(--telegram-bottom-inset)); width: min(calc(100% - 36px), 430px); padding: 12px 15px; border-radius: 13px; background: var(--ink); color: var(--paper); font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 26px 0; }
  .app-shell { min-height: calc(100dvh - 52px); border-radius: 34px; }
  .bottom-nav { bottom: 26px; border-bottom-left-radius: 34px; border-bottom-right-radius: 34px; }
  main { padding-left: 28px; padding-right: 28px; }
  .hero-card { min-height: 535px; }
  .hero-card__visual { inset: 0 42% 0 0; }
  .hero-card__content { align-self: end; margin-left: 42%; padding: 44px 30px 35px; background: linear-gradient(90deg, rgba(32,36,31,0) 0%, var(--ink) 17%); }
  .product-grid--featured { grid-template-columns: repeat(3, 1fr); }
  .product-card__visual { min-height: 190px; }
  .product-card__body p { min-height: 54px; }
}

@media (max-width: 365px) {
  main { padding-left: 14px; padding-right: 14px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-card h1 { font-size: 38px; }
}

/* Theme variations shown in the prototype. The structure stays the same; the mood changes. */
body[data-theme="noir"] {
  --ink: #f3efe8;
  --ink-soft: #a7a79f;
  --paper: #171918;
  --canvas: #0f1110;
  --card: #252a27;
  --card-deep: #303632;
  --line: rgba(243, 239, 232, .18);
  --accent: #d7a76f;
  --accent-dark: #e0bb8c;
  --olive: #8c9b82;
  --white: #222622;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
}
body[data-theme="noir"] .hero-card { background: #0c0e0d; }
body[data-theme="noir"] .hero-card__visual { background: radial-gradient(circle at 72% 22%, rgba(255,225,187,.15), transparent 22%), linear-gradient(145deg, #3d403a 0%, #232824 55%, #121513 100%); }
body[data-theme="noir"] .hero-card h1 em { color: #d7a76f; }
body[data-theme="noir"] .status-card { background: #0c0e0d; }
body[data-theme="sunset"] {
  --ink: #36251f;
  --ink-soft: #806b5f;
  --paper: #fff8ee;
  --canvas: #ead3c1;
  --card: #f5e2d1;
  --card-deep: #efd0b4;
  --line: rgba(54, 37, 31, .16);
  --accent: #d26e42;
  --accent-dark: #a74c2a;
  --olive: #7a7c59;
  --white: #fffdf7;
}
body[data-theme="sunset"] .hero-card { background: #36251f; }
body[data-theme="sunset"] .hero-card__visual { background: radial-gradient(circle at 72% 22%, rgba(255,235,191,.45), transparent 20%), linear-gradient(145deg, #d36c46 0%, #e8a56f 48%, #f0cf9f 100%); }

.profile-popover { position: fixed; z-index: 40; top: calc(70px + var(--telegram-top-inset)); left: max(16px, calc(50% - 262px)); width: min(330px, calc(100% - 32px)); padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: var(--shadow); animation: screen-in .2s ease both; }
.profile-popover[hidden] { display: none; }
.profile-popover__head { display: grid; grid-template-columns: 35px 1fr 32px; align-items: center; gap: 10px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.profile-popover__head .avatar-mark { width: 32px; height: 32px; }
.profile-popover__head strong, .profile-popover__head small { display: block; }
.profile-popover__head strong { font-size: 13px; }
.profile-popover__head small { margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
.modal-close { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--ink-soft); font-size: 22px; line-height: 1; }
.profile-popover__section { padding: 13px 0 12px; }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 8px; }
.theme-option { display: grid; justify-items: center; gap: 6px; padding: 8px 5px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--ink-soft); font-size: 10px; }
.theme-option.is-selected, .theme-option:hover { border-color: var(--line); background: var(--card); color: var(--ink); }
.theme-swatch { width: 43px; height: 24px; border-radius: 8px; }
.theme-swatch--atelier { background: linear-gradient(135deg, #20241f 0 45%, #c89570 45%); }
.theme-swatch--noir { background: linear-gradient(135deg, #141615 0 45%, #d7a76f 45%); }
.theme-swatch--sunset { background: linear-gradient(135deg, #36251f 0 45%, #e8a56f 45%); }
.profile-popover__admin { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 8px 3px; border: 0; border-top: 1px solid var(--line); background: transparent; font-size: 12px; font-weight: 700; text-align: left; }
.profile-popover__admin span { color: var(--accent-dark); font-size: 17px; }
.profile-popover__admin small { margin-left: auto; color: var(--ink-soft); font-size: 10px; font-weight: 500; }

.consent-field { display: flex; align-items: flex-start; gap: 9px; margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.consent-field input { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }
.inline-link { padding: 0; border: 0; background: transparent; color: var(--accent-dark); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

.payment-card { display: grid; gap: 12px; margin-top: 15px; padding: 17px 15px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.payment-card__topline { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.payment-card h3 { margin: 3px 0 0; font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; }
.payment-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.payment-pill--unpaid { background: rgba(185, 102, 75, .13); color: var(--accent-dark); }
.payment-pill--pending { background: rgba(204, 157, 76, .18); color: #876115; }
.payment-pill--paid { background: rgba(105, 116, 96, .15); color: #516148; }
.payment-pill--declined { background: rgba(125, 54, 54, .14); color: #914d4d; }
.payment-card__text { margin: 0; color: var(--ink-soft); font-size: 12px; }
.requisites-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--card); }
.requisites-grid { display: grid; gap: 7px; min-width: 0; }
.requisites-row small, .requisites-row strong { display: block; }
.requisites-row small { color: var(--ink-soft); font-size: 10px; }
.requisites-row strong { margin-top: 3px; font-family: 'DM Mono', monospace; font-size: 13px; letter-spacing: .02em; }
.copy-button { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 800; transition: .2s ease; }
.secondary-button:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--card); }
.secondary-button:disabled { cursor: not-allowed; opacity: .55; }
.secondary-button--wide { width: 100%; }
.payment-card__note { color: var(--ink-soft); font-size: 10px; }

.admin-badge { padding: 5px 8px; border-radius: 999px; background: var(--card); color: var(--ink-soft); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.admin-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; }
.admin-kpi { padding: 12px 10px; border-radius: 14px; background: var(--ink); color: var(--paper); }
.admin-kpi small, .admin-kpi strong { display: block; }
.admin-kpi small { color: rgba(248,245,239,.62); font-size: 10px; }
.admin-kpi strong { margin-top: 4px; font-family: 'Playfair Display', Georgia, serif; font-size: 25px; font-weight: 500; }
.admin-tabs { display: flex; gap: 7px; overflow-x: auto; margin: 0 -2px 17px; padding: 2px; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { min-height: 33px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.admin-tab.is-active, .admin-tab:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.admin-panel { display: none; }
.admin-panel.is-active { display: block; animation: screen-in .24s ease both; }
.admin-panel__heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 13px; }
.admin-panel__heading h2 { margin-top: 4px; font-size: 26px; }
.admin-panel__lead { margin: -5px 0 16px; line-height: 1.5; }
.admin-settings-card { display: grid; gap: 9px; margin-bottom: 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); }
.admin-settings-card > div:first-child strong { display: block; margin-top: 3px; font-size: 13px; }
.admin-settings-card .field { margin-bottom: 0; }
.admin-settings-card .secondary-button { justify-self: start; min-height: 34px; font-size: 11px; }
.admin-form { display: grid; gap: 12px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.admin-form .field { margin-bottom: 0; }
.admin-form .field-row { align-items: start; gap: 12px; }
.admin-form .field > span { display: block; min-height: 18px; }
.admin-form__actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-form__actions .primary-button { min-width: 180px; }
.admin-muted { color: var(--ink-soft); font-size: 12px; }
.admin-order-row, .admin-catalog-row, .discount-row, .user-row, .doc-row { display: grid; gap: 10px; margin-bottom: 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.admin-order-row__top, .admin-catalog-row__top, .discount-row__top, .user-row__top, .doc-row__top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.admin-order-row strong, .admin-catalog-row strong, .discount-row strong, .user-row strong, .doc-row strong { font-size: 13px; }
.admin-order-row small, .admin-catalog-row small, .discount-row small, .user-row small, .doc-row small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10px; }
.admin-order-row__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-order-row__actions button { min-height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 10px; font-weight: 800; }
.admin-order-row__actions button:hover { border-color: var(--accent); color: var(--accent-dark); }
.admin-order-row__actions .is-primary { border-color: var(--accent); background: var(--accent); color: white; }
.admin-catalog-row { grid-template-columns: 44px 1fr auto; align-items: center; }
.admin-catalog-row__visual { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--card-deep); font-size: 17px; }
.admin-catalog-row__visual svg { width: 43px; height: 43px; }
.admin-catalog-row__locations { display: block; margin-top: 4px; color: var(--accent-dark); font-size: 10px; font-weight: 700; }
.admin-catalog-row__actions { display: grid; gap: 5px; }
.admin-catalog-row__actions button { padding: 4px 7px; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; font-weight: 800; }
.admin-catalog-list, #admin-discounts-list, #admin-users-list, #admin-orders-list { display: grid; gap: 10px; margin-top: 18px; }
.palette-editor { margin: 2px 0 4px; padding: 14px; border-radius: 12px; background: var(--card); }
.palette-editor__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
.palette-row { display: grid; grid-template-columns: 27px 1fr 80px 26px; align-items: center; gap: 6px; margin-bottom: 6px; }
.palette-row input { min-height: 33px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 11px; }
.palette-row input[type="color"] { width: 27px; padding: 2px; }
.palette-row button { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--accent-dark); font-size: 17px; }
.switch-field { display: flex; align-items: center; gap: 9px; margin: 3px 0 11px; }
.switch-field input { width: 17px; height: 17px; accent-color: var(--accent); }
.switch-field input:disabled + span { opacity: .48; }
.switch-field strong, .switch-field small { display: block; }
.switch-field strong { font-size: 12px; }
.switch-field small { margin-top: 2px; color: var(--ink-soft); font-size: 10px; }
.admin-options-card { display: grid; gap: 9px; padding: 13px; border-radius: 12px; background: var(--card); }
.admin-options-card .eyebrow { margin-bottom: 2px; }
.admin-options-card .switch-field { margin: 0; }
.field-help { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.svg-help { margin-top: 7px; padding: 9px 10px; border-radius: 10px; background: var(--card); color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.svg-help summary { color: var(--accent-dark); cursor: pointer; font-size: 11px; font-weight: 800; }
.svg-help p { margin: 7px 0 0; }
.svg-help code { padding: 1px 3px; border-radius: 4px; background: rgba(32,36,31,.08); color: var(--ink); font-family: 'DM Mono', monospace; font-size: 9px; }
.discount-row { grid-template-columns: 1fr auto; align-items: center; }
.discount-row__delete { padding: 4px 6px; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; }
.user-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.user-row__identity strong, .user-row__identity small { display: block; }
.user-row__identity small { margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.user-row__meta { text-align: right; white-space: nowrap; }
.user-row__meta strong { font-size: 12px; }
.user-row__meta strong span { color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.doc-checklist { display: grid; gap: 8px; }
.doc-row { grid-template-columns: 27px 1fr auto; align-items: start; }
.doc-row input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); }
.doc-row__link { padding: 0; border: 0; background: transparent; color: var(--accent-dark); font-size: 11px; font-weight: 800; }

.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; align-items: end; justify-items: center; padding: 17px; background: rgba(18, 20, 18, .48); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal-card { position: relative; width: min(100%, 520px); max-height: min(90dvh, 720px); overflow: auto; padding: 16px; border-radius: 26px 26px 18px 18px; background: var(--paper); box-shadow: 0 24px 70px rgba(0,0,0,.23); animation: modal-in .28s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
.modal-card > .modal-close { position: absolute; z-index: 1; top: 12px; right: 12px; }
.modal-product-visual { display: grid; place-items: center; min-height: 235px; border-radius: 18px; background: var(--card-deep); }
.modal-product-visual svg { width: min(70%, 230px); height: auto; filter: drop-shadow(0 18px 16px rgba(32,36,31,.16)); }
.modal-product-copy { padding: 18px 2px 10px; }
.modal-product-copy h2, .legal-modal h2 { margin: 4px 0 6px; font-family: 'Playfair Display', Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -.04em; }
.modal-product-copy p:last-child { margin: 0; color: var(--ink-soft); font-size: 13px; }
.modal-palette { padding: 12px 0 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.modal-palette__heading { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 12px; }
.modal-palette__heading strong { color: var(--accent-dark); }
#modal-palette-options { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-swatch { position: relative; width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(32,36,31,.17); }
.palette-swatch.is-selected { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1px var(--ink); }
.modal-product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.modal-product-bottom > strong { font-family: 'Playfair Display', Georgia, serif; font-size: 24px; font-weight: 500; white-space: nowrap; }
.legal-modal { align-self: center; border-radius: 22px; }
.legal-modal h2 { margin-top: 8px; }
.legal-modal p { color: var(--ink-soft); font-size: 13px; }
.legal-modal ul { padding-left: 19px; color: var(--ink-soft); font-size: 13px; }

@media (min-width: 700px) {
  .profile-popover { left: calc(50% - 252px); }
  .modal-backdrop { align-items: center; }
  .modal-card { border-radius: 26px; }
}
