:root { color: #171717; background: #f5f0ff; font: 1rem/1.5 system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; }
html { scroll-padding-top: 64px; }
header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 5px clamp(16px, 4vw, 24px);
  background: #352043;
  border-bottom: 1px solid rgba(167, 139, 250, .42);
}
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  header {
    background: linear-gradient(105deg, rgba(28, 15, 43, .96), rgba(59, 30, 84, .88));
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-reduced-transparency: reduce) {
  header { background: #352043; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
header img {
  display: block;
  width: 128px;
  max-width: 44%;
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(13, 5, 25, .45));
}
main { width: min(100% - 32px, 660px); margin: 24px auto; padding: 24px; background: white; border-radius: 20px; }
h1 { margin: 0 0 16px; line-height: 1.15; }
label, input { display: block; }
input, button { min-height: 44px; font: inherit; border-radius: 10px; }
input { width: 100%; margin: 4px 0 12px; padding: 8px 12px; border: 1px solid #baa3dc; }
button { padding: 8px 16px; border: 0; color: white; background: var(--action-fill, #6d28d9); cursor: pointer; }
button:disabled { opacity: .6; }
li { margin: 8px 0; }
main > a { display: inline-block; margin-top: 16px; color: #542393; }
:focus-visible { outline: 3px solid #8b5cf6; outline-offset: 3px; }

[hidden]{display:none!important}
body{background:#f5f0ff} main{max-width:850px;width:min(calc(100% - 24px),850px);border:1px solid #e1d9ed}
h1,h2,h3{color:#23162d} h1{font-size:clamp(1.7rem,5vw,2.3rem)} h2{font-size:1.25rem} h3{font-size:1.1rem}
#restaurants,#catalog-list{list-style:none;padding:0} #restaurants li,#catalog-list li{margin:8px 0}
.venue,.product-row{width:100%;display:flex;align-items:center;gap:14px;padding:14px 16px;background:white;border:1px solid #d4c5e5;border-radius:14px;color:#23162d;text-decoration:none;text-align:left}
.venue strong,.product-row span{flex:1}.venue:after{content:"›";color:#6d28d9;font-size:1.5rem}
.product-row img{width:64px;height:58px;object-fit:cover;border-radius:9px}.product-row small{display:block;color:#5a5064}.product-row b{color:#6327ac;white-space:nowrap}
.secondary,.back{background:#f2edf9;color:#572493}.back{display:inline-block;padding:9px 14px;border-radius:9px;text-decoration:none}
.tabs{display:flex;gap:var(--action-gap);margin:18px 0;border-bottom:1px solid #d8cde2;padding-bottom:10px}.tabs a{padding:10px 14px;color:#4b375b;text-decoration:none;border-radius:10px}.tabs a[aria-current=page]{color:white;background:var(--action-fill)}
details{margin:20px 0}summary{cursor:pointer;font-weight:600;padding:10px 0}
textarea,select{display:block;width:100%;font:inherit;border:1px solid #baa3dc;border-radius:10px;padding:8px 12px;margin:4px 0 12px;min-height:44px}
input[type=checkbox]{width:20px;min-height:20px;display:inline-block;vertical-align:middle}
#product-editor{padding:16px;border:1px solid #d4c5e5;border-radius:14px;margin:15px 0}
#product-editor img{width:130px;height:100px;object-fit:cover;border-radius:8px}

#status:empty{display:none}#status{color:#532785}button:active,.venue:active{transform:scale(.985)}@media(prefers-reduced-motion:reduce){button:active,.venue:active{transform:none}}

#account-nav { margin: 0; }
#account-nav summary {
  display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 14px;
  list-style: none; cursor: pointer; color: white; font-weight: 600;
  background: rgba(255,255,255,.07); border: 1px solid rgba(231,218,255,.32); border-radius: 12px;
}
#account-nav summary::-webkit-details-marker { display: none; }
#account-nav summary::before {
  content: ""; width: 16px; height: 12px;
  border-block: 1.5px solid currentColor;
  background: linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat;
}
#account-nav[open] summary { background: rgba(255,255,255,.16); }
.action-group button { font-weight: 600; }
.action-group .secondary { background: #f3eff9; color: #51316f; border: 1px solid #dcd0e9; }
#account-nav nav{position:absolute;z-index:2;right:16px;top:calc(100% - 4px);width:min(260px,90vw);padding:8px;border:1px solid #d4c5e5;background:white;border-radius:14px;box-shadow:0 6px 20px #23162d25}
#account-nav nav a,#account-nav nav button{display:block;width:100%;padding:11px 14px;color:#402162;background:white;font:inherit;text-align:left;text-decoration:none}
#account-nav nav a:hover,#account-nav nav button:hover{background:#f5f0ff}
#users-panel select{width:100%;margin:4px 0 14px;padding:10px;border:1px solid #baa3dc;border-radius:10px;font:inherit}
#pending-users{padding:0;list-style:none}#pending-users li{overflow-wrap:anywhere}#pending-users button{margin:4px 8px}

@media (prefers-reduced-motion: no-preference) {
  @keyframes dashboard-enter {
    from { opacity:.12; transform:translateY(32px) scale(.974); }
    to { opacity:1; transform:none; }
  }
  #dashboard:not([hidden]), #sign-in:not([hidden]), #set-password:not([hidden]), #catalog-panel .tabs + h2, #catalog-panel form, #account-nav[open] nav, #status:not(:empty) { animation:dashboard-enter 440ms cubic-bezier(.18,.78,.22,1); }
  #account-nav[open] nav { transform-origin:top right; }
  #restaurants li, #catalog-list li:nth-child(-n+4) { animation:dashboard-enter 420ms ease-out backwards; }
  #restaurants li:nth-child(2), #catalog-list li:nth-child(2) { animation-delay:65ms; }
  #catalog-list li:nth-child(3) { animation-delay:100ms; }
  #catalog-list li:nth-child(4) { animation-delay:140ms; }
}
