﻿:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #d9e0ea;
  --line-strong: #c7d0dd;
  --text: #1f2937;
  --muted: #687589;
  --ql-primary-color: 0 122 255;
  --primary: rgb(var(--ql-primary-color));
  --primary-weak: #e6f2ff;
  --success: #1d9a68;
  --success-weak: #e8f7ef;
  --warning: #c27803;
  --warning-weak: #fff4dc;
  --danger: #d64545;
  --danger-weak: #ffecec;
  --teal: #088f8f;
  --violet: #6f4cc3;
  --shadow: 0 10px 28px rgba(24, 39, 75, 0.09);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.top-nav [data-route],
.header-link,
.quick-btn,
.notice-btn,
.side-item,
.side-child,
.room-mode-tabs .tab,
.mobile-menu,
.logout-link {
  cursor: pointer;
}

.login-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 460px;
  background:
    linear-gradient(120deg, rgba(16, 105, 210, 0.88), rgba(8, 143, 143, 0.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='900' viewBox='0 0 1400 900'%3E%3Crect width='1400' height='900' fill='%23eef5ff'/%3E%3Cg fill='none' stroke='%23b7c8df' stroke-width='2' opacity='.55'%3E%3Cpath d='M120 170h260v170H120zM430 170h220v260H430zM710 135h310v205H710zM1070 135h180v315h-180zM110 420h310v210H110zM480 500h240v235H480zM780 410h210v210H780zM1045 530h250v160h-250z'/%3E%3Cpath d='M155 215h70M155 255h160M455 225h140M745 188h210M1110 198h90M145 480h200M510 555h120M825 465h110M1090 585h145'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.68'%3E%3Ccircle cx='250' cy='705' r='42'/%3E%3Ccircle cx='890' cy='720' r='56'/%3E%3Ccircle cx='1190' cy='310' r='34'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.login-visual {
  min-height: 100%;
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  font-weight: 700;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #1769e0;
  background: #fff;
  font-weight: 800;
}

.login-title {
  max-width: 620px;
}

.login-title h1 {
  margin: 0 0 20px;
  font-size: 44px;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-title p {
  margin: 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
  line-height: 1.8;
}

.login-panel-wrap {
  display: grid;
  align-items: center;
  padding: 42px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.login-panel {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.login-panel h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.login-panel .sub {
  margin: 0 0 26px;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  color: #334155;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

.textarea {
  min-height: 78px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.14);
}

.readonly-value {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 22px;
  color: var(--muted);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fff;
  color: var(--text);
  transition: 0.16s ease;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn.primary:hover {
  background: #0f5cca;
  color: #fff;
}

.btn.ghost {
  background: var(--panel-soft);
  border-color: var(--line);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.block {
  width: 100%;
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 48px 1fr;
  overflow: hidden;
}

.app-header {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  z-index: 3;
}

.system-logo {
  width: 140px;
  height: 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.system-logo .brand-mark {
  position: relative;
  width: 34px;
  height: 24px;
  border-radius: 0;
  color: transparent;
  background: transparent;
  overflow: hidden;
}

.system-logo .brand-mark::before,
.system-logo .brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #168cff;
}

.system-logo .brand-mark::before {
  clip-path: polygon(47% 100%, 35% 8%, 49% 0, 60% 100%, 56% 100%, 67% 10%, 83% 18%, 62% 100%);
}

.system-logo .brand-mark::after {
  clip-path: polygon(46% 100%, 0 43%, 16% 34%, 52% 100%, 58% 100%, 96% 35%, 100% 48%, 66% 100%, 86% 100%, 86% 110%, 10% 110%, 10% 100%);
}

.system-logo strong {
  color: #0b8fff;
  font-size: 17px;
  white-space: nowrap;
}

.top-nav {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav [data-route] {
  height: 48px;
  min-width: 58px;
  padding: 0 12px;
  border: 0;
  border-bottom: 4px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  background: transparent;
}

.top-nav [data-route]:hover,
.top-nav [data-route].active {
  color: rgb(var(--ql-primary-color, 23 105 224));
  border-bottom-color: rgb(var(--ql-primary-color, 23 105 224));
  background: transparent;
}

.header-actions {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-right: 8px;
  flex: 0 0 auto;
}

.header-search {
  width: 220px;
  height: 30px;
  min-height: 30px;
  margin-left: 6px;
  padding: 0 10px;
  border-radius: 4px;
}

.header-exit {
  height: 46px;
  min-height: 46px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 13px;
}

.header-link,
.quick-btn {
  border: 0;
  background: transparent;
  color: #334155;
}

.header-link {
  height: 48px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  font-size: 12px;
}

.header-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  color: #334155;
  font-size: 13px;
}

.quick-btn {
  min-width: 46px;
  height: 22px;
  border-radius: 6px;
  padding: 0 7px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.notice-btn {
  position: relative;
  min-width: 22px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #334155;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
}

.notice-btn em {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 20px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 14px;
}

.biz-date {
  color: var(--muted);
}

.body-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  overflow: hidden;
}

.body-shell.home-only {
  grid-template-columns: 1fr;
}

.side-nav,
.sub-sidebar {
  min-width: 0;
  overflow: auto;
  width: 140px;
  background: #f3f6fa;
  border-right: 1px solid #dce3ec;
}

.side-nav {
  padding: 8px 6px 0;
}

.side-group {
  display: grid;
  gap: 0;
}

.side-item,
.side-child {
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
  color: #1f2937;
  margin-bottom: 4px;
  display: grid;
  grid-template-columns: 24px 1fr 14px;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.side-item {
  padding: 0 10px;
  font-weight: 500;
}

.side-child {
  padding: 0 10px 0 34px;
  color: #4b5563;
  grid-template-columns: 1fr;
}

.side-children {
  display: grid;
}

.side-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #111827;
  font-size: 18px;
}

.side-caret {
  color: #1f2937;
  font-size: 15px;
}

.side-item:hover,
.side-child:hover,
.side-item.active,
.side-child.active {
  color: var(--primary);
  background: #e6f2ff;
}

.side-item.open,
.side-item.active .side-icon,
.side-item:hover .side-icon {
  color: var(--primary);
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: 48px 1fr;
  overflow: hidden;
}

.main-home {
  grid-template-rows: 1fr;
}

.main-room {
  grid-template-rows: 1fr;
}

.pagebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.rooms-banner {
  display: grid;
  gap: 0;
  margin-bottom: 10px;
}

.rooms-crumbbar,
.rooms-titlebar {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.rooms-crumbbar {
  border-bottom: 0;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.rooms-crumbbar .crumb {
  gap: 8px;
}

.rooms-crumbbar .crumb strong {
  font-size: 12px;
}

.rooms-crumbbar .search {
  width: 210px;
  min-height: 28px;
}

.rooms-titlebar {
  min-height: 58px;
}

.rooms-titlebar > div:first-child {
  display: grid;
  gap: 2px;
}

.rooms-titlebar strong {
  font-size: 18px;
  line-height: 1.2;
}

.rooms-titlebar span {
  color: var(--muted);
  font-size: 12px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.crumb strong {
  color: var(--text);
  font-size: 18px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  width: 260px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-weak);
  color: var(--primary);
  font-weight: 700;
}

.content {
  overflow: auto;
  padding: 16px;
  background: var(--bg);
}

.main-room .content {
  padding: 10px 12px 12px;
  background: #f4f7fb;
}

.main-home .content {
  padding: 16px;
  background: #f6f8fb;
}

.home-page {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 350px;
  gap: 16px;
  align-items: start;
}

.home-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-greeting {
  min-height: 41px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
}

.home-greeting h2,
.home-greeting h4 {
  margin: 0;
  font-weight: 700;
}

.home-greeting h2 {
  font-size: 24px;
}

.home-greeting h4 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
}

.home-today-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.home-today-card,
.notebook-panel {
  background: #fff;
  border-radius: 6px;
}

.home-today-card {
  min-height: 93px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}

.home-today-card:hover {
  transform: translateY(-1px);
  background: #f8fbff;
}

.home-today-card span {
  color: #475569;
}

.home-today-card strong {
  font-size: 28px;
  line-height: 1;
}

.home-section {
  margin: 0;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
}

.home-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

.home-section-title > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-section-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.home-section-title em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.title-bar {
  width: 4px;
  height: 22px;
  align-self: center;
  border-radius: 2px;
  background: var(--primary);
}

.home-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.home-switch input {
  appearance: none;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #d7dee9;
  position: relative;
  outline: 0;
}

.home-switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .18);
}

.home-switch input:checked {
  background: var(--primary);
}

.home-switch input:checked::after {
  left: 14px;
}

.realtime-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.realtime-card {
  min-width: 194px;
  min-height: 115px;
  flex: 1 1 calc(33.33% - 16px);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  background: #eef2f7;
  cursor: pointer;
}

.metric-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.metric-icon img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.metric-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.realtime-label,
.goal-name {
  color: #475569;
}

.realtime-value {
  font-size: 24px;
  font-weight: 700;
}

.realtime-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.trend i {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid currentColor;
}

.trend.down {
  color: var(--success);
}

.trend.down i {
  transform: rotate(180deg);
}

.trend.up {
  color: var(--danger);
}

.trend.flat {
  color: var(--muted);
}

.trend.flat i {
  display: none;
}

.goal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.goal-card {
  min-width: 270px;
  min-height: 278px;
  flex: 1 1 calc(33.33% - 16px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 6px;
  background: #eef2f7;
  cursor: pointer;
}

.goal-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.goal-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #475569;
  line-height: 1.6;
}

.goal-line strong {
  color: #334155;
}

.goal-line.muted {
  color: #94a3b8;
}

.goal-progress-circle {
  width: 96px;
  height: 96px;
  margin: 4px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--success) var(--progress-deg, 0deg), rgba(29, 154, 104, .18) 0);
}

.goal-progress-circle > div {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  border-radius: 50%;
  background: #eef2f7;
}

.goal-progress-circle strong {
  color: var(--primary);
  font-size: 28px;
}

.goal-progress-circle span {
  color: var(--primary);
}

.goal-foot {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--muted);
}

.goal-foot em {
  font-style: normal;
}

.notebook-panel {
  min-height: 278px;
  padding: 16px;
}

.notebook-panel .home-section-title {
  margin-bottom: 16px;
}

.notebook-panel .home-section-title h2 {
  font-size: 24px;
}

.notebook-empty {
  height: 189px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.empty-illus {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #9aa5b1;
}

.empty-illus svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 4;
}

.search-card {
  margin-bottom: 14px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px 16px;
}

.search-card .field {
  margin: 0;
}

.search-card .field label {
  color: #475569;
  font-size: 13px;
}

.search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.subnav button {
  min-height: 32px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  padding: 5px 13px;
  color: var(--muted);
  background: transparent;
}

.subnav button.active,
.subnav button:hover {
  color: var(--primary);
  background: var(--primary-weak);
}

.notice {
  display: grid;
  grid-template-columns: minmax(96px, 140px) 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bad7f8;
  border-radius: 8px;
  background: #f0f7ff;
}

.notice span {
  color: var(--muted);
  line-height: 1.7;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.filters .input,
.filters .select {
  width: auto;
  min-width: 150px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.compact-stats .stat-card {
  min-height: 86px;
}

.stat-card,
.panel,
.table-card,
.room-card,
.kanban-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-card {
  padding: 16px;
  display: grid;
  gap: 8px;
  min-height: 104px;
}

.stat-label {
  color: var(--muted);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
}

.accounts-stats .stat-card { min-width: 0; min-height: 80px; padding: 12px; }
.accounts-stats .stat-value { font-size: 20px; overflow-wrap: anywhere; }
.accounts-caption { color: var(--muted); font-size: 13px; line-height: 1.6; }
.invoice-filterbar { align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.invoice-filterbar .business-filter { min-width: 150px; flex: 1 1 150px; }
.invoice-filterbar .business-filter:first-child { flex: 2 1 260px; }
.invoice-summary { display: flex; align-items: center; gap: 24px; min-height: 52px; padding: 8px 0; }
.invoice-summary > :last-child { margin-left: auto; }
table.business-wide-table { min-width: 1280px; }

.stat-trend {
  color: var(--success);
  font-size: 13px;
}

.workbench-head,
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workbench-head div {
  display: grid;
  gap: 4px;
}

.workbench-head span,
.report-toolbar span {
  color: var(--muted);
}

.report-toolbar {
  justify-content: flex-start;
}

.report-toolbar .input {
  width: min(360px, 40vw);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.35fr) minmax(320px, 0.9fr);
  gap: 14px;
}

.channel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.channel-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.channel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.dot.on {
  background: var(--success);
}

.channel-card p {
  margin: 0;
  color: var(--muted);
}

.setting-list {
  display: grid;
  gap: 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.setting-row span {
  display: grid;
  gap: 4px;
}

.setting-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
}

.mini-chart {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bar {
  flex: 1;
  min-width: 24px;
  background: linear-gradient(180deg, #40b8aa, #1769e0);
  border-radius: 5px 5px 0 0;
  position: relative;
}

.bar span {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.table-card {
  overflow: auto;
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
}

.table-card:hover {
  scrollbar-width: thin;
  scrollbar-color: #aab6c6 transparent;
}

.table-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.table-card:hover::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-card::-webkit-scrollbar-track {
  background: transparent;
}

.table-card::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #aab6c6;
  background-clip: padding-box;
}

.table-card::-webkit-scrollbar-thumb:hover {
  background: #7b8798;
  background-clip: padding-box;
}

.pager {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.pager span {
  color: var(--muted);
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.order-wide-table {
  width: 2660px;
  min-width: 2660px;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: var(--panel-soft);
  color: #475569;
  font-weight: 700;
}

.order-wide-table th:nth-child(1),
.order-wide-table td:nth-child(1) {
  width: 116px;
}

.order-wide-table th:nth-child(2),
.order-wide-table td:nth-child(2) {
  width: 96px;
}

.order-wide-table th:nth-child(3),
.order-wide-table td:nth-child(3) {
  width: 168px;
}

.order-wide-table th:nth-child(4),
.order-wide-table td:nth-child(4) {
  width: 180px;
}

.order-wide-table th:nth-child(5),
.order-wide-table td:nth-child(5) {
  width: 100px;
}

.order-wide-table th:nth-child(6),
.order-wide-table td:nth-child(6) {
  width: 150px;
}

.order-wide-table th:nth-child(7),
.order-wide-table td:nth-child(7),
.order-wide-table th:nth-child(8),
.order-wide-table td:nth-child(8) {
  width: 98px;
}

.order-wide-table th:nth-child(9),
.order-wide-table td:nth-child(9) {
  width: 190px;
}

.order-wide-table th:nth-child(10),
.order-wide-table td:nth-child(10) {
  width: 90px;
}

.order-wide-table th:nth-child(11),
.order-wide-table td:nth-child(11) {
  width: 96px;
}

.order-wide-table th:nth-child(12),
.order-wide-table td:nth-child(12) {
  width: 160px;
}

.order-wide-table th:nth-child(13),
.order-wide-table td:nth-child(13),
.order-wide-table th:nth-child(14),
.order-wide-table td:nth-child(14) {
  width: 172px;
}

.order-wide-table th:nth-child(15),
.order-wide-table td:nth-child(15) {
  width: 220px;
}

.order-wide-table th:nth-child(16),
.order-wide-table td:nth-child(16),
.order-wide-table th:nth-child(17),
.order-wide-table td:nth-child(17),
.order-wide-table th:nth-child(18),
.order-wide-table td:nth-child(18),
.order-wide-table th:nth-child(19),
.order-wide-table td:nth-child(19) {
  width: 90px;
}

.order-wide-table th:nth-child(20),
.order-wide-table td:nth-child(20) {
  width: 120px;
}

.order-wide-table th:nth-child(21),
.order-wide-table td:nth-child(21) {
  width: 156px;
}

.order-remark-cell {
  position: relative;
  width: 156px;
  max-width: 156px;
  outline: none;
}

.order-remark-preview {
  display: block;
  width: 156px;
  max-width: 156px;
  overflow: hidden;
  color: #334155;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr:hover td {
  background: #fbfdff;
}

.actions {
  display: flex;
  gap: 8px;
}

.link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--primary);
}

.phone-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.phone-toggle {
  min-height: 20px;
  border: 0;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 12px;
  line-height: 18px;
}

.phone-toggle:hover {
  background: rgba(var(--ql-primary-color), 0.16);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.green {
  color: var(--success);
  background: var(--success-weak);
}

.badge.blue {
  color: var(--primary);
  background: var(--primary-weak);
}

.badge.yellow {
  color: var(--warning);
  background: var(--warning-weak);
}

.badge.red {
  color: var(--danger);
  background: var(--danger-weak);
}

.badge.gray {
  color: #667085;
  background: #edf1f6;
}

.room-board-page {
  display: grid;
  gap: 10px;
}

.room-board-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-board-head > div:first-child {
  display: grid;
  gap: 3px;
}

.room-board-head strong {
  font-size: 18px;
}

.room-board-head span,
.room-time,
.room-guest {
  color: var(--muted);
}

.room-head-actions,
.room-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.room-summary-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 8px;
}

.room-summary-item {
  min-height: 78px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-summary-item span,
.room-summary-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.room-summary-item strong {
  font-size: 24px;
  line-height: 1;
}

.room-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.calendar-topbar {
  min-height: 48px;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.calendar-topbar .room-head-actions {
  margin-left: auto;
}

.calendar-topbar .btn.primary {
  min-height: 32px;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
}

.room-filter-bar.compact {
  padding: 8px;
}

.room-filter-bar .input {
  width: 240px;
}

.room-date-switch {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.room-date-switch strong {
  min-width: 92px;
  text-align: center;
}

.room-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.room-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.room-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--line-strong);
}

.room-legend i.available { background: var(--success); }
.room-legend i.booked { background: var(--warning); }
.room-legend i.occupied { background: var(--primary); }
.room-legend i.cleaning { background: #f59e0b; }
.room-legend i.maintenance { background: var(--danger); }
.room-legend i.warn { background: var(--violet); }

.room-floor-section {
  display: grid;
  gap: 10px;
}

.room-floor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.room-floor-head strong {
  color: var(--text);
  font-size: 18px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 10px;
}

.room-card {
  min-height: 184px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 8px;
  align-content: start;
  border-left-width: 5px;
  cursor: pointer;
  position: relative;
}

.room-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(24, 39, 75, 0.08);
  z-index: 5;
}

.room-card-top,
.room-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-no {
  font-size: 20px;
  font-weight: 800;
}

.room-type {
  min-height: 20px;
  font-weight: 700;
}

.room-guest,
.room-time {
  min-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tags {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
}

.room-tags span {
  min-height: 20px;
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
}

.room-card-action {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 9px;
  background: #fff;
  color: var(--primary);
}

.room-card-action:hover {
  border-color: var(--primary);
  background: var(--primary-weak);
}

.room-card.available {
  border-left-color: var(--success);
}

.room-card.booked {
  border-left-color: var(--warning);
}

.room-card.occupied {
  border-left-color: var(--primary);
}

.room-card.cleaning {
  border-left-color: #f59e0b;
}

.room-card.maintenance {
  border-left-color: var(--danger);
}

.room-hover-detail {
  position: absolute;
  left: 12px;
  top: calc(100% - 4px);
  width: min(420px, calc(100vw - 48px));
  display: none;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  text-align: left;
  z-index: 20;
}

.room-card:hover .room-hover-detail,
.room-calendar-cell:hover .room-hover-detail {
  display: grid;
  gap: 8px;
}

body.room-dragging .room-hover-detail {
  display: none !important;
  pointer-events: none;
}

.room-hover-title,
.room-hover-meta,
.room-hover-order {
  display: grid;
  gap: 4px;
}

.room-hover-title {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.room-hover-title span,
.room-hover-meta,
.room-hover-order span,
.room-hover-order em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.room-hover-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.room-hover-order {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.room-calendar-board {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-calendar-row {
  min-width: 1120px;
  display: grid;
  grid-template-columns: 160px repeat(7, minmax(132px, 1fr));
  border-bottom: 1px solid var(--line);
}

.room-calendar-row:last-child {
  border-bottom: 0;
}

.room-calendar-row > div {
  min-height: 74px;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.room-calendar-row > div:last-child {
  border-right: 0;
}

.room-calendar-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--panel-soft);
  font-weight: 700;
}

.room-calendar-head span,
.room-calendar-room span,
.room-calendar-cell span,
.room-calendar-cell em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.room-calendar-cell {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  border-left: 4px solid transparent;
}

.room-calendar-cell.available { border-left-color: var(--success); }
.room-calendar-cell.booked { border-left-color: var(--warning); }
.room-calendar-cell.occupied { border-left-color: var(--primary); }
.room-calendar-cell.cleaning { border-left-color: #f59e0b; }
.room-calendar-cell.maintenance { border-left-color: var(--danger); }

.room-calendar-orders {
  display: grid;
  gap: 4px;
}

.room-calendar-order {
  width: 100%;
  min-height: 34px;
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: grab;
}

.room-calendar-order:hover {
  border-color: var(--primary);
  background: var(--primary-weak);
}

.room-calendar-order.dragging {
  opacity: 0.58;
  cursor: grabbing;
}

.room-calendar-order strong {
  font-size: 12px;
}

.room-calendar-order span,
.room-calendar-empty {
  color: var(--muted);
  font-size: 12px;
}

.room-calendar-cell.drag-over {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  background: #eef7ff;
}

.room-calendar-cell.drop-swap {
  outline-color: var(--warning);
  background: var(--warning-weak);
}

.room-calendar-cell.drop-blocked {
  outline-color: var(--danger);
  background: var(--danger-weak);
}

body.room-dragging .room-calendar-cell {
  box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.15);
}

.room-calendar-cell .room-hover-detail {
  left: 8px;
  top: calc(100% - 2px);
}

.room-filter-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.room-filter-fields.collapsed {
  display: none;
}

.calendar-filter-bar {
  align-items: stretch;
}

.room-date-range {
  min-width: 118px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.room-calendar-gantt {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 -10px 0 rgba(245, 247, 250, 0.7);
}

.calendar-filter-popover {
  position: absolute;
  left: 52px;
  top: 184px;
  z-index: 30;
  width: 420px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #b8d7ff;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.calendar-filter-popover .input {
  width: 150px;
}

.calendar-filter-popover .select {
  width: 110px;
}

.room-calendar-grid {
  min-width: calc(208px + (var(--calendar-days) * 96px));
  display: grid;
  grid-template-columns: 112px 96px repeat(var(--calendar-days), 96px);
  grid-template-rows: 30px 48px 38px 40px;
  grid-auto-rows: 60px;
  position: relative;
  align-items: stretch;
  color: var(--text);
}

.calendar-head-cell,
.room-calendar-type-cell,
.room-calendar-room-cell,
.room-calendar-cell.gantt-cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-head-cell {
  position: sticky;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 4px 6px;
  font-size: 12px;
  text-align: center;
  background: #fff;
}

.calendar-count,
.calendar-unassigned { top: 0; }
.calendar-date,
.calendar-date-control { top: 30px; }
.calendar-week,
.calendar-range { top: 78px; }
.calendar-remain,
.calendar-filter-toggle { top: 116px; }

.calendar-unassigned,
.calendar-date-control,
.calendar-range,
.calendar-filter-toggle {
  left: 0;
  z-index: 12;
}

.calendar-date-control,
.calendar-range,
.calendar-filter-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.calendar-date-control .room-date-input {
  width: 116px;
  min-height: 28px;
  padding: 2px 6px;
  font-size: 12px;
}

.calendar-count span {
  min-width: 22px;
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9ac6ff;
  border-radius: 3px;
  background: #eef6ff;
  color: var(--primary);
  font-weight: 700;
}

.calendar-date strong {
  font-size: 14px;
}

.calendar-date em {
  display: block;
  color: var(--primary);
  font-style: normal;
  font-size: 12px;
}

.calendar-week.weekend,
.calendar-date.weekend {
  color: #ff4d5f;
}

.calendar-remain {
  color: var(--muted);
}

.calendar-head-cell.today,
.room-calendar-cell.gantt-cell.today {
  border-left: 2px solid var(--primary);
}

.room-calendar-type-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 8px;
  background: #fff;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
}

.room-calendar-room-cell {
  position: sticky;
  left: 112px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  border-top: 0;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.room-calendar-room-cell.booked,
.room-calendar-room-cell.occupied {
  background: #e9f4ff;
}

.room-calendar-room-cell.cleaning,
.room-calendar-room-cell.maintenance {
  background: #d1d5db;
}

.room-calendar-room-cell:hover {
  color: var(--primary);
  background: #edf6ff;
}

.room-calendar-cell.gantt-cell {
  min-height: 60px;
  display: grid;
  place-items: center;
  padding: 0;
  border-left: 0;
  color: #5f6977;
  font-size: 12px;
  background: #fff;
}

.room-calendar-cell.gantt-cell.maintenance {
  background: #f6f0ff;
  color: var(--violet);
  font-weight: 700;
}

.room-calendar-cell.gantt-cell:hover {
  background: #eef7ff;
  outline: 1px solid var(--primary);
  outline-offset: -1px;
}

.room-calendar-order.gantt-order {
  position: relative;
  z-index: 4;
  width: auto;
  min-height: 55px;
  height: 55px;
  align-self: center;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  justify-items: start;
  gap: 4px;
  margin: 2px 3px;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  color: #111827;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  overflow: visible;
}

.room-calendar-order.gantt-order strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.room-calendar-order.gantt-order em {
  display: inline-flex;
  gap: 2px;
  color: #fff;
  font-style: normal;
}

.room-calendar-order.gantt-order em span {
  min-width: 18px;
  min-height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  background: #111827;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.room-calendar-order.gantt-order i {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.78);
}

.room-calendar-order.gantt-order.booked { background: #f6a21a; }
.room-calendar-order.gantt-order.occupied { background: #28bee0; }
.room-calendar-order.gantt-order.ota { background: #27c1e4; }
.room-calendar-order.gantt-order.maintenance { background: #9468b2; color: #fff; }
.room-calendar-order.gantt-order.past { background: #858886; color: #fff; }

.room-calendar-order.gantt-order:hover {
  filter: brightness(0.97);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.room-calendar-order.gantt-order:hover .calendar-order-hover {
  display: grid;
  gap: 8px;
}

.calendar-order-hover {
  left: 0;
  top: calc(100% + 4px);
  color: var(--text);
  white-space: normal;
}

.room-future-board {
  display: grid;
  gap: 10px;
}

.room-future-note {
  padding: 10px 12px;
  border: 1px solid #bad7f8;
  border-radius: 8px;
  background: #f0f7ff;
  color: var(--muted);
}

.room-detail-order {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.room-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--panel-soft);
}

.room-detail-hero.available { border-left-color: var(--success); }
.room-detail-hero.booked { border-left-color: var(--warning); }
.room-detail-hero.occupied { border-left-color: var(--primary); }
.room-detail-hero.cleaning { border-left-color: #f59e0b; }
.room-detail-hero.maintenance { border-left-color: var(--danger); }

.room-detail-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.room-detail-no {
  min-width: 72px;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
}

.room-detail-main div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.room-detail-main span,
.room-detail-title span,
.room-detail-field-grid span,
.room-detail-kpis span {
  color: var(--muted);
}

.room-detail-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-detail-status .select {
  min-width: 118px;
}

.room-detail-markers {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-detail-markers span {
  min-height: 22px;
  border-radius: 4px;
  padding: 2px 7px;
  background: var(--primary-weak);
  color: var(--primary);
  font-size: 12px;
}

.room-detail-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.room-detail-kpis div {
  min-height: 64px;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-detail-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.room-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.room-detail-title .actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.room-detail-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.room-detail-field-grid > div {
  min-height: 58px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.room-detail-field-grid .wide {
  grid-column: 1 / -1;
}

.room-detail-field-grid p {
  margin: 0;
  max-height: 72px;
  overflow: auto;
  color: var(--text);
  line-height: 1.6;
}

.room-detail-empty {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-soft);
}

.room-meta {
  color: var(--muted);
  line-height: 1.6;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
}

.tab {
  min-height: 30px;
  padding: 4px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 1px 5px rgba(30, 41, 59, 0.12);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
}

.kanban-col {
  min-width: 0;
  background: #eef3f8;
  border-radius: 8px;
  padding: 10px;
}

.kanban-col h3 {
  margin: 2px 4px 10px;
  font-size: 15px;
}

.kanban-card {
  padding: 12px;
  margin-bottom: 10px;
  display: grid;
  gap: 8px;
}

.audit-stats {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.audit-toolbar {
  align-items: stretch;
}

.audit-date-fields {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.audit-date-item {
  min-width: 150px;
  min-height: 42px;
  padding: 7px 10px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.audit-date-item span {
  color: var(--muted);
  font-size: 12px;
}

.audit-date-item strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.audit-date-item.source {
  min-width: 220px;
}

.audit-grid {
  margin-bottom: 14px;
}

.audit-checks {
  display: grid;
  gap: 14px;
}

.audit-panel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.audit-panel-meta strong {
  color: var(--text);
  font-size: 20px;
}

.audit-desc {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.rate-cell {
  min-height: 104px;
  display: grid;
  gap: 4px;
  justify-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--text);
}

.rate-cell:hover {
  border-color: var(--primary);
}

.rate-cell.closed {
  background: var(--danger-weak);
  border-color: #f3b4b4;
}

.rate-cell span,
.rate-cell em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline > div {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.timeline span {
  color: var(--muted);
}

.money {
  color: #0f766e;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.user-hotel-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  min-height: 36px;
  align-items: center;
}

.user-hotel-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.34);
  z-index: 20;
}

.modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.modal:has(.room-detail-hero) {
  width: min(1040px, 100%);
}

.modal-backdrop:has(.calendar-order-drawer) {
  place-items: stretch end;
  padding: 0;
  background: rgba(15, 23, 42, 0.18);
}

.modal:has(.calendar-order-drawer) {
  width: min(1040px, 100vw);
  max-height: 100vh;
  height: 100vh;
  border-radius: 0;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.18);
}

.calendar-order-drawer {
  height: 100%;
  display: block;
  overflow-y: auto;
  background: #f5f7fb;
  color: #1f2937;
}

.calendar-order-head {
  height: 48px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e5eaf1;
  background: #fff;
}

.calendar-order-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.calendar-order-status-line {
  min-height: 42px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  border-bottom: 1px solid #e5eaf1;
  background: #fff;
  color: #64748b;
  white-space: nowrap;
}

.calendar-order-status-line span {
  position: relative;
  font-size: 13px;
}

.calendar-order-status-line span::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 999px;
  background: #cbd5e1;
  vertical-align: middle;
}

.calendar-order-status-line span.active {
  color: #1677ff;
  font-weight: 700;
}

.calendar-order-status-line span.active::before {
  background: #1677ff;
}

.calendar-order-summary {
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: #fff;
  border-bottom: 1px solid #e5eaf1;
}

.calendar-order-summary div {
  min-height: 54px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  border: 1px solid #edf1f5;
  border-radius: 4px;
  background: #fbfcfe;
}

.calendar-order-summary strong {
  font-size: 20px;
}

.calendar-order-summary span {
  color: #64748b;
  font-size: 13px;
}

.calendar-order-tabs {
  height: 42px;
  padding: 0 18px;
  display: flex;
  align-items: end;
  gap: 18px;
  border-bottom: 1px solid #e5eaf1;
  background: #fff;
}

.calendar-order-tabs button {
  height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
}

.calendar-order-tabs button.active {
  color: #1677ff;
  border-color: #1677ff;
  font-weight: 700;
}

.calendar-order-money {
  padding: 12px 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid #e5eaf1;
  background: #fff;
}

.calendar-order-action-row {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #e5eaf1;
  background: #fff;
}

.calendar-order-section {
  margin: 12px 18px 0;
  padding: 0;
  border: 1px solid #e5eaf1;
  border-radius: 4px;
  background: #fff;
}

.calendar-order-section h4 {
  height: 42px;
  margin: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  font-size: 14px;
}

.calendar-order-field-grid {
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.calendar-order-info-item {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.calendar-order-info-item span {
  color: #64748b;
  font-size: 12px;
}

.calendar-order-info-item strong {
  min-width: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.modal-head,
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
}

.modal-body {
  padding: 16px;
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 220px;
  padding: 12px 14px;
  color: #fff;
  background: #172033;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 30;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.mobile-menu {
  display: none;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 300px;
    padding: 34px;
  }

  .login-title h1 {
    font-size: 32px;
  }

  .login-panel-wrap {
    padding: 24px;
  }

  .app-shell {
    grid-template-rows: 48px 1fr;
  }

  .body-shell,
  .body-shell.home-only {
    grid-template-columns: 1fr;
  }

  .body-shell:has(.main-room) {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .sub-sidebar {
    position: fixed;
    inset: 48px auto 0 0;
    width: 220px;
    z-index: 15;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
  }

  .app-shell:has(.mobile-menu:focus) .sub-sidebar {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .pagebar {
    padding: 0 12px;
  }

  .header-actions {
    display: none;
  }

  .search {
    display: none;
  }

  .stats-grid,
  .dashboard-grid,
  .kanban,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .room-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-board-head,
  .room-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .main-room .calendar-topbar {
    align-items: center;
    flex-direction: row;
  }

  .room-filter-bar .input,
  .room-filter-bar .select {
    width: 100%;
  }

  .room-detail-kpis,
  .room-detail-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 14px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    align-items: stretch;
  }

  .filters .input,
  .filters .select {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .notice {
    grid-template-columns: 1fr;
  }

  .table-card {
    overflow-x: auto;
  }

  .room-summary-strip,
  .room-grid {
    grid-template-columns: 1fr;
  }

  .room-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .room-head-actions .btn {
    width: 100%;
  }

  .room-detail-kpis,
  .room-detail-field-grid {
    grid-template-columns: 1fr;
  }

  .room-detail-status,
  .room-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .room-detail-actions .btn,
  .room-detail-status .select {
    width: 100%;
  }
}

/* Final room-page parity overrides. Keep these last so the calendar shell wins. */
.main-room .content {
  padding: 0 14px 10px;
  background: #f3f6fa;
}

.room-board-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
}

.room-board-head {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  background: #fff;
  position: relative;
  z-index: 2;
}

.room-board-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.room-board-head span {
  color: #6b7280;
  font-size: 12px;
}

.room-head-actions {
  gap: 8px;
}

.room-head-actions .btn.primary,
.calendar-topbar .btn.primary {
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.room-filter-bar {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  background: #fff;
  position: relative;
  z-index: 3;
}

.room-filter-bar.calendar-topbar {
  justify-content: space-between;
  z-index: 4;
}

.room-filter-bar.calendar-topbar .room-head-actions {
  margin-left: auto;
}

.room-filter-bar.calendar-topbar .room-mode-tabs {
  margin-right: 0;
}

.room-mode-tabs {
  height: 30px;
}

.room-mode-tabs .tab {
  min-width: 42px;
  height: 30px;
  padding: 0 12px;
  border-color: #d8e0ea;
  font-size: 13px;
}

.side-nav.rooms-side-nav {
  width: 126px;
  min-width: 126px;
  padding: 0;
  background: #f7f7f7;
  border-right: 1px solid #bfc5cf;
}

.side-nav.rooms-side-nav .side-item {
  width: 100%;
  min-height: 24px;
  margin: 0;
  justify-content: flex-start;
  gap: 6px;
  border: 1px solid #bfc5cf;
  border-top: 0;
  border-radius: 0;
  background: #efefef;
  color: #222;
  font-size: 13px;
}

.side-nav.rooms-side-nav .side-item:first-child {
  border-top: 1px solid #bfc5cf;
}

.side-nav.rooms-side-nav .side-item.active {
  background: #fff;
  color: #1677ff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #1677ff;
}

.side-nav.rooms-side-nav .side-caret,
.side-nav.rooms-side-nav .side-children {
  display: none !important;
}

.side-nav.rooms-side-nav .side-icon {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #5b6878;
}

.side-nav.rooms-side-nav .side-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.side-nav.rooms-side-nav .side-item.active .side-icon,
.side-nav.rooms-side-nav .side-item:hover .side-icon {
  color: #1677ff;
}

.side-nav.rooms-side-nav .side-label {
  line-height: 1;
  font-size: 13px;
}

.body-shell:has(.rooms-side-nav),
.body-shell:has(.main-room) {
  grid-template-columns: 126px minmax(0, 1fr);
}

/* Original calendar-page alignment overrides. */
.app-header {
  height: 46px;
  box-shadow: none;
}

.app-shell {
  grid-template-rows: 46px 1fr;
}

.system-logo {
  width: 140px;
  height: 46px;
  padding: 0 12px;
  gap: 8px;
}

.system-logo .brand-mark {
  width: 26px;
  height: 22px;
  flex: 0 0 auto;
}

.system-logo strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.top-nav,
.top-nav [data-route],
.header-link {
  height: 46px;
}

.top-nav [data-route] {
  min-width: 54px;
  padding: 0 11px;
  border-bottom-width: 3px;
  font-size: 14px;
}

.header-actions {
  height: 46px;
  gap: 6px;
}

.body-shell {
  grid-template-columns: 140px minmax(0, 1fr);
  background: #f5f7fb;
}

.side-nav {
  width: 140px;
  padding: 8px 5px 0;
  background: #f7f9fc;
  border-right: 1px solid #e5eaf1;
}

.side-group {
  gap: 4px;
}

.side-item,
.side-child {
  min-height: 38px;
  margin: 0 0 5px;
  border-radius: 3px;
  font-size: 13px;
}

.side-item {
  grid-template-columns: 24px 1fr 14px;
  padding: 0 8px;
  color: #1f2937;
}

.side-child {
  min-height: 32px;
  padding: 0 8px 0 36px;
  color: #4b5563;
}

.side-icon {
  width: 22px;
  height: 22px;
  background: transparent;
  color: #374151;
  font-size: 17px;
}

.side-caret {
  color: #6b7280;
  font-size: 13px;
}

.side-item:hover,
.side-child:hover,
.side-item.active,
.side-child.active {
  color: #1677ff;
  background: #e8f3ff;
}

.side-item.active .side-icon,
.side-item.open .side-icon,
.side-item:hover .side-icon {
  color: #1677ff;
}

.main-room .content {
  padding: 8px 14px 12px;
  background: #f5f7fb;
}

.room-board-page {
  height: 100%;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  gap: 8px;
}

.calendar-topbar {
  min-height: 42px;
  padding: 0 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  justify-content: space-between;
}

.room-mode-tabs {
  height: 34px;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.room-mode-tabs .tab {
  min-width: 46px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid #d8e0ea;
  border-right: 0;
  border-radius: 0;
  background: #fff;
  color: #475569;
  font-size: 13px;
}

.room-mode-tabs .tab input {
  display: none;
}

.room-mode-tabs .tab:first-child {
  border-radius: 3px 0 0 3px;
}

.room-mode-tabs .tab:last-child {
  border-right: 1px solid #d8e0ea;
  border-radius: 0 3px 3px 0;
}

.room-mode-tabs .tab.active {
  position: relative;
  z-index: 1;
  border-color: #1677ff;
  color: #1677ff;
  background: #fff;
}

.calendar-topbar .room-head-actions {
  gap: 10px;
}

.calendar-topbar .btn.primary {
  min-height: 32px;
  height: 32px;
  padding: 0 13px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.room-calendar-gantt {
  height: 100%;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  box-shadow: none;
}

.room-calendar-grid {
  min-width: calc(194px + (var(--calendar-days) * 96px));
  grid-template-columns: 98px 96px repeat(var(--calendar-days), 96px);
  grid-template-rows: 28px 48px 36px 38px;
  grid-auto-rows: 58px;
}

.calendar-count,
.calendar-unassigned { top: 0; }
.calendar-date,
.calendar-date-control { top: 28px; }
.calendar-week,
.calendar-range { top: 76px; }
.calendar-remain,
.calendar-filter-toggle { top: 112px; }

.calendar-head-cell {
  padding: 3px 5px;
  border-color: #e6ebf2;
  font-size: 12px;
  background: #fff;
}

.calendar-unassigned {
  color: #334155;
  font-weight: 500;
}

.calendar-date-control .room-date-input {
  width: 112px;
  height: 28px;
  min-height: 28px;
  padding: 0 4px;
}

.calendar-date-control .btn.mini {
  height: 28px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 3px;
}

.calendar-range {
  color: #64748b;
}

.range-arrow {
  width: 18px;
  color: #94a3b8;
  font-size: 16px;
}

.calendar-filter-toggle {
  gap: 18px;
}

.calendar-filter-toggle .link-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #1677ff;
  font-size: 12px;
}

.calendar-link-icon {
  color: #111827;
  font-size: 12px;
  line-height: 1;
}

.calendar-count span {
  min-width: 20px;
  min-height: 16px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 16px;
}

.calendar-date strong {
  font-size: 13px;
}

.calendar-date em {
  color: #1677ff;
  font-size: 12px;
}

.calendar-week {
  color: #334155;
}

.calendar-remain {
  color: #64748b;
}

.calendar-head-cell.today,
.room-calendar-cell.gantt-cell.today {
  border-left: 1px solid #1677ff;
}

.room-calendar-type-cell {
  left: 0;
  padding: 6px 7px;
  border-color: #e6ebf2;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.45;
  background: #fff;
}

.room-calendar-room-cell {
  left: 98px;
  min-height: 58px;
  border-color: #e6ebf2;
  background: #fff;
  font-size: 12px;
}

.room-calendar-room-cell.cleaning,
.room-calendar-room-cell.maintenance {
  background: #d7d7d7;
}

.room-state-mark {
  margin-left: 2px;
  color: #111827;
  font-size: 11px;
}

.room-calendar-cell.gantt-cell {
  min-height: 58px;
  border-color: #e6ebf2;
  color: #4b5563;
  font-size: 12px;
}

.room-calendar-order.gantt-order {
  height: 52px;
  min-height: 52px;
  margin: 3px 2px;
  padding: 4px 7px;
  border-radius: 3px;
}

.room-calendar-order.gantt-order strong {
  font-size: 13px;
  line-height: 17px;
}

.room-calendar-order.gantt-order em span {
  min-width: 16px;
  min-height: 16px;
  border-radius: 2px;
  font-size: 10px;
}

.calendar-filter-popover {
  left: 36px;
  top: 154px;
  width: 410px;
}

.room-calendar-grid {
  min-width: calc(240px + (var(--calendar-days) * 120px));
  grid-template-columns: 120px 120px repeat(var(--calendar-days), 120px);
}

.room-calendar-room-cell {
  left: 120px;
}

.room-calendar-order.gantt-order {
  margin-left: 3px;
  margin-right: 3px;
}

@media (max-width: 900px) {
  .app-header {
    height: 56px;
  }

  .app-shell {
    grid-template-rows: 56px 1fr;
  }

  .system-logo {
    width: 42px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }

  .system-logo .brand-mark,
  .system-logo strong {
    display: none;
  }

  .system-logo::before {
    content: "鈽?;
    color: #334155;
    font-size: 18px;
    line-height: 1;
  }

  .top-nav,
  .top-nav [data-route],
  .header-link {
    height: 56px;
  }

  .top-nav [data-route] {
    min-width: 62px;
    font-size: 16px;
  }

  .header-actions {
    display: none;
  }

  .body-shell,
  .body-shell:has(.main-room) {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-nav {
    display: none;
  }

  .main-room .content {
    padding: 15px 16px 12px;
  }

  .room-board-page {
    grid-template-rows: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .calendar-topbar {
    min-height: 40px;
    padding-bottom: 0;
  }

  .room-calendar-gantt {
    height: calc(100vh - 120px);
  }
}

/* Calendar original parity pass 2026-08-09. */
.app-header {
  height: 56px;
}

.app-shell {
  grid-template-rows: 56px 1fr;
}

.system-logo {
  width: 180px;
  height: 56px;
}

.top-nav,
.top-nav [data-route],
.header-link {
  height: 56px;
}

.body-shell {
  grid-template-columns: 180px minmax(0, 1fr);
}

.side-nav {
  width: 180px;
  padding: 10px 10px 0;
  background: #f5f8fc;
}

.side-item,
.side-child {
  min-height: 40px;
  margin-bottom: 6px;
  border-radius: 4px;
}

.side-item {
  grid-template-columns: 24px 1fr 16px;
  padding: 0 12px;
}

.side-icon {
  font-size: 16px;
}

.main-room .content {
  padding: 0 16px 12px;
}

.room-board-page {
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 16px;
}

.calendar-topbar {
  min-height: 48px;
  padding: 0;
  align-items: center;
}

.room-calendar-gantt {
  height: calc(100vh - 120px);
}

.room-calendar-grid {
  min-width: calc(240px + (var(--calendar-days) * 120px));
  grid-template-columns: 120px 120px repeat(var(--calendar-days), 120px);
  grid-template-rows: 31px 38px 31px 30px;
  grid-auto-rows: 60px;
}

.calendar-count,
.calendar-unassigned { top: 0; }
.calendar-date,
.calendar-date-control { top: 31px; }
.calendar-week,
.calendar-range { top: 69px; }
.calendar-remain,
.calendar-filter-toggle { top: 100px; }

.room-calendar-type-cell,
.room-calendar-room-cell,
.room-calendar-cell.gantt-cell {
  min-height: 60px;
}

.room-calendar-room-cell {
  left: 120px;
}

.room-calendar-order.gantt-order {
  height: 54px;
  min-height: 54px;
  margin: 3px;
}

.calendar-summary-type,
.calendar-summary-label,
.calendar-summary-cell {
  min-height: 60px;
  border-right: 1px solid #e6ebf2;
  border-bottom: 1px solid #e6ebf2;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 13px;
}

.calendar-summary-type {
  position: sticky;
  left: 0;
  z-index: 9;
  padding: 6px 8px;
  justify-content: flex-start;
  line-height: 1.35;
  font-weight: 600;
}

.calendar-summary-label {
  position: sticky;
  left: 120px;
  z-index: 9;
  color: #64748b;
}

.calendar-summary-cell {
  color: #1f2937;
}

.calendar-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: 300px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  padding: 14px 18px 72px;
  overflow-y: auto;
  color: #1f2937;
}

.calendar-filter-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
  margin-bottom: 8px;
}

.calendar-filter-section {
  display: grid;
  gap: 8px;
  padding: 4px 0 10px;
}

.calendar-filter-section h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
}

.calendar-filter-field {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
}

.calendar-filter-field .input {
  height: 34px;
  min-height: 34px;
  border-radius: 4px;
}

.calendar-check-row {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1f2937;
  font-size: 14px;
  line-height: 20px;
}

.calendar-check-row input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1677ff;
}

.calendar-filter-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 264px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 12px;
  background: #fff;
}

.calendar-filter-actions .btn {
  min-width: 56px;
  height: 34px;
  min-height: 34px;
  border-radius: 4px;
}

/* Original calendar desktop parity: keep PMS shell layout even in the in-app split view. */
.app-header {
  height: 46px;
}

.app-shell {
  grid-template-rows: 46px 1fr;
}

.system-logo {
  width: 140px;
  height: 46px;
  padding: 0 12px;
  justify-content: flex-start;
}

.system-logo .brand-mark,
.system-logo strong {
  display: inline-flex;
}

.system-logo::before {
  content: none;
}

.header-collapse {
  width: 34px;
  height: 46px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid #edf1f5;
  background: #fff;
  color: #4b5563;
  padding: 0;
}

.header-collapse span {
  width: 13px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.top-nav,
.top-nav [data-route],
.header-link {
  height: 46px;
}

.top-nav [data-route] {
  min-width: 54px;
  padding: 0 11px;
  border-bottom-width: 3px;
  font-size: 14px;
}

.header-actions {
  height: 46px;
}

.header-actions-rooms {
  gap: 10px;
}

.header-actions-rooms .header-link-text {
  padding: 0 4px;
  min-width: 0;
  width: auto;
  gap: 0;
  color: #333;
  font-size: 14px;
}

.header-superscript {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  margin-top: -10px;
  color: #a1a1aa;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
}

.header-superscript span {
  margin-left: -1px;
}

.body-shell,
.body-shell:has(.main-room) {
  grid-template-columns: 140px minmax(0, 1fr);
  background: #f5f7fb;
}

.side-nav {
  display: block;
  width: 140px;
  min-width: 140px;
  padding: 8px 5px 0;
  background: #f7f9fc;
  border-right: 1px solid #e5eaf1;
}

.side-item,
.side-child {
  min-height: 38px;
  margin: 0 0 5px;
  border-radius: 3px;
  font-size: 13px;
}

.side-item {
  grid-template-columns: 24px 1fr 14px;
  padding: 0 8px;
}

.side-child {
  min-height: 32px;
  padding: 0 8px 0 36px;
}

.side-icon {
  width: 22px;
  height: 22px;
  background: transparent;
  color: #374151;
  font-size: 17px;
}

.side-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-item.active .side-icon svg,
.side-item.open .side-icon svg,
.side-item:hover .side-icon svg {
  stroke: #1677ff;
}

.main-room .content {
  padding: 0 14px 10px;
  background: #f5f7fb;
}

.main-room .pagebar {
  min-height: 46px;
  padding: 0 14px;
}

.room-board-page {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.calendar-topbar {
  min-height: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.room-calendar-gantt {
  height: calc(100vh - 98px);
  border-radius: 4px;
}

.room-calendar-grid {
  min-width: calc(194px + (var(--calendar-days) * 96px));
  grid-template-columns: 98px 96px repeat(var(--calendar-days), 96px);
  grid-template-rows: 28px 48px 36px 38px;
  grid-auto-rows: 58px;
}

.room-calendar-room-cell {
  left: 98px;
}

.calendar-count,
.calendar-unassigned { top: 0; }
.calendar-date,
.calendar-date-control { top: 28px; }
.calendar-week,
.calendar-range { top: 76px; }
.calendar-remain,
.calendar-filter-toggle { top: 112px; }

.room-calendar-type-cell,
.room-calendar-room-cell,
.room-calendar-cell.gantt-cell,
.calendar-summary-type,
.calendar-summary-label,
.calendar-summary-cell {
  min-height: 58px;
}

.calendar-summary-label {
  left: 98px;
}

/* Final narrow original parity overrides: must stay after desktop room side rules. */
@media (max-width: 900px) {
  .body-shell:has(.main-room),
  .body-shell:has(.rooms-side-nav) {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .side-nav.rooms-side-nav {
    width: 64px;
    min-width: 64px;
    padding: 16px 0 0;
    background: #f5f7fb;
    border-right: 1px solid #e6ebf2;
  }

  .side-nav.rooms-side-nav .side-item,
  .side-nav.rooms-side-nav .side-child {
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0 auto 14px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: transparent;
    font-size: 0;
    overflow: hidden;
  }

  .side-nav.rooms-side-nav .side-item::before {
    content: none;
  }

  .side-nav.rooms-side-nav .side-item.active,
  .side-nav.rooms-side-nav .side-item:hover {
    background: #e6f2ff;
  }

  .side-nav.rooms-side-nav .side-item.active::before,
  .side-nav.rooms-side-nav .side-item:hover::before {
    border-color: #1677ff;
    background-color: #1677ff;
  }

  .side-nav.rooms-side-nav .side-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #1f2937;
  }

  .side-nav.rooms-side-nav .side-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .side-nav.rooms-side-nav .side-label,
  .side-nav.rooms-side-nav .side-caret {
    display: none;
  }

  .side-nav.rooms-side-nav .side-item.active .side-icon,
  .side-nav.rooms-side-nav .side-item:hover .side-icon {
    color: #1677ff;
  }

  .main-room .content {
    padding: 14px 14px 10px;
  }

  .app-header .system-logo {
    width: 64px;
    padding: 0;
    justify-content: center;
  }

  .app-header .system-logo .brand-mark {
    width: 26px;
    height: 22px;
    border-radius: 0;
    background: transparent;
    color: transparent;
  }

  .app-header .system-logo .brand-mark::before,
  .app-header .system-logo .brand-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #1677ff;
  }

  .app-header .system-logo .brand-mark::before {
    clip-path: polygon(47% 100%, 35% 8%, 49% 0, 60% 100%, 56% 100%, 67% 10%, 83% 18%, 62% 100%);
  }

  .app-header .system-logo .brand-mark::after {
    clip-path: polygon(46% 100%, 0 43%, 16% 34%, 52% 100%, 58% 100%, 96% 35%, 100% 48%, 66% 100%, 86% 100%, 86% 110%, 10% 110%, 10% 100%);
  }

  .app-header .system-logo strong {
    display: none;
  }

  .app-header .header-collapse {
    width: 36px;
    display: inline-flex;
    border-right: 0;
  }
}

@media (max-width: 900px) {
  .body-shell:has(.rooms-side-nav) {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rooms-side-nav {
    width: 64px;
    min-width: 64px;
    padding: 16px 0 0;
    background: #f5f7fb;
    border-right: 1px solid #e6ebf2;
  }

  .rooms-side-nav .side-item,
  .rooms-side-nav .side-child {
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0 auto 14px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: transparent;
    font-size: 0;
    overflow: hidden;
  }

  .rooms-side-nav .side-item::before {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    border: 2px solid #1f2937;
  }

  .rooms-side-nav .side-item[data-subroute="room-status"]::before {
    border: 0;
    background: #1f2937;
    clip-path: polygon(50% 0, 100% 40%, 100% 100%, 62% 100%, 62% 62%, 38% 62%, 38% 100%, 0 100%, 0 40%);
  }

  .rooms-side-nav .side-item[data-subroute="room-price"]::before {
    border-radius: 4px;
    transform: rotate(-45deg);
  }

  .rooms-side-nav .side-item[data-subroute="room-items"]::before {
    border-radius: 1px;
  }

  .rooms-side-nav .side-item[data-subroute="room-meal"]::before {
    border-radius: 10px 10px 2px 2px;
  }

  .rooms-side-nav .side-item.active,
  .rooms-side-nav .side-item:hover {
    background: #e6f2ff;
  }

  .rooms-side-nav .side-item.active::before,
  .rooms-side-nav .side-item:hover::before {
    border-color: #1677ff;
    background-color: #1677ff;
  }

  .calendar-topbar .room-head-actions {
    display: none;
  }
}

.app-header .system-logo {
  width: 110px;
  height: 46px;
  padding: 0 7px;
  gap: 8px;
}

.app-header .system-logo .brand-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  background: #1677ff;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.app-header .system-logo .brand-mark::before {
  content: "QL";
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  background: transparent;
  clip-path: none;
}

.app-header .system-logo .brand-mark::after {
  content: none;
}

.app-header .system-logo strong {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.app-header .system-logo .app-brand-mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  background: transparent;
  color: #1677ff;
  font-size: 0;
}

.app-header .system-logo .app-brand-mark svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
}

.app-header .system-logo .app-brand-mark::before,
.app-header .system-logo .app-brand-mark::after {
  content: none;
}

.app-header .header-collapse {
  display: none;
}

.room-calendar-order.gantt-order {
  height: 52px;
  min-height: 52px;
  margin: 3px 2px;
}

.body-shell:has(.rooms-side-nav) {
  grid-template-columns: 124px minmax(0, 1fr);
  background: #f3f6fa;
}

.rooms-side-nav {
  width: 124px;
  min-width: 124px;
  padding: 0;
  background: #f3f6fa;
  border-right: 1px solid #c9cfd8;
}

.rooms-side-nav .side-group {
  gap: 0;
}

.rooms-side-nav .side-item,
.rooms-side-nav .side-child {
  min-height: 24px;
  height: 24px;
  margin: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #aeb7c2;
  border-left: 0;
  border-top: 0;
  border-radius: 0;
  background: #f1f3f5;
  color: #111827;
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
}

.rooms-side-nav .side-item.active,
.rooms-side-nav .side-child.active,
.rooms-side-nav .side-item:hover,
.rooms-side-nav .side-child:hover {
  background: #f8fafc;
  color: #111827;
}

.rooms-side-nav .side-caret,
.rooms-side-nav .side-icon {
  display: none;
}

.main-room .content {
  padding: 0 14px 10px;
  background: #f3f6fa;
}

.room-board-page {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.room-board-head,
.calendar-topbar {
  min-height: 52px;
  padding: 8px 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  background: #fff;
}

.room-board-head {
  display: flex;
  justify-content: space-between;
}

.room-board-head strong {
  font-size: 18px;
}

.room-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.room-head-actions .btn.primary,
.calendar-topbar .btn.primary {
  height: 32px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.room-filter-bar {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  background: #fff;
}

.room-mode-tabs {
  height: 30px;
}

.room-mode-tabs .tab {
  min-width: 42px;
  height: 30px;
  padding: 0 12px;
  border-color: #d8e0ea;
  font-size: 13px;
}

.room-calendar-gantt {
  height: 100%;
  border: 1px solid #e1e7ef;
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}

.room-calendar-grid {
  min-width: calc(194px + (var(--calendar-days) * 96px));
  grid-template-columns: 98px 96px repeat(var(--calendar-days), 96px);
  grid-template-rows: 28px 48px 36px 38px;
  grid-auto-rows: 48px;
}

.calendar-head-cell {
  padding: 2px 4px;
  border-color: #e6ebf2;
  font-size: 12px;
}

.calendar-count,
.calendar-unassigned { top: 0; }
.calendar-date,
.calendar-date-control { top: 28px; }
.calendar-week,
.calendar-range { top: 76px; }
.calendar-remain,
.calendar-filter-toggle { top: 112px; }

.room-calendar-type-cell,
.room-calendar-room-cell,
.room-calendar-cell.gantt-cell,
.calendar-summary-type,
.calendar-summary-label,
.calendar-summary-cell {
  min-height: 48px;
}

.room-calendar-type-cell {
  left: 0;
  padding: 4px 6px;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.room-calendar-room-cell {
  left: 98px;
  min-height: 48px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.room-calendar-room-cell.cleaning,
.room-calendar-room-cell.maintenance {
  background: #d9d9d9;
}

.room-calendar-cell.gantt-cell {
  min-height: 48px;
  color: #606a78;
  font-size: 12px;
}

.room-calendar-order.gantt-order {
  height: 43px;
  min-height: 43px;
  margin: 2px 2px;
  padding: 3px 7px;
  border-radius: 3px;
}

.room-calendar-order.gantt-order strong {
  font-size: 12px;
  line-height: 16px;
}

.room-calendar-order.gantt-order em span {
  min-width: 15px;
  min-height: 15px;
  font-size: 10px;
}

.calendar-summary-label {
  left: 98px;
}

@media (max-width: 900px) {
  .body-shell:has(.main-room),
  .body-shell:has(.rooms-side-nav) {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .side-nav.rooms-side-nav {
    width: 64px;
    min-width: 64px;
    padding: 16px 0 0;
    background: #f5f7fb;
    border-right: 1px solid #e6ebf2;
  }

  .side-nav.rooms-side-nav .side-item,
  .side-nav.rooms-side-nav .side-child {
    width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0 auto 14px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: transparent;
    font-size: 0;
    overflow: hidden;
  }

  .side-nav.rooms-side-nav .side-item::before {
    content: none;
  }

  .side-nav.rooms-side-nav .side-item.active,
  .side-nav.rooms-side-nav .side-item:hover {
    background: #e6f2ff;
  }

  .side-nav.rooms-side-nav .side-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #1f2937;
  }

  .side-nav.rooms-side-nav .side-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .side-nav.rooms-side-nav .side-label,
  .side-nav.rooms-side-nav .side-caret {
    display: none;
  }

  .side-nav.rooms-side-nav .side-item.active .side-icon,
  .side-nav.rooms-side-nav .side-item:hover .side-icon {
    color: #1677ff;
  }

  .main-room .content {
    padding: 14px 14px 10px;
  }
}
.calendar-filter-mask {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(15, 23, 42, 0.38);
}

.calendar-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: 300px;
  height: 100vh;
  padding: 0 16px 66px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow-y: auto;
}

.calendar-filter-title {
  flex: 0 0 52px;
  height: 52px;
  margin: 0 -16px 14px;
  padding: 0 44px 0 16px;
  border-bottom: 1px solid #eef0f4;
  display: flex;
  align-items: center;
  color: #1f2937;
  font-size: 18px;
  font-weight: 600;
}

.calendar-filter-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 3px;
  background: #e5e7eb;
  color: #666;
  font-size: 22px;
  line-height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
}

.calendar-filter-section {
  gap: 10px;
  padding: 0 0 12px;
}

.calendar-filter-field {
  display: block;
  margin: 0;
}

.calendar-filter-field > span,
.calendar-filter-section h4 {
  display: block;
  margin: 0 0 8px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.calendar-filter-field .input {
  height: 44px;
  min-height: 44px;
  border-radius: 2px;
  border-color: #dcdfe6;
  padding: 0 36px 0 12px;
  font-size: 14px;
}

.calendar-check-row {
  min-height: 24px;
  gap: 8px;
  align-items: flex-start;
  color: #333;
  font-size: 14px;
  line-height: 22px;
}

.calendar-check-row input {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: #1677ff;
  flex: 0 0 auto;
}

.calendar-filter-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 41;
  width: 300px;
  height: 66px;
  padding: 14px 16px;
  border-top: 1px solid #eef0f4;
  background: #fff;
  justify-content: flex-end;
  gap: 14px;
}

.calendar-filter-actions .btn {
  min-width: 56px;
  height: 34px;
  min-height: 34px;
  border-radius: 3px;
  padding: 0 14px;
}

/* Room page parity lock. */
.body-shell:has(.rooms-side-nav),
.body-shell:has(.main-room) {
  grid-template-columns: 126px minmax(0, 1fr) !important;
}

.side-nav.rooms-side-nav {
  width: 126px !important;
  min-width: 126px !important;
  padding: 8px 0 !important;
  background: #fff !important;
  border-right: 1px solid #d7dde5 !important;
}

.side-nav.rooms-side-nav .side-item {
  min-height: 40px !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-bottom: 1px solid #e5eaf1 !important;
  background: #fff !important;
  color: #1f2937 !important;
  font-size: 13px !important;
}

.side-nav.rooms-side-nav .side-item::before {
  content: none !important;
}

.side-nav.rooms-side-nav .side-item.active,
.side-nav.rooms-side-nav .side-item:hover {
  background: #e6f2ff !important;
  color: #1677ff !important;
}

.side-nav.rooms-side-nav .side-icon {
  display: inline-grid !important;
  width: 18px !important;
  height: 18px !important;
  place-items: center !important;
  color: #5b6878 !important;
}

.side-nav.rooms-side-nav .side-item.active .side-icon,
.side-nav.rooms-side-nav .side-item:hover .side-icon {
  color: #1677ff !important;
}

.side-nav.rooms-side-nav .side-label {
  flex: 1 !important;
  text-align: left !important;
  font-size: 13px !important;
}

.side-nav.rooms-side-nav .side-caret {
  display: inline-flex !important;
  margin-left: auto !important;
  color: #9aa4b2 !important;
}

.calendar-summary-type {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border: 1px solid #e6ebf2;
  border-right: 0;
  border-top: 0;
  background: #fff;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
}

.calendar-summary-cell {
  min-height: 48px;
  padding: 4px 10px;
  border: 1px solid #e6ebf2;
  border-top: 0;
  background: #fafcff;
  color: #64748b;
  font-size: 12px;
  display: flex;
  align-items: center;
}


.business-filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px 0; }
.business-filter { display: flex; flex-direction: column; gap: 6px; min-width: 140px; max-width: 230px; font-size: 12px; }
.business-filter .input, .business-filter .select { width: 100%; min-width: 0; }
.business-filterbar .btn { flex-shrink: 0; }
.business-data-table { width: 100%; table-layout: auto; }
.business-wide-table { min-width: 920px; }
.business-data-table td { white-space: normal; overflow-wrap: anywhere; min-width: 72px; max-width: 200px; }
.business-data-table td:first-child { min-width: 110px; max-width: 180px; }
.business-data-table .btn { white-space: nowrap; }
.business-data-table .order-remark-cell,
.business-data-table .order-remark-preview { width: 100%; max-width: 156px; min-width: 0; }
.linen-page .business-data-table { min-width: 1000px; }
.business-data-table td:has(> .phone-line), .business-data-table .phone-line, .business-data-table .phone-toggle { white-space: nowrap; overflow-wrap: normal; }
.business-data-table .phone-toggle { flex-shrink: 0; }
.business-data-table td:is([data-column="账面余额"], [data-column="卡内余额"], [data-column="应收欠款"], [data-column="订单余款"], [data-column="累计消费金额"], [data-column="房费"], [data-column="消费"], [data-column="收款"], [data-column="退款"], [data-column="净收款"], [data-column="ADR"], [data-column="RevPAR"], [data-column="独立收入"], [data-column="独立支出"]) { white-space: nowrap; overflow-wrap: normal; }
table.customer-data-table { min-width: 1520px; }
table.accounts-data-table { min-width: 2050px; }
.accounts-data-table td { white-space: nowrap; overflow-wrap: normal; }
.accounts-data-table td:is([data-column="入住时间"], [data-column="离店时间"]) { min-width: 170px; }
.customer-data-table td[data-column="联系方式"] { min-width: 165px; }
.customer-data-table td[data-column="上次下单时间"] { min-width: 150px; }
.business-data-table td:is([data-column="金额"], [data-column="销售金额"], [data-column="出库成本"], [data-column="开票金额"], [data-column="营业日"], [data-column="操作人"], [data-column="制单人"]) { white-space: nowrap; }
.business-data-table td:is([data-column="记一笔时间"], [data-column="操作时间"], [data-column="申请日期"]) { min-width: 120px; }
.toolbar:has([data-change="business-date"]) { flex-wrap: wrap; }
.toolbar:has([data-change="business-date"]) .btn { flex-shrink: 0; white-space: nowrap; }
.toolbar [data-change="business-date"] { flex: 0 1 180px; }
.toolbar:has([data-change="business-date"]) > [data-input="query"] { flex: 1 1 240px; width: auto; min-width: 0; }

.content:has(.shop-pos) { container-type: inline-size; }
.shop-pos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); min-height: calc(100vh - 130px); background: #fff; border: 1px solid #eee; }
.shop-catalog { min-width: 0; display: flex; flex-direction: column; }
.shop-catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; background: #fff; margin-bottom: 18px; }
.body-shell:has(.settings-side-nav) { grid-template-columns: 180px minmax(0, 1fr); }
.settings-side-nav { width: 180px; min-width: 180px; background: #fff; padding: 8px; }
.settings-side-nav .side-item, .settings-side-nav .side-child { min-height: 44px; margin-bottom: 4px; white-space: nowrap; }
.settings-side-nav .side-child { padding-left: 28px; }
.shop-catalog-toolbar .input { width: 380px; min-width: 0; }
.shop-settings-layout { display: grid; grid-template-columns: minmax(160px, 28%) minmax(0, 1fr); gap: 18px; min-height: calc(100vh - 230px); }
.shop-settings-categories, .shop-settings-table { min-width: 0; background: #fff; }
.shop-settings-table { display: flex; flex-direction: column; height: calc(100vh - 290px); min-height: 320px; }
.shop-settings-table .table-card { flex: 1; min-height: 0; border-radius: 0; scrollbar-width: thin; scrollbar-color: #aab6c6 transparent; }
.shop-settings-table .table-card::-webkit-scrollbar { height: 10px; width: 10px; }
.shop-settings-table .pager { margin-top: 0; padding: 12px; border-top: 1px solid #eee; }
.shop-settings-table th:last-child, .shop-settings-table td:last-child { position: sticky; right: 0; z-index: 1; min-width: 80px; background: #fff; border-left: 1px solid #eee; }
.shop-settings-table th:last-child { background: #fafafa; }
.shop-settings-categories > div { padding: 16px 12px; border-bottom: 1px solid #eee; }
.shop-settings-categories > button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 28px; font: inherit; cursor: pointer; }
.shop-settings-categories > button.active { color: #208cff; background: #e6f4ff; }
.shop-settings-categories .empty { margin: 35px 0; }
.shop-settings-table .business-data-table { margin: 0; }
.shop-search { display: flex; gap: 16px; justify-content: space-between; padding: 16px; }
.shop-search .input { width: 375px; min-width: 0; }
.shop-search .btn { flex-shrink: 0; }
.shop-categories { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 16px; border-bottom: 1px solid #eee; }
.shop-products { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); align-content: start; gap: 12px; padding: 16px; }
.shop-products > .empty { grid-column: 1 / -1; align-self: center; margin: 170px 0; }
.shop-product { text-align: left; display: flex; flex-direction: column; gap: 10px; min-height: 108px; padding: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 4px; cursor: pointer; font: inherit; overflow-wrap: anywhere; }
.shop-product:hover { border-color: #208cff; background: #f4faff; }
.shop-product span { color: #888; font-size: 12px; }
.shop-product b { color: #e45042; }
.shop-cart { display: flex; flex-direction: column; border-left: 1px solid #eee; min-width: 0; }
.shop-cart-lines { flex: 1; overflow: auto; max-height: 55vh; }
.shop-cart table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.shop-cart th, .shop-cart td { padding: 12px 6px; text-align: left; font-size: 12px; border-bottom: 1px solid #eee; overflow-wrap: anywhere; }
.shop-cart th { background: #fafafa; font-weight: 400; }
.shop-cart th:first-child { width: 30%; }
.shop-cart th:nth-child(3) { width: 30%; }
.shop-quantity { display: flex; align-items: center; gap: 5px; }
.shop-quantity .btn { padding: 0; width: 23px; height: 26px; min-width: 23px; }
.shop-cart-footer { padding: 16px; border-top: 1px solid #eee; }
.shop-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shop-total .input { width: 130px; }
.shop-checkout-actions { display: flex; gap: 12px; margin-top: 18px; }
.shop-checkout-actions .btn { flex: 1; }
#shop-receipt { display: none; }
.purchase-account { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e5e7eb; min-width: 0; }
.purchase-account p, .history-reconciliation { overflow-wrap: anywhere; line-height: 1.7; }
.history-reconciliation { padding: 8px 12px; background: #fff7df; color: #79530c; border: 1px solid #ecd28a; margin-bottom: 12px; }
.shop-product-editor { min-width: 0; }
.shop-editor-heading { display: flex; align-items: center; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.shop-product-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 20px 28px; padding: 24px 0; }
.shop-product-fields .field { min-width: 0; }
.shop-product-fields input, .shop-product-fields select { width: 100%; box-sizing: border-box; }
.shop-editor-actions { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid #eee; }
@media (max-width: 720px) { .shop-product-fields { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 700px) { .shop-pos { grid-template-columns: minmax(0, 1fr); } .shop-cart { border-left: 0; border-top: 1px solid #eee; } .shop-products > .empty { margin: 45px 0; } .shop-cart-lines { max-height: 35vh; } .shop-search { gap: 8px; } }
@media print { body:has(#shop-receipt) > :not(#shop-receipt) { display: none !important; } #shop-receipt { display: block; padding: 12px; color: #000; } #shop-receipt table { width: 100%; border-collapse: collapse; } #shop-receipt td, #shop-receipt th { padding: 6px; border-bottom: 1px solid #ccc; } }
.role-permission-options { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.role-permission-option { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.settings-data-page[data-settings-workflow="inventory-config"] .business-data-table { table-layout: fixed; width: 100%; min-width: 920px; }
.settings-data-page[data-settings-workflow="inventory-config"] .business-data-table td { min-width: 0; max-width: none; }
.settings-data-page[data-settings-workflow="inventory-config"] .business-data-table th:first-child { width: 20%; }
.settings-data-page[data-settings-workflow="inventory-config"] .business-data-table th:last-child { width: 80px; }
.settings-data-page[data-settings-workflow="room-config"] .business-data-table { table-layout: fixed; min-width: 1040px; width: 100%; }
.settings-data-page[data-settings-workflow="room-config"] .business-data-table td { min-width: 0; max-width: none; }
.settings-data-page[data-settings-workflow="room-config"] .business-data-table th:nth-child(2) { width: 19%; }
.settings-data-page[data-settings-workflow="room-config"] .business-data-table th:last-child { width: 110px; }
.settings-data-page[data-settings-workflow="room-config"] .business-data-table td:last-child { white-space: nowrap; }
.settings-data-page[data-settings-workflow="room-type-config"] .business-data-table { table-layout: fixed; min-width: 850px; width: 100%; }
.settings-data-page[data-settings-workflow="room-type-config"] .business-data-table td { min-width: 0; max-width: none; overflow-wrap: anywhere; }
.settings-data-page[data-settings-workflow="room-type-config"] .business-data-table th:first-child { width: 26%; }
.settings-data-page[data-settings-workflow="room-type-config"] .business-data-table th:last-child { width: 125px; }
.settings-data-page[data-settings-workflow="room-type-config"] .business-data-table td:last-child { white-space: nowrap; }
.rate-plans-page .business-data-table { table-layout: fixed; min-width: 1020px; width: 100%; }
.rate-plans-page .business-data-table td { min-width: 0; max-width: none; overflow-wrap: anywhere; }
.rate-plans-page .business-data-table th:nth-child(4) { width: 23%; }
.rate-plans-page .business-data-table th:last-child { width: 145px; }
.rate-plans-page .business-data-table td:last-child { white-space: normal; }
.rate-plan-weekdays { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0; border: 1px solid var(--border, #d9e0e8); }
.rate-plan-weekdays label { display: inline-flex; gap: 5px; align-items: center; }
.rate-plan-rules .business-data-table th:first-child { width: 60px; }
.rate-plan-rules .business-data-table th:last-child { width: 160px; }
.guest-items-page .business-data-table { min-width: 1500px; }
.guest-items-page .business-data-table td:last-child { min-width: 145px; }
.guest-items-page .business-data-table td:first-child { max-width: 180px; }
.guest-item-summary { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; }
.guest-item-summary dt { color: var(--muted); }
.guest-item-summary dd { margin: 0; overflow-wrap: anywhere; }
.rentals-page .business-data-table { min-width: 1240px; }
.rentals-page .business-data-table td:first-child { min-width: 60px; }
.rentals-page .business-data-table td:last-child { min-width: 160px; }
.rentals-page .business-filterbar { padding-top: 0; }
.rentals-page .business-filter:has([data-business-filter="rentalQuery"]) { flex: 1; min-width: 220px; max-width: 320px; }
.rental-topbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 16px; background: #fff; margin-bottom: 16px; }
.rental-catalog-search { display: flex; width: 390px; max-width: 100%; }
.rental-catalog-search .input { min-width: 0; border-radius: 3px 0 0 3px; }
.rental-catalog-search .btn { border-radius: 0 3px 3px 0; flex-shrink: 0; }
.rental-table-area { display: flex; flex-direction: column; min-height: calc(100dvh - 235px); background: #fff; min-width: 0; }
.rental-table-area > .table-card { flex: 1; border-radius: 0; border: 0; margin: 0; }
.rental-table-area > .pager { margin: 0; border-top: 1px solid #eee; padding: 12px; }
.rental-table-area th { background: #fafafc; font-weight: 400; }
.rental-catalog-page .business-data-table { min-width: 740px; table-layout: fixed; }
.rental-catalog-page .business-data-table td { min-width: 0; }
.rental-catalog-page .link-btn.danger { color: #e43a3a; }
.rental-status-switch { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 12px; background: #8b9098; color: #fff; padding: 2px 3px 2px 10px; cursor: pointer; white-space: nowrap; font: inherit; }
.rental-status-switch[aria-checked="true"] { background: #0784ff; }
.rental-status-switch > span { width: 17px; height: 17px; border-radius: 50%; background: #fff; }
.rental-status-switch[aria-checked="false"] > span { order: -1; }
.rental-status-switch[aria-checked="false"] { padding: 2px 10px 2px 3px; }
.rental-status-switch:disabled { cursor: default; }
.rental-status-switch:focus-visible { outline: 2px solid #005ac2; outline-offset: 2px; }
.rental-date-range { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rental-date-range > div { display: flex; align-items: center; gap: 8px; }
.rental-date-range .business-filter { min-width: 0; width: 180px; }
.rental-date-range .business-filter > span, .rental-search .business-filter > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rental-list-filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px; }
.rental-list-filters > .business-filter { flex-direction: row; align-items: center; max-width: 270px; }
.rental-list-filters > .business-filter > .select { width: 200px; }
.rental-search { width: 400px; max-width: 100%; }
.rental-search .business-filter { min-width: 0 !important; max-width: 100% !important; }
.rentals-page .business-data-table td:last-child, .rentals-page .business-data-table th:last-child { position: sticky; right: 0; background: #fff; box-shadow: -3px 0 5px #0001; }
@media (max-width: 620px) {
  .rental-topbar { flex-wrap: wrap; padding: 12px; }
  .rental-date-range { width: 100%; }
  .rental-date-range .business-filter { flex: 1; width: 0; }
  .rental-catalog-search { width: 100%; }
  .body-shell:has(.rentals-page), .body-shell:has(.rental-catalog-page) { grid-template-columns: minmax(0, 1fr) !important; }
  .app-shell:has(.rentals-page) .rooms-side-nav, .app-shell:has(.rental-catalog-page) .settings-side-nav { display: none; }
  .app-shell:has(.rentals-page) .header-collapse, .app-shell:has(.rental-catalog-page) .header-collapse { display: inline-flex; }
  .app-shell.nav-collapsed:has(.rentals-page) .rooms-side-nav, .app-shell.nav-collapsed:has(.rental-catalog-page) .settings-side-nav { display: block; position: fixed; z-index: 40; top: 56px; bottom: 0; left: 0; width: 180px !important; min-width: 180px !important; overflow-y: auto; box-shadow: 4px 0 12px #0002; }
  .app-shell:has(.rental-catalog-page) .pagebar { min-height: 52px; height: auto; gap: 8px; }
  .app-shell:has(.rental-catalog-page) .crumb { min-width: 0; gap: 8px; }
  .app-shell:has(.rental-catalog-page) .crumb > span { display: none; }
  .app-shell:has(.rental-catalog-page) .crumb strong, .app-shell:has(.rental-catalog-page) .logout-link { white-space: nowrap; }
  .rental-table-area > .pager { flex-wrap: wrap; }
}
.meals-page .business-data-table { min-width: 1350px; }
.meals-page .business-data-table td:first-child { max-width: 180px; overflow-wrap: anywhere; }
.meals-page .business-data-table td:last-child { min-width: 125px; }
.meals-page[data-room-source^="meal_products"] .business-data-table { min-width: 1000px; table-layout: fixed; }
.meals-page[data-room-source^="meal_products"] .business-data-table th:first-child { width: 22%; }
.meals-page[data-room-source^="meal_products"] .business-data-table th:nth-child(6) { width: 18%; }
.meals-page[data-room-source^="meal_products"] .business-data-table th:last-child { width: 150px; }
.meals-page[data-room-source^="meal_products"] .business-data-table td { min-width: 0; max-width: none; }
.meals-page[data-room-source^="meal_products"] .business-data-table td:last-child { white-space: nowrap; }
.hk-status-counts { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 12px 16px; border-bottom: 1px solid var(--line, #e5e7eb); }
.hk-room-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-height: 50vh; overflow: auto; margin-bottom: 16px; }
.hk-room-options label { display: flex; align-items: center; gap: 8px; }
.hk-task-lines { display: grid; gap: 18px; }
.hk-task-line { padding-bottom: 16px; border-bottom: 1px solid var(--line, #e5e7eb); }
.hk-task-line h4 { grid-column: 1 / -1; margin: 0; }
.room-source-page[data-room-workflow="housekeeping-tasks"] table { min-width: 1500px; }
.hk-portal { padding: 16px; max-width: 1800px; margin: auto; }
.hk-portal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.hk-portal-head .select { max-width: 420px; }
.hk-portal table { min-width: 1450px; }
.hk-worker-tasks h2 { font-size: 18px; margin: 20px 0 12px; }
.hk-worker-task { border-top: 1px solid var(--line, #e5e7eb); padding: 16px 0; overflow-wrap: anywhere; }
.hk-worker-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.hk-worker-task p { margin: 10px 0; }
.hk-worker-task .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hk-rework { color: #b42318; }
.hk-tabs { display: flex; margin-bottom: 16px; }
.hourly-type-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; border: 1px solid #e1e6ee; padding: 16px; }
.hourly-type-options label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.hourly-rules-page .business-data-table { min-width: 700px; }
.hk-tabs > div { display: inline-flex; }
.hk-tabs .btn { border-radius: 0; margin-right: -1px; }
.hk-tabs .btn.active { position: relative; border-color: #0781ff; color: #0781ff; background: #fff; }
.hk-rules { background: #fff; }
.hk-rule-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 16px; border-bottom: 1px solid #edf0f5; min-height: 75px; }
.hk-rule-row strong { font-weight: 400; color: #1677ff; text-align: right; }
.hk-history-title { margin: 24px 0 12px; font-size: 15px; }
.hk-mode-choice { display: flex; flex-wrap: wrap; gap: 16px; border: 0; padding: 0; margin-bottom: 20px; }
.hk-mode-choice legend { padding: 0; margin-bottom: 12px; }
.hk-mode-choice label, .hk-rule-flags label { display: inline-flex; align-items: center; gap: 8px; }
.hk-rule-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
@media (max-width: 600px) {
  .hk-portal { padding: 8px; }
  .hk-portal-head .select { order: 1; width: 100%; max-width: none; }
  .hk-portal .business-filterbar > * { min-width: 0; max-width: 100%; }
  .hk-portal .modal { width: calc(100vw - 16px); }
}
.overtime-settings { background: #fff; padding: 20px; }
.overtime-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 60px; border-bottom: 1px solid #eee; }
.overtime-setting-row .select { width: 220px; max-width: 60%; }
.overtime-unit-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 18px 0; }
.overtime-unit-fields .input { width: 100%; min-width: 0; }
.overtime-type-rule { border-bottom: 1px solid #eee; }
.overtime-settings .panel-head { flex-wrap: wrap; }
.overtime-settings .panel-head h3 { flex: 1 0 200px; }
.overtime-settings .actions { display: flex; gap: 8px; }
.overtime-settings .btn { white-space: nowrap; flex-shrink: 0; }
.checkout-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
.checkout-summary dt { margin-bottom: 6px; color: var(--muted); }
.checkout-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.checkout-waiver { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
@media (max-width: 620px) {
  .overtime-unit-fields { grid-template-columns: 1fr; }
  .overtime-settings { padding: 12px; }
  .overtime-setting-row { gap: 12px; }
  .overtime-setting-row .select { flex: 1; min-width: 0; }
  .body-shell:has(.overtime-settings) { grid-template-columns: minmax(0, 1fr); }
  .app-shell:has(.overtime-settings) .settings-side-nav { display: none; }
  .app-shell:has(.overtime-settings) .header-collapse { display: inline-flex; }
  .app-shell.nav-collapsed:has(.overtime-settings) .settings-side-nav { display: block; position: fixed; z-index: 30; top: 46px; bottom: 0; left: 0; overflow-y: auto; box-shadow: 4px 0 12px #0002; }
  .app-shell:has(.overtime-settings) .pagebar { min-height: 52px; height: auto; gap: 8px; }
  .app-shell:has(.overtime-settings) .crumb { min-width: 0; gap: 8px; }
  .app-shell:has(.overtime-settings) .crumb > span { display: none; }
  .app-shell:has(.overtime-settings) .crumb strong, .app-shell:has(.overtime-settings) .logout-link { white-space: nowrap; }
  .checkout-summary { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

.app-shell:has(.rate-board-settings) { grid-template-rows: 56px minmax(0, 1fr); }
.app-shell:has(.rate-board-settings) .app-header { height: 56px; min-height: 56px; }
.main:has(.rate-board-settings) { grid-template-rows: minmax(0, 1fr); }
.main:has(.rate-board-settings) .pagebar { display: none; }
.content:has(.rate-board-settings) { padding: 0; background: #fff; }
.rate-board-settings { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 16px 40px; padding: 20px 24px 0; background: #fff; height: calc(100vh - 56px); position: relative; }
.board-preview-column, .board-settings-column { min-width: 0; overflow-y: auto; }
.board-preview-frame { margin-top: 112px; padding: 16px; background: #f1f1f1; border-radius: 8px; box-shadow: 0 5px 10px #0001; aspect-ratio: 0.72; overflow: hidden; }
.board-disabled { height: 100%; min-height: 300px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 12px; color: #777; }
.board-disabled strong { color: #f5222d; font-size: 52px; line-height: 1; }
.board-enabled { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.board-tabs { display: flex; gap: 32px; border-bottom: 1px solid #edf0f4; margin: 10px 0 12px; }
.board-tabs button { background: none; border: 0; padding: 12px 0; color: #222; cursor: pointer; border-bottom: 2px solid transparent; }
.board-tabs button.active { color: #1677ff; border-bottom-color: #1677ff; }
.board-setting-row { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 14px; align-items: start; padding: 10px 0; min-height: 54px; }
.board-setting-row > label { text-align: right; padding-top: 7px; }
.board-setting-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.board-setting-row .input, .board-setting-row .select { width: 200px; max-width: 100%; min-width: 0; }
.board-setting-row textarea.input { width: 300px; min-height: 80px; resize: vertical; }
.board-setting-row input[type=color] { width: 44px; height: 30px; padding: 3px; }
.board-setting-row input[type=number] { max-width: 160px; }
.board-setting-row .btn { color: #1677ff; padding: 6px; white-space: nowrap; }
.board-radio { display: inline-flex; gap: 5px; align-items: center; margin-right: 9px; min-height: 28px; white-space: nowrap; }
.board-type-picker { position: relative; width: 200px; max-width: 100%; border: 1px solid #d9dce4; border-radius: 3px; padding: 8px 10px; }
.board-type-picker label { display: flex; gap: 8px; padding: 7px 0; overflow-wrap: anywhere; }
.board-media { display: flex; flex-wrap: wrap; gap: 8px; }
.board-media > div { width: 68px; height: 68px; position: relative; }
.board-media img { width: 100%; height: 100%; object-fit: cover; }
.board-media button { position: absolute; top: 0; right: 0; background: #fff; }
.board-upload { cursor: pointer; position: relative; width: 68px; height: 68px; border: 1px dashed #ddd; display: grid; place-items: center; font-size: 28px; color: #999; }
.board-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.board-settings-column input[role=switch] { appearance: none; width: 40px; height: 22px; border-radius: 12px; background: #d9d9d9; position: relative; cursor: pointer; }
.board-settings-column input[role=switch]::after { content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0002; }
.board-settings-column input[role=switch]:checked { background: #1677ff; }
.board-settings-column input[role=switch]:checked::after { left: 20px; }
.board-settings-column .table-wrap { max-width: 100%; overflow: auto; }
.board-settings-column table .input { width: 100%; min-width: 70px; }
.board-settings-column .board-add { width: 100%; margin-top: 24px; }
.board-sort { display: flex; align-items: center; gap: 4px; }
.board-sort .btn { padding: 2px 5px; min-height: 24px; }
.board-settings-footer { position: sticky; bottom: 0; grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fafafd; border-top: 1px solid #eee; padding: 12px; z-index: 2; }
.board-settings-footer > div { display: flex; gap: 8px; }
.board-settings-footer .btn { white-space: nowrap; }
.board-screen { height: 100%; min-height: 280px; position: relative; padding: 16px; background-size: cover; background-position: center; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.board-screen > :not(.board-overlay) { position: relative; }
.board-overlay { position: absolute; inset: 0; pointer-events: none; }
.board-screen header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.board-screen h3 { margin: 0; overflow-wrap: anywhere; max-width: 100%; }
.board-screen header > div { display: flex; flex-wrap: wrap; gap: 8px; }
.board-logo { max-width: 80px; max-height: 50px; object-fit: contain; }
.board-weather { font-size: 12px; color: #777; }
.board-screen-main { display: flex; gap: 10px; min-width: 0; flex: 1; }
.board-room-photo { object-fit: cover; min-width: 0; max-height: 400px; align-self: stretch; }
.board-price-area { flex: 1; min-width: 0; }
.board-price-row, .board-price-heading { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6px; padding: 8px 4px; border-bottom: 1px solid #ddd; }
.board-price-row > span, .board-price-heading > span, .board-notice, .board-scheme, .board-screen footer { overflow-wrap: anywhere; white-space: pre-wrap; }
.board-screen.style-2, .board-screen.style-5 { background-color: #eef6f1; }
.board-screen.style-2 .board-price-row, .board-screen.style-5 .board-price-row { border-bottom-color: #73a68d; }
.board-screen.style-3 .board-price-row, .board-screen.style-6 .board-price-row { background: #fafafa; border: 1px solid #ddd; margin-top: 6px; }
.board-screen.portrait header { flex-direction: column; align-items: flex-start; }
.board-full-preview { height: min(65vh, 650px); min-height: 300px; }
.board-full-preview:has(.portrait) { max-width: 390px; margin: auto; }
.modal:has(.board-full-preview) { width: min(1000px, calc(100vw - 24px)); }
@media (max-width: 1000px) {
  .rate-board-settings { grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 20px; padding: 16px 12px 0; }
  .board-setting-row { grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 700px) {
  .rate-board-settings { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; height: auto; padding: 12px 8px 0; gap: 20px; }
  .board-preview-column, .board-settings-column { overflow: visible; }
  .board-preview-frame { margin: 12px auto 0; width: min(100%, 330px); aspect-ratio: 1.2; }
  .board-setting-row { grid-template-columns: 90px minmax(0, 1fr); }
  .board-settings-footer { padding: 8px 0; flex-wrap: wrap; }
  .board-settings-footer > div { margin-left: auto; }
  .board-settings-footer .btn { padding: 6px 9px; }
  .body-shell:has(.rate-board-settings) { grid-template-columns: minmax(0, 1fr) !important; }
  .app-shell:has(.rate-board-settings) .settings-side-nav { display: none; }
  .app-shell.nav-collapsed:has(.rate-board-settings) .settings-side-nav { display: block; position: fixed; z-index: 30; top: 46px; bottom: 0; left: 0; overflow-y: auto; box-shadow: 4px 0 12px #0002; }
  .app-shell:has(.rate-board-settings) .header-collapse { display: inline-flex; }
  .app-shell:has(.rate-board-settings) .pagebar { min-height: 52px; height: auto; gap: 8px; }
  .app-shell:has(.rate-board-settings) .crumb > span { display: none; }
}
/* Financial configuration uses the same SQL catalog as posting forms. */
.finance-config-page { display: grid; gap: 14px; }
.finance-config-top { display: flex; justify-content: flex-end; }
.finance-config-section { padding: 16px; background: #fff; border: 1px solid #edf0f4; }
.finance-config-section .panel-head { margin-bottom: 16px; padding: 0; }
.finance-config-section h3 { font-size: 14px; font-weight: 500; }
.finance-config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.finance-config-item { min-width: 0; padding: 12px; border: 1px solid #e7ebf2; border-radius: 3px; }
.finance-config-name { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.finance-config-name small { color: #1677ff; font-size: 11px; }
.finance-config-controls { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.finance-config-controls .btn { padding: 3px 7px; min-height: 26px; font-size: 12px; }
@media (max-width: 600px) { .finance-config-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .body-shell:has(.finance-config-page) { grid-template-columns: minmax(0, 1fr) !important; }
  .app-shell:has(.finance-config-page) .settings-side-nav { display: none; }
  .app-shell:has(.finance-config-page) .header-collapse { display: inline-flex; }
  .app-shell.nav-collapsed:has(.finance-config-page) .settings-side-nav { display: block; position: fixed; z-index: 40; top: 46px; bottom: 0; left: 0; width: 180px; overflow-y: auto; box-shadow: 4px 0 12px #0002; }
  .app-shell:has(.finance-config-page) .pagebar { min-height: 52px; height: auto; gap: 8px; }
  .app-shell:has(.finance-config-page) .crumb { min-width: 0; gap: 8px; }
  .app-shell:has(.finance-config-page) .crumb > span { display: none; }
  .app-shell:has(.finance-config-page) .crumb strong, .app-shell:has(.finance-config-page) .logout-link { white-space: nowrap; }
}
/* Employee records keep their own filters and pagination. */
.employee-filterbar { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; padding: 18px; background: #fff; margin-bottom: 16px; }
.employee-filterbar .field { min-width: 150px; margin: 0; }
.employee-filterbar .employee-search { flex: 1; min-width: 220px; }
.employee-page { min-width: 0; }
.employee-page .business-data-table { min-width: 850px; table-layout: auto; }
.employee-scope { display: block; color: #747b89; font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.employee-pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; padding: 10px 14px; }
.employee-pager > label { display: flex; align-items: center; gap: 8px; }
.employee-pager .pager { padding: 0; }
@media (max-width: 700px) {
  .body-shell:has(.employee-page) { grid-template-columns: minmax(0, 1fr) !important; }
  .app-shell:has(.employee-page) .settings-side-nav { display: none; }
  .app-shell:has(.employee-page) .header-collapse { display: inline-flex; }
  .app-shell.nav-collapsed:has(.employee-page) .settings-side-nav { display: block; position: fixed; z-index: 40; top: 46px; bottom: 0; left: 0; width: 180px; overflow-y: auto; box-shadow: 4px 0 12px #0002; }
  .app-shell:has(.employee-page) .pagebar { min-height: 52px; height: auto; gap: 8px; }
  .app-shell:has(.employee-page) .crumb { min-width: 0; gap: 8px; }
  .app-shell:has(.employee-page) .crumb > span { display: none; }
  .app-shell:has(.employee-page) .crumb strong, .app-shell:has(.employee-page) .logout-link { white-space: nowrap; }
  .employee-filterbar { gap: 10px; padding: 12px; }
  .employee-filterbar .field { flex: 1; min-width: 120px; }
  .employee-filterbar .employee-search { flex-basis: 100%; }
}
