/* Unakoti — mobile-first design system (panels + shared) */
:root {
  --bg: #f3efe6;
  --bg-deep: #e7e0d2;
  --surface: #fffdf8;
  --ink: #1c1917;
  --muted: #57534e;
  --brand: #1b4332;
  --brand-2: #2d6a4f;
  --accent: #bc6c25;
  --accent-soft: #f3e0c8;
  --line: #d6d3d1;
  --danger: #9f1239;
  --ok: #166534;
  --warn: #a16207;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --bottom-nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(45,106,79,.12), transparent 40%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
  line-height: 1.5;
}
body.has-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; min-height: 44px; padding: .7rem 1.1rem;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; cursor: pointer; text-decoration: none;
  font: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); text-decoration: none; color: #fff; }
.btn-secondary { background: var(--accent-soft); color: var(--ink); border-color: #e7d3b5; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }

.section { padding: 2rem 0; }
.section h2 {
  font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 .35rem; color: var(--brand);
}
.section .lead { color: var(--muted); margin: 0 0 1.25rem; }

.grid { display: grid; gap: 1rem; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }

.tile {
  background: var(--surface); border: 1px solid rgba(28,25,23,.06);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
}
.tile h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

.flash {
  padding: .85rem 1rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 600;
  word-break: break-word;
}
.flash-success { background: #dcfce7; color: var(--ok); }
.flash-error { background: #ffe4e6; color: var(--danger); }
.flash-info { background: #e0f2fe; color: #075985; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; max-width: 100%; min-height: 44px; padding: .65rem .8rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit;
}
.form-group textarea { min-height: 110px; }
.form-group input[type="file"] { padding: .45rem; }
.help { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.notice-box {
  background: var(--accent-soft); border: 1px solid #e7d3b5;
  border-radius: 12px; padding: 1rem; margin: 1rem 0;
}

.badge {
  display: inline-flex; align-items: center; padding: .2rem .55rem;
  border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase;
}
.badge-pending { background: #fef3c7; color: var(--warn); }
.badge-accepted { background: #e0e7ff; color: #3730a3; }
.badge-confirmed { background: #dcfce7; color: var(--ok); }
.badge-rejected, .badge-cancelled { background: #ffe4e6; color: var(--danger); }
.badge-completed { background: #e7e5e4; color: #44403c; }

/* ---------- Panels ---------- */
.panel-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
  position: relative;
}
.panel-content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.panel-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: .65rem; padding: .7rem .85rem;
  background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 30;
}
.panel-top a { color: #fff; }
.panel-brand { font-family: var(--font-display); font-weight: 700; }
.panel-title-truncate {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .95rem;
}
.panel-user-chip {
  max-width: 34vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .78rem; opacity: .92;
}
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px; background: #fff; color: #111; cursor: pointer; flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 45;
}
.sidebar-backdrop.is-on { display: block; }

.sidebar {
  display: none;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(86vw, 300px);
  z-index: 50;
  background: #102a20; color: #d8f3dc;
  padding: 0 0 1rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: 8px 0 30px rgba(0,0,0,.25);
  visibility: hidden;
  pointer-events: none;
}
.sidebar.open {
  display: block;
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; background: #102a20; z-index: 1;
}
.sidebar-close {
  width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: transparent; color: #fff; cursor: pointer; font-size: 1rem;
}
.sidebar a {
  display: block; color: #d8f3dc; padding: .75rem 1rem; border-radius: 0; font-weight: 600;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.08); text-decoration: none; }

.panel-main {
  padding: 1rem .85rem 1.25rem;
  min-width: 0;
}
.stat-grid { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
.stat {
  background: var(--surface); border-radius: 12px; padding: .9rem; box-shadow: var(--shadow);
}
.stat .n { font-size: 1.35rem; font-weight: 800; color: var(--brand); }
.stat .l { color: var(--muted); font-size: .82rem; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.data {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border-radius: 12px; overflow: hidden; min-width: 560px;
}
table.data th, table.data td {
  padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
  font-size: .9rem;
}
table.data th { background: #efe8da; font-size: .8rem; }

.card-list { display: grid; gap: .75rem; }
.order-card {
  background: var(--surface); border-radius: 12px; padding: 1rem;
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04);
}
.order-card .row { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.muted { color: var(--muted); }

/* Forms inside tiles on small screens */
.panel-main .tile,
.panel-main form.tile { max-width: 100%; }
.panel-main .grid { width: 100%; }
.panel-main label input[type="checkbox"] { width: auto; min-height: auto; }

/* ---------- Bottom mobile nav ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  min-height: var(--bottom-nav-h);
  padding: .35rem .2rem calc(.35rem + var(--safe-bottom));
  background: #0f241b;
  border-top: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
}
.bottom-nav-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.72);
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  min-height: 52px;
  padding: .25rem .15rem;
  font-size: .62rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.1;
  text-align: center;
}
.bottom-nav-item .bn-ico {
  font-size: 1.05rem;
  line-height: 1;
}
.bottom-nav-item.is-active,
.bottom-nav-item:hover {
  color: #fff;
}
.bottom-nav-item.is-active {
  color: #e4b93c;
}
.bottom-nav-item span:not(.bn-ico) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  padding: 0 .1rem;
}

.stack-form {
  display: grid;
  gap: .5rem;
  margin-top: .65rem;
}
.stack-form select,
.stack-form button {
  width: 100%;
  min-height: 44px;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

/* Module checkbox wrap */
.panel-main label input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0;
}
.panel-main label[style*="inline-flex"] {
  display: inline-flex !important;
  flex-wrap: wrap;
  margin: .25rem .5rem .25rem 0 !important;
}

/* Public bottom nav */
.public-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: var(--bottom-nav-h);
  padding: .35rem .2rem calc(.35rem + var(--safe-bottom));
  background: #1b3b2b;
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -10px 28px rgba(0,0,0,.2);
}
body.is-public.has-public-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
}
body.is-public.has-public-bottom-nav .uh-footer-bar {
  margin-bottom: 0;
}
body.is-public.has-public-bottom-nav .uh-cta-band {
  padding-bottom: 2.5rem;
}

.panel-main .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
@media (max-width: 767px) {
  .mobile-only-cards { display: grid; }
  .mobile-only-cards + .table-wrap { display: none; }
  .panel-main .grid-2,
  .panel-main .grid-3 { grid-template-columns: 1fr !important; }
  .panel-main form[style*="display:flex"] {
    display: grid !important;
    gap: .5rem;
    width: 100%;
  }
  .panel-main form[style*="display:flex"] select,
  .panel-main form[style*="display:flex"] input,
  .panel-main form[style*="display:flex"] button {
    width: 100%;
  }
  .cta-row .btn,
  .panel-main .btn { max-width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  body.nav-open .sidebar {
    display: block;
    visibility: visible;
    pointer-events: auto;
  }
  .panel-main .cta-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .panel-main .cta-actions .btn,
  .panel-main .order-card .btn {
    width: 100%;
  }
  .panel-main form[style*="display:inline"] {
    display: block !important;
    margin-bottom: .4rem;
  }
  .panel-main form[style*="display:inline"] .btn {
    width: 100%;
  }
  .sidebar {
    visibility: hidden;
  }
  .sidebar.open {
    visibility: visible;
  }
}

@media (min-width: 768px) {
  body.has-bottom-nav { padding-bottom: 0; }
  .bottom-nav,
  .public-bottom-nav { display: none; }
  body.is-public.has-public-bottom-nav { padding-bottom: 0; }

  .mobile-only-cards { display: none; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }

  .panel-shell { grid-template-columns: 250px 1fr; }
  .sidebar-backdrop { display: none !important; }
  .sidebar {
    display: block;
    position: sticky;
    top: 0;
    height: 100vh;
    width: auto;
    transform: none;
    box-shadow: none;
    transition: none;
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar.open {
    display: block;
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
  .sidebar-head .sidebar-close,
  .panel-top .nav-toggle { display: none; }
  .panel-user-chip { max-width: 220px; font-size: .85rem; }
  .panel-main { padding: 1.25rem 1.35rem 2rem; }
  table.data { display: table; min-width: 0; }
}

.panel-dev-credit {
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  padding: .65rem .85rem;
  border-top: 1px solid rgba(28,25,23,.08);
  background: rgba(255,253,248,.92);
  margin-top: auto;
}
.panel-dev-credit a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}
.panel-dev-credit a:hover { text-decoration: underline; }

/* —— Panel design system (admin + provider) —— */
.panel-main {
  background:
    radial-gradient(circle at top right, rgba(45,106,79,.06), transparent 42%),
    linear-gradient(180deg, #f4f1ea 0%, #ebe6db 100%);
}
.panel-top {
  background: linear-gradient(120deg, #102a20 0%, #1b4332 55%, #2d6a4f 100%);
  box-shadow: 0 8px 24px rgba(16,42,32,.18);
}
.sidebar {
  background: linear-gradient(180deg, #0d241a 0%, #102a20 40%, #143328 100%);
}
.sidebar-head {
  background: rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-head .panel-brand {
  margin: 0; color: #fff; font-size: 1.05rem;
}
.sidebar-nav-label {
  margin: .85rem 1rem .25rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(216,243,220,.45);
}
.sidebar a {
  display: block;
  margin: 0 .55rem; padding: .62rem .8rem; border-radius: 10px;
  color: rgba(216,243,220,.88); font-size: .9rem; font-weight: 600;
  text-decoration: none;
}
.sidebar a:hover,
.sidebar a.active {
  background: rgba(255,255,255,.08); color: #fff; text-decoration: none;
}
.sidebar a.is-active {
  background: rgba(255,255,255,.14); color: #fff;
  box-shadow: inset 3px 0 0 #95d5b2;
}

.panel-page-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  align-items: flex-start; margin: 0 0 1.1rem;
}
.panel-crumb {
  margin: 0 0 .2rem; font-size: .8rem; color: var(--muted); font-weight: 600;
}
.panel-crumb a { color: var(--muted); }
.panel-crumb a:hover { color: var(--brand); }
.panel-page-title {
  margin: 0; font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: var(--brand); line-height: 1.2;
}
.panel-page-sub {
  margin: .3rem 0 0; color: var(--muted); font-size: .9rem; max-width: 40rem;
}
.panel-page-actions {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}

.panel-main > .tile,
.panel-main > form.tile,
.panel-main > .order-card,
.panel-main .tile {
  border: 1px solid rgba(28,25,23,.07);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(28,25,23,.05);
  background: #fffdf8;
}
.panel-main .tile h3,
.panel-main .order-card h3 {
  font-family: var(--font-display); color: var(--brand);
}
.panel-main .stat {
  border: 1px solid rgba(28,25,23,.06);
  border-radius: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.panel-main a.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(27,67,50,.12);
  text-decoration: none;
}
.panel-main .stat .n {
  font-family: var(--font-display);
}
.panel-main table.data {
  border: 1px solid rgba(28,25,23,.07);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(28,25,23,.04);
  overflow: hidden;
}
.panel-main table.data th {
  background: linear-gradient(180deg, #f7f3eb, #efe8da);
  color: var(--brand);
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  font-size: .72rem;
}
.panel-main table.data tbody tr:hover td {
  background: rgba(45,106,79,.04);
}
.panel-main .order-card {
  border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.panel-main .order-card:hover {
  border-color: rgba(27,67,50,.22);
  box-shadow: 0 10px 26px rgba(28,25,23,.08);
}
.panel-main .badge {
  background: #efe8da; color: var(--brand);
}
.panel-main .cta-row .btn,
.panel-page-actions .btn {
  border-radius: 10px;
}
.panel-toolbar {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: end;
  margin-bottom: 1rem; padding: 1rem 1.1rem;
  background: #fffdf8; border: 1px solid rgba(28,25,23,.07);
  border-radius: 14px; box-shadow: 0 6px 18px rgba(28,25,23,.04);
}
.panel-toolbar .form-group { margin: 0; min-width: 180px; flex: 1 1 180px; }
.panel-empty {
  padding: 1.5rem; text-align: center; color: var(--muted);
  background: #fffdf8; border: 1px dashed rgba(28,25,23,.14);
  border-radius: 14px;
}
.panel-pager {
  display: flex; flex-wrap: wrap; gap: .75rem 1rem;
  align-items: center; justify-content: space-between;
  margin: 1rem 0 0; padding: .85rem 1rem;
  background: #fffdf8; border: 1px solid rgba(28,25,23,.07);
  border-radius: 12px;
}
.panel-pager-meta { margin: 0; color: var(--muted); font-size: .88rem; }
.panel-pager-links { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.panel-pager-page { font-size: .88rem; font-weight: 700; color: var(--brand); padding: 0 .35rem; }
.panel-pager .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.room-status-active { background: #d8f3dc; color: #14532d; }
.room-status-occupied { background: #fee2e2; color: #9f1239; }
.room-status-maintenance { background: #fef3c7; color: #92400e; }
.room-status-inactive { background: #e7e5e4; color: #57534e; }
.room-type-summary {
  display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1rem;
}
.room-type-summary .stat { margin: 0; }
.panel-section-title {
  margin: 1.35rem 0 .65rem;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--brand);
}
.panel-main .flash {
  border-radius: 12px;
  border: 1px solid transparent;
}
.panel-main .flash-success { border-color: rgba(22,101,52,.15); }
.panel-main .flash-error { border-color: rgba(159,18,57,.15); }
.panel-main .flash-info { border-color: rgba(7,89,133,.15); }

@media (min-width: 768px) {
  .panel-main { padding: 1.35rem 1.5rem 2.25rem; }
  .panel-shell { grid-template-columns: 260px 1fr; }
}

/* —— Homestay manage editor (tabbed) —— */
.hs-editor { max-width: 1180px; margin: 0 auto 1.5rem; }
.hs-topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  align-items: flex-start; margin-bottom: 1rem;
}
.hs-crumb { margin: 0 0 .2rem; font-size: .82rem; color: var(--muted); }
.hs-crumb a { color: var(--muted); font-weight: 600; }
.hs-page-title {
  margin: 0; font-family: var(--font-display); font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  color: var(--brand); line-height: 1.2;
}
.hs-page-sub { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; max-width: 42rem; }
.hs-topbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

.hs-workspace {
  display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start;
}
.hs-tablist {
  display: flex; flex-wrap: nowrap; gap: .35rem; overflow-x: auto;
  padding: .2rem 0 .75rem; margin-bottom: .15rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.hs-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .75rem; border-radius: 999px; border: 1px solid rgba(28,25,23,.1);
  background: #fff; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.hs-tab:hover { border-color: rgba(27,67,50,.3); color: var(--brand); }
.hs-tab.is-active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.hs-tab-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; border-radius: 999px;
  background: rgba(28,25,23,.08); font-size: .68rem; font-weight: 800;
}
.hs-tab.is-active .hs-tab-num { background: rgba(255,255,255,.22); }

.hs-panel { display: none; }
.hs-panel.is-active { display: block; }
/* Keep inactive detail panels in the DOM for HTML5 required validation */
.hs-tab-form > .hs-panel:not(.is-active) {
  display: block !important;
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.hs-panel-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem;
  margin: .85rem 0 0;
}
.hs-lock-banner { margin-bottom: .85rem; }

.hs-card {
  background: var(--surface);
  border: 1px solid rgba(28,25,23,.07);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(28,25,23,.05);
  overflow: hidden;
}
.hs-card + .hs-card { margin-top: .85rem; }
.hs-card-head {
  display: flex; gap: .85rem; align-items: flex-start;
  padding: .95rem 1.15rem;
  border-bottom: 1px solid rgba(28,25,23,.06);
  background: linear-gradient(180deg, #fbfaf7, #f7f4ee);
}
.hs-card-head h2 {
  margin: 0; font-family: var(--font-display); font-size: 1.1rem; color: var(--brand);
}
.hs-card-head p { margin: .12rem 0 0; color: var(--muted); font-size: .86rem; }
.hs-step {
  flex: 0 0 auto; width: 2rem; height: 2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 800;
}
.hs-card-body { padding: 1.05rem 1.15rem 1.15rem; }
.hs-status-field { max-width: 220px; }

.hs-check-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem;
}
.hs-check-grid-2 { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.hs-check-grid-3 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.hs-check {
  display: flex; align-items: center; gap: .5rem;
  margin: 0; padding: .55rem .7rem;
  border: 1px solid rgba(28,25,23,.1); border-radius: 10px;
  background: #fff; cursor: pointer; font-weight: 600; font-size: .88rem;
}
.hs-check:hover { border-color: rgba(27,67,50,.28); }
.hs-check input { width: auto; min-height: auto; margin: 0; }
.hs-check-inline { display: inline-flex; max-width: max-content; }

.hs-badge {
  display: inline-flex; align-items: center; padding: .2rem .5rem;
  border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase;
}
.hs-badge-ok { background: #dcfce7; color: #166534; }
.hs-badge-warn { background: #fef3c7; color: #92400e; }
.hs-badge-muted { background: #e7e5e4; color: #44403c; }

.hs-aside { display: grid; gap: .85rem; }
.hs-aside-card {
  background: var(--surface); border: 1px solid rgba(28,25,23,.07);
  border-radius: 14px; padding: 1rem; box-shadow: 0 6px 18px rgba(28,25,23,.04);
}
.hs-aside-card h3 { margin: 0 0 .65rem; font-size: .95rem; color: var(--ink); }
.hs-aside-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .55rem;
}
.hs-aside-card-head h3 { margin: 0; }
.hs-aside-status {
  background: linear-gradient(160deg, #1b4332, #2d6a4f);
  color: #f4faf6; border: none;
}
.hs-aside-status h3 { color: #fff; }
.hs-aside-status-pill {
  display: inline-flex; margin: 0 0 .75rem; padding: .35rem .75rem;
  border-radius: 999px; font-size: .78rem; font-weight: 800; text-transform: uppercase;
  background: rgba(255,255,255,.16); color: #fff;
}
.hs-aside-status .help { color: rgba(255,255,255,.75); }
.hs-aside-meta { margin: 0; display: grid; gap: .45rem; }
.hs-aside-meta div { display: grid; gap: .05rem; }
.hs-aside-meta dt { font-size: .72rem; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.hs-aside-meta dd { margin: 0; font-size: .88rem; font-weight: 600; }
.hs-aside-cover {
  height: 120px; border-radius: 10px; background-size: cover; background-position: center;
  background-color: rgba(255,255,255,.12);
}
.hs-aside-cover-empty {
  display: flex; align-items: center; justify-content: center;
  background: #f3f0ea; color: var(--muted); font-size: .85rem; font-weight: 600;
}
.hs-quick-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.hs-quick-link {
  width: 100%; display: flex; align-items: center; gap: .55rem;
  padding: .45rem .5rem; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; text-align: left;
}
.hs-quick-link span {
  flex: 0 0 auto; width: 1.45rem; height: 1.45rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; background: #f0ece4; font-size: .68rem; font-weight: 800; color: var(--brand);
}
.hs-quick-link:hover, .hs-quick-link.is-active { background: #f3f0ea; color: var(--brand); }
.hs-quick-link.is-active span { background: var(--brand); color: #fff; }

.hs-photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem;
  margin-bottom: 1rem;
}
.hs-photo-card {
  margin: 0; background: #fff; border: 1px solid rgba(28,25,23,.08);
  border-radius: 12px; overflow: hidden;
}
.hs-photo-thumb {
  height: 100px; background-size: cover; background-position: center; background-color: #e7e5e4;
}
.hs-photo-card figcaption { padding: .5rem .6rem .65rem; }
.hs-photo-actions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.hs-btn-xs { min-height: 30px; padding: .2rem .5rem; font-size: .72rem; border-radius: 8px; }
.hs-upload-row { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.hs-upload-box {
  padding: .9rem; border: 1px dashed rgba(28,25,23,.18); border-radius: 12px; background: #fafaf8;
}
.hs-upload-box h3 { margin: 0 0 .55rem; font-size: .95rem; }

.hs-rooms-layout { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.hs-subhead { margin: 0 0 .65rem; font-size: .95rem; }
.hs-room-card {
  border: 1px solid rgba(28,25,23,.08); border-radius: 12px;
  padding: .8rem .9rem; margin-bottom: .65rem; background: #fff;
}
.hs-room-card.is-active { border-color: rgba(27,67,50,.35); box-shadow: 0 0 0 2px rgba(45,106,79,.12); }
.hs-room-card-top {
  display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; margin-bottom: .2rem;
}
.hs-room-codes { margin: .4rem 0 .55rem; padding-left: 1.05rem; color: var(--muted); font-size: .85rem; }
.hs-room-codes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f5f5f4; padding: .05rem .3rem; border-radius: 4px; color: var(--ink);
}
.hs-side-form {
  border: 1px solid rgba(28,25,23,.08); border-radius: 12px;
  padding: .9rem; background: #fafaf8; margin-bottom: .75rem;
}
.hs-side-form h3 { margin: 0 0 .65rem; font-size: 1rem; color: var(--brand); }
.hs-mini-head {
  margin: .7rem 0 .35rem; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); font-weight: 700;
}

.hs-footbar {
  position: sticky; bottom: calc(var(--bottom-nav-h, 0px) + var(--safe-bottom, 0px) + 6px);
  z-index: 25; margin-top: 1.15rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: rgba(255,253,248,.97);
  border: 1px solid rgba(28,25,23,.1);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(28,25,23,.12);
  backdrop-filter: blur(8px);
}

@media (min-width: 980px) {
  .hs-workspace { grid-template-columns: minmax(0, 1fr) 260px; }
  .hs-aside { position: sticky; top: .75rem; }
  .hs-upload-row { grid-template-columns: 1fr 1fr; }
  .hs-rooms-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, .95fr); }
  .hs-footbar { bottom: 10px; }
  .hs-tablist { display: none; }
}

/* Safe edit: filled fields locked until user clicks Edit */
.uh-safe-edit-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  background: #f3f0ea;
  border: 1px solid rgba(28, 25, 23, .1);
  border-radius: 8px;
  font-size: .9rem;
}
.uh-safe-edit-banner p { margin: 0; flex: 1 1 220px; color: var(--muted); }
.uh-field-locked-wrap {
  position: relative;
}
.uh-field-locked-wrap.is-locked input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.uh-field-locked-wrap.is-locked select,
.uh-field-locked-wrap.is-locked textarea {
  background: #f5f4f1;
  color: #44403c;
  cursor: default;
  border-color: rgba(28, 25, 23, .12);
}
.uh-field-locked-wrap.is-locked label {
  opacity: .92;
}
.uh-field-edit {
  margin-top: .35rem;
  padding: .15rem .55rem;
  font-size: .75rem;
  font-weight: 600;
  border: 1px solid rgba(28, 25, 23, .18);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: var(--brand, #1c1917);
}
.uh-field-edit:hover { background: #fafaf9; }
label.uh-field-locked-wrap.is-locked .uh-field-edit {
  margin-left: .35rem;
  margin-top: 0;
}
