/* Admin Panel — Altan Baikal — Light Theme */

:root {
  --bg:           #FFF8F6;
  --bg-soft:      #FBEDE8;
  --surface:      #FFFFFF;
  --surface-2:    #FCEFEC;
  --surface-3:    #F9E8E4;
  --primary:      #E94B5C;
  --primary-2:    #D43A4B;
  --primary-soft: #FCE4E2;
  --accent:       #F8C9C2;
  --text:         #2A1A1B;
  --text-2:       #7A5C5E;
  --text-3:       #B59A9C;
  --line:         rgba(233, 75, 92, 0.10);
  --line-2:       rgba(42, 26, 27, 0.06);
  --ok:           #2DA679;
  --ok-soft:      rgba(45,166,121,0.12);
  --warn:         #F5A623;
  --warn-soft:    rgba(245,166,35,0.12);
  --err:          #E94B5C;
  --shadow-sm:    0 1px 2px rgba(218,70,86,0.06), 0 2px 6px rgba(218,70,86,0.04);
  --shadow-md:    0 6px 16px rgba(218,70,86,0.08), 0 2px 4px rgba(218,70,86,0.05);
  --shadow-lg:    0 18px 40px rgba(218,70,86,0.14), 0 4px 12px rgba(218,70,86,0.08);
  --radius-sm:    10px;
  --radius:       16px;
  --radius-lg:    22px;
  --ease-ios:     cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --sidebar-w:    248px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────────── */
.admin {
  min-height: 100vh;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────────── */
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
  box-shadow: 2px 0 16px rgba(218,70,86,0.04);
  transition: width 0.24s var(--ease-ios), padding 0.24s var(--ease-ios);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  flex-shrink: 0;
}
.admin-brand__logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.admin-brand__text { flex: 1; min-width: 0; overflow: hidden; }
.admin-brand__name {
  font-weight: 700; font-size: 15px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-brand__title {
  font-size: 11px; color: var(--text-3);
  letter-spacing: 0.3px; margin-top: 1px;
  white-space: nowrap;
}

/* Sidebar collapse toggle */
.sidebar-collapse-btn {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text-3);
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  padding: 0;
  margin-left: auto;
}
.sidebar-collapse-btn:hover {
  background: var(--surface-2);
  color: var(--primary-2);
  border-color: var(--primary);
}
.sidebar-collapse-btn svg {
  transition: transform 0.24s var(--ease-ios);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  transition: background 0.2s var(--ease-ios), color 0.2s;
  user-select: none;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.is-active {
  background: var(--primary-soft);
  color: var(--primary-2);
  font-weight: 600;
}
.nav-item__icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: background 0.2s var(--ease-ios);
}
.nav-item__icon svg { width: 18px; height: 18px; }
.nav-item.is-active .nav-item__icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
}
.nav-item__badge {
  margin-left: auto;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.nav-item__label { overflow: hidden; transition: opacity 0.18s, max-width 0.24s var(--ease-ios); }

.admin-sidebar__bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.user-chip__avatar {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.user-chip__info { flex: 1; min-width: 0; overflow: hidden; }
.user-chip__name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.user-chip__role { font-size: 11px; color: var(--text-3); margin-top: 1px; white-space: nowrap; }

/* ── MAIN ───────────────────────────────────────────────────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.24s var(--ease-ios);
}

/* ── COLLAPSED SIDEBAR ──────────────────────────────────────────────────────── */
.admin.is-collapsed {
  --sidebar-w: 68px;
}
.admin.is-collapsed .admin-sidebar {
  padding: 20px 10px;
}
.admin.is-collapsed .admin-brand {
  padding: 6px 4px 18px;
  gap: 0;
  justify-content: center;
}
.admin.is-collapsed .admin-brand__text,
.admin.is-collapsed .admin-brand .sidebar-collapse-btn { display: none; }
.admin.is-collapsed .admin-brand__logo { cursor: pointer; }

/* Show collapse btn below brand when collapsed */
.admin.is-collapsed .admin-sidebar__expand-btn { display: grid; }
.admin-sidebar__expand-btn {
  display: none;
  width: 100%;
  place-items: center;
  padding: 6px 0 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.admin-sidebar__expand-btn button {
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--text-3);
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, color 0.2s;
}
.admin-sidebar__expand-btn button:hover {
  background: var(--primary-soft);
  color: var(--primary-2);
}

.admin.is-collapsed .nav-item {
  justify-content: center;
  padding: 10px;
  gap: 0;
}
.admin.is-collapsed .nav-item .nav-item__label,
.admin.is-collapsed .nav-item .nav-item__badge,
.admin.is-collapsed .nav-item > svg { display: none; }

.admin.is-collapsed .user-chip {
  justify-content: center;
  padding: 8px 4px;
}
.admin.is-collapsed .user-chip__info,
.admin.is-collapsed .user-chip__logout { display: none; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px 0;
  margin-bottom: 28px;
}
.page-head__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 600;
  color: var(--text); margin: 0;
  letter-spacing: -0.3px;
}
.page-head__sub {
  font-size: 14px; color: var(--text-3);
  margin-top: 4px;
}

.page-content {
  padding: 0 36px 48px;
  flex: 1;
}

/* ── BUTTONS ────────────────────────────────────────────────────────────────── */
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-size: 15px; font-weight: 600;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(233,75,92,0.28);
  transition: all 0.2s var(--ease-ios);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(233,75,92,0.36); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border: none; border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease-ios);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }

.btn-outline {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 12px;
  background: transparent;
  border: 1.5px solid var(--line-2);
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  font-family: inherit;
  transition: all 0.2s var(--ease-ios);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-2); background: var(--primary-soft); }

/* ── CARD BLOCK ─────────────────────────────────────────────────────────────── */
.card-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-2);
  margin-bottom: 20px;
}
.card-block__title {
  font-size: 17px; font-weight: 700; color: var(--text);
  margin: 0 0 4px;
}
.card-block__sub {
  font-size: 13px; color: var(--text-3);
  margin: 0 0 18px;
}

/* ── BADGE ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--ok-soft);
  color: var(--ok);
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err  { background: var(--primary-soft); color: var(--primary-2); }

/* ── FaceID animation ───────────────────────────────────────────────────────── */
.face-id-wrap { width: 52px; height: 52px; flex-shrink: 0; }
.face-id-wrap svg { overflow: visible; }
.face-id-corner {
  stroke: var(--primary); stroke-width: 2.5; stroke-linecap: round; fill: none;
  animation: faceIdPulse 2.4s ease-in-out infinite;
}
@keyframes faceIdPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.face-id-scan {
  animation: faceIdScan 2.4s ease-in-out infinite;
}
@keyframes faceIdScan {
  0%        { transform: translateY(0px);  opacity: 0.85; }
  44%       { transform: translateY(24px); opacity: 0.85; }
  50%, 55%  { transform: translateY(24px); opacity: 0;    }
  56%       { transform: translateY(0px);  opacity: 0;    }
  62%       { opacity: 0.85; }
  100%      { transform: translateY(0px);  opacity: 0.85; }
}
.face-id-blink {
  transform-box: fill-box; transform-origin: center;
  animation: eyeBlink 3.6s ease-in-out infinite;
}
.face-id-blink:nth-child(2) { animation-delay: 0.05s; }
@keyframes eyeBlink {
  0%, 40%, 60%, 100% { transform: scaleY(1); }
  50%                { transform: scaleY(0.06); }
}

/* ── Profile form ────────────────────────────────────────────────────────────── */
.profile-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.profile-form .pf-row { display: flex; flex-direction: column; gap: 3px; }
.profile-form label { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.3px; }
.profile-form input {
  border: 1.5px solid var(--line-2); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; color: var(--text);
  background: var(--surface-2); width: 100%; box-sizing: border-box;
  transition: border-color 0.15s;
}
.profile-form input:focus { outline: none; border-color: var(--primary); }
.pf-domain-row { display: flex; align-items: center; gap: 6px; }
.pf-domain-row input { flex: 1; }
.pf-domain-suffix { font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.42);
  display: grid; place-items: center;
  padding: 24px;
}
.modal {
  background: var(--surface); border-radius: 20px; padding: 28px 28px 24px;
  max-width: 460px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: modalPop 0.2s var(--ease-spring);
}
@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.modal__title { font-size: 20px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.modal__sub   { font-size: 14px; color: var(--text-2); margin-bottom: 20px; line-height: 1.55; }
.modal__contact {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface-2); border-radius: 12px;
  font-size: 14px; margin-bottom: 8px;
}
.modal__contact-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.modal__contact a { color: var(--primary-2); text-decoration: none; font-weight: 600; }
.modal__contact a:hover { text-decoration: underline; }

/* ── Cost calculator ─────────────────────────────────────────────────────────── */
.calc-row { display: flex; gap: 10px; align-items: stretch; margin: 16px 0; }
.calc-row select, .calc-row input[type=number] {
  border: 1.5px solid var(--line-2); border-radius: 10px;
  padding: 8px 12px; font-size: 14px; color: var(--text);
  background: var(--surface-2); flex: 1; min-width: 0;
}
.calc-row select:focus, .calc-row input:focus { outline: none; border-color: var(--primary); }
.calc-result {
  padding: 20px 16px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  text-align: center; color: #fff;
  font-size: 30px; font-weight: 800; margin: 4px 0 20px;
}
.calc-result small { display: block; font-size: 13px; font-weight: 400; opacity: 0.8; margin-top: 4px; }

/* ── Server status dot ───────────────────────────────────────────────────────── */
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.ok   { background: var(--ok);   box-shadow: 0 0 0 3px rgba(45,166,121,0.2); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245,166,35,0.2);  }
.status-dot.err  { background: var(--primary); box-shadow: 0 0 0 3px rgba(233,75,92,0.2); }

/* ── PROFILE ────────────────────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }

.org-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-2);
}
.org-card__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-2);
}
.org-card__logo {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 600;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.org-card__logo button {
  position: absolute; bottom: -6px; right: -6px;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.org-card__name { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.org-card__meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }

.org-info { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row__label { width: 80px; flex-shrink: 0; color: var(--text-3); font-size: 13px; }
.info-row__value { color: var(--text); font-weight: 500; }

/* ── STATS ──────────────────────────────────────────────────────────────────── */
.stats-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat-tile {
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 14px;
}
.stat-tile__label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.stat-tile__value { font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-tile__delta { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.stat-tile__delta.up { color: var(--ok); }

/* ── TOGGLE ─────────────────────────────────────────────────────────────────── */
.tg {
  width: 44px; height: 26px;
  border-radius: 999px;
  background: var(--line-2);
  position: relative;
  cursor: pointer;
  transition: background 0.25s var(--ease-ios);
  flex-shrink: 0;
  border: 1.5px solid transparent;
}
.tg.sm { width: 36px; height: 22px; }
.tg::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.25s var(--ease-spring);
}
.tg.sm::after { width: 14px; height: 14px; }
.tg.on { background: var(--primary); }
.tg.on::after { transform: translateX(18px); }
.tg.sm.on::after { transform: translateX(14px); }

/* ── CHECKBOX ───────────────────────────────────────────────────────────────── */
.cb {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  background: var(--surface);
  transition: all 0.18s var(--ease-ios);
}
.cb.checked { background: var(--primary); border-color: var(--primary); }
.cb.indeterm { background: var(--primary-soft); border-color: var(--primary); }
.cb.indeterm::after {
  content: '';
  width: 10px; height: 2px;
  background: var(--primary-2);
  border-radius: 2px;
}
.cb:hover { border-color: var(--primary); }

/* ── IIKO IMPORT ────────────────────────────────────────────────────────────── */
.iiko-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}
.iiko-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-3); font-weight: 500;
}
.iiko-step__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  transition: all 0.3s var(--ease-ios);
  flex-shrink: 0;
  color: var(--text-3);
}
.iiko-step.is-active .iiko-step__num {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(233,75,92,0.3);
}
.iiko-step.is-done .iiko-step__num {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.iiko-step.is-active .iiko-step__label { color: var(--text); font-weight: 600; }
.iiko-step.is-done .iiko-step__label   { color: var(--ok); }
.iiko-step__line {
  flex: 1; height: 2px;
  background: var(--line-2);
  margin: 0 10px;
  border-radius: 2px;
  transition: background 0.4s;
}
.iiko-step__line.done { background: var(--ok); }

.iiko-empty {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 32px 20px;
  gap: 12px;
}
.iiko-empty__icon { width: 88px; height: 88px; }
.iiko-empty h3 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.iiko-empty p { font-size: 14px; color: var(--text-2); margin: 0; max-width: 420px; line-height: 1.5; }

.import-progress {
  text-align: center;
  padding: 32px 20px;
}
.import-progress__count {
  font-size: 48px; font-weight: 800;
  color: var(--primary); font-variant-numeric: tabular-nums;
}
.import-progress__label { font-size: 14px; color: var(--text-3); margin: 8px 0 16px; }
.import-progress__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.import-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.3s var(--ease-ios);
}

.iiko-import-list {
  margin-top: 14px;
  display: flex; flex-direction: column; gap: 6px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.iiko-cat-block {
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.iiko-cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.18s;
}
.iiko-cat-row:hover { background: var(--surface-3); }
.iiko-cat-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.iiko-cat-count { font-size: 12px; color: var(--text-3); background: var(--surface); padding: 2px 8px; border-radius: 999px; }
.iiko-cat-arrow { color: var(--text-3); transition: transform 0.25s var(--ease-ios); }
.iiko-cat-arrow.open { transform: rotate(90deg); }

.iiko-dish-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 22px;
  border-top: 1px solid var(--line-2);
  background: var(--surface);
}
.iiko-dish-row__name { flex: 1; font-size: 13px; color: var(--text-2); }
.iiko-dish-row__price { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.iiko-dish-row__stop {
  font-size: 11px; font-weight: 700;
  color: var(--warn); background: var(--warn-soft);
  padding: 2px 8px; border-radius: 999px;
}

/* ── VISIBILITY ─────────────────────────────────────────────────────────────── */
.vis-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.vis-tree {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  padding: 8px 6px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 20px;
}
.tree-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px; color: var(--text-2);
  transition: all 0.18s var(--ease-ios);
  user-select: none;
}
.tree-item:hover { background: var(--surface-2); color: var(--text); }
.tree-item.is-active { background: var(--primary-soft); color: var(--primary-2); font-weight: 600; }
.tree-item.muted { opacity: 0.45; }
.tree-item__emoji { font-size: 18px; }
.tree-item__name { flex: 1; }
.tree-item__count { font-size: 11px; color: var(--text-3); }

.vis-grid-wrap { min-width: 0; }
.vis-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line-2);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.vis-toolbar__title {
  font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: baseline; gap: 8px;
}
.vis-toolbar__title small { font-size: 12px; color: var(--text-3); font-weight: 400; }

.vis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.vis-card {
  background: var(--surface);
  border-radius: 16px;
  border: 1.5px solid var(--line-2);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease-ios);
  position: relative;
  display: flex;
  flex-direction: column;
}
.vis-card:hover { box-shadow: var(--shadow-md); }
.vis-card.muted { opacity: 0.45; }
.vis-card__img {
  height: 100px;
  background: linear-gradient(135deg, var(--surface-2), var(--primary-soft));
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.vis-card__img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.vis-card__stop {
  position: absolute; top: 6px; right: 6px;
  font-size: 10px; font-weight: 700;
  color: #fff; background: var(--warn);
  padding: 2px 7px; border-radius: 999px;
}
.vis-card__price {
  padding: 8px 12px 2px;
  font-size: 14px; font-weight: 700;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.vis-card__name {
  padding: 0 12px;
  font-size: 12px; font-weight: 500; color: var(--text);
  line-height: 1.3; min-height: 32px;
}
.vis-card__meta { padding: 2px 12px; font-size: 11px; color: var(--text-3); }
.vis-card__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 10px;
  font-size: 12px; color: var(--text-3);
  margin-top: auto;
}

/* ── LICENSE TIMELINE ───────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding: 8px 0 24px;
}
.timeline__track {
  position: absolute;
  top: 20px; left: 20px; right: 20px;
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
}
.timeline__fill {
  position: absolute;
  top: 20px; left: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  border-radius: 2px;
  transition: width 0.6s var(--ease-ios);
}
.timeline__row {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between;
}
.timeline__step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 60px;
}
.timeline__dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--surface);
  display: grid; place-items: center;
  transition: all 0.3s;
}
.timeline__dot.done    { background: var(--ok); border-color: var(--ok); }
.timeline__dot.current { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline__dot.future  { background: var(--surface-2); border-color: var(--line-2); }
.timeline__step-label { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.3; }
.timeline__step-label.is-current { color: var(--primary-2); font-weight: 600; }
.timeline__step-date { font-size: 11px; color: var(--text-3); text-align: center; }

.license-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.license-tile {
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: 16px;
  border: 1px solid var(--line-2);
}
.license-tile.accent {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}
.license-tile__label {
  font-size: 12px; color: var(--text-3); margin-bottom: 8px;
  .license-tile.accent & { color: rgba(255,255,255,0.7); }
}
.license-tile.accent .license-tile__label { color: rgba(255,255,255,0.7); }
.license-tile__value { font-size: 22px; font-weight: 700; color: var(--text); }
.license-tile.accent .license-tile__value { color: #fff; }
.license-tile__sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.license-tile.accent .license-tile__sub { color: rgba(255,255,255,0.7); }

/* ── QR DESIGNER ────────────────────────────────────────────────────────────── */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.qr-stage {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
.qr-frame {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line-2);
  min-width: 280px;
}
.qr-frame.poster {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
  color: #fff;
}
.qr-frame.tabletop { background: var(--bg-soft); }
.qr-frame__brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 600; color: var(--text); margin: 0;
}
.qr-frame__brand-mini {
  font-size: 12px; color: var(--text-3); font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
}
.qr-frame__cta { font-size: 13px; color: var(--text-2); text-align: center; }
.qr-frame__handle {
  font-size: 12px; color: var(--primary-2);
  font-family: monospace; font-weight: 600;
  padding: 4px 12px; background: var(--primary-soft); border-radius: 999px;
}
.qr-mock { width: 240px; height: 240px; }
.qr-mock__svg { width: 100%; height: 100%; }

.qr-controls {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 22px;
}
.qr-controls section h4 {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin: 0 0 10px;
}
.qr-style-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.qr-style-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 2px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.18s var(--ease-ios);
  font-family: inherit;
}
.qr-style-tile:hover { border-color: var(--accent); }
.qr-style-tile.selected { border-color: var(--primary); background: var(--primary-soft); }
.qr-style-tile__label { font-size: 11px; color: var(--text-2); font-weight: 500; }
.qr-style-tile.selected .qr-style-tile__label { color: var(--primary-2); }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease-spring);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.selected { border-color: var(--text); transform: scale(1.15); }

/* ── AUTH OVERLAY ───────────────────────────────────────────────────────────── */
.auth-root {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(255,248,246,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  transition: opacity 0.4s var(--ease-ios);
}
.auth-root.hidden { opacity: 0; pointer-events: none; }
.auth-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 36px 32px;
  width: 400px; max-width: calc(100vw - 40px);
  box-shadow: 0 24px 60px rgba(218,70,86,0.16), 0 4px 16px rgba(42,26,27,0.08);
  border: 1px solid var(--line);
  position: relative;
}
.auth-back {
  position: absolute; top: 16px; left: 16px;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-2); color: var(--text-2);
  display: grid; place-items: center;
  border: none; cursor: pointer;
  transition: all 0.18s;
}
.auth-back:hover { background: var(--surface-3); color: var(--text); }
.auth-progress {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 24px;
}
.auth-progress span {
  width: 24px; height: 4px; border-radius: 2px;
  background: var(--line-2);
  transition: all 0.3s var(--ease-ios);
}
.auth-progress span.is-active { background: var(--primary); width: 36px; }
.auth-progress span.is-done   { background: var(--ok); }
.auth-logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; font-weight: 600;
  display: grid; place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(233,75,92,0.3);
}
.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px; font-weight: 600; color: var(--text);
  text-align: center; margin: 0 0 6px;
}
.auth-subtitle {
  font-size: 14px; color: var(--text-3);
  text-align: center; margin: 0 0 28px;
  line-height: 1.5;
}
.auth-step { display: flex; flex-direction: column; gap: 12px; }

.auth-field {
  position: relative;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  transition: all 0.2s var(--ease-ios);
}
.auth-field label {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--text-3);
  pointer-events: none;
  transition: all 0.2s var(--ease-ios);
}
.auth-field.is-active label,
.auth-field input:focus ~ label {
  top: 10px; transform: none;
  font-size: 11px; color: var(--primary-2);
}
.auth-field input {
  width: 100%; padding: 24px 16px 10px;
  border: none; outline: none;
  background: transparent;
  font-size: 15px; color: var(--text);
  font-family: inherit;
  border-radius: 14px;
}
.auth-field.is-active { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(233,75,92,0.1); }
.auth-field.is-error  { border-color: var(--err); }
.auth-error-msg { font-size: 12px; color: var(--err); padding: 0 2px; }

.auth-hint-success {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ok); font-weight: 500;
  padding: 10px 14px;
  background: var(--ok-soft);
  border-radius: 10px;
}
.auth-mail-preview {
  border: 1.5px solid var(--line-2); border-radius: 14px;
  overflow: hidden; cursor: pointer;
  transition: border-color 0.2s;
}
.auth-mail-preview:hover { border-color: var(--primary); }
.auth-mail-preview__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.auth-mail-preview__from { font-weight: 600; font-size: 12px; color: var(--text-2); }
.auth-mail-preview__subj { font-size: 11px; color: var(--text-3); }
.auth-mail-preview__demo {
  margin-left: auto;
  font-size: 10px; font-weight: 700;
  color: var(--warn); background: var(--warn-soft);
  padding: 2px 7px; border-radius: 999px;
}
.auth-mail-preview__code {
  font-size: 36px; font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 10px;
  padding: 16px 14px 8px;
  text-align: center;
}
.auth-mail-preview__hint { font-size: 12px; color: var(--text-3); text-align: center; padding: 0 14px 12px; }

.code-row {
  display: flex; gap: 10px; justify-content: center;
}
.code-cell {
  width: 58px; height: 64px;
  border-radius: 14px;
  border: 2px solid var(--line-2);
  background: var(--surface-2);
  font-size: 28px; font-weight: 800;
  text-align: center; font-family: inherit;
  color: var(--text); outline: none;
  caret-color: var(--primary);
  transition: all 0.18s var(--ease-ios);
}
.code-cell:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px rgba(233,75,92,0.1); }
.code-cell.filled { border-color: var(--primary-soft); background: var(--primary-soft); color: var(--primary-2); }
.code-cell.err { border-color: var(--err); animation: shake 0.35s; }
.code-row.is-error .code-cell { border-color: var(--err); }

.code-resend {
  font-size: 13px; color: var(--text-3); text-align: center; margin: 0;
}
.code-resend button {
  color: var(--primary-2); font-weight: 600; font-size: 13px; font-family: inherit;
  background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}

/* ── ANIMATIONS ─────────────────────────────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-4px); }
  40%       { transform: translateX(4px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(2px); }
}
@keyframes checkPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ── ADMIN TOAST ─────────────────────────────────────────────────────────────── */
@keyframes _toastIn {
  0%   { transform: translateY(-14px) scale(0.97); opacity: 0; }
  60%  { transform: translateY(3px)   scale(1.01); }
  100% { transform: translateY(0)     scale(1);    opacity: 1; }
}
.admin-toast {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
  animation: _toastIn 0.4s var(--ease-spring) both;
  pointer-events: none;
  max-width: 360px;
  min-width: 220px;
}
.admin-toast--ok  { background: var(--ok);      color: #fff; }
.admin-toast--err { background: var(--primary);  color: #fff; }

/* ── BUTTON DANGER ───────────────────────────────────────────────────────────── */
.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(233,75,92,0.1);
  color: var(--primary);
  font-size: 15px; font-weight: 600;
  font-family: inherit;
  transition: all 0.2s var(--ease-ios);
  border: 1.5px solid rgba(233,75,92,0.25);
}
.btn-danger:hover  { background: rgba(233,75,92,0.18); border-color: var(--primary); }
.btn-danger:active { transform: scale(0.98); }
.btn-danger:disabled { opacity: 0.5; pointer-events: none; }

/* ── CONFIRM MODAL ───────────────────────────────────────────────────────────── */
@keyframes _confirmIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.admin-confirm-overlay {
  position: fixed; inset: 0; z-index: 1050;
  background: rgba(42,26,27,0.45);
  backdrop-filter: blur(5px);
  display: grid; place-items: center; padding: 24px;
  animation: _overlayIn 0.18s ease;
}
@keyframes _overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.admin-confirm {
  background: var(--surface);
  border-radius: 22px;
  padding: 36px 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(218,70,86,0.14), 0 4px 18px rgba(0,0,0,0.08);
  animation: _confirmIn 0.3s var(--ease-spring);
}
.admin-confirm__icon {
  width: 62px; height: 62px; border-radius: 50%;
  margin: 0 auto 18px;
  display: grid; place-items: center;
}
.admin-confirm__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text); margin: 0 0 8px;
}
.admin-confirm__body {
  font-size: 14px; color: var(--text-2);
  line-height: 1.55; margin: 0 0 6px;
}
.admin-confirm__actions {
  display: flex; gap: 10px; margin-top: 24px;
}
.admin-confirm__actions .btn-ghost,
.admin-confirm__actions .btn-danger,
.admin-confirm__actions .btn-primary {
  flex: 1;
}

/* ── CARD BLOCK HEADER / BODY (Settings page) ────────────────────────────── */
.card-block__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.card-block__body {
  /* no extra padding — card-block already has padding */
}

/* ── TOGGLE ROW (Settings page) ──────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── SAVE BAR (Settings page / VisibilityPage pattern) ──────────────────── */
.save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 14px 24px;
  margin: 0 -24px -24px;
  border-top: 1px solid var(--line-2);
  z-index: 10;
}

/* ── ADMIN TABLE BADGE (Settings page iiko table grid) ───────────────────── */
.admin-table-badge {
  min-width: 46px;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-table-badge.is-selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(233,75,92,0.28);
}
.admin-table-badge:hover:not(.is-selected) {
  border-color: var(--primary);
  color: var(--primary-2);
}
