/* ==========================================================================
   SHIKS FURNITURE PALACE — admin.css
   --------------------------------------------------------------------------
   Styles for the "ghost mode" admin overlay ONLY. Nothing in here is visible
   to a visitor: every rule is scoped behind body.is-admin or the .admin-ui
   shell that js/admin.js injects after a successful sign-in.
   It reuses the site's design tokens (css/style.css §1) so the overlay feels
   like part of the same brand.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
.admin-ui {
  --admin-z-bar: 305;   /* above the scrim, so the bar keeps working */
  --admin-z-scrim: 300;
  --admin-z-panel: 320;
  --admin-z-drawer: 310;
  --admin-z-login: 345;
  --admin-z-confirm: 360;
  --danger: #B23A2E;
  --danger-soft: #FBEDEA;
}

/* keep the site's toasts above the overlay while editing */
body.is-admin .toast-stack { z-index: 400; }
body.admin-no-scroll { overflow: hidden; }

/* a quiet gold dot on the logo: "you are editing" */
body.is-admin .site-header .brand { position: relative; }
body.is-admin .site-header .brand::after {
  content: '';
  position: absolute;
  top: 2px;
  right: -6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 133, 64, .22);
}

/* ==========================================================================
   1. INLINE TOOLBARS — floating on the real cards
   ========================================================================== */
/* The toolbars hang off the block itself. .card, .service-card and .hero__slide
   are already positioned by style.css — only the services.html blocks need help.
   (A blanket rule here would flatten .hero__slide's position:absolute and break
   the slideshow, so it is deliberately narrow.) */
body.is-admin .service-block.admin-editable { position: relative; }

.admin-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 100px;
  background: rgba(20, 17, 14, .82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  pointer-events: none;
}
.admin-editable:hover > .admin-tools,
.admin-editable:focus-within > .admin-tools,
.admin-tools:hover,
.admin-tools:focus-within { opacity: 1; transform: none; pointer-events: auto; }

/* touch devices have no hover — always show the tools */
@media (hover: none) {
  .admin-tools { opacity: 1; transform: none; pointer-events: auto; }
}

.admin-tools__tag {
  padding: 0 8px 0 4px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) { .admin-tools__tag { display: none; } }

.admin-tool {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.admin-tool svg { width: 15px; height: 15px; }
.admin-tool:hover { background: var(--gold); color: #fff; transform: translateY(-1px); }
.admin-tool.is-off { color: #FFD9A8; background: rgba(176, 133, 64, .35); }
.admin-tool--danger:hover { background: var(--danger); }

/* the slideshow toolbar only makes sense on the slide that is on screen */
.hero__slide .admin-tools { top: 12px; right: 12px; }
.hero__slide:not(.is-active) .admin-tools { display: none; }
.hero__frame:hover .hero__slide.is-active .admin-tools { opacity: 1; transform: none; }

/* service blocks: put the tools over the photo, not the text */
.service-block > .admin-tools { top: clamp(2.2rem, 5vw, 4rem); right: 0; }
.service-block .admin-tools { background: rgba(20, 17, 14, .9); }

/* hidden (draft) items stay visible to the admin, clearly marked */
body.is-admin .admin-hidden-item {
  opacity: .55;
  outline: 2px dashed rgba(176, 133, 64, .65);
  outline-offset: -2px;
}
body.is-admin .admin-hidden-item:hover { opacity: .85; }

/* ==========================================================================
   2. "+" TILES — create something new, right where it will appear
   ========================================================================== */
.admin-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 260px;
  padding: 2rem 1.4rem;
  border: 2px dashed rgba(176, 133, 64, .45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .5);
  color: var(--muted);
  text-align: center;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.admin-add:hover {
  border-color: var(--gold);
  background: #fff;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}
.admin-add svg { width: 26px; height: 26px; color: var(--gold); }
.admin-add span {
  font-family: var(--f-display);
  font-size: 1.08rem;
  color: var(--ink);
}
.admin-add small { font-size: .74rem; line-height: 1.5; max-width: 26ch; }
.admin-add--wide { min-height: 0; padding: 1.6rem; margin-top: clamp(2.2rem, 5vw, 4rem); }

/* the slideshow "+" sits with the prev/next arrows */

/* ==========================================================================
   3. THE ADMIN BAR — pinned to the very top, never over the content
   --------------------------------------------------------------------------
   The page is pushed down by exactly the height of the bar (body.has-admin-bar
   gets --admin-bar-h, measured by js/admin.js), so nothing is ever covered.
   It holds who is signed in, the connection status, Slideshow, Categories and
   Sign out — and nothing else.
   ========================================================================== */
.admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--admin-z-bar);
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 14px 34px -26px rgba(0, 0, 0, .9);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s var(--ease-out), opacity .3s var(--ease), visibility .3s;
}
.admin-bar.is-open { transform: none; opacity: 1; visibility: visible; }

.admin-bar__inner {
  display: flex;
  align-items: center;
  gap: .4rem .9rem;
  flex-wrap: wrap;
  max-width: 1560px;
  margin: 0 auto;
  padding: .42rem clamp(.75rem, 2vw, 1.5rem);
  font-size: .78rem;
  line-height: 1.4;
}
.admin-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.admin-bar__brand svg { width: 15px; height: 15px; }
.admin-bar__brand b { font-weight: 700; }
.admin-bar__who {
  font-weight: 600;
  color: #fff;
  max-width: 20ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-bar__status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  flex: 1 1 260px;
  min-width: 0;
  color: rgba(255, 255, 255, .74);
  font-size: .74rem;
}
.admin-bar__status b { color: #fff; font-weight: 700; }
.admin-bar__status svg { width: 15px; height: 15px; flex: none; color: var(--gold-soft); }
.admin-bar__status--warn svg { color: #F2B368; }
.admin-bar__status code {
  padding: .05rem .3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  font-size: .7rem;
  white-space: nowrap;
}
.admin-bar__actions { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; }
.admin-bar .admin-chip {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
  padding: .38rem .7rem;
  font-size: .74rem;
}
.admin-bar .admin-chip svg { color: var(--gold-soft); }
.admin-bar .admin-chip:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.admin-bar .admin-chip--danger:hover { background: var(--danger); border-color: var(--danger); }

/* the page never loses a pixel of content to the bar */
body.has-admin-bar { padding-top: var(--admin-bar-h, 0px); }
body.has-admin-bar .site-header { top: var(--admin-bar-h, 0px); }
body.has-admin-bar .scroll-progress { top: var(--admin-bar-h, 0px); }

/* ==========================================================================
   4. SHARED OVERLAY BITS
   ========================================================================== */
.admin-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--admin-z-scrim);
  background: rgba(12, 10, 8, .58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.admin-scrim.is-open { opacity: 1; visibility: visible; }

.admin-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.admin-eyebrow svg { width: 13px; height: 13px; }

.admin-x {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.admin-x svg { width: 16px; height: 16px; }
.admin-x:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

.admin-error {
  margin: .7rem 0 0;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--danger);
  min-height: 0;
}
.admin-error:empty { display: none; }
.admin-error--foot { margin: 0; padding: 0 1.3rem; }
.admin-error--foot:empty { padding: 0; }

.btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--danger:hover { --btn-bg: #93291F; --btn-bd: #93291F; }

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .85rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.admin-chip svg { width: 15px; height: 15px; color: var(--gold-deep); }
.admin-chip:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.admin-chip:hover svg { color: var(--gold-soft); }
.admin-chip--danger:hover { background: var(--danger); border-color: var(--danger); }
.admin-chip--danger:hover svg { color: #fff; }

.admin-icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
}
.admin-icon-btn svg { width: 14px; height: 14px; }
.admin-icon-btn:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ==========================================================================
   5. SIGN-IN PANEL (ghost mode)
   ========================================================================== */
.admin-login {
  position: fixed;
  inset: 0;
  z-index: var(--admin-z-login);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.admin-login.is-open { opacity: 1; visibility: visible; }

.admin-login__panel {
  position: relative;
  width: min(430px, 100%);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  transform: translateY(14px) scale(.98);
  transition: transform .4s var(--ease-out);
}
.admin-login.is-open .admin-login__panel { transform: none; }
.admin-login__panel .admin-x { position: absolute; top: 1rem; right: 1rem; }
.admin-login__panel h3 {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.4vw, 1.95rem);
  margin: .5rem 0 .45rem;
}
.admin-login__lead { font-size: .86rem; color: var(--muted); line-height: 1.6; }
.admin-login__form { margin-top: 1.3rem; display: grid; gap: .95rem; }
.admin-login__form .btn { margin-top: .25rem; }
.admin-login__foot {
  margin-top: 1.1rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  line-height: 1.55;
  color: var(--muted);
}

.admin-pw { position: relative; display: block; }
.admin-pw input { padding-right: 3rem !important; }
.admin-pw__eye {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
}
.admin-pw__eye svg { width: 16px; height: 16px; }
.admin-pw__eye:hover { background: var(--sand); color: var(--ink); }

/* ==========================================================================
   6. EDITOR DRAWER
   ========================================================================== */
.admin-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--admin-z-drawer);
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 70px -40px rgba(20, 17, 14, .6);
  transform: translateX(103%);
  transition: transform .45s var(--ease-out);
}
.admin-drawer.is-open { transform: none; }

.admin-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.admin-drawer__head h3 { font-family: var(--f-display); font-size: 1.3rem; margin-top: .2rem; }
.admin-drawer__body { flex: 1; overflow-y: auto; padding: 1.2rem 1.3rem 1.4rem; }
.admin-drawer__foot {
  display: flex;
  gap: .6rem;
  padding: 1rem 1.3rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--white);
}
.admin-drawer__foot .btn { flex: 1; padding-inline: 1rem; }
.admin-drawer__foot .btn--danger { flex: 0 0 auto; }
.admin-drawer__foot .btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---- fieldsets ---------------------------------------------------------- */
.admin-group {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.admin-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.admin-group legend {
  padding: 0;
  margin-bottom: .9rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.admin-field { display: block; margin-bottom: 1rem; }
.admin-field > label {
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-field > label em { color: var(--danger); font-style: normal; }
.admin-field > small {
  display: block;
  margin-top: .35rem;
  font-size: .72rem;
  line-height: 1.5;
  color: var(--muted);
}
.admin-field input[type="text"],
.admin-field input[type="number"],
.admin-field input[type="url"],
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.admin-field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(176, 133, 64, .12);
}
.admin-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6257' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

/* ---- toggle ------------------------------------------------------------- */
.admin-field--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.admin-field--toggle b { display: block; font-size: .86rem; }
.admin-field--toggle small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.45; }
.admin-switch { position: relative; flex: none; width: 46px; height: 26px; }
.admin-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.admin-switch i {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: var(--sand);
  transition: background .25s var(--ease);
}
.admin-switch i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 17, 14, .3);
  transition: transform .25s var(--ease-out);
}
.admin-switch input:checked + i { background: var(--wa); }
.admin-switch input:checked + i::after { transform: translateX(20px); }
.admin-switch input:focus-visible + i { outline: 2px solid var(--gold-deep); outline-offset: 3px; }

/* ---- photo dropzone ----------------------------------------------------- */
.admin-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 176px;
  border: 2px dashed rgba(176, 133, 64, .45);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.admin-drop:hover, .admin-drop.is-over { border-color: var(--gold); background: #FFFCF6; }
.admin-drop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-drop img.is-empty { display: none; }
.admin-drop__cta {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: .3rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
.admin-drop__cta svg { width: 22px; height: 22px; color: var(--gold); }
.admin-drop__cta b { font-family: var(--f-display); font-size: 1rem; color: var(--ink); }
.admin-drop__cta small { font-size: .72rem; line-height: 1.45; max-width: 30ch; }
.admin-drop.has-photo .admin-drop__cta {
  background: rgba(20, 17, 14, .72);
  color: #fff;
  border-radius: 100px;
  padding: .5rem 1rem;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.admin-drop.has-photo .admin-drop__cta small { display: none; }
.admin-drop.has-photo .admin-drop__cta b { color: #fff; font-family: var(--f-body); font-size: .8rem; }
.admin-drop.has-photo .admin-drop__cta svg { display: none; }
.admin-drop.has-photo:hover .admin-drop__cta { opacity: 1; }
.admin-drop.is-busy { pointer-events: none; }
.admin-drop.is-busy .admin-drop__cta { opacity: 0; }
.admin-drop__busy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  place-items: center;
  background: rgba(251, 248, 243, .9);
  font-size: .8rem;
  font-weight: 600;
  color: var(--gold-deep);
}
.admin-drop.is-busy .admin-drop__busy { display: grid; }

.admin-urlrow { display: flex; gap: .5rem; margin-top: .55rem; }
.admin-urlrow input { flex: 1; min-width: 0; }
.admin-urlrow .admin-chip { flex: none; }

/* ---- highlight pairs ---------------------------------------------------- */
.admin-pairs { display: grid; gap: .5rem; margin-bottom: .55rem; }
.admin-pair { display: flex; gap: .45rem; align-items: center; }
.admin-pair input { flex: 1; min-width: 0; }
.admin-pairs:empty { display: none; }

/* ==========================================================================
   7. CONFIRM DIALOG
   ========================================================================== */
.admin-confirm {
  position: fixed;
  inset: 0;
  z-index: var(--admin-z-confirm);
  display: grid;
  place-items: center;
  padding: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.admin-confirm.is-open { opacity: 1; visibility: visible; }
.admin-confirm__panel {
  width: min(400px, 100%);
  padding: clamp(1.4rem, 4vw, 1.9rem);
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  transform: translateY(12px) scale(.98);
  transition: transform .35s var(--ease-out);
}
.admin-confirm.is-open .admin-confirm__panel { transform: none; }
.admin-confirm__panel h3 { font-family: var(--f-display); font-size: 1.35rem; margin-bottom: .5rem; }
.admin-confirm__panel p { font-size: .88rem; color: var(--muted); line-height: 1.6; }
.admin-confirm__btns { display: flex; gap: .6rem; margin-top: 1.4rem; }
.admin-confirm__btns .btn { flex: 1; }

/* ==========================================================================
   8. RESPONSIVE
   ========================================================================== */
@media (max-width: 700px) {
  .admin-drawer { width: 100vw; }
  .admin-bar__inner { padding: .4rem .7rem; }
  .admin-bar__who { max-width: 14ch; }
  .admin-bar__status { flex-basis: 100%; order: 3; font-size: .72rem; }
  .admin-bar__actions { margin-left: auto; }
  .admin-bar__actions .admin-chip { padding: .36rem .55rem; font-size: .7rem; }
  .admin-tools { top: 8px; right: 8px; padding: 4px 5px; gap: 3px; }
  .admin-tool { width: 28px; height: 28px; }
  .admin-tool svg { width: 14px; height: 14px; }
  .admin-add { min-height: 200px; }
  .service-block > .admin-tools { top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-tools, .admin-bar, .admin-login__panel, .admin-confirm__panel, .admin-drawer, .admin-modal__panel {
    transition-duration: .01ms;
  }
}

/* ==========================================================================
   9. PANELS — homepage slideshow picker and the categories editor
   ========================================================================== */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: var(--admin-z-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(.75rem, 3vw, 2rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.admin-modal.is-open { opacity: 1; visibility: visible; }

.admin-modal__panel {
  width: min(700px, 100%);
  max-height: min(88vh, 780px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-l);
  transform: translateY(16px) scale(.98);
  transition: transform .35s var(--ease-out);
}
.admin-modal.is-open .admin-modal__panel { transform: none; }

.admin-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem .85rem;
  border-bottom: 1px solid var(--line);
}
.admin-modal__head h3 { font-family: var(--f-display); font-size: 1.35rem; margin-top: .2rem; }
.admin-modal__lead {
  margin: 0;
  padding: .85rem 1.3rem 0;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--muted);
}
.admin-modal__body { flex: 1; overflow-y: auto; padding: .9rem 1.15rem 1rem; }
.admin-modal__status {
  margin: 0;
  padding: .8rem 1.3rem 1.05rem;
  font-size: .74rem;
  line-height: 1.55;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.admin-modal__status i { font-style: italic; }
/* slideshow panel: the status line sits directly above the Save footer, so
   the double border-top (status + foot) is dropped */
[data-admin-slides] .admin-modal__status { border-top: 0; padding-bottom: .3rem; }
.admin-slides__foot { align-items: center; }
.admin-slides__count {
  flex: 1;
  min-width: 0;
  font-size: .78rem;
  color: var(--muted);
}
.admin-modal__foot {
  display: flex;
  gap: .6rem;
  padding: .85rem 1.3rem calc(.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: var(--cream);
}
.admin-modal__foot input {
  flex: 1;
  min-width: 0;
  padding: .62rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  font-size: .84rem;
  color: var(--ink);
}
.admin-modal__foot input:focus { outline: 2px solid var(--gold-deep); outline-offset: 1px; }
.admin-empty { padding: 1.6rem 0; text-align: center; font-size: .85rem; color: var(--muted); }

/* ---- tabs -------------------------------------------------------------- */
.admin-tabs { display: flex; gap: .35rem; padding: .85rem 1.3rem 0; flex-wrap: wrap; }
.admin-tab {
  padding: .42rem .85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  font-size: .74rem;
  font-weight: 600;
  color: var(--muted);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.admin-tab:hover { border-color: var(--gold-soft); color: var(--ink); }
.admin-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- slideshow rows ---------------------------------------------------- */
.admin-slide {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .5rem .55rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.admin-slide + .admin-slide { margin-top: .25rem; }
.admin-slide:hover { background: var(--cream); }
.admin-slide.is-on { border-color: var(--gold-soft); background: #FDF8EF; }
.admin-slide.is-draft { opacity: .55; }
.admin-slide input { width: 18px; height: 18px; flex: none; accent-color: var(--gold-deep); }
.admin-slide__thumb {
  width: 64px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cream-2);
}
.admin-slide__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-slide__thumb i { display: grid; place-items: center; }
.admin-slide__thumb i svg { width: 18px; height: 18px; color: var(--muted); }
.admin-slide__text { min-width: 0; }
.admin-slide__text b { display: block; font-size: .85rem; line-height: 1.35; }
.admin-slide__text small { display: block; font-size: .72rem; color: var(--muted); }
.admin-slide-warn { display: inline-flex; align-items: center; gap: .45rem; color: #7A4B12; }
.admin-slide-warn svg { width: 15px; height: 15px; flex: none; }

/* ---- category rows ----------------------------------------------------- */
.admin-cat {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .3rem .35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.admin-cat:hover { background: var(--cream); }
.admin-cat.is-off { opacity: .6; }
.admin-cat__grip {
  width: 1.7rem;
  flex: none;
  text-align: center;
  font-size: .68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.admin-cat__name {
  flex: 1;
  min-width: 0;
  padding: .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  font-size: .84rem;
  color: var(--ink);
}
.admin-cat__name:focus { outline: 2px solid var(--gold-deep); outline-offset: 1px; }
.admin-cat__count {
  min-width: 2.2ch;
  text-align: right;
  font-size: .7rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.admin-cat__tools { display: flex; gap: 2px; flex: none; }
.admin-cat__tools .admin-tool { width: 30px; height: 30px; }
.admin-cat__tools .admin-tool svg { width: 14px; height: 14px; }
.admin-cat__tools .admin-tool[disabled] { opacity: .3; pointer-events: none; }

/* ---- the ★ tools and the filter-bar extras ----------------------------- */
.admin-tool.is-on { background: var(--gold); color: #fff; }
.admin-tool.is-on svg { color: #fff; }
.admin-tool.is-on:hover { background: var(--gold-deep); }

body.is-admin .filter--hidden { opacity: .55; border-style: dashed; }
body.is-admin .filter--manage {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-style: dashed;
  border-color: var(--gold);
  color: var(--gold-deep);
  font-weight: 600;
}
body.is-admin .filter--manage svg { width: 14px; height: 14px; }
body.is-admin .filter--manage:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
body.is-admin .filter--manage:hover svg { color: #fff; }

/* the bar squeezes on small screens: keep it one tidy row plus a status line */
@media (max-width: 900px) {
  .admin-modal { padding: 0; }
  .admin-modal__panel { width: 100%; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
  .admin-bar__brand b { display: none; }
  .admin-bar__who { max-width: 12ch; }
}

/* ==========================================================================
   10. UPLOAD MANY PHOTOS — the second "+" tile and its panel
   ========================================================================== */
.admin-add--bulk { border-style: solid; border-color: rgba(176, 133, 64, .3); background: #FFFCF6; }
.admin-add--bulk svg { color: var(--gold-deep); }
.admin-chip--go { background: var(--gold); border-color: var(--gold); color: #fff; }
.admin-chip--go svg { color: #fff; }
.admin-chip--go:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.admin-bulk__warn {
  margin: .75rem 1.3rem 0;
  padding: .7rem .85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 179, 104, .55);
  background: #FFF6EA;
  color: #7A4B12;
  font-size: .78rem;
  line-height: 1.55;
}
.admin-bulk__warn[hidden] { display: none; }
.admin-bulk { display: grid; gap: .9rem; }
.admin-bulk__cat { display: grid; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--ink); }
.admin-bulk__cat em { font-style: normal; font-weight: 400; color: var(--muted); }
.admin-bulk__cat select {
  padding: .62rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  font-size: .86rem;
  color: var(--ink);
}
.admin-drop--bulk { min-height: 132px; }
.admin-bulk__list { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.admin-bulk__item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: .7rem;
  padding: .45rem .55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.admin-bulk__item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--sand); }
.admin-bulk__name { min-width: 0; font-size: .82rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-bulk__name small { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); white-space: normal; }
.admin-bulk__item.is-busy { border-color: var(--gold); }
.admin-bulk__item.is-busy img { opacity: .6; }
.admin-bulk__item.is-done { border-color: rgba(31, 168, 85, .5); background: #F3FBF5; }
.admin-bulk__item.is-error { border-color: rgba(200, 60, 60, .5); background: #FDF4F4; }
.admin-bulk__item.is-error small { color: #B23B3B; }
.admin-bulk__foot { align-items: center; justify-content: space-between; }
.admin-bulk__status { font-size: .78rem; color: var(--muted); }
.admin-bulk__foot .btn { flex: none; }

/* ==========================================================================
   10. PHOTO TILES — slideshow picker & "Set order" (drag a tile onto another
       to swap their places; touch drags the ⠿ handle, or tap-then-tap)
   ========================================================================== */
.admin-modal__panel--wide { width: min(960px, 100%); }
.admin-order__label {
  margin: .2rem 0 .6rem;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
}
.admin-order__label svg { width: 14px; height: 14px; color: var(--gold-deep); }
.admin-order__label small { flex-basis: 100%; font-size: .74rem; font-weight: 600; color: var(--gold-deep); min-height: 1em; }
.admin-order__label + .admin-order__label { margin-top: 1.1rem; }
.admin-tiles + .admin-order__label { margin-top: 1.2rem; }
.admin-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: .55rem;
  min-height: 40px;
}
.admin-tiles .admin-empty { grid-column: 1 / -1; }
.admin-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s var(--ease);
}
.admin-tile:hover { border-color: var(--gold-soft); }
.admin-tile.is-draft { opacity: .6; }
.admin-tile.is-dragging { opacity: .3; }
.admin-tile.is-over { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(176, 133, 64, .3); transform: scale(1.03); }
.admin-tile.is-tapped { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(176, 133, 64, .3); }
.admin-tile__img { display: block; aspect-ratio: 4 / 3; background: var(--cream-2); }
.admin-tile__img img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.admin-tile__img i { display: grid; place-items: center; height: 100%; }
.admin-tile__img i svg { width: 22px; height: 22px; color: var(--muted); }
.admin-tile__num {
  position: absolute; top: .4rem; left: .4rem; z-index: 2;
  min-width: 24px; height: 24px; padding: 0 .4rem;
  display: grid; place-items: center;
  border-radius: 100px;
  background: var(--ink); color: var(--gold);
  font-size: .72rem; font-weight: 700;
}
.admin-tile__name {
  display: block; padding: .4rem .5rem .45rem;
  font-size: .7rem; line-height: 1.3; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-tile__handle {
  position: absolute; right: .3rem; bottom: 1.85rem; z-index: 2;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; background: rgba(20, 17, 14, .78); color: #fff;
  touch-action: none;           /* a touch here drags; the rest of the tile still scrolls */
  cursor: grab;
}
.admin-tile__handle svg { width: 16px; height: 16px; }
.admin-tile__x {
  position: absolute; top: .3rem; right: .3rem; z-index: 2;
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .92); color: #B3261E;
  border: 1px solid var(--line);
}
.admin-tile__x svg { width: 13px; height: 13px; }
.admin-tile__x:hover { background: #B3261E; color: #fff; }
.admin-tile--off { cursor: pointer; }
.admin-tile--off .admin-tile__img { filter: saturate(.6); opacity: .85; }
.admin-tile--off:hover .admin-tile__img { filter: none; opacity: 1; }
.admin-tile__add {
  position: absolute; top: .4rem; left: .4rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .2rem .5rem; border-radius: 100px;
  background: var(--gold); color: #fff; font-size: .68rem; font-weight: 700;
}
.admin-tile__add svg { width: 12px; height: 12px; }
.admin-tiles.is-swapping .admin-tile { cursor: grabbing; }
.admin-tile--ghost {
  position: fixed; top: 0; left: 0; z-index: 100000;
  pointer-events: none; opacity: .92;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
  transform-origin: center; border-color: var(--gold-deep);
}
@media (max-width: 560px) {
  .admin-tiles { grid-template-columns: repeat(3, 1fr); gap: .4rem; }
  .admin-tile__name { font-size: .64rem; padding: .3rem .4rem .35rem; }
  .admin-tile__handle { width: 34px; height: 34px; }
}
