/* ============================================================
   J Park Hotel — guest services, live chat & staff console
   Builds on the design tokens declared in style.css
   ============================================================ */

/* ---------------- announcement banner ---------------- */
.ann-banner {
  background: linear-gradient(90deg, var(--terracotta), var(--gold));
  color: #fff;
  font-size: 0.9rem;
  display: none;
}
.ann-banner.show { display: block; }
.ann-banner .ann-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 10px clamp(20px, 6vw, 80px);
  display: flex; align-items: center; gap: 14px;
}
.ann-banner .ann-text { flex: 1; }
.ann-banner .ann-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff; flex: none;
  animation: annPulse 1.8s ease-in-out infinite;
}
@keyframes annPulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.ann-banner .ann-close {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1;
}
.ann-banner .ann-close:hover { background: rgba(255,255,255,0.35); }
body.has-banner .site-header { } /* header stays fixed; banner scrolls above */

/* ---------------- generic field styling ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.78rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 0.96rem; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal-soft);
  box-shadow: 0 0 0 3px rgba(19,125,120,0.14);
}
.field textarea { resize: vertical; min-height: 70px; }
.form-error { color: var(--terracotta-d); font-size: 0.86rem; margin-top: 4px; min-height: 1.1em; }
.muted { color: var(--ink-soft); font-size: 0.84rem; }

/* ============================================================
   GUEST SERVICES
   ============================================================ */
.services .svc-shell { max-width: 1080px; margin: 0 auto; }

/* access gate */
.svc-gate {
  max-width: 460px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow);
}
.svc-gate h3 { font-family: var(--serif); font-size: 1.7rem; color: var(--teal-deep); margin-bottom: 8px; }
.svc-gate .gate-lede { color: var(--ink-soft); margin-bottom: 22px; font-size: 0.96rem; }
.svc-gate .gate-or { text-align: center; font-size: 0.8rem; color: var(--ink-soft); margin: 6px 0 14px; letter-spacing: .04em; }
.svc-gate .btn { width: 100%; }
.svc-gate .gate-demo { margin-top: 16px; font-size: 0.76rem; color: var(--ink-soft); text-align: center; }

/* portal */
.svc-portal { display: none; }
.svc-portal.show { display: block; }
.portal-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: var(--teal-deep); color: var(--ivory);
  padding: 16px 22px; border-radius: 16px; margin-bottom: 26px;
}
.portal-bar .pb-welcome { font-family: var(--serif); font-size: 1.3rem; }
.portal-bar .pb-room { font-size: 0.82rem; color: var(--gold-light); letter-spacing: .08em; text-transform: uppercase; }
.portal-bar .btn-signout {
  background: rgba(247,242,232,0.14); color: var(--ivory); border: 1px solid rgba(247,242,232,0.4);
  padding: 8px 18px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.portal-bar .btn-signout:hover { background: rgba(247,242,232,0.26); }

.portal-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(22px, 3vw, 34px); margin-bottom: 26px;
}
.portal-card > h3 { font-family: var(--serif); font-size: 1.55rem; color: var(--teal-deep); }
.portal-card > .pc-lede { color: var(--ink-soft); margin: 6px 0 22px; font-size: 0.96rem; }

/* quick service matrix */
.matrix-group { margin-bottom: 22px; }
.matrix-group h4 {
  font-size: 0.78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.matrix-group h4 .mg-ico { font-size: 1.05rem; }
.matrix-buttons { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.req-btn {
  display: flex; align-items: center; gap: 9px; text-align: left;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 13px;
  padding: 13px 15px; cursor: pointer; font-family: var(--sans); font-size: 0.9rem; font-weight: 500;
  color: var(--ink); transition: transform .2s var(--ease), border-color .2s, background .2s;
}
.req-btn .rb-ico { font-size: 1.15rem; flex: none; }
.req-btn:hover { border-color: var(--teal-soft); transform: translateY(-2px); background: #fff; }
.req-btn:active { transform: scale(.97); }
.req-btn.sent { border-color: var(--teal); background: rgba(19,125,120,0.1); }

/* status tracker */
.track-list { display: flex; flex-direction: column; gap: 12px; }
.track-empty { color: var(--ink-soft); font-size: 0.94rem; padding: 8px 0; }
.track-item {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px; background: var(--paper);
}
.track-item .ti-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.track-item .ti-title { font-weight: 600; font-size: 0.98rem; }
.track-item .ti-meta { font-size: 0.78rem; color: var(--ink-soft); }
.track-item .ti-note { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }
.badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.badge.pending  { background: #fbe9d6; color: #9a5a17; }
.badge.progress { background: #d6e9fb; color: #1c5a8f; }
.badge.done     { background: #d8f0df; color: #1d7a3a; }
.badge.cancelled{ background: #eee; color: #777; }

/* status progress rail */
.ti-rail { display: flex; align-items: center; gap: 0; }
.ti-rail .step { flex: 1; height: 4px; border-radius: 999px; background: var(--line); position: relative; }
.ti-rail .step.on { background: var(--teal-soft); }
.ti-rail .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); flex: none; }
.ti-rail .dot.on { background: var(--teal); }
.link-cancel { background: none; border: none; color: var(--terracotta-d); font-size: 0.8rem; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------------- room service ---------------- */
.rs-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.rs-cat-btn {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 18px; font-size: 0.84rem; font-weight: 600; cursor: pointer; color: var(--ink-soft);
  font-family: var(--sans); transition: all .2s;
}
.rs-cat-btn.active { background: var(--teal); color: var(--ivory); border-color: var(--teal); }
.rs-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.rs-item {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper);
}
.rs-item .rs-name { font-weight: 600; font-size: 0.94rem; }
.rs-item .rs-price { font-size: 0.84rem; color: var(--terracotta); font-weight: 600; }
.rs-add {
  background: var(--gold); color: var(--teal-deep); border: none; border-radius: 999px;
  width: 34px; height: 34px; font-size: 1.3rem; line-height: 1; cursor: pointer; flex: none; font-weight: 700;
}
.rs-add:hover { background: var(--gold-light); }

.rs-cart { background: var(--teal-deep); color: var(--ivory); border-radius: 16px; padding: 20px 22px; }
.rs-cart h4 { font-family: var(--serif); font-size: 1.25rem; margin-bottom: 14px; color: var(--ivory); }
.rs-cart .cart-empty { color: rgba(247,242,232,0.7); font-size: 0.9rem; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(247,242,232,0.16); }
.cart-line .cl-name { flex: 1; font-size: 0.92rem; }
.cart-line .cl-qty { display: flex; align-items: center; gap: 8px; }
.cart-line .cl-qty button {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(247,242,232,0.4);
  background: transparent; color: var(--ivory); cursor: pointer; font-size: 1rem; line-height: 1;
}
.cart-line .cl-price { width: 70px; text-align: right; font-size: 0.88rem; color: var(--gold-light); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; margin: 14px 0; font-size: 1.05rem; }
.cart-total span:last-child { color: var(--gold-light); }
.rs-cart .field label { color: rgba(247,242,232,0.8); }
.rs-cart .field input, .rs-cart .field select, .rs-cart .field textarea {
  background: rgba(247,242,232,0.95); border-color: transparent;
}
.rs-cart .btn { width: 100%; margin-top: 6px; }

/* ============================================================
   CONCIERGE
   ============================================================ */
.conc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.conc-card {
  border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line);
  display: flex; flex-direction: column; box-shadow: 0 12px 34px -24px rgba(7,61,59,.5);
  transition: transform .3s var(--ease);
}
.conc-card:hover { transform: translateY(-4px); }
.conc-card .cc-img { aspect-ratio: 16/10; overflow: hidden; }
.conc-card .cc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.conc-card:hover .cc-img img { transform: scale(1.06); }
.conc-card .cc-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.conc-card .cc-body h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--teal-deep); }
.conc-card .cc-body p { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.conc-card .cc-actions { display: flex; gap: 8px; margin-top: 10px; }
.conc-card .cc-actions button {
  flex: 1; font-family: var(--sans); font-weight: 600; font-size: 0.82rem; cursor: pointer;
  padding: 10px; border-radius: 999px; border: 1.5px solid var(--teal); transition: all .2s;
}
.cc-ask { background: #fff; color: var(--teal); }
.cc-ask:hover { background: var(--teal); color: var(--ivory); }
.cc-book { background: var(--teal); color: var(--ivory); }
.cc-book:hover { background: var(--teal-deep); }

/* ============================================================
   LIVE CHAT WIDGET
   ============================================================ */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 1000;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--teal); color: var(--gold-light);
  box-shadow: 0 14px 34px -10px rgba(7,61,59,.7);
  display: grid; place-items: center; font-size: 1.6rem;
  transition: transform .3s var(--ease), background .3s;
}
.chat-fab:hover { transform: scale(1.07); background: var(--teal-deep); }
.chat-fab .fab-badge {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--terracotta); color: #fff; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.chat-fab .fab-badge.show { display: flex; }

.chat-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 1001;
  width: min(380px, calc(100vw - 32px)); height: min(600px, calc(100vh - 100px));
  background: var(--paper); border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(7,61,59,.6);
  display: none; flex-direction: column;
  transform: translateY(20px) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .3s;
}
.chat-panel.open { display: flex; transform: none; opacity: 1; }
.chat-head {
  background: var(--teal-deep); color: var(--ivory); padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
}
.chat-head .ch-avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--teal-deep);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.3rem; flex: none;
}
.chat-head .ch-title { font-weight: 600; font-size: 1.02rem; }
.chat-head .ch-sub { font-size: 0.74rem; color: var(--gold-light); display: flex; align-items: center; gap: 6px; }
.chat-head .ch-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fd08a; }
.chat-head .ch-close { margin-left: auto; background: none; border: none; color: var(--ivory); font-size: 1.5rem; cursor: pointer; line-height: 1; }

.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-langnote { text-align: center; font-size: 0.72rem; color: var(--ink-soft); margin: 2px 0 4px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.92rem; line-height: 1.45; word-wrap: break-word; }
.msg.bot, .msg.staff { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.guest { align-self: flex-end; background: var(--teal); color: var(--ivory); border-bottom-right-radius: 5px; }
.msg .msg-from { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .7; margin-bottom: 3px; }
.msg.staff .msg-from { color: var(--terracotta); }

/* "Translated from X" note (live chat bubbles + internal messages) */
.tr-note { display: block; margin-top: 5px; font-size: 0.66rem; font-style: italic; letter-spacing: .02em; opacity: .68; }
.tr-note::before { content: "\1F310"; font-style: normal; margin-right: 4px; opacity: .8; }
.msg.guest .tr-note { color: rgba(247,242,232,0.85); }
.msg-tr-note { margin: 10px 0 0; color: var(--terracotta); opacity: .85; }
.msg.system { align-self: center; background: transparent; color: var(--ink-soft); font-size: 0.8rem; font-style: italic; text-align: center; max-width: 100%; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 10px; }
.chat-quick button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 13px; font-size: 0.8rem; cursor: pointer; color: var(--teal); font-weight: 600; font-family: var(--sans);
}
.chat-quick button:hover { background: var(--teal); color: var(--ivory); border-color: var(--teal); }
.chat-quick .cq-frontdesk { border-color: var(--terracotta); color: var(--terracotta); width: 100%; }
.chat-quick .cq-frontdesk:hover { background: var(--terracotta); color: #fff; }

.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.chat-input input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px;
  font-family: var(--sans); font-size: 0.92rem; background: #fff;
}
.chat-input input:focus { outline: none; border-color: var(--teal-soft); }
.chat-input button {
  background: var(--teal); color: var(--ivory); border: none; border-radius: 50%;
  width: 42px; height: 42px; cursor: pointer; font-size: 1.1rem; flex: none;
}
.chat-input button:hover { background: var(--teal-deep); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--teal-deep); color: var(--ivory); padding: 12px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow);
  animation: toastIn .3s var(--ease); max-width: 90vw;
}
.toast.success { background: #1d7a3a; }
.toast.error { background: var(--terracotta-d); }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================================================
   STAFF / ADMIN CONSOLE  (staff.html)
   ============================================================ */
body.staff-body { background: #eef1ef; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(420px, 100%); background: #fff; border-radius: 22px; padding: 38px 34px;
  box-shadow: 0 30px 70px -30px rgba(7,61,59,.5); text-align: center;
}
.login-card .brand-mark { width: 54px; height: 54px; margin: 0 auto 16px; font-size: 1.9rem; border-radius: 14px; }
.login-card h1 { font-family: var(--serif); font-size: 1.9rem; color: var(--teal-deep); }
.login-card .login-sub { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 24px; }
.login-card .field { text-align: left; }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-card .login-demo { font-size: 0.76rem; color: var(--ink-soft); margin-top: 18px; }
.login-card .login-back { display: inline-block; margin-top: 14px; font-size: 0.84rem; color: var(--teal-soft); }

/* dashboard shell */
.dash { display: none; min-height: 100vh; grid-template-columns: 248px 1fr; }
.dash.show { display: grid; }
.dash-side {
  background: var(--teal-deep); color: var(--ivory); padding: 24px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.ds-nav { display: flex; flex-direction: column; gap: 6px; }
.dash-side .ds-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.dash-side .ds-brand .brand-mark { width: 38px; height: 38px; font-size: 1.4rem; }
.dash-side .ds-brand .ds-name { font-family: var(--serif); font-size: 1.15rem; color: var(--ivory); }
.dash-side .ds-brand .ds-role { font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-light); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 11px;
  cursor: pointer; color: rgba(247,242,232,0.82); font-weight: 500; font-size: 0.92rem;
  border: none; background: none; text-align: left; width: 100%; font-family: var(--sans);
  transition: background .2s, color .2s;
}
.nav-item .ni-ico { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(247,242,232,0.1); color: var(--ivory); }
.nav-item.active { background: var(--gold); color: var(--teal-deep); font-weight: 700; }
.nav-item .ni-count {
  margin-left: auto; background: var(--terracotta); color: #fff; font-size: 0.72rem; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px; display: none; align-items: center; justify-content: center; padding: 0 6px;
}
.nav-item .ni-count.show { display: flex; }
.dash-side .ds-spacer { flex: 1; }
.dash-side .ds-foot { border-top: 1px solid rgba(247,242,232,0.16); padding-top: 14px; margin-top: 8px; }
.dash-side .ds-user { font-size: 0.85rem; margin-bottom: 10px; }
.dash-side .ds-user b { display: block; }
.btn-signout-side { width: 100%; background: rgba(247,242,232,0.12); color: var(--ivory); border: 1px solid rgba(247,242,232,0.3); border-radius: 10px; padding: 9px; cursor: pointer; font-weight: 600; font-size: 0.84rem; }
.btn-signout-side:hover { background: rgba(247,242,232,0.22); }

.dash-main { padding: clamp(20px, 3vw, 38px); overflow-y: auto; max-height: 100vh; }
.dash-panel { display: none; }
.dash-panel.show { display: block; }
.dash-panel h2 { font-family: var(--serif); font-size: 1.9rem; color: var(--teal-deep); }
.dash-panel .panel-lede { color: var(--ink-soft); margin: 4px 0 22px; }

/* request filters + cards */
.req-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.req-filters button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--ink-soft); font-family: var(--sans); }
.req-filters button.active { background: var(--teal); color: var(--ivory); border-color: var(--teal); }
.staff-list { display: flex; flex-direction: column; gap: 12px; }
.staff-req {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.staff-req.pending  { border-left-color: #d98a2b; }
.staff-req.progress { border-left-color: #2b7fd9; }
.staff-req.done     { border-left-color: #2bb35a; }
.staff-req .sr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.staff-req .sr-room { background: var(--teal); color: var(--ivory); font-weight: 700; padding: 4px 12px; border-radius: 8px; font-size: 0.84rem; }
.staff-req .sr-title { font-weight: 600; font-size: 1rem; }
.staff-req .sr-time { margin-left: auto; font-size: 0.76rem; color: var(--ink-soft); }
.staff-req .sr-new { background: var(--terracotta); color: #fff; font-size: 0.66rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .05em; }
.staff-req .sr-detail { font-size: 0.88rem; color: var(--ink-soft); }
.staff-req .sr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.staff-req .sr-actions button { border: none; border-radius: 999px; padding: 8px 18px; font-size: 0.82rem; font-weight: 600; cursor: pointer; font-family: var(--sans); }
.act-start { background: #2b7fd9; color: #fff; }
.act-done { background: #2bb35a; color: #fff; }
.act-reopen { background: var(--sand); color: var(--ink); }

/* chat console */
.chat-console { display: grid; grid-template-columns: 280px 1fr; gap: 18px; height: 70vh; min-height: 440px; }
.cc-threads { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow-y: auto; }
.cc-thread { padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s; }
.cc-thread:hover { background: var(--paper); }
.cc-thread.active { background: rgba(19,125,120,0.1); }
.cc-thread .cct-name { font-weight: 600; font-size: 0.94rem; display: flex; align-items: center; gap: 8px; }
.cc-thread .cct-unread { width: 9px; height: 9px; border-radius: 50%; background: var(--terracotta); }
.cc-thread .cct-last { font-size: 0.82rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.cc-thread .cct-lang { font-size: 0.7rem; color: var(--teal-soft); text-transform: uppercase; letter-spacing: .05em; }
.cc-thread { display: flex; align-items: center; gap: 10px; }
.cc-thread .cct-body { flex: 1; min-width: 0; }
.cc-thread .cct-check { width: 18px; height: 18px; cursor: pointer; flex: 0 0 auto; }
.cc-thread .cct-actions { display: flex; gap: 4px; flex: 0 0 auto; opacity: 0; transition: opacity .15s; }
.cc-thread:hover .cct-actions, .cc-thread.active .cct-actions { opacity: 1; }
.cc-thread .cct-act { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; cursor: pointer; font-size: 0.95rem; line-height: 1; color: var(--ink-soft); }
.cc-thread .cct-act:hover { background: var(--paper); border-color: var(--line); }
.cc-thread .cct-act.cct-delete:hover { color: var(--terracotta); }
.cc-thread .cct-act.cct-pin.is-pinned { opacity: 1; color: var(--gold, #c9952a); }
.cc-thread.pinned-thread .cct-actions { opacity: 1; }
.cc-thread .cct-pinned { font-size: 0.75rem; line-height: 1; flex-shrink: 0; }
.cc-thread.pinned-thread { border-left: 3px solid var(--gold, #c9952a); }
.cc-threads-bar { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 1; }
.cc-threads-bar .cc-btn { font-size: 0.82rem; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer; color: var(--ink); }
.cc-threads-bar .cc-btn:hover:not(:disabled) { background: var(--paper); border-color: var(--teal-soft); }
.cc-threads-bar .cc-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.cc-threads-bar .cc-btn-danger { color: var(--terracotta); border-color: rgba(193,103,73,0.3); }
.cc-threads-bar .cc-btn-danger:hover:not(:disabled) { background: rgba(193,103,73,0.08); }
.cc-threads-bar .cc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cc-conv { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.cc-conv-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.cc-conv-head .cch-name { font-weight: 600; }
.cc-conv-head .cch-lang { font-size: 0.74rem; color: var(--ink-soft); margin-left: auto; }
.cc-conv-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cc-conv-empty { margin: auto; color: var(--ink-soft); }
/* staff sees the guest on the left, themselves on the right */
.cc-conv-body .msg { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; }
.cc-conv-body .msg .msg-from { display: block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
.cc-conv-body .msg.guest { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cc-conv-body .msg.bot { align-self: flex-start; background: var(--sand); color: var(--ink); border-bottom-left-radius: 4px; }
.cc-conv-body .msg.staff { align-self: flex-end; background: var(--teal); color: var(--ivory); border-bottom-right-radius: 4px; }
.cc-conv-body .msg.system { align-self: center; background: transparent; color: var(--ink-soft); font-style: italic; font-size: 0.78rem; text-align: center; max-width: 100%; }
.cc-conv-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.cc-conv-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px; font-family: var(--sans); font-size: 0.92rem; }
.cc-conv-input input:focus { outline: none; border-color: var(--teal-soft); }
.cc-conv-input button { background: var(--teal); color: var(--ivory); border: none; border-radius: 999px; padding: 0 22px; cursor: pointer; font-weight: 600; }

/* assigned-staff label inside each thread row */
.cc-thread .cct-assigned { font-size: 0.7rem; color: var(--ink-soft); margin-top: 3px; font-style: italic; }
.cc-thread .cct-assigned.mine { color: var(--teal-soft); font-weight: 600; font-style: normal; }

/* owner badge inside the conversation header */
.cc-conv-head .cch-owner { font-size: 0.74rem; color: var(--ink-soft); padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.cc-conv-head .cch-owner.mine { background: var(--teal); color: var(--ivory); border-color: var(--teal); }
.cc-conv-head .cch-lang { margin-left: auto; }

/* read-only "take over" banner for chats not assigned to the current user */
.cc-conv-takeover { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.cc-conv-takeover .cct-readonly { flex: 1; font-size: 0.86rem; color: var(--ink-soft); font-style: italic; }
.cc-conv-takeover .cc-takeover-btn { background: var(--terracotta); color: #fff; border: none; border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; font-size: 0.86rem; }
.cc-conv-takeover .cc-takeover-btn:hover { background: var(--terracotta-d, #9d4625); }

/* per-message pin button — visible on hover; locked-on when pinned */
.cc-conv-body .msg { position: relative; }
.cc-conv-body .msg .msg-pin {
  position: absolute; top: 4px; right: 4px;
  background: transparent; border: none; cursor: pointer;
  font-size: 0.78rem; opacity: 0; transition: opacity .15s, transform .15s;
  padding: 2px 4px; line-height: 1; color: inherit;
}
.cc-conv-body .msg:hover .msg-pin { opacity: 0.6; }
.cc-conv-body .msg .msg-pin:hover { opacity: 1; transform: scale(1.15); }
.cc-conv-body .msg .msg-pin.is-pinned { opacity: 1; }
.cc-conv-body .msg.pinned { box-shadow: 0 0 0 2px var(--gold); }
.cc-conv-body .msg.pinned.system { box-shadow: none; border-left: 3px solid var(--gold); padding-left: 10px; }

/* company board */
.company-feed { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.company-msg { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.company-msg .cm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.company-msg .cm-author { font-weight: 700; font-size: 0.92rem; }
.company-msg .cm-role { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; }
.cm-role.admin { background: var(--gold); color: var(--teal-deep); }
.cm-role.staff { background: var(--sand); color: var(--ink-soft); }
.company-msg .cm-time { margin-left: auto; font-size: 0.74rem; color: var(--ink-soft); }
.company-msg .cm-text { font-size: 0.94rem; }
.company-compose { display: flex; gap: 10px; }
.company-compose textarea { flex: 1; }

/* site editor + team */
.editor-card, .team-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-bottom: 20px; max-width: 720px; }
.editor-card h3, .team-card h3 { font-family: var(--serif); font-size: 1.3rem; color: var(--teal-deep); margin-bottom: 14px; }
.ann-edit-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ann-edit-row { display: flex; align-items: center; gap: 10px; background: var(--paper); padding: 10px 14px; border-radius: 10px; }
.ann-edit-row .ae-text { flex: 1; font-size: 0.9rem; }
.ann-edit-row button, .team-row button { border: none; background: var(--terracotta); color: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 0.78rem; font-weight: 600; }
.section-toggles { display: flex; flex-direction: column; gap: 8px; }
.section-toggles label { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 500; }
.section-toggles input { width: 18px; height: 18px; accent-color: var(--teal); }

/* ---------- Site Editor: tutorial / guide ---------- */
.guide-card { background: linear-gradient(180deg, #fff, #fbf6ec); border-color: var(--gold-light); }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.guide-head h3 { margin-bottom: 0; }
.guide-toggle { border: 1.5px solid var(--teal); background: none; color: var(--teal); border-radius: 999px; padding: 6px 16px; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.guide-toggle:hover { background: var(--teal); color: var(--ivory); }
.guide-intro { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; margin: 8px 0 16px; }
.guide-steps { list-style: none; counter-reset: gstep; display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.guide-steps li { counter-increment: gstep; position: relative; padding-left: 44px; min-height: 30px; }
.guide-steps li::before { content: counter(gstep); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: var(--ivory); font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; justify-content: center; }
.guide-steps li b { display: block; color: var(--teal-deep); font-size: 0.98rem; margin-bottom: 2px; }
.guide-steps li span { display: block; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; }
.guide-tip { background: var(--paper); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; padding: 14px 18px; margin-bottom: 18px; }
.guide-tip b { color: var(--teal-deep); display: block; margin-bottom: 6px; }
.guide-tip ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.6; }

/* ---------- Site Editor: toolbar ---------- */
.ed-toolbar { display: flex; gap: 16px; flex-wrap: wrap; }
.ed-toolbar .field { flex: 1; min-width: 220px; margin-bottom: 8px; }
.ed-hint { color: var(--ink-soft); font-size: 0.84rem; line-height: 1.5; margin-top: 4px; }
.ed-nomatch { color: var(--ink-soft); font-style: italic; padding: 8px 2px; }

/* ---------- Site Editor: grouped text fields ---------- */
.ed-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.ed-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 600; color: var(--teal-deep); background: var(--paper); user-select: none; }
.ed-group > summary::-webkit-details-marker { display: none; }
.ed-group > summary::after { content: "▸"; margin-left: auto; transition: transform .2s; color: var(--ink-soft); }
.ed-group[open] > summary::after { transform: rotate(90deg); }
.ed-grp-title { font-size: 1rem; }
.ed-grp-count { font-size: 0.72rem; font-weight: 700; background: var(--sand); color: var(--ink-soft); border-radius: 999px; padding: 2px 9px; }
.ed-field { padding: 14px 18px; border-top: 1px solid var(--line); }
.ed-field.is-edited { background: #fffaf0; box-shadow: inset 3px 0 0 var(--gold); }
.ed-field-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ed-field-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; color: var(--ink-soft); opacity: 0.7; }
.ed-field-loc { font-size: 0.82rem; font-weight: 600; color: var(--teal-deep); cursor: help; }
.ed-field-status { font-size: 0.74rem; font-weight: 700; }
.ed-field-status.saved { color: #1d7a3a; }
.ed-field-input { width: 100%; font-family: var(--sans); font-size: 0.95rem; color: var(--ink); padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
textarea.ed-field-input { resize: vertical; line-height: 1.5; }
.ed-field-input:focus { outline: none; border-color: var(--teal-soft); box-shadow: 0 0 0 3px rgba(19,125,120,0.14); }
.ed-field-reset { margin-top: 8px; border: 1px solid var(--line); background: #fff; color: var(--terracotta-d); border-radius: 8px; padding: 5px 12px; font-size: 0.76rem; font-weight: 600; font-family: var(--sans); cursor: pointer; }
.ed-field-reset:hover { background: var(--paper); }

/* ---------- Site Editor: images ---------- */
.ed-images { display: flex; flex-direction: column; gap: 16px; }
.ed-img { display: flex; gap: 16px; align-items: flex-start; }
.ed-img-thumb { width: 120px; height: 80px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.ed-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-img-thumb.empty { display: flex; align-items: center; justify-content: center; }
.ed-img-thumb.empty::after { content: "🖼"; font-size: 1.6rem; opacity: 0.4; }
.ed-img-body { flex: 1; min-width: 0; }
.ed-img-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.ed-img-url { width: 100%; font-family: var(--sans); font-size: 0.9rem; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.ed-img-url:focus { outline: none; border-color: var(--teal-soft); box-shadow: 0 0 0 3px rgba(19,125,120,0.14); }
.ed-img-actions { display: flex; gap: 8px; align-items: center; }
.ed-img-upload { padding: 7px 16px; font-size: 0.78rem; }

/* ---------- Site Editor: colours ---------- */
.ed-colors { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 16px; }
.ed-color { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.ed-color input[type="color"] { width: 46px; height: 36px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; padding: 2px; }

@media (max-width: 760px) {
  .ed-toolbar { flex-direction: column; }
  .ed-img { flex-direction: column; }
  .ed-img-thumb { width: 100%; height: 140px; }
}

.team-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.team-row .tr-name { font-weight: 600; min-width: 130px; }
.team-row .tr-role { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.tr-role.admin { background: var(--gold); color: var(--teal-deep); }
.tr-role.staff { background: var(--sand); color: var(--ink-soft); }
.team-row .tr-status { font-size: 0.8rem; }
.tr-status.active { color: #1d7a3a; }
.tr-status.suspended { color: var(--terracotta-d); }
.team-row .tr-spacer { flex: 1; }
.team-row .btn-activate { background: #2bb35a; }
.team-row .you-tag { font-size: 0.72rem; color: var(--ink-soft); }
.team-row.pending { background: rgba(201, 162, 75, 0.08); }
.team-row.pending-remove .tr-name,
.team-row.pending-remove .tr-role,
.team-row.pending-remove .tr-status { opacity: 0.55; text-decoration: line-through; }
.team-row .tr-tag { font-size: 0.7rem; color: var(--terracotta-d); font-style: italic; font-weight: 600; margin-left: 6px; text-decoration: none; }
.team-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.team-actions .ed-hint { margin: 0 0 10px; color: var(--terracotta-d); font-weight: 600; }
.team-actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.team-actions-row .btn[disabled],
.team-actions-row .btn-solid[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-danger { background: var(--terracotta-d); color: #fff; border: none; border-radius: 10px; padding: 10px 20px; cursor: pointer; font-weight: 600; font-family: var(--sans); }

/* admin-only "edit website" entry on public site */
.admin-bar {
  position: fixed; left: 0; bottom: 0; width: 100%; z-index: 1500;
  background: var(--gold); color: var(--teal-deep);
  display: none; align-items: center; gap: 14px; padding: 10px clamp(16px, 5vw, 60px);
  font-size: 0.88rem; font-weight: 600; box-shadow: 0 -6px 24px -12px rgba(0,0,0,.3);
}
.admin-bar.show { display: flex; }
.admin-bar .ab-ico { font-size: 1.1rem; }
.admin-bar a { margin-left: auto; background: var(--teal-deep); color: var(--ivory); padding: 8px 18px; border-radius: 999px; }

/* ============================================================
   VIEW TOGGLE — floating button
   ============================================================ */
.view-toggle {
  position: fixed;
  bottom: 18px;
  left: 16px;
  z-index: 1400;
  background: var(--teal-deep);
  color: var(--ivory);
  border: none;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 3px 12px -3px rgba(0,0,0,.35);
  transition: background .2s, transform .15s;
  white-space: nowrap;
  opacity: 0.82;
}
.view-toggle:hover { background: var(--teal); transform: translateY(-1px); opacity: 1; }
body:has(.admin-bar.show) .view-toggle { bottom: 56px; }

/* ============================================================
   MOBILE VIEW — body.mobile-view overrides
   Cleaner, larger-touch-target layout for the guest portal
   ============================================================ */

/* Prevent iOS auto-zoom on form focus */
body.mobile-view .field input,
body.mobile-view .field select,
body.mobile-view .field textarea {
  font-size: 1rem;
}

/* Gate — full width, no card shadow */
body.mobile-view .svc-gate {
  max-width: 100%;
  border-radius: 14px;
  box-shadow: none;
  padding: 22px 18px;
}

/* Portal bar — stack vertically */
body.mobile-view .portal-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-radius: 14px;
  padding: 14px 16px;
}
body.mobile-view .portal-bar .btn-signout {
  align-self: flex-end;
}

/* Portal cards — tighter padding, full width */
body.mobile-view .portal-card {
  padding: 18px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

/* Service matrix — 2 columns, bigger tap targets */
body.mobile-view .matrix-buttons {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
body.mobile-view .req-btn {
  padding: 14px 10px;
  font-size: 0.85rem;
  border-radius: 12px;
  justify-content: flex-start;
}
body.mobile-view .req-btn .rb-ico {
  font-size: 1.2rem;
  flex: none;
}

/* Dining category tabs — horizontal scroll, larger */
body.mobile-view .rs-cats {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  padding-bottom: 4px;
}
body.mobile-view .rs-cat-btn {
  white-space: nowrap;
  flex: none;
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* Menu items — bigger touch area */
body.mobile-view .rs-item {
  padding: 12px 0;
}
body.mobile-view .rs-add {
  min-width: 40px;
  min-height: 40px;
  font-size: 1.3rem;
}

/* Cart qty buttons — bigger */
body.mobile-view .cl-qty button {
  min-width: 34px;
  min-height: 34px;
  font-size: 1.1rem;
}

/* Place order button — full width */
body.mobile-view #rsPlace {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
}

/* Track items — bigger cancel button */
body.mobile-view .link-cancel {
  padding: 8px 0;
  font-size: 0.9rem;
}

/* Section grids — single column */
body.mobile-view .room-grid,
body.mobile-view .dining-grid {
  grid-template-columns: 1fr;
}
body.mobile-view .fac-grid {
  grid-template-columns: 1fr;
}
body.mobile-view .fac-card.large {
  grid-column: 1;
}

/* ============================================================
   SIDEBAR — avatar + home button
   ============================================================ */
.ds-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ds-user-info { flex: 1; min-width: 0; }
.ds-user-info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.88rem; }
.ds-user-info .muted { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ds-avatar-wrap {
  position: relative; width: 42px; height: 42px; flex: none; cursor: pointer;
  border-radius: 50%; transition: opacity .2s;
}
.ds-avatar-wrap:hover { opacity: .85; }
.ds-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: var(--teal-deep);
  display: grid; place-items: center; font-weight: 700; font-size: 1.05rem;
  overflow: hidden; border: 2px solid rgba(247,242,232,0.3);
  user-select: none;
}
.ds-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ds-avatar-edit {
  position: absolute; bottom: -1px; right: -1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); color: var(--teal-deep);
  display: grid; place-items: center; font-size: 0.55rem; font-weight: 900;
  border: 1.5px solid var(--teal-deep); pointer-events: none; line-height: 1;
}

.btn-home-side {
  display: flex; align-items: center; gap: 7px; margin-top: 8px;
  color: rgba(247,242,232,0.6); font-size: 0.78rem; font-weight: 500;
  text-decoration: none; padding: 6px 4px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.btn-home-side:hover { color: var(--ivory); background: rgba(247,242,232,0.08); }

/* ============================================================
   MESSAGES — Gmail-inspired internal messaging
   ============================================================ */
.msg-shell {
  display: grid; grid-template-columns: 210px 1fr;
  height: calc(100vh - 100px); min-height: 500px;
  background: #f6f8fc; border-radius: 16px; overflow: hidden;
  border: 1px solid #e0e4f0;
  box-shadow: 0 4px 28px -8px rgba(7,61,59,.15);
}

/* messages sidebar */
.msg-sidebar {
  background: #f6f8fc; padding: 14px 8px 14px 0;
  border-right: 1px solid #e0e4f0;
  display: flex; flex-direction: column; gap: 2px;
}
.msg-compose-btn {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--teal-deep);
  border: none; border-radius: 18px; padding: 13px 20px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.14), 0 2px 12px rgba(0,0,0,.06);
  margin: 0 8px 12px; font-family: var(--sans);
  transition: box-shadow .2s, background .2s;
  letter-spacing: .01em;
}
.msg-compose-btn:hover { box-shadow: 0 2px 14px rgba(0,0,0,.22); background: #f1f6ff; }
.msg-compose-btn .mcb-ico { font-size: 1.05rem; }
.msg-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 16px; border-radius: 0 24px 24px 0;
  cursor: pointer; font-size: 0.86rem; font-weight: 500; color: #333;
  border: none; background: none; text-align: left; width: 100%;
  font-family: var(--sans); transition: background .15s; letter-spacing: .01em;
}
.msg-nav-item:hover { background: rgba(0,0,0,.06); }
.msg-nav-item.active {
  background: linear-gradient(135deg, rgba(212,175,55,.22), rgba(19,125,120,.16));
  color: var(--teal-deep); font-weight: 700;
}
.msg-nav-item .mni-ico { font-size: 1rem; width: 22px; text-align: center; flex: none; }
.msg-nav-item .mni-label { flex: 1; }
.msg-nav-item .mni-badge {
  background: var(--teal); color: #fff;
  font-size: 0.66rem; font-weight: 700; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}

/* messages main area */
.msg-main { display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.msg-list-area { flex: 1; overflow-y: auto; }
.msg-list-area.hidden { display: none; }
.msg-list-header {
  padding: 16px 22px 12px; font-family: var(--serif); font-size: 1.45rem;
  color: var(--teal-deep); border-bottom: 1px solid #eef0f8;
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; position: sticky; top: 0; z-index: 2;
}
.msg-list-header .mlh-count { font-family: var(--sans); font-size: 0.78rem; color: #aaa; font-weight: 400; }

/* message row (list item) */
.msg-row {
  display: grid; grid-template-columns: 46px 180px 1fr 70px;
  align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid #f2f4fb; cursor: pointer;
  transition: background .12s; position: relative;
}
.msg-row:hover { background: #f5f7fd; }
.msg-row.unread { background: #fff; }
.msg-row.read { background: #fafbfe; }
.msg-row.unread .mr-sender { font-weight: 700; color: #111; }
.msg-row.unread .mr-subject { font-weight: 700; color: #111; }
.msg-row.read .mr-sender { font-weight: 500; color: #555; }
.msg-row .mr-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--teal); color: #fff; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 0.92rem;
}
.msg-row.announcement .mr-avatar { background: linear-gradient(135deg, var(--gold), #e8a800); color: var(--teal-deep); }
.msg-row .mr-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mr-sender { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-subject-preview { overflow: hidden; display: flex; align-items: baseline; gap: 0; min-width: 0; }
.mr-subject { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 240px; }
.mr-sep { font-size: 0.82rem; color: #bbb; padding: 0 5px; flex-shrink: 0; }
.mr-preview { font-size: 0.82rem; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.mr-time { font-size: 0.74rem; color: #999; text-align: right; white-space: nowrap; }
.msg-row.unread .mr-time { color: var(--teal); font-weight: 600; }

/* unread dot */
.msg-row.unread::before {
  content: ""; position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
}
.msg-row.announcement.unread::before { background: var(--gold); }

/* message detail view */
.msg-detail { flex: 1; overflow-y: auto; padding: 28px 36px; display: none; }
.msg-detail.show { display: block; }
.msg-detail-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid #e8ecf8;
}
.mda-action-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 500;
  background: #f4f6fb; border: 1px solid #d8dff0; color: #334; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.mda-action-btn:hover { background: #e8ecf8; border-color: #b8c4e0; }
.mda-star-btn { color: #888; }
.mda-star-btn.starred { color: #c9a24b; background: #fdf8ec; border-color: #e8d5a0; }
.mda-star-btn.starred:hover { background: #f9f0d0; }
.mda-delete-btn { color: #c0392b; }
.mda-delete-btn:hover { background: #fdecea; border-color: #e8b0aa; color: #a93226; }
.mda-report-btn { color: #b7640a; }
.mda-report-btn:hover { background: #fef4e7; border-color: #f0c980; color: #9a5208; }
.mda-report-btn.reported { color: #999; background: #f7f7f7; border-color: #ddd; cursor: default; }
.mda-report-btn.reported:hover { background: #f7f7f7; border-color: #ddd; }
.mr-flag { color: #e67e22; font-size: 0.78rem; }
.msg-row.reported .mr-subject { color: #c0392b; }
.msg-detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; color: var(--teal);
  font-size: 0.86rem; font-weight: 600; padding: 0; margin-bottom: 22px;
  font-family: var(--sans); transition: color .15s;
}
.msg-detail-back:hover { color: var(--teal-deep); }
.msg-detail-subject {
  font-family: var(--serif); font-size: 1.9rem; color: #111;
  margin-bottom: 18px; line-height: 1.2; font-weight: 600;
}
.msg-detail-meta {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px;
  padding-bottom: 22px; border-bottom: 1px solid #eef0f8;
}
.mda-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--teal); color: #fff; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
}
.mda-avatar.announcement-avatar { background: linear-gradient(135deg, var(--gold), #e8a800); color: var(--teal-deep); }
.mda-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mda-info { flex: 1; min-width: 0; }
.mda-from { font-weight: 700; font-size: 0.96rem; color: #111; }
.mda-from .mda-email { font-weight: 400; color: #888; font-size: 0.82rem; margin-left: 6px; }
.mda-to { font-size: 0.82rem; color: #888; margin-top: 3px; }
.mda-time { font-size: 0.78rem; color: #aaa; white-space: nowrap; }
.msg-detail-body {
  font-size: 0.97rem; line-height: 1.8; color: #222; white-space: pre-wrap;
  max-width: 680px;
}

/* empty state */
.msg-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 32px; text-align: center; color: #aaa;
}
.msg-empty .me-ico { font-size: 3rem; margin-bottom: 14px; opacity: .5; }
.msg-empty .me-title { font-family: var(--serif); font-size: 1.2rem; color: #bbb; margin-bottom: 6px; }
.msg-empty .me-sub { font-size: 0.84rem; }

/* ============================================================
   MULTI-SELECT + BULK ACTION BAR
   ============================================================ */
/* "Select" toggle button in list header */
.msg-list-header { display: flex; align-items: center; gap: 10px; }
.mlh-select-btn {
  margin-left: auto; padding: 4px 14px; border-radius: 14px; font-size: 0.76rem;
  font-weight: 600; background: #f0f4ff; border: 1px solid #c8d4f0;
  color: var(--teal-deep); cursor: pointer; font-family: var(--sans);
  transition: background .12s, border-color .12s; white-space: nowrap;
}
.mlh-select-btn:hover { background: #e0eaff; border-color: #a0b8e8; }
.mlh-select-btn.active { background: #e8ecf8; border-color: #b0c0e0; color: #555; }

/* Bulk action toolbar shown below header when multi-select is on */
.msg-bulk-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 18px 8px; background: #f0f6ff;
  border-bottom: 1px solid #d8e4f8; font-family: var(--sans);
}
.mbb-count {
  font-size: 0.8rem; font-weight: 600; color: var(--teal-deep);
  margin-right: 4px; min-width: 80px;
}
.mbb-btn {
  padding: 5px 13px; border-radius: 14px; font-size: 0.78rem; font-weight: 500;
  background: #fff; border: 1px solid #c8d4f0; color: #334; cursor: pointer;
  font-family: var(--sans); transition: background .12s; white-space: nowrap;
}
.mbb-btn:hover:not(:disabled) { background: #e8ecf8; border-color: #b0c0e0; }
.mbb-btn:disabled { opacity: .45; cursor: default; }
.mbb-delete { color: #c0392b; border-color: #e0b0aa; }
.mbb-delete:hover:not(:disabled) { background: #fdecea; border-color: #e8b0aa; }
.mbb-restore { color: #1a7a50; border-color: #a8d8be; }
.mbb-restore:hover:not(:disabled) { background: #e8f8f0; border-color: #88c8a8; }
.mbb-report { color: #b7640a; border-color: #e8d0a0; }
.mbb-report:hover:not(:disabled) { background: #fef4e7; border-color: #f0c980; }

/* Row selected state */
.msg-row.selected { background: #eef4ff !important; }
.msg-row.selectable { cursor: pointer; }
.msg-row.selectable:hover { background: #e8f0ff; }

/* Checkbox column replaces avatar in multi-select mode */
.mr-check {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
}
.mr-checkbox {
  width: 17px; height: 17px; cursor: pointer; accent-color: var(--teal);
  border-radius: 4px;
}
/* Unread dot hidden when selectable (checkbox takes that slot) */
.msg-row.selectable.unread::before { display: none; }

/* ============================================================
   TRASH VIEW
   ============================================================ */
.msg-trash-info {
  font-size: 0.78rem; color: #aaa; padding: 7px 20px;
  background: #fafbfe; border-bottom: 1px solid #f0f2fb;
  font-style: italic;
}
.trash-row .mr-sender { color: #999; }
.trash-row .mr-subject { color: #aaa; }
.trash-row .mr-preview { color: #bbb; }
.mr-days-left { color: #caa; font-size: 0.72rem; }

/* Restore button in detail view */
.mda-restore-btn { color: #1a7a50; }
.mda-restore-btn:hover { background: #e8f8f0; border-color: #88c8a8; color: #155e3c; }

/* ============================================================
   GUEST BOOKING inbox — OTA reservations (Agoda, Booking.com…)
   ============================================================ */
.bk-avatar { color: #fff; }
.channel-agoda   .bk-avatar, .bk-avatar.channel-agoda   { background: #d62e30; }
.channel-booking .bk-avatar, .bk-avatar.channel-booking { background: #003580; }
.channel-airbnb  .bk-avatar, .bk-avatar.channel-airbnb  { background: #ff385c; }
.channel-trip    .bk-avatar, .bk-avatar.channel-trip    { background: #287dfa; }
.channel-expedia .bk-avatar, .bk-avatar.channel-expedia { background: #fbc02d; color: #1a2b4a; }
.channel-other   .bk-avatar, .bk-avatar.channel-other   { background: var(--teal); }
.msg-row.booking.unread::before { background: var(--gold); }

/* structured booking details, shown above the confirmation email body */
.bk-detail-grid {
  display: grid; grid-template-columns: max-content 1fr; gap: 9px 22px;
  margin-bottom: 26px; max-width: 580px;
}
.bkd-row { display: contents; }
.bkd-label { font-size: 0.84rem; color: #888; white-space: nowrap; }
.bkd-value { font-size: 0.9rem; color: #1a1a1a; font-weight: 600; word-break: break-word; }
.bk-confirm-label {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: .07em;
  color: #aaa; font-weight: 700; margin-bottom: 12px;
  padding-top: 18px; border-top: 1px solid #eef0f8;
}

/* ============================================================
   COMPOSE MODAL — Gmail-style bottom-right card
   ============================================================ */
.msg-compose-modal {
  position: fixed; bottom: 0; right: 24px; z-index: 3000;
  display: none; flex-direction: column; pointer-events: none;
}
.msg-compose-modal.open { display: flex; pointer-events: all; }
.msg-compose-box {
  width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 60px);
  background: #fff; border-radius: 14px 14px 0 0;
  box-shadow: 0 8px 40px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.08);
  display: flex; flex-direction: column; overflow: hidden;
  animation: composeSlideUp .22s cubic-bezier(.22,.68,0,1.2);
}
@keyframes composeSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.msg-compose-head {
  background: var(--teal-deep); color: var(--ivory);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px;
  cursor: default;
}
.msg-compose-head .mch-title { flex: 1; font-family: var(--serif); font-size: 1rem; font-weight: 600; letter-spacing: .01em; }
.msg-compose-head .mch-btn {
  background: none; border: none; color: var(--ivory); cursor: pointer;
  font-size: 1.1rem; line-height: 1; opacity: .75; padding: 2px 6px; border-radius: 4px;
  transition: opacity .15s, background .15s;
}
.msg-compose-head .mch-btn:hover { opacity: 1; background: rgba(247,242,232,0.15); }
.msg-compose-fields { border-bottom: 1px solid #e8ecf8; }
.msg-compose-row {
  display: flex; align-items: flex-start; gap: 8px;
  border-bottom: 1px solid #f2f4fb; padding: 10px 16px;
}
.msg-compose-row:last-child { border-bottom: none; }
.mcr-label {
  font-size: 0.74rem; font-weight: 700; color: #999; letter-spacing: .06em;
  text-transform: uppercase; padding-top: 4px; min-width: 58px; flex: none;
}
.msg-subject-input {
  flex: 1; border: none; outline: none; font-family: var(--sans);
  font-size: 0.94rem; background: transparent; color: var(--ink);
  padding: 2px 0;
}
.msg-compose-to-tags {
  flex: 1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  min-height: 28px;
}
.msg-to-tag {
  background: #e8f0fe; color: #1a6fe8; border-radius: 4px;
  padding: 3px 6px 3px 8px; font-size: 0.8rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px; user-select: none;
}
.msg-to-tag.everyone-tag { background: linear-gradient(135deg, rgba(212,175,55,.2), rgba(19,125,120,.16)); color: var(--teal-deep); }
.msg-to-tag button {
  background: none; border: none; color: inherit; cursor: pointer;
  font-size: 0.85rem; padding: 0; line-height: 1; opacity: .7;
}
.msg-to-tag button:hover { opacity: 1; }
.msg-to-input {
  border: none; outline: none; font-family: var(--sans); font-size: 0.9rem;
  flex: 1; min-width: 80px; background: transparent; color: var(--ink); padding: 2px 0;
}
.msg-to-dropdown {
  display: none; position: absolute; top: 100%; left: 74px; right: 0;
  background: #fff; border: 1px solid #dde3f0; border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.14); max-height: 220px; overflow-y: auto;
  z-index: 3100;
}
.msg-to-dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  cursor: pointer; transition: background .12s; font-size: 0.88rem;
}
.msg-to-dropdown-item:hover { background: #f6f8ff; }
.mdi-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--teal); color: #fff; overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem;
}
.mdi-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.mdi-name { flex: 1; font-weight: 500; }
.mdi-role { font-size: 0.74rem; color: #aaa; text-transform: capitalize; }
.msg-compose-body {
  flex: 1; min-height: 160px; max-height: 280px; border: none; width: 100%;
  box-sizing: border-box; font-family: var(--sans); font-size: 0.94rem;
  resize: none; color: var(--ink); outline: none; line-height: 1.65;
  padding: 14px 16px;
}
.msg-compose-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-top: 1px solid #f2f4fb; background: #fafbfe;
}
.msg-send-btn {
  background: var(--teal); color: var(--ivory); border: none;
  border-radius: 22px; padding: 9px 22px; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; font-family: var(--sans); transition: background .2s;
  display: flex; align-items: center; gap: 6px; letter-spacing: .02em;
}
.msg-send-btn:hover { background: var(--teal-deep); }
.msg-send-btn .msb-ico { font-size: 1rem; }
.mf-limit { font-size: 0.76rem; color: #bbb; margin-left: 4px; }
.mf-limit.over { color: #e44; }
.msg-discard-btn {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: 1rem; color: #aaa; padding: 6px; border-radius: 6px;
  transition: color .15s, background .15s;
}
.msg-discard-btn:hover { color: var(--terracotta-d); background: #fff0ee; }

/* ============================================================
   MESSAGES — responsive
   ============================================================ */
@media (max-width: 700px) {
  .msg-shell { grid-template-columns: 1fr; height: auto; }
  .msg-sidebar { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid #e0e4f0; padding: 10px 8px 6px; }
  .msg-compose-btn { margin: 0 0 6px; padding: 9px 14px; font-size: 0.82rem; }
  .msg-nav-item { border-radius: 8px; padding: 8px 12px; flex: 1; justify-content: center; font-size: 0.8rem; }
  .msg-nav-item .mni-label { display: none; }
  .msg-row { grid-template-columns: 36px 1fr 60px; }
  .mr-sender { display: none; }
  .msg-compose-box { width: 100%; border-radius: 14px 14px 0 0; }
  .msg-compose-modal { right: 0; left: 0; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 760px) {
  .dash.show { display: block; min-height: 100vh; }

  /* top app bar: brand + compact controls */
  .dash-side {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 8px 12px; box-shadow: 0 2px 14px rgba(0,0,0,0.28);
  }
  .dash-side .ds-brand { margin: 0 auto 0 0; gap: 8px; }
  .dash-side .ds-brand .brand-mark { width: 30px; height: 30px; font-size: 1.1rem; }
  .dash-side .ds-brand .ds-name { font-size: 0.95rem; }
  .dash-side .ds-spacer { display: none; }

  .dash-side .ds-foot {
    border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px;
  }
  .dash-side .ds-foot .field { margin: 0 !important; }
  .dash-side .ds-foot #staffLang { padding: 6px 8px; font-size: 0.74rem; max-width: 92px; }
  .dash-side .ds-user { margin: 0; }
  .dash-side .ds-user .ds-user-info { display: none; }
  .dash-side .btn-signout-side { width: auto; padding: 7px 11px; font-size: 0.74rem; }
  .dash-side .btn-home-side { display: none; }

  /* bottom tab bar: the panel nav */
  .ds-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    flex-direction: row; gap: 2px;
    background: var(--teal-deep); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 14px rgba(0,0,0,0.28);
  }
  .ds-nav .nav-item {
    position: relative; flex: 1; flex-direction: column; gap: 3px;
    width: auto; padding: 7px 3px; border-radius: 10px;
    font-size: 0.62rem; text-align: center; line-height: 1.2;
  }
  .ds-nav .nav-item .ni-ico { width: auto; font-size: 1.3rem; }
  .ds-nav .nav-item .ni-label { display: block; }
  .ds-nav .nav-item .ni-count { position: absolute; top: 2px; right: 22%; margin: 0; }

  /* main content clears the fixed bars */
  .dash-main { max-height: none; overflow: visible; padding: 70px 14px calc(74px + env(safe-area-inset-bottom, 0px)); }
  .dash-panel h2 { font-size: 1.55rem; }

  .chat-console { grid-template-columns: 1fr; height: auto; }
  .cc-threads { max-height: 220px; }
  .cc-conv { min-height: 60vh; }
}
@media (max-width: 420px) {
  .dash-side .ds-brand .ds-name { display: none; }
  .ds-nav .nav-item .ni-label { font-size: 0.58rem; }
}

/* ===================== Login self-service (forgot / new staff) ===================== */
.auth-card { display: none; }
.auth-card.show { display: block; }
.login-links { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin-top: 16px; }
.login-link { background: none; border: none; color: var(--teal-soft); font-family: var(--sans); font-size: 0.82rem; font-weight: 600; cursor: pointer; padding: 2px 4px; }
.login-link:hover { color: var(--teal-deep); text-decoration: underline; }
.login-hint { font-size: 0.74rem; color: var(--ink-soft); margin-top: 5px; }
.login-card .auth-back { display: inline-block; margin-top: 16px; font-size: 0.84rem; color: var(--teal-soft); background: none; border: none; cursor: pointer; font-family: var(--sans); }
.login-card .auth-back:hover { text-decoration: underline; }
.auth-step .field { margin-bottom: 12px; }

/* ===================== Site Editor — tabs ===================== */
.ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; max-width: 720px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.ed-tab { border: none; background: none; font-family: var(--sans); font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); padding: 10px 14px; cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.ed-tab:hover { color: var(--teal-deep); }
.ed-tab.active { color: var(--teal-deep); border-bottom-color: var(--teal-deep); }
.ed-tabpane { display: none; }
.ed-tabpane.show { display: block; }

/* group thumbnail + per-field "view on site" */
.ed-grp-thumb { width: 40px; height: 30px; border-radius: 6px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); flex-shrink: 0; }
.ed-grp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.ed-grp-thumb.empty { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 6px, #fff 6px, #fff 12px); }
.ed-grp-title { flex: 1; }
.ed-field-view { margin-left: auto; font-size: 0.74rem; font-weight: 600; color: var(--teal-soft); text-decoration: none; white-space: nowrap; }
.ed-field-view:hover { text-decoration: underline; }
.ed-field-status.translating { color: var(--terracotta-d); }

/* "view on site" highlight — pulsing gold outline on the targeted element */
@keyframes site-hl-pulse {
  0%   { outline-color: transparent;      background-color: transparent; }
  18%  { outline-color: var(--gold);       background-color: rgba(201,162,75,0.22); }
  65%  { outline-color: var(--gold);       background-color: rgba(201,162,75,0.10); }
  100% { outline-color: transparent;      background-color: transparent; }
}
.site-hl {
  outline: 3px solid transparent;
  outline-offset: 5px;
  border-radius: 4px;
  animation: site-hl-pulse 2.8s ease forwards;
}

/* whole-section glow when the editor opens "View on site" for a section */
@keyframes site-hl-section-pulse {
  0%   { box-shadow: inset 0 0 0 0 rgba(201,162,75,0);   background-color: transparent; }
  20%  { box-shadow: inset 0 0 0 4px rgba(201,162,75,0.9); background-color: rgba(201,162,75,0.10); }
  70%  { box-shadow: inset 0 0 0 4px rgba(201,162,75,0.6); background-color: rgba(201,162,75,0.05); }
  100% { box-shadow: inset 0 0 0 0 rgba(201,162,75,0);   background-color: transparent; }
}
.site-hl-section { animation: site-hl-section-pulse 3.2s ease forwards; }

/* floating "this is what you're editing" banner (opened from the Site Editor) */
.edit-locator {
  position: fixed; top: 18px; left: 50%; transform: translate(-50%, -24px);
  z-index: 4000; max-width: min(92vw, 460px);
  background: var(--teal-deep, #073d3b); color: #fff;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28); border: 1px solid rgba(201,162,75,0.7);
  opacity: 0; pointer-events: none; transition: opacity .35s ease, transform .35s ease;
}
.edit-locator.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .site-hl-section { animation: none; box-shadow: inset 0 0 0 4px rgba(201,162,75,0.8); }
  .edit-locator { transition: opacity .2s ease; }
}

/* ===================== Site Editor — photo manager ===================== */
#edMediaSets { display: flex; flex-direction: column; gap: 12px; }
.ed-mset { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ed-mset.is-edited { box-shadow: inset 3px 0 0 var(--gold); }
.ed-mset > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-weight: 600; color: var(--teal-deep); background: var(--paper); user-select: none; }
.ed-mset > summary::-webkit-details-marker { display: none; }
.ed-mset > summary::after { content: "▸"; margin-left: 4px; transition: transform .2s; color: var(--ink-soft); }
.ed-mset[open] > summary::after { transform: rotate(90deg); }
.ed-mset-thumb { width: 52px; height: 38px; border-radius: 7px; overflow: hidden; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.ed-mset-thumb img, .ed-mset-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-mset-thumb.empty { background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 6px, #fff 6px, #fff 12px); }
.ed-mset-title { flex: 1; }
.ed-mset-count { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.ed-mset-body { padding: 14px 16px; border-top: 1px solid var(--line); }
.ed-mset-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ed-mset-toolbar .ed-field-view { margin-left: 0; }
.ed-mset-toolbar .ed-field-reset { margin-top: 0; margin-left: auto; }
.ed-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ed-tile { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); aspect-ratio: 4 / 3; cursor: grab; }
.ed-tile:active { cursor: grabbing; }
.ed-tile.is-dragging { opacity: 0.35; }
.ed-tile.drag-over { outline: 2px dashed var(--teal, #0c5b58); outline-offset: 3px; }
.ed-tile-add { cursor: default; }
.ed-tile > img, .ed-tile > video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-tile.is-video::before { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); pointer-events: none; }
.ed-tile-num { position: absolute; top: 4px; left: 4px; background: rgba(7,61,59,.78); color: #fff; font-size: 0.66rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.ed-tile-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 2px; padding: 4px; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); }
.ed-tile-btn { flex: 1; border: none; background: rgba(255,255,255,.92); color: var(--teal-deep); border-radius: 6px; padding: 4px 0; font-size: 0.8rem; line-height: 1; cursor: pointer; }
.ed-tile-btn:hover { background: #fff; }
.ed-tile-btn:disabled { opacity: 0.35; cursor: default; }
.ed-tile-btn.danger { color: var(--terracotta-d); }
.ed-tile-add { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 10px; background: #fff; border-style: dashed; aspect-ratio: 4 / 3; }
.ed-add-up { border: 1px solid var(--teal-soft); background: var(--paper); color: var(--teal-deep); border-radius: 8px; padding: 8px; font-size: 0.8rem; font-weight: 600; font-family: var(--sans); cursor: pointer; }
.ed-add-up:hover { background: #fff; }
.ed-add-url { display: flex; }
.ed-add-url input { width: 100%; font-family: var(--sans); font-size: 0.74rem; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; }
.ed-add-url input:focus { outline: none; border-color: var(--teal-soft); }

/* ----- cover chooser (each section's main photo/video) ----- */
.ed-tile-cover { position: absolute; top: 4px; right: 4px; background: var(--gold, #c9a24b); color: #2a2410; font-size: 0.6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ed-tile-btn.cover { color: #9a7b1f; }
.ed-tile-btn.cover:not(:disabled):hover { background: var(--gold-light, #e0c178); }
.ed-cover-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--gold, #c9a24b); border-radius: 10px; background: rgba(201,162,75,.07); }
.ed-cover-text { display: flex; flex-direction: column; gap: 2px; min-width: 180px; }
.ed-cover-title { font-weight: 700; font-size: 0.82rem; color: var(--teal-deep); }
.ed-cover-hint { font-size: 0.72rem; color: var(--ink-soft); line-height: 1.4; }
.ed-cover-btns { display: flex; gap: 8px; flex-shrink: 0; }
.ed-cover-up, .ed-cover-gal { border: 1px solid var(--teal-soft); background: var(--paper); color: var(--teal-deep); border-radius: 8px; padding: 8px 12px; font-size: 0.78rem; font-weight: 600; font-family: var(--sans); cursor: pointer; white-space: nowrap; }
.ed-cover-up:hover, .ed-cover-gal:hover { background: #fff; }

/* ===================== Gallery Picker Modal ===================== */
.gp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.gp-box { background: var(--paper, #f8f5f0); border-radius: 16px; max-width: 860px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,.28); }
.gp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.gp-title { font-weight: 700; font-size: 1rem; color: var(--teal-deep); }
.gp-close { border: none; background: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-soft); padding: 4px 8px; border-radius: 6px; font-family: var(--sans); }
.gp-close:hover { background: var(--line); }
.gp-body { overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 20px; }
.gp-section-label { font-weight: 600; font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.gp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 7px; }
.gp-thumb { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.gp-thumb:hover, .gp-thumb:focus-visible { border-color: var(--teal, #0c5b58); box-shadow: 0 0 0 3px rgba(12,91,88,.18); outline: none; }
.gp-thumb img, .gp-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.gp-thumb.is-video::after { content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; text-shadow: 0 1px 5px rgba(0,0,0,.65); pointer-events: none; }
.ed-add-btns { display: flex; gap: 6px; }
.ed-add-btns .ed-add-up, .ed-add-btns .ed-add-gal { flex: 1; }
.ed-add-gal { border: 1px solid var(--teal-soft); background: var(--paper); color: var(--teal-deep); border-radius: 8px; padding: 8px; font-size: 0.8rem; font-weight: 600; font-family: var(--sans); cursor: pointer; }
.ed-add-gal:hover { background: #fff; }

/* ===================== Site Editor — history ===================== */
.ed-hist-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.eh-head { display: flex; align-items: baseline; gap: 10px; }
.eh-who { font-weight: 700; color: var(--teal-deep); font-size: 0.9rem; }
.eh-time { margin-left: auto; font-size: 0.74rem; color: var(--ink-soft); }
.eh-desc { font-size: 0.86rem; color: var(--ink); margin-top: 2px; }
.eh-diff { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.78rem; }
.eh-from, .eh-to { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eh-from { color: var(--ink-soft); text-decoration: line-through; }
.eh-to { color: #1d7a3a; }
.eh-arrow { color: var(--ink-soft); }

/* ===================== Password reset requests ===================== */
.reset-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.reset-row.handled { opacity: 0.55; }
.rr-ico { font-size: 1.3rem; flex-shrink: 0; }
.rr-main { flex: 1; min-width: 0; }
.rr-title { font-weight: 700; color: var(--teal-deep); font-size: 0.88rem; }
.rr-who { font-size: 0.85rem; }
.rr-meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.rr-time { font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; }
.rr-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.rr-actions button { border: none; background: var(--teal-soft); color: #fff; border-radius: 8px; padding: 6px 11px; font-size: 0.74rem; font-weight: 600; font-family: var(--sans); cursor: pointer; }
.rr-actions .btn-activate { background: #2bb35a; }
.rr-actions .rr-del { background: var(--terracotta); }
@media (max-width: 560px) {
  .reset-row { flex-wrap: wrap; }
  .rr-time { order: 3; }
}

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.profile-modal-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0,0,0,.48);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.profile-modal-overlay[hidden] { display: none; }
.profile-modal-box {
  background: #fff; border-radius: 18px;
  width: min(420px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  box-shadow: 0 16px 60px rgba(0,0,0,.28);
  animation: profileSlideIn .2s cubic-bezier(.22,.68,0,1.2);
}
@keyframes profileSlideIn {
  from { transform: translateY(-20px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.profile-modal-head {
  background: var(--teal-deep); color: var(--ivory);
  padding: 16px 20px; border-radius: 18px 18px 0 0;
  display: flex; align-items: center; gap: 10px;
}
.profile-modal-head span { flex: 1; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.pmh-close {
  background: none; border: none; color: var(--ivory); cursor: pointer;
  font-size: 1.1rem; padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.pmh-close:hover { background: rgba(255,255,255,.18); }
.profile-modal-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 24px; }
.pm-photo-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pm-photo {
  width: 86px; height: 86px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-family: var(--serif); font-weight: 700;
  overflow: hidden; flex-shrink: 0;
}
.pm-photo img { width: 100%; height: 100%; object-fit: cover; }
.pm-user-info { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pm-display-name { margin: 0; font-weight: 600; font-size: 0.98rem; color: var(--teal-deep); }
.pm-display-email { margin: 0; font-size: 0.82rem; color: #888; }
.pm-change-photo { padding: 9px 20px !important; font-size: 0.82rem !important; }
.pm-section-pass { display: flex; flex-direction: column; }
.pm-section-title {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: .07em;
  color: #999; font-weight: 700; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.pm-section-pass .field { margin-bottom: 10px; }
.pm-pass-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; gap: 10px;
}
.pm-forgot-link {
  background: none; border: none; padding: 0;
  color: var(--teal-soft); font-size: 0.83rem; cursor: pointer;
  font-family: var(--sans); text-decoration: underline;
}
.pm-forgot-link:hover { color: var(--teal-deep); }
.pm-save { padding: 10px 22px !important; font-size: 0.88rem !important; }
