/* ══ правая панель ══ */


/* Coffee panel and menu components are uniquely identified by DOM ids. */
#panel #profileCoffeeSection { padding: var(--loyalty-panel-padding, 14px); }
#profileCoffeeSection .bonus-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 10px; }
#profileCoffeeSection .bonus-eyebrow { color:var(--loyalty-muted, var(--soft)); font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin:0 0 3px; }
#profileCoffeeSection .bonus-heading h3 { color:var(--ink); font:700 14px/1.25 "Golos Text",system-ui,sans-serif; margin:0; }
#profileCoffeeSection .bonus-count { flex:0 0 auto; border:1px solid var(--loyalty-border, var(--line)); border-radius:999px; padding:5px 9px; color:var(--loyalty-accent, var(--flame)); font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; }
#profileCoffeeSection .stamps { grid-template-columns:repeat(5,minmax(0,1fr)); gap:var(--loyalty-stamp-gap, 9px); padding:var(--loyalty-stamp-padding, 16px); border-radius:14px; box-shadow:none; min-width:0; }
#profileCoffeeSection .stamp { min-width:0; width:100%; max-width:48px; justify-self:center; }
#profileCoffeeSection .stamp.n, #profileCoffeeSection .stamp.e { animation:none; border-width:1px; }
#profileCoffeeSection .prog { margin-top:8px; font-size:12px; line-height:1.4; }
#profileCoffeeSection .freeCard { margin-top:8px; padding:10px 12px; gap:8px; border-width:1px; border-radius:12px; box-shadow:none; background:var(--loyalty-card-bg, #fff); min-width:0; }
#profileCoffeeSection .freeCard .fe { font-size:22px; animation:none; flex:0 0 auto; }
#profileCoffeeSection .freeCard > div { min-width:0; overflow-wrap:anywhere; }
#profileCoffeeSection .freeCard b { font:700 13px/1.3 "Golos Text",system-ui,sans-serif; color:var(--loyalty-gift-text, var(--ink)); }
#profileCoffeeSection .freeCard small { display:block; margin-top:2px; font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
#profileCoffeeSection .qrbox { padding:10px; margin-top:8px; border-radius:12px; box-shadow:none; }
#profileCoffeeSection .qrbox .findrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  grid-template-rows: auto;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
#profileCoffeeSection .qrbox .findrow input {
  grid-column: 1;
  grid-row: 1;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  flex: none;
}
#profileCoffeeSection .qrbox .findrow button {
  grid-column: 2;
  grid-row: 1;
  box-sizing: border-box;
  width: 56px;
  min-width: 56px;
  flex: none;
  white-space: nowrap;
}
#profileCoffeeSection .bonus-qr-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:8px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--loyalty-qr-bg, #fff); }
#profileCoffeeSection .bonus-qr-copy { min-width:0; display:grid; gap:2px; }
#profileCoffeeSection .bonus-qr-copy b { font-size:12px; }
#profileCoffeeSection .bonus-qr-copy small { margin:0; font-size:10.5px; line-height:1.3; }
#profileCoffeeSection .bonus-qr-row .demoBtn { width:auto; flex:0 0 auto; margin:0; min-height:40px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; color:var(--loyalty-accent, var(--flame)); font-size:12px; }
#profileCoffeeSection .bonus-qr-canvas { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
#profileCoffeeSection .stats { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
#profileCoffeeSection .stat { min-width:0; padding:9px 3px; border-radius:11px; box-shadow:none; }
#profileCoffeeSection .stat b { font-size:var(--loyalty-profile-stat-size, 19px); }
#profileCoffeeSection .stat span { font-size:9px; letter-spacing:.02em; }
.profile-qr-access { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin-top:8px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; font-size:11px; color:var(--soft); }
.profile-qr-access canvas { display:none; }
.profile-qr-access > span { min-width:0; }
.profile-qr-link { width:100%; color:#fff; font-size:14px; font-weight:800; text-decoration:none; flex:0 0 auto; }
@media(max-width:420px) { #menuView .menu-head { padding-bottom:8px; } #menuView h1 { font-size:clamp(18px,5vw,21px); line-height:1.2; } #profileCoffeeSection .stamps { padding:8px; gap:5px; } #profileCoffeeSection .bonus-qr-row { align-items:center; gap:6px; padding:8px 9px; } #profileCoffeeSection .bonus-qr-row .demoBtn { padding-inline:10px; } }
@media(prefers-reduced-motion:reduce) { #profileCoffeeSection .stamp.n, #profileCoffeeSection .freeCard .fe { animation:none; } }
#menuView .mh-top {   align-items: center;   row-gap: 8px; }
#menuView .mh-top > div:first-child {   display: contents; }
#menuView .mh-top h1 {   flex: 1 1 100%;   margin: 0; }
#menuView .mh-top h2.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#menuView .mh-top .upd { display: none; }
#menuView .mh-top .mh-right {   flex: 1 1 100%;   width: 100%;   max-width: none;   margin: 0; }
#menuView .coffee-menu-search {   min-height: 44px;   padding: 0 12px;   gap: 9px;   border: 1px solid rgba(18, 58, 107, 0.14);   border-radius: 12px;   background: #fff;   box-shadow: none; }
#menuView .coffee-menu-search .search-icon {   width: 17px;   height: 17px;   flex: 0 0 17px;   fill: none;   stroke: #586470;   stroke-width: 1.8;   stroke-linecap: round; }
#menuView .coffee-menu-search input {   font-size: 15px;   font-weight: 500; }
#menuView .coffee-menu-search input::placeholder {   color: #7b8792;   opacity: 1; }
#menuView .coffee-menu-search:focus-within {   border-color: rgba(18, 58, 107, 0.5);   box-shadow: 0 0 0 2px rgba(18, 58, 107, 0.08); }
#menuView .search-shortcut {   display: none; }
@media (max-width: 420px) { #menuView .menu-head { padding-bottom: 8px; } #menuView h1 { font-size: clamp(18px, 5vw, 21px); line-height: 1.2; } }
.panel{
  position: sticky;
  top: 118px;
  max-height: calc(100vh - 140px);
  background: #fffcf5;
  border: 1.5px solid rgba(62, 143, 208, 0.25);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 14px 40px -12px rgba(18, 58, 107, 0.18);
}
.tabs{
  display: flex;
  gap: 6px;
  padding: 12px 12px 0;
}
.tabs button{
  flex: 1;
  padding: 9px 4px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--soft);
  transition: 0.2s;
}
.tabs button:hover{
  background: #edf2f6;
}
.tabs button.on{
  background: var(--tab-on-bg, #123a6b);
  color: var(--tab-on-color, #ffffff);
  border: var(--tab-on-border, none);
  box-shadow: var(--tab-on-shadow, 0 4px 12px rgba(18, 58, 107, 0.25));
  border-radius: 12px;
  transform: var(--tab-on-transform, none);
}
.tabs .btn-back{
  flex: 0 0 auto;
  padding: 9px 12px;
  color: var(--flame);
  font-weight: 800;
}
@media (min-width: 1181px){.tabs .btn-back{
    display: none;
  }



}
.pv{
  overflow-y: auto;
  padding: 14px;
  flex: 1;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.pv::-webkit-scrollbar{
  width: 6px;
}
.pv::-webkit-scrollbar-thumb{
  background: #c9d3dc;
  border-radius: 3px;
}
.pv h4{
  font: 700 12px "Unbounded", "Golos Text", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b98a5;
  margin: 14px 2px 9px;
}
.pv h4:first-child{
  margin-top: 2px;
}
.stamps{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.stamp svg,
.cdot svg{
  width: 72%;
  height: 72%;
  display: block;
}
.stamp{
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  transition: 0.3s;
}
#profileCoffeeSection .stamp.f{
  background: #ffffff;
  border: 1.5px solid rgba(107, 74, 47, 0.18);
  border-radius: 50%;
  color: #6b4a2f;
  box-shadow: 0 2px 6px rgba(107, 74, 47, 0.08);
}
.stamp.n{
  border: 2px dashed var(--amber);
  animation: nextp 1.6s infinite;
}
@keyframes nextp{
  50% {
    box-shadow: 0 0 0 5px rgba(200, 155, 106, 0.25);
  }
}
#profileCoffeeSection .stamp.e{
  border: 1.5px dashed rgba(62, 143, 208, 0.35);
  background: transparent;
}
.prog{
  margin-top: 11px;
  font-size: 13.5px;
  color: var(--soft);
}
.prog b{
  color: var(--ink);
}
#profileCoffeeSection .freeCard{
  margin-top: 12px;
  background: linear-gradient(120deg, #f5e5c9, #e6cfa8);
  border: 2px solid var(--amber);
  border-radius: 18px;
  padding: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(194, 147, 95, 0.35);
}
.freeCard .fe{
  font-size: 30px;
  animation: sway 2.6s infinite;
}
@keyframes sway{

  0%,
  100% {
    transform: rotate(-6deg);
  }

  50% {
    transform: rotate(6deg);
  }
}
#profileCoffeeSection .freeCard b{
  display: block;
  font: 700 14px "Unbounded", "Golos Text", sans-serif;
  color: #4a3100;
}
.freeCard small{
  color: #6b4e0e;
  font-size: 11.5px;
}
#profileCoffeeSection .freeCard button{
  margin-left: auto;
  background: #4a3100;
  color: #f5e5c9;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 800;
  transition: 0.2s;
}
.freeCard button:hover{
  transform: scale(1.05);
}
.demoBtn {
  width: 100%;
  margin-top: 12px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--soft);
  transition: 0.2s;
  background: #fff;
}
.demoBtn:hover{
  border-color: var(--flame);
  color: var(--flame);
}
.qrbox{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  margin-top: 12px;
}
.qrbox canvas{
  image-rendering: pixelated;
  border-radius: 8px;
}
.qrbox small{
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--soft);
}
.authPrompt{
  background: linear-gradient(135deg, #eaf1f9, #d8e6f4);
  border: 1px dashed #7fb2d9;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  animation: rise 0.4s both;
}
.authPrompt .ap{
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
}
.authPrompt b{
  font: 700 14.5px "Unbounded", "Golos Text", sans-serif;
  color: #163b6b;
  display: block;
  margin-bottom: 6px;
}
.authPrompt p{
  font-size: 12.5px;
  color: #33507a;
  margin-bottom: 12px;
}
.authPrompt button{
  background: #163b6b;
  color: #eaf1f9;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  transition: 0.2s;
}
.authPrompt button:hover{
  transform: scale(1.04);
}
.profile-identity { margin-bottom: 6px; }
.phead {
  display: flex;
  gap: 12px;
  align-items: center;
}
.phead .ava {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  font-size: 19px;
  border: none;
}
.profile-identity-copy {
  flex: 1;
  min-width: 0;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.phead input#nameInput {
  min-width: 0;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: 700 18px/1.25 "Golos Text";
  padding: 5px 7px;
  transition: 0.2s;
}
.phead input#nameInput[readonly] {
  border-color: transparent;
  cursor: default;
}
.phead input#nameInput:not([readonly]) {
  border-color: var(--line);
  background: #fff;
}
.phead input#nameInput:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 2px;
}
.profile-name-action {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  color: var(--soft);
  background: #fff;
  font-size: 11.5px;
  font-weight: 800;
}
.profile-name-action.is-primary { color: var(--flame); }
.profile-name-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}
.phead .ph {
  font-size: 13px;
  color: #5b6874;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.profile-role {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-size: 10.5px;
  line-height: 1.35;
  font-weight: 800;
}
.profile-brand-section { margin-top: 8px; }
.profile-section-heading,
.profile-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.profile-section-heading {
  flex-wrap: wrap;
}
.profile-section-heading h4 {
  flex: 1 1 120px;
  min-width: 0;
}
.profile-section-heading h4,
.profile-history-heading h4 { margin: 0; }
.profile-all-orders {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--flame);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  white-space: normal;
  text-align: center;
}
#profileOrdersSection .profile-section-heading #myOrdersBtn {
  width: auto;
  margin: 0;
}
.profile-history-section { margin-top: 10px; }
.profile-history-count {
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
}
.profile-history-toggle {
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--soft);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.profile-name-action:focus-visible,
.profile-all-orders:focus-visible,
.profile-history-toggle:focus-visible,
.tabs button:focus-visible {
  outline: 2px solid var(--flame);
  outline-offset: 2px;
}
.stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.stats .stat{
  background: #ffffff;
  border: 1px solid rgba(62, 143, 208, 0.2);
  border-radius: 14px;
  padding: 11px 6px;
  text-align: center;
  transition: 0.2s;
}
.stat:hover{
  transform: translateY(-2px);
  box-shadow: var(--sh);
}
.stat b{
  font: 900 19px "Unbounded", "Golos Text", sans-serif;
  color: #123a6b;
}
.stat span{
  display: block;
  font-size: 10.5px;
  color: var(--soft);
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hmini{
  font-size: 11.5px;
  color: var(--soft);
  padding: 6px 2px;
  border-bottom: 1px dashed var(--line);
  animation: rise 0.3s both;
}
.hmini b{
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hmini i{
  font-style: normal;
  opacity: 0.75;
}


/* Компактная компоновка профиля и мобильные действия. */
#pvProfile { padding: 10px 12px; }
.profile-name-edit-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 5px; }
.profile-name-edit-icon svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 380px) {
  .phead { gap: 8px; }
  .phead .ava { width: 44px; height: 44px; flex-basis: 44px; }
  .phead .gear { width: 36px; height: 36px; flex: 0 0 36px; }
  .profile-section-heading { align-items: stretch; }
  #profileOrdersSection .profile-section-heading #myOrdersBtn { width: 100%; }
  .profile-name-actions .profile-name-action { padding: 6px 7px; font-size: 10.5px; }
}


/* ── Профиль: единая сетка секций и согласованные действия ── */
#profileBox:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#profileBox > * {
  min-width: 0;
}
#profileBox > .profile-identity,
#profileBox > .profile-brand-section,
#profileBox > .placebox,
#profileBox > #fridayInfo,
#profileBox > .profile-history-section {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
#profileBox .stats {
  margin-top: 0;
}
#profileBox .profile-main-qr,
#profileBox .qrbox {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 14px;
}
#profileBox .profile-main-qr canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}
#profileBox .demoBtn {
  margin: 10px 0 0;
  border-style: solid;
  border-color: var(--line);
  background: #fff;
}
#profileBox > #pushBtn {
  margin: 0;
  padding: 10px 12px;
  border-style: solid;
  border-color: var(--line);
  background: #fff;
}
#settingsModal .settings-staff-section:not([hidden]) {
  display: grid;
  gap: 8px;
}
#settingsModal .settings-staff-section[hidden] {
  display: none;
}
#settingsModal .settings-staff-section #activateBtn {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
#settingsModal .settings-staff-section #activateBtn.staff-access-link {
  width: max-content;
  min-height: 32px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--soft);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#settingsModal .settings-staff-section #activateBtn.staff-access-link:hover {
  background: transparent;
  color: var(--ink);
}
#profileBox .profile-section-heading {
  align-items: center;
  margin-bottom: 10px;
}
#profileBox .profile-section-heading h4 {
  margin: 0;
}
#profileBox .profile-section-heading #myOrdersBtn {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
#profileBox .myOrderCard {
  margin-top: 0;
}
#profileBox #myOrders {
  min-height: 64px;
}
#profileBox > #fridayInfo {
  line-height: 1.55;
  border-color: rgba(62, 143, 208, 0.28);
  background: var(--tint-cool);
}
#profileBox .profile-history-heading {
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
#profileBox .profile-history-heading h4 {
  margin: 0;
}
#profileBox .profile-history-count {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--tint-cool);
  color: var(--soft);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
#profileBox .profile-history-count:empty {
  display: none;
}
#profileBox #histList .hmini {
  padding: 9px 2px;
  line-height: 1.4;
}
#profileBox #histList .hmini:last-child {
  border-bottom: 0;
}
#profileBox .profile-history-toggle {
  margin-top: 8px;
  padding: 7px 10px;
}
#profileBox > .placebox {
  line-height: 1.55;
}
#profileBox > .placebox b {
  margin-bottom: 4px;
}
@media (max-width: 380px) {
  #profileBox .profile-section-heading {
    align-items: stretch;
  }
  #profileBox .profile-section-heading #myOrdersBtn {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stamp {
    transition: none;
  }

  .stamp.n,
  .freeCard .fe,
  .hmini {
    animation: none;
  }

  .stats .stat {
    transition: none;
  }

  .stats .stat:hover {
    transform: none;
  }
}
