/* Admin layout (shell.js): sidebar on computers, top bar + bottom bar on phones, pages instead of pop-ups. */
:root { --side: 248px; --side-mini: 76px; --tabbar: 64px; }

/* Logged in: the sidebar replaces the old top header */
.admin:has(#dash:not([hidden])) { padding: 0; max-width: none; }
body:has(#dash:not([hidden])) > .header { display: none; }

#dash:not([hidden]) { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
#dash.lz-mini { grid-template-columns: var(--side-mini) minmax(0, 1fr); }
.lz-body { min-width: 0; }
.lz-content { padding: 40px clamp(20px, 3.5vw, 56px) 120px; max-width: 1280px; }
.lz-h1 { font: 300 clamp(32px, 3.4vw, 46px)/1.1 var(--serif); }

/* ── Sidebar ── */
.lz-side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; display: flex; flex-direction: column; gap: 12px; padding: 18px 12px 14px; background: #0b0a09; border-right: 1px solid var(--line); }
.lz-brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 14px; border-bottom: 1px solid var(--line); }
.lz-brand img { flex: none; width: 44px; height: auto; }
.lz-brand b { display: block; font: 400 18px/1.15 var(--serif); letter-spacing: .03em; }
.lz-brand small { display: block; margin-top: 5px; font: 400 9px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.lz-side::-webkit-scrollbar { display: none; }
.lz-nav { display: grid; gap: 1px; }
.lz-group { margin: 12px 12px 4px; font: 400 10px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #7d746a; }
.lz-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border-radius: 8px; color: var(--muted); font: 400 14px/1.2 var(--sans); letter-spacing: .02em; text-align: left; transition: background .15s, color .15s; }
.lz-item svg { flex: none; }
.lz-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lz-item:hover { background: #171512; color: var(--text); }
.lz-item.on { background: #1d1a15; color: var(--gold); }
.lz-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.lz-item:focus-visible, .lz-tab:focus-visible, .lz-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lz-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #0e0d0c; font: 500 11px/20px var(--sans); text-align: center; font-style: normal; }
.lz-badge[hidden] { display: none; }
.lz-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Collapsed: icons only, the name shows on hover */
#dash.lz-mini .lz-side { padding-inline: 10px; }
#dash.lz-mini .lz-brand { justify-content: center; padding-inline: 0; }
#dash.lz-mini .lz-brand span, #dash.lz-mini .lz-item span, #dash.lz-mini .lz-group { display: none; }
#dash.lz-mini .lz-group + .lz-item { margin-top: 12px; }
#dash.lz-mini .lz-item { justify-content: center; padding: 11px 0; }
#dash.lz-mini .lz-badge { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
#dash.lz-mini .lz-item.on::before { left: -10px; }

/* ── Phone top bar and bottom bar (hidden on computers) ── */
.lz-top, .lz-bottom { display: none; }

/* ── Pages that replace pop-ups ── */
.lz-panels { display: block; }
body.lz-screen-open .lz-panels { display: none; }
.lz-screen.narrow > * { max-width: 640px; }
.lz-screen-head { display: grid; gap: 8px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.lz-screen-head .h2 { font-size: clamp(30px, 3.6vw, 42px); }
.lz-back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: -6px 0 8px -8px; padding: 6px 12px 6px 6px; border-radius: 8px; color: var(--muted); font: 400 14px/1 var(--sans); letter-spacing: .02em; }
.lz-back:hover { color: var(--gold); background: #171512; }
.lz-screen .s-small { display: grid; gap: 4px; }
.lz-screen .s-small .hero-actions, .lz-screen form .hero-actions { margin-top: 18px; }

/* Booking editor as a page: form on the left, money summary on the right, Save bar at the bottom of the screen */
.lz-screen .s-ed { padding: 0; }
.lz-screen .s-ed-head { position: static; display: grid; gap: 4px; justify-content: stretch; background: none; padding: 0 0 18px; }
.lz-screen .s-ed-head .lz-back { margin-bottom: 4px; }
.lz-screen .s-ed-foot { background: #0e0d0cf2; backdrop-filter: blur(8px); margin-top: 12px; }
.lz-screen .s-sum { top: 24px; background: var(--surface); }

/* More (phones) */
.lz-more { display: grid; gap: 2px; margin-top: 24px; max-width: 520px; }
.lz-more .lz-item { padding: 14px 12px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }

@media (max-width: 899px) {
  #dash:not([hidden]), #dash.lz-mini { display: block; }
  .lz-side { display: none; }
  .lz-content { padding: 22px 16px calc(var(--tabbar) + 48px + env(safe-area-inset-bottom)); }

  .lz-top { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: #0e0d0cf0; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .lz-top img { width: 36px; height: auto; }
  .lz-top b { font: 400 20px/1 var(--serif); letter-spacing: .02em; }

  .lz-bottom { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0; z-index: 60; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #0b0a09f5; backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .lz-tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; color: var(--muted); font: 400 11px/1 var(--sans); letter-spacing: .02em; }
  .lz-tab.on { color: var(--gold); }
  .lz-tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lz-tab .lz-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }

  /* A page over a list: no bottom bar, so the Save bar can sit at the very bottom */
  body.lz-screen-open .lz-bottom { display: none; }
  body.lz-screen-open .lz-content { padding-bottom: 48px; }
  .lz-screen-head { margin-bottom: 20px; padding-bottom: 16px; }
  .lz-h1 { font-size: 32px; }
  .s-top .lz-h1 { display: none; }   /* the top bar already says where you are */
  .s-top { justify-content: flex-end; margin-bottom: 18px; }
  .s-top .btn { flex: 1; justify-content: center; }

  .a-toast { bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); }
  body.lz-screen-open .a-toast { bottom: 90px; }
  .w-savebar { bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); }
}

/* Messages ("Saved") never block a tap on what's under them; on a page they sit above the Save bar */
.a-toast { pointer-events: none; }
@media (min-width: 900px) { body.lz-screen-open .a-toast { bottom: 96px; } }
