/* Дизайн-система Organic (из макета "My coffee", Claude Design) */
:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;

  --font-heading: 'Caprasimo', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  --radius-card: 28px;
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; letter-spacing: -0.015em; line-height: 1.12; margin: 0; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: var(--color-accent-700); text-decoration: none; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
.noscroll { scrollbar-width: none; }
.noscroll::-webkit-scrollbar { display: none; }

/* ---------- утилиты ---------- */
.muted { color: var(--color-neutral-700); }
.faint { color: var(--color-neutral-600); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.bold { font-weight: 700; }
.heading { font-family: var(--font-heading); }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 2px; } .gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.nowrap { white-space: nowrap; }
.caps { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); padding-left: 4px; }

/* ---------- каркас экрана ---------- */
.app { min-height: 100vh; }
.screen { display: flex; flex-direction: column; min-height: 100vh; max-width: 560px; margin: 0 auto; position: relative; }
.screen-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.screen-head h2 { flex: 1; }
.screen-body { flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.screen-foot {
  position: sticky; bottom: 0; z-index: 5;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--color-bg) 75%, transparent);
  display: flex; flex-direction: column; gap: 10px;
}
.with-tabbar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
.with-tabbar .screen-foot { bottom: calc(64px + env(safe-area-inset-bottom)); padding-bottom: 12px; }
.center-screen { align-items: center; justify-content: center; text-align: center; padding: 24px; }

/* декоративные круги */
.blob { position: absolute; border-radius: 50%; pointer-events: none; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1.2;
  padding: 0 18px; height: 40px; background: transparent; color: var(--color-text);
  transition: background 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary.on-bg { background: var(--color-bg); }
.btn-ghost { color: var(--color-accent); padding: 0 10px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-lg { height: 56px; font-size: 16px; }
.btn-md { height: 50px; }
.btn-block { width: 100%; }
.btn-split { justify-content: space-between; padding: 0 22px; }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--color-divider); background: transparent; cursor: pointer; position: relative; padding: 0;
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.icon-btn.lg { width: 48px; height: 48px; }
.icon-btn .dot {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--color-accent); border: 2px solid var(--color-bg);
}
.ico { display: block; fill: none; stroke: currentColor; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round; }

/* круглая кнопка "+" и степпер */
.plus-btn {
  border: 0; cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-accent); color: var(--color-bg); display: grid; place-items: center; flex: none;
}
.stepper { display: flex; align-items: center; gap: 4px; background: var(--color-accent-100); border-radius: 999px; padding: 2px; flex: none; }
.stepper button {
  border: 0; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
}
.stepper .dec { background: var(--color-bg); color: var(--color-accent-700); }
.stepper .inc { background: var(--color-accent); color: var(--color-bg); }
.stepper .inc:disabled { opacity: 0.45; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }

/* ---------- метки ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.02em;
  padding: 3px 10px; border-radius: 999px; border: 0; white-space: nowrap;
}
.tag.md { font-size: 13px; padding: 5px 12px; }
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); background: transparent; }
button.tag { cursor: pointer; font-weight: 600; }

/* ---------- поля ---------- */
.field { display: flex; flex-direction: column; }
.field > label { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.field-hint { font-size: 12px; color: var(--color-neutral-600); margin-top: 6px; padding-left: 4px; }
.input {
  width: 100%; height: 48px; padding: 0 18px; font: inherit; font-size: 15px; color: var(--color-text);
  caret-color: var(--color-accent); background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: 999px;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible, .input:focus { border-color: var(--color-accent); outline: none; }
.input.lg { height: 56px; padding: 0 22px; font-size: 17px; }
textarea.input { height: auto; min-height: 80px; border-radius: 22px; padding: 12px 16px; resize: vertical; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23645c50' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 16px; padding-right: 40px; }
.search { position: relative; }
.search .ico { position: absolute; left: 16px; top: 13px; color: var(--color-neutral-600); }
.search .input { height: 44px; padding-left: 42px; font-size: 14px; }

/* сегмент-переключатель */
.seg { display: flex; gap: 6px; padding: 4px; background: var(--color-surface); border-radius: 999px; }
.seg button {
  flex: 1; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; height: 36px; border-radius: 999px;
  background: transparent; color: var(--color-text);
}
.seg button.active { background: var(--color-text); color: var(--color-bg); }
.seg.lg button { height: 38px; }

/* чипсы */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  border: 0; cursor: pointer; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  white-space: nowrap; background: var(--color-surface); color: var(--color-text); flex: none;
}
.chip.active { background: var(--color-text); color: var(--color-bg); }

/* переключатель */
.toggle {
  width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 3px; display: flex; cursor: pointer; flex: none;
  background: var(--color-neutral-400); justify-content: flex-start; transition: background 0.15s;
}
.toggle.on { background: var(--color-accent-2); justify-content: flex-end; }
.toggle span { width: 20px; height: 20px; border-radius: 50%; background: var(--color-neutral-100); box-shadow: var(--shadow-sm); }
.toggle.lg { width: 48px; height: 28px; }
.toggle.lg span { width: 22px; height: 22px; }

/* радио-строка */
.radio-row {
  display: flex; align-items: center; gap: 12px; border: 2px solid transparent; background: var(--color-bg);
  border-radius: 22px; padding: 10px 14px; cursor: pointer; text-align: left; width: 100%;
}
.radio-row.pill { border-radius: 999px; padding: 10px 16px; font-size: 15px; }
.radio-row.active { border-color: var(--color-accent); }
.radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--color-accent); display: grid; place-items: center; flex: none; }
.radio-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.radio-row.active .radio-dot::after { background: var(--color-accent); }

/* ---------- карточки ---------- */
.card { background: var(--color-surface); border-radius: var(--radius-card); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.pad-20 { padding: 20px; }
.card.tight { border-radius: 22px; padding: 12px 12px 12px 16px; gap: 8px; }
.card-row { display: flex; align-items: center; gap: 12px; background: var(--color-surface); border-radius: 22px; padding: 8px 12px 8px 8px; }
.card-row.pad { padding: 12px 12px 12px 16px; }

/* фото */
.photo { position: relative; overflow: hidden; background: var(--color-neutral-300); flex: none; display: grid; place-items: center; color: var(--color-neutral-600); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.6) contrast(0.85) brightness(1.1) opacity(0.94); }

/* ---------- главная ---------- */
.home-hero-card {
  border: 0; cursor: pointer; text-align: left; color: var(--color-bg); background: var(--color-accent);
  border-radius: var(--radius-card); padding: 22px; min-height: 190px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden; width: 100%;
}
.home-hero-card:disabled { opacity: 0.5; cursor: not-allowed; }
.home-hero-card .title { display: block; font-family: var(--font-heading); font-size: 28px; line-height: 1.1; }
.home-hero-card .sub { display: block; font-size: 14px; margin-top: 6px; color: var(--color-accent-100); }
.soon-card {
  background: var(--color-surface); border-radius: var(--radius-card); padding: 18px; min-height: 130px; border: 0;
  display: flex; flex-direction: column; justify-content: space-between; color: var(--color-neutral-700); text-align: left; cursor: pointer;
}

/* выбор режима */
.option-card {
  border: 2px solid transparent; background: var(--color-surface); cursor: pointer; text-align: left;
  border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 6px; width: 100%;
}
.option-card.active { border-color: var(--color-accent); background: var(--color-accent-100); }
.option-card .title { font-family: var(--font-heading); font-size: 22px; }
.option-card .sub { font-size: 14px; color: var(--color-neutral-700); line-height: 1.4; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slots button { border: 0; cursor: pointer; font-size: 14px; font-weight: 600; height: 42px; border-radius: 999px; background: var(--color-surface); }
.slots button.active { background: var(--color-accent); color: var(--color-bg); }

/* меню */
.menu-scroll { flex: 1; padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 22px; }
.day-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.day-card { flex: none; width: 300px; max-width: 82vw; background: var(--color-surface); border-radius: var(--radius-card); padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.day-card.single { width: 100%; max-width: none; }
.day-card .photo { height: 150px; border-radius: 20px; }
.day-card .name { font-family: var(--font-heading); font-size: 20px; line-height: 1.15; }
.item { display: flex; gap: 12px; }
.item.dim { opacity: 0.5; }
.item .photo { width: 88px; height: 88px; border-radius: 22px; }
.item .name { font-weight: 700; font-size: 15px; }
.item .desc { font-size: 12.5px; color: var(--color-neutral-700); line-height: 1.35; }
.price { font-weight: 700; font-size: 15px; }

/* корзина */
.cart-line { display: flex; gap: 12px; align-items: center; }
.cart-line .photo { width: 56px; height: 56px; border-radius: 18px; }
.pill-box { display: flex; align-items: center; justify-content: space-between; background: var(--color-surface); border-radius: 999px; padding: 6px 6px 6px 18px; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.total-line .sum { font-family: var(--font-heading); font-size: 24px; }

/* экран "заказ принят" */
.done-circle {
  width: 200px; height: 200px; border-radius: 50%; background: var(--color-accent); color: var(--color-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 20px 0 24px; position: relative;
}
.done-circle .num { font-family: var(--font-heading); font-size: 76px; line-height: 1; }

/* статус-шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.steps .bar { height: 6px; border-radius: 999px; background: var(--color-neutral-300); }
.steps .on .bar { background: var(--color-accent); }
.steps .lbl { font-size: 11px; color: var(--color-neutral-600); margin-top: 6px; display: block; }
.steps .on .lbl { color: var(--color-text); }
.order-no { font-family: var(--font-heading); font-size: 26px; line-height: 1; }
.history-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--color-divider); }

/* ---------- нижняя панель (админ) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 6px 6px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-divider); background: var(--color-bg);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin: 0 auto; }
.tabbar button {
  border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; color: var(--color-neutral-600);
}
.tabbar button.active { color: var(--color-accent); }
.tabbar span { font-size: 11px; font-weight: 600; }

/* админ */
.admin-order .where { font-weight: 700; font-size: 14px; color: var(--color-accent-2-800); }
.comment-box { background: var(--color-accent-100); color: var(--color-accent-800); border-radius: 16px; padding: 8px 12px; font-size: 14px; }
.revenue-card { background: var(--color-accent); color: var(--color-bg); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.revenue-card .val { font-family: var(--font-heading); font-size: 36px; line-height: 1.1; position: relative; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--color-surface); border-radius: var(--radius-card); padding: 16px 18px; }
.stat.sage { background: var(--color-accent-2-200); }
.stat .val { font-family: var(--font-heading); font-size: 30px; line-height: 1.2; }
.stat .lbl { font-size: 13px; color: var(--color-neutral-700); }
.stat.sage .lbl { color: var(--color-accent-2-800); }
.bar-track { height: 10px; border-radius: 999px; background: var(--color-surface); }
.bar-fill { height: 100%; border-radius: 999px; background: var(--color-accent-2); }
.photo-drop { height: 150px; border-radius: var(--radius-card); cursor: pointer; width: 100%; border: 0; padding: 0; }
.photo-drop .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; }
.tg-preview { background: var(--color-neutral-100); border-radius: 22px 22px 22px 6px; padding: 8px; display: flex; flex-direction: column; gap: 8px; max-width: 290px; box-shadow: var(--shadow-sm); }
.tg-preview .photo { height: 140px; border-radius: 16px; }
.tg-preview .btn-line { border-top: 1px solid var(--color-divider); text-align: center; padding: 8px 0 4px; font-size: 14px; font-weight: 600; color: var(--color-accent-700); }
.num-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--color-bg); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.day-add { margin-left: auto; border: 0; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; background: var(--color-bg); display: grid; place-items: center; color: var(--color-accent-700); }
.card.today { background: var(--color-accent-100); }

/* ---------- шторка ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
  background: color-mix(in srgb, var(--color-neutral-900) 45%, transparent);
}
.sheet {
  width: 100%; max-width: 560px; max-height: 80vh; overflow: auto; background: var(--color-bg);
  border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-lg);
}
.sheet h3 { font-size: 21px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; border: 0; background: var(--color-surface); border-radius: 999px; padding: 12px 18px; cursor: pointer; font-size: 15px; text-align: left; }

/* уведомление */
.toast {
  position: fixed; left: 16px; right: 16px; top: 12px; z-index: 100; max-width: 520px; margin: 0 auto;
  padding: 12px 18px; border-radius: 999px; background: var(--color-text); color: var(--color-bg); font-size: 14px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.toast-error { background: var(--color-accent-700); }
.fade-enter-active, .fade-leave-active { transition: opacity 0.25s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
.splash { font-family: var(--font-heading); font-size: 40px; }
