/* ==========================================================================
   owner.css — the back of house. Same brass, more density.
   Loaded after cocktailor.css, which owns the tokens and the slider component
   (owners edit sliders with the very same control the guest uses).
   ========================================================================== */

.owner-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  background: var(--bg);
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.sheetmain { padding: 18px 16px 40px; min-width: 0; }

/* --- flashes ------------------------------------------------------------ */

.flash {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(196,164,106,.3);
  background: rgba(196,164,106,.1);
  color: var(--brass-hot);
  font-size: 14px;
  font-weight: 500;
}
.flash--bad { border-color: rgba(180,35,24,.5); background: rgba(180,35,24,.14); color: #f0a89f; }

/* --- navigation --------------------------------------------------------- */

.rail { display: none; }

.tabs {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hair);
  background: rgba(11,10,9,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs__item {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 9px 2px 8px;
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--ink-faint);
  font-weight: 600;
}
.tabs__item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs__item.is-on { color: var(--brass-hot); }

/* --- page furniture ----------------------------------------------------- */

.page {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.page__title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.page__sub { margin-top: 4px; font-size: 13px; color: var(--ink-faint); }

.panelcard {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 16px;
}
.panelcard + .panelcard { margin-top: 14px; }
.panelcard__title {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 12px;
}

.lock {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(196,164,106,.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(196,164,106,.13), rgba(196,164,106,.05));
}
.lock p { font-size: 13.5px; line-height: 1.45; color: var(--ink-dim); }
.lock a { color: var(--brass-hot); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --- forms -------------------------------------------------------------- */

.field { display: block; margin-bottom: 14px; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-faint);
}
.field__hint { margin-top: 6px; font-size: 12px; color: #6b6154; line-height: 1.4; }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--bg-sink);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brass); background: #0d0b09; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c4a46a' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  cursor: pointer;
}
.switch:last-child { border-bottom: 0; }
.switch__text b { display: block; font-size: 14.5px; font-weight: 600; }
.switch__text small { font-size: 12px; color: var(--ink-faint); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__box {
  flex: none;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: var(--bg-sink);
  border: 1px solid var(--hair);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
  position: relative;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.switch__box::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--steel-face);
  box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform var(--t) var(--ease), background var(--t) var(--ease);
}
.switch input:checked + .switch__box { background: rgba(196,164,106,.22); border-color: var(--brass-deep); }
.switch input:checked + .switch__box::after { transform: translateX(20px); background: var(--brass-face); }

/* --- the owner's copy of the drink list --------------------------------- */

.list { display: flex; flex-direction: column; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg-elev);
  transition: opacity var(--t) var(--ease), border-color var(--t) var(--ease);
}
.row.is-86 { opacity: .45; border-style: dashed; }
.row.is-hidden { opacity: .35; }

.row__shot {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-sink);
  position: relative;
}
.row__shot .shot { min-height: 0; }
.row__shot .shot__stage .glass { width: 74%; height: 82%; }

.row__main { min-width: 0; }
.row__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.row__name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__name .tag { flex: none; }
.row__feel {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-faint);
  text-transform: lowercase;
  font-variant: small-caps;
  letter-spacing: .05em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__price { font-size: 13px; font-weight: 700; color: var(--brass); font-variant-numeric: tabular-nums; }
.row__acts { display: flex; align-items: center; gap: 6px; }

.stat-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--ink-faint);
}
.stat-inline b { color: var(--brass-hot); font-variant-numeric: tabular-nums; }

.tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tag--house  { background: var(--brass-face); color: #241a08; }
.tag--86     { background: rgba(180,35,24,.2); color: #f0a89f; border: 1px solid rgba(180,35,24,.45); }
.tag--hidden { background: rgba(255,255,255,.07); color: var(--ink-faint); }

.iconbtn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 11px;
  background: var(--bg-lift);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn:hover { border-color: var(--brass-deep); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn.is-on { background: rgba(180,35,24,.16); border-color: rgba(180,35,24,.5); }
.iconbtn.is-on svg { stroke: #f0a89f; }
.iconbtn.is-star.is-on { background: rgba(196,164,106,.18); border-color: var(--brass-deep); }
.iconbtn.is-star.is-on svg { stroke: var(--brass-hot); fill: var(--brass); }

/* --- stat tiles --------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.tile {
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg-elev);
}
.tile__n {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--brass-hot);
}
.tile__k {
  margin-top: 6px;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.bars { display: grid; gap: 9px; }
.bar {
  display: grid;
  grid-template-columns: 92px 1fr 38px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.bar__k { color: var(--ink-dim); text-transform: capitalize; }
.bar__t { height: 8px; border-radius: 999px; background: var(--bg-sink); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.7); }
.bar__f { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brass-deep), var(--brass)); }
.bar__n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-faint); }

.spark14 { display: flex; align-items: flex-end; gap: 3px; height: 46px; margin-top: 4px; }
.spark14 i {
  flex: 1;
  min-height: 2px;
  height: var(--h);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--brass), var(--brass-deep));
  opacity: .85;
}

/* --- library ------------------------------------------------------------ */

.searchbar { display: flex; gap: 10px; margin-bottom: 14px; }
.searchbar .input { flex: 1; }

.libgrid { display: grid; gap: 10px; }
.lib {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--bg-elev);
}
.lib__shot { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; position: relative; }
.lib__shot .shot { min-height: 0; }
.lib__name { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.lib__feel { margin-top: 2px; font-size: 11px; color: var(--ink-faint); font-variant: small-caps; text-transform: lowercase; letter-spacing: .05em; }
.lib__have { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--good); font-weight: 700; }

/* --- photo ------------------------------------------------------------- */

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shotpick {
  position: relative;
  border: 2px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-sink);
  cursor: pointer;
}
.shotpick img { width: 100%; height: 100%; object-fit: cover; }
.shotpick.is-on { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(196,164,106,.2); }
.shotpick__tag {
  position: absolute;
  inset: auto 0 0;
  padding: 7px 10px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  background: linear-gradient(180deg, transparent, rgba(7,6,5,.9));
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 26px 18px;
  border: 1.5px dashed var(--hair);
  border-radius: 14px;
  background: var(--bg-sink);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brass); background: rgba(196,164,106,.06); }
.dropzone b { font-size: 14.5px; }
.dropzone small { font-size: 12px; color: var(--ink-faint); }

/* --- QR ----------------------------------------------------------------- */

.qrbox {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: #0b0a09;
}
.qrbox svg { width: min(260px, 70vw); height: auto; }
.qrbox__name { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.qrbox__line { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #6b6154; }

.urlbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--bg-sink);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--brass-hot);
  overflow-x: auto;
  white-space: nowrap;
}

/* --- auth pages --------------------------------------------------------- */

.owner-body--plain {
  display: grid;
  place-items: center;
  padding: 24px 20px calc(40px + env(safe-area-inset-bottom));
}
.authcard {
  width: 100%;
  max-width: 420px;
  padding: 26px 22px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: 0 40px 80px -50px #000;
}
.authcard__mark { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.authcard__mark b { font-family: var(--font-display); font-size: 19px; }
.authcard h1 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.authcard p.lede { font-size: 14px; color: var(--ink-faint); margin-bottom: 20px; line-height: 1.5; }
.authcard .btn { width: 100%; margin-top: 6px; }
.authcard__alt { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--ink-faint); }
.authcard__alt a { color: var(--brass-hot); font-weight: 600; }

/* --- desktop: a rail instead of tabs ------------------------------------ */

@media (min-width: 860px) {
  .owner-body { grid-template-columns: 248px 1fr; padding-bottom: 0; }
  .tabs { display: none; }

  .rail {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 16px;
    border-right: 1px solid var(--hair);
    background: var(--bg-elev);
  }
  .rail__brand { display: flex; align-items: center; gap: 11px; }
  .rail__brand b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
  .rail__brand small {
    font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-deep); font-weight: 700;
  }

  .rail__nav { display: grid; gap: 3px; }
  .rail__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 11px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-dim);
    transition: background var(--t-fast), color var(--t-fast);
  }
  .rail__item svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .rail__item:hover { background: rgba(255,255,255,.04); color: var(--ink); }
  .rail__item.is-on { background: rgba(196,164,106,.13); color: var(--brass-hot); }

  .rail__foot { margin-top: auto; display: grid; gap: 4px; }
  .rail__link {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 12px;
    border: 0;
    background: none;
    font-size: 12.5px;
    color: var(--ink-faint);
    cursor: pointer;
  }
  .rail__link:hover { color: var(--brass); }

  .sheetmain { padding: 30px 34px 60px; max-width: 980px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .libgrid { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(3, 1fr); max-width: 620px; }
}

/* Logo row in settings: what is there now, and a way to drop it. */
.logoedit{ display:flex; align-items:center; gap:14px; margin:0 0 10px; flex-wrap:wrap; }
.logoedit__shot{
  height:48px; width:auto; max-width:220px; object-fit:contain;
  padding:6px 10px; border-radius:8px; background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.10);
}
.logoedit__drop{ display:inline-flex; align-items:center; gap:7px; font-size:.83rem; cursor:pointer; }
