:root {
  --ink-950: #101d1c;
  --ink-900: #152725;
  --ink-800: #1d3430;
  --ink-700: #28443e;
  --ink: var(--ink-950);
  --paper-100: #fffdf8;
  --paper-200: #f7f4ed;
  --paper-300: #edf1eb;
  --line: #d9e1da;
  --line-dark: rgba(255, 253, 248, 0.13);
  --text: #172522;
  --text-soft: #60706a;
  --orange: #ef6a43;
  --orange-dark: #c84f2f;
  --teal: #2f9689;
  --teal-soft: #dcefe8;
  --teal-text: #23746a;
  --yellow: #d8a23e;
  --yellow-soft: #f6e9c9;
  --red-soft: #fbe2dc;
  --blue-soft: #dfeaf1;
  --shadow: 0 20px 48px rgba(19, 40, 36, 0.10);
  --shadow-soft: 0 2px 8px rgba(19, 40, 36, 0.035);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-width: 236px;
  --danger: #b63835;
  --focus-ring: #23746a;
}

/* 可维护选项与折叠配置 */
.multi-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 2px 0;
}

.multi-option-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.multi-option-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.multi-option-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line, #d8e1dc);
  border-radius: 9px;
  background: var(--surface-soft, #f5f8f5);
  color: var(--ink-soft, #41514b);
  font-size: 13px;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.multi-option-chip:hover span {
  border-color: var(--accent, #2e9f8f);
}

.multi-option-chip input:checked + span {
  border-color: var(--accent, #2e9f8f);
  background: rgba(46, 159, 143, .12);
  color: var(--accent-strong, #176b60);
  font-weight: 650;
}

.multi-option-chip input:focus-visible + span {
  outline: 3px solid rgba(46, 159, 143, .25);
  outline-offset: 2px;
}

.settings-config-group {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--line, #dfe7e2);
}

.settings-config-group:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.settings-config-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink, #1e2c28);
}

.settings-config-head p {
  margin: 4px 0 0;
  color: var(--muted, #77847e);
  font-size: 12px;
}

.settings-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.settings-add-row input {
  width: 100%;
  min-height: 40px;
  min-width: 0;
  flex: 1;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-100);
  color: var(--text);
  font: inherit;
  outline: none;
}

.settings-add-row input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 150, 137, 0.12);
}

.settings-form .settings-add-row .btn {
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
}

.settings-config-hint {
  display: block;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.settings-config-list {
  margin-top: 0;
}

.compact-empty {
  min-height: 72px;
  padding: 14px;
}

.config-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.config-toggle svg {
  width: 14px;
  height: 14px;
  margin-left: 4px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper-300);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--paper-300);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 150, 137, 0.28);
  outline-offset: 2px;
}

::selection {
  color: var(--paper-100);
  background: var(--orange);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: rgba(17, 32, 31, 0.06);
}

::-webkit-scrollbar-thumb {
  background: rgba(40, 68, 62, 0.35);
  border-radius: 9px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* 正式版未登录时锁住整个工作台，只保留认证窗口。 */
body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

body.auth-locked .modal-backdrop {
  background: rgba(9, 21, 20, 0.9);
}

body.auth-locked .modal {
  width: min(460px, 100%);
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 24px 16px 18px;
  color: var(--paper-100);
  background: var(--ink-950);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink-950);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--orange);
  border-radius: 7px;
}

.brand-logo {
  display: block;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 3px;
  object-fit: contain;
  background: var(--paper-100);
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 8px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-copy span {
  color: rgba(255, 253, 248, 0.48);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-copy strong {
  color: var(--paper-100);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.workspace-label {
  margin: 34px 10px 10px;
  color: rgba(255, 253, 248, 0.38);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.primary-nav {
  display: grid;
  gap: 3px;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: rgba(255, 253, 248, 0.65);
  text-align: left;
  background: transparent;
  border-radius: 6px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--paper-100);
  background: rgba(255, 253, 248, 0.08);
}

.nav-item:active {
  transform: translateY(1px);
}

.nav-item.is-active {
  color: var(--paper-100);
  background: var(--ink-800);
  box-shadow: inset 3px 0 0 var(--orange);
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.nav-icon svg,
.icon-btn svg,
.btn svg,
.action-link svg,
.section-link svg,
.form-submit svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.nav-key {
  color: rgba(255, 253, 248, 0.28);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.nav-key-alert {
  color: var(--orange);
}

.sidebar-divider {
  height: 1px;
  margin: 20px 10px 13px;
  background: var(--line-dark);
}

.sidebar-spacer {
  flex: 1;
  min-height: 28px;
}

.sidebar-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 10px 16px;
  padding: 11px 12px;
  background: rgba(255, 253, 248, 0.06);
  border: 1px solid var(--line-dark);
  border-radius: 6px;
}

.sidebar-status strong,
.sidebar-status span:last-child {
  display: block;
}

.sidebar-status strong {
  color: rgba(255, 253, 248, 0.88);
  font-size: 12px;
  font-weight: 600;
}

.sidebar-status span:last-child {
  margin-top: 2px;
  color: rgba(255, 253, 248, 0.42);
  font-size: 10px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange);
}

.status-dot-live {
  background: #8bca62;
  box-shadow: 0 0 0 3px rgba(139, 202, 98, 0.12);
}

.status-dot-teal {
  width: 6px;
  height: 6px;
  margin: 0;
  background: var(--teal);
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 32px 1fr 28px;
  align-items: center;
  gap: 9px;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--line-dark);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: var(--ink-950);
  font-size: 13px;
  font-weight: 800;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}

.avatar-orange {
  background: #f3b497;
}

.avatar-teal {
  background: #98d2c5;
}

.avatar-blue {
  background: #a9c6d7;
}

.avatar-yellow {
  background: #e9cb88;
}

.profile-copy strong,
.profile-copy span {
  display: block;
}

.profile-copy strong {
  color: var(--paper-100);
  font-size: 12px;
  font-weight: 600;
}

.profile-copy span {
  color: rgba(255, 253, 248, 0.42);
  font-size: 10px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink-700);
  background: transparent;
  border-radius: 6px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-btn:hover {
  color: var(--ink-950);
  background: rgba(40, 68, 62, 0.08);
}

.icon-btn:active {
  transform: translateY(1px);
}

.icon-btn-ghost {
  color: rgba(255, 253, 248, 0.45);
}

.icon-btn-ghost:hover {
  color: var(--paper-100);
  background: rgba(255, 253, 248, 0.08);
}

.mobile-menu {
  display: none;
}

.main-shell {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 34px;
  background: rgba(237, 241, 235, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right,
.breadcrumb,
.demo-badge {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
}

.breadcrumb {
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.breadcrumb strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb-separator {
  color: #9aa8a1;
}

.topbar-right {
  gap: 13px;
}

.demo-badge {
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  background: var(--teal-soft);
  border-radius: 999px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border: 2px solid var(--paper-300);
  border-radius: 50%;
}

.content {
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px 34px 50px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0;
  color: var(--ink-950);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-head p {
  max-width: 60ch;
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 700;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  background: var(--paper-200);
  border-color: #c2d0c7;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: var(--paper-100);
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 6px 14px rgba(239, 106, 67, 0.2);
}

.btn-primary:hover {
  color: var(--paper-100);
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.btn-ink {
  color: var(--paper-100);
  background: var(--ink-800);
  border-color: var(--ink-800);
}

.btn-ink:hover {
  color: var(--paper-100);
  background: var(--ink-700);
  border-color: var(--ink-700);
}

.btn-quiet {
  color: var(--text-soft);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn-quiet:hover {
  color: var(--ink-800);
  background: rgba(40, 68, 62, 0.06);
  border-color: transparent;
}

.btn-danger {
  color: #a13b32;
  background: var(--red-soft);
  border-color: #f2c9c0;
}

.btn-sm {
  min-height: 31px;
  padding: 0 10px;
  font-size: 11px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric-item {
  position: relative;
  min-height: 116px;
  padding: 20px 22px 18px;
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
}

.metric-label svg {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.metric-value {
  display: block;
  margin-top: 9px;
  color: var(--ink-950);
  font-size: 31px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-note {
  display: block;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 11px;
}

.metric-note strong {
  color: var(--teal);
  font-weight: 700;
}

.metric-item-alert .metric-label svg,
.metric-item-alert .metric-note strong {
  color: var(--orange);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.panel {
  min-width: 0;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  margin: 0;
  color: var(--ink-950);
  font-size: 15px;
  font-weight: 800;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
}

.section-link:hover {
  color: var(--ink-800);
}

.section-link svg {
  width: 14px;
  height: 14px;
}

.floor-panel {
  overflow: hidden;
}

.floor-filter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--paper-300);
  border-radius: 6px;
}

.filter-chip {
  min-height: 27px;
  padding: 0 9px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border-radius: 4px;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: var(--ink-800);
  background: var(--paper-100);
  box-shadow: 0 1px 2px rgba(19, 40, 36, 0.08);
}

.floor-list {
  display: grid;
  gap: 0;
}

.floor-row {
  display: grid;
  grid-template-columns: 60px minmax(180px, 1.3fr) minmax(150px, 1fr) 120px;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
}

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

.floor-name {
  color: var(--ink-950);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.floor-name small {
  display: block;
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.floor-track {
  height: 8px;
  overflow: hidden;
  background: #e5ebe5;
  border-radius: 999px;
}

.floor-track span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.floor-track span.is-alert {
  background: var(--orange);
}

.floor-progress-copy {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.bed-dots {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.bed-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #d9e3dc;
}

.bed-dot.is-occupied {
  background: var(--ink-700);
}

.bed-dot.is-maintenance {
  background: var(--orange);
}

.floor-state {
  display: flex;
  justify-content: flex-end;
}

.floor-summary-row {
  width: 100%;
  grid-template-columns: minmax(110px, 0.9fr) repeat(3, 64px) minmax(150px, 1fr) 18px;
  color: inherit;
  text-align: left;
  background: transparent;
}

.floor-summary-row:hover {
  background: var(--paper-200);
}

.floor-summary-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.floor-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floor-summary-metric strong {
  color: var(--ink-950);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.floor-summary-metric small,
.floor-summary-track small {
  color: var(--text-soft);
  font-size: 10px;
  white-space: nowrap;
}

.floor-summary-metric.is-free strong {
  color: var(--teal);
}

.floor-summary-track {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.floor-summary-track .floor-track {
  width: 100%;
}

.floor-summary-action {
  display: grid;
  place-items: center;
  color: var(--teal);
}

.floor-summary-action svg {
  width: 16px;
  height: 16px;
}

.room-type-panel {
  margin-top: 20px;
}

.room-type-list {
  display: grid;
}

.room-type-stat {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) 90px 100px minmax(160px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}

.room-type-stat:last-child {
  border-bottom: 0;
}

.room-type-stat-name,
.room-type-stat-number,
.room-type-stat-share {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.room-type-stat-name strong {
  color: var(--ink-950);
  font-size: 13px;
}

.room-type-stat-name span,
.room-type-stat-number span,
.room-type-stat-share span {
  color: var(--text-soft);
  font-size: 10px;
}

.room-type-stat-number strong,
.room-type-stat-share strong {
  color: var(--ink-950);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.room-type-stat-number.is-free strong,
.room-type-stat-share strong {
  color: var(--teal);
}

.room-type-stat-share {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.room-type-stat-share span {
  grid-column: 1 / -1;
}

.type-share-track {
  height: 7px;
  overflow: hidden;
  background: #e5ebe5;
  border-radius: 999px;
}

.type-share-track span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.floor-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--paper-200);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.floor-detail-summary div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px;
}

.floor-detail-summary strong {
  color: var(--ink-950);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.floor-detail-summary span {
  color: var(--text-soft);
  font-size: 10px;
}

.floor-room-list {
  display: grid;
  max-height: 410px;
  gap: 0;
  margin-top: 14px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.floor-room-detail {
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.floor-room-detail:last-child {
  border-bottom: 0;
}

.floor-room-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.floor-room-detail-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.floor-room-detail-head strong {
  color: var(--ink-950);
  font-size: 13px;
}

.floor-room-detail-head span {
  color: var(--text-soft);
  font-size: 10px;
}

.floor-bed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.floor-bed-pill {
  padding: 4px 7px;
  color: var(--text-soft);
  font-size: 10px;
  background: var(--paper-200);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.floor-bed-pill.is-occupied {
  color: var(--ink-800);
  background: #e1e9e3;
}

.floor-bed-pill.is-maintenance {
  color: #9b522f;
  background: var(--orange-soft);
  border-color: #f0c8b3;
}

.floor-bed-pill.is-available {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(38, 134, 115, 0.16);
}

.state-badge,
.tag,
.priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--paper-300);
  border-radius: 999px;
}

.state-badge svg,
.priority-badge svg {
  width: 12px;
  height: 12px;
}

.state-badge.is-good {
  color: var(--teal);
  background: var(--teal-soft);
}

.state-badge.is-warning {
  color: #9d6d14;
  background: var(--yellow-soft);
}

.state-badge.is-danger {
  color: #aa3e32;
  background: var(--red-soft);
}

.action-panel {
  overflow: hidden;
}

.action-list {
  display: grid;
}

.action-item {
  display: grid;
  grid-template-columns: 36px 1fr 18px;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 0 22px;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

.action-item:last-child {
  border-bottom: 0;
}

.action-item:hover {
  background: var(--paper-300);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--ink-800);
  background: var(--paper-300);
  border-radius: 6px;
}

.action-item:first-child .action-icon {
  color: var(--orange-dark);
  background: var(--red-soft);
}

.action-item:nth-child(2) .action-icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.action-item:nth-child(3) .action-icon {
  color: #9d6d14;
  background: var(--yellow-soft);
}

.action-copy strong,
.action-copy span {
  display: block;
}

.action-copy strong {
  color: var(--ink-950);
  font-size: 12px;
  font-weight: 700;
}

.action-copy span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 10px;
}

.action-item > svg {
  color: #93a19b;
}

.repair-panel {
  margin-top: 20px;
  overflow: hidden;
}

.repair-list {
  display: grid;
}

.repair-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1.2fr) 96px 100px 28px;
  align-items: center;
  gap: 15px;
  min-height: 62px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
}

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

.repair-room {
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.repair-content strong,
.repair-content span {
  display: block;
}

.repair-content strong {
  overflow: hidden;
  color: var(--ink-950);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-content span {
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 10px;
}

.priority-badge {
  justify-content: center;
}

.priority-high {
  color: #ae402d;
  background: var(--red-soft);
}

.priority-medium {
  color: #976710;
  background: var(--yellow-soft);
}

.priority-low {
  color: var(--teal);
  background: var(--teal-soft);
}

.repair-time {
  color: var(--text-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.row-more {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--text-soft);
  background: transparent;
  border-radius: 5px;
}

.row-more:hover {
  color: var(--ink-800);
  background: var(--paper-300);
}

.row-more svg {
  width: 16px;
  height: 16px;
}

.page-stack {
  display: grid;
  gap: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 16px;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 230px;
}

.search-control svg {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  color: #889890;
  pointer-events: none;
}

.search-control input {
  width: 100%;
  min-height: 36px;
  padding: 0 12px 0 34px;
  color: var(--text);
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-control input::placeholder {
  color: #9aa7a0;
}

.select-control {
  min-height: 36px;
  padding: 0 30px 0 11px;
  color: var(--text);
  appearance: none;
  background: var(--paper-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2360706a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-panel {
  overflow: hidden;
}

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

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
}

.pagination-summary {
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-page,
.pagination-arrow {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
}

.pagination-page:hover,
.pagination-arrow:hover:not(:disabled) {
  color: var(--ink-950);
  background: var(--paper-300);
  border-color: var(--line);
}

.pagination-page.is-active {
  color: #fff;
  background: var(--ink-900);
  border-color: var(--ink-900);
}

.pagination-page[aria-current="page"] {
  outline: 0;
}

.pagination-arrow svg {
  width: 14px;
  height: 14px;
}

.pagination-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.pagination-ellipsis {
  display: inline-grid;
  place-items: center;
  width: 20px;
  color: var(--text-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}

.data-table th {
  padding: 12px 16px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  letter-spacing: 0.04em;
  background: var(--paper-300);
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 13px 16px;
  color: var(--ink-800);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #fbfcf7;
}

.data-table .cell-strong {
  color: var(--ink-950);
  font-weight: 750;
}

.data-table .cell-muted {
  color: var(--text-soft);
  font-size: 11px;
}

.data-table .cell-mono {
  font-variant-numeric: tabular-nums;
}

.room-name-cell,
.person-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.room-code {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink-800);
  font-size: 11px;
  font-weight: 800;
  background: var(--paper-300);
  border-radius: 5px;
}

.person-cell .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.cell-stack strong,
.cell-stack span {
  display: block;
}

.cell-stack strong {
  color: var(--ink-950);
  font-weight: 700;
}

.cell-stack span {
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 10px;
}

.reward-object-trigger {
  min-width: 132px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.reward-object-trigger:hover {
  background: var(--paper-300);
}

.reward-object-trigger:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.reward-detail-preview {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reward-detail-copy {
  display: grid;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--text-soft);
  background: transparent;
  border-radius: 5px;
}

.table-action:hover {
  color: var(--ink-800);
  background: var(--paper-300);
}

.table-action.is-danger:hover {
  color: #ae402d;
  background: var(--red-soft);
}

.table-action svg {
  width: 15px;
  height: 15px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  color: var(--text-soft);
  text-align: center;
}

.empty-state svg {
  width: 28px;
  height: 28px;
  margin-bottom: 9px;
  color: #91a29a;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--ink-800);
  font-size: 13px;
}

.empty-state span {
  margin-top: 4px;
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 20px 22px;
}

.detail-item {
  min-height: 62px;
  padding: 12px 13px;
  background: var(--paper-300);
  border-radius: 6px;
}

.detail-item span,
.detail-item strong {
  display: block;
}

.detail-item span {
  color: var(--text-soft);
  font-size: 10px;
}

.detail-item strong {
  margin-top: 4px;
  color: var(--ink-950);
  font-size: 13px;
  font-weight: 750;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.form-panel {
  overflow: hidden;
}

.form-body {
  padding: 22px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field-span-2 {
  grid-column: span 2;
}

.field label,
.field legend {
  color: var(--ink-800);
  font-size: 11px;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  color: var(--text);
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 150, 137, 0.12);
  outline: 0;
}

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

.field-hint {
  color: var(--text-soft);
  font-size: 10px;
}

.radio-row,
.chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text-soft);
  font-size: 11px;
  background: var(--paper-300);
  border: 1px solid transparent;
  border-radius: 6px;
}

.radio-label:has(input:checked) {
  color: var(--ink-800);
  background: var(--teal-soft);
  border-color: #b9ddd3;
}

.radio-label input {
  width: 14px;
  min-height: 14px;
  accent-color: var(--teal);
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.bed-preview {
  overflow: hidden;
}

.bed-preview-body {
  padding: 20px 22px 22px;
}

.room-picker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  padding: 15px;
  background: var(--ink-900);
  border-radius: 6px;
}

.room-picker span,
.room-picker strong {
  display: block;
}

.room-picker span {
  color: rgba(255, 253, 248, 0.53);
  font-size: 10px;
}

.room-picker strong {
  margin-top: 2px;
  color: var(--paper-100);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.room-picker .state-badge {
  color: #a9e0c1;
  background: rgba(122, 192, 143, 0.17);
}

.bed-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 18px;
}

.bed-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 12px;
  color: var(--text-soft);
  text-align: left;
  background: var(--paper-300);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.bed-option:hover:not(:disabled) {
  color: var(--ink-800);
  background: var(--paper-200);
  border-color: #c5d3ca;
}

.bed-option.is-selected {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: #b9ddd3;
}

.bed-option:disabled {
  color: #9da8a3;
  cursor: not-allowed;
  background: #eef1ed;
}

.bed-option strong {
  font-size: 12px;
}

.bed-option span {
  font-size: 10px;
}

.bed-option .bed-number {
  font-variant-numeric: tabular-nums;
}

.selection-note {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.selection-note strong {
  color: var(--teal);
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--paper-300);
  border-radius: 6px;
}

.segment {
  min-height: 29px;
  padding: 0 11px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
  border-radius: 4px;
}

.segment.is-active,
.segment:hover {
  color: var(--ink-800);
  background: var(--paper-100);
  box-shadow: 0 1px 2px rgba(19, 40, 36, 0.08);
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--ink-900);
  border-radius: var(--radius-sm);
}

.bulk-toolbar span {
  color: rgba(255, 253, 248, 0.68);
  font-size: 11px;
}

.bulk-toolbar strong {
  color: var(--paper-100);
}

.check-cell {
  width: 42px;
  text-align: center !important;
}

.check-cell input {
  width: 15px;
  height: 15px;
  accent-color: var(--orange);
}

.history-note {
  padding: 12px 16px;
  color: var(--text-soft);
  font-size: 11px;
  background: var(--paper-300);
  border-bottom: 1px solid var(--line);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.75fr) minmax(0, 1.25fr);
  gap: 20px;
  align-items: start;
}

.settings-form {
  padding: 20px 22px 22px;
}

.settings-form .field + .field {
  margin-top: 14px;
}

.settings-form .btn {
  width: 100%;
  margin-top: 16px;
}

.list-stack {
  display: grid;
  gap: 0;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item strong,
.list-item span {
  display: block;
}

.list-item strong {
  color: var(--ink-950);
  font-size: 12px;
  font-weight: 750;
}

.list-item span {
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 10px;
}

.permission-panel {
  margin-top: 20px;
}

.audit-panel {
  margin-top: 20px;
}

.admin-tools-panel {
  margin-top: 20px;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px 0;
}

.admin-tools-grid .btn {
  justify-content: center;
  min-height: 46px;
}

.admin-tools-hint {
  display: block;
  padding: 10px 22px 18px;
}

.audit-list {
  display: grid;
  max-height: 520px;
  overflow: auto;
}

.audit-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
}

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

.audit-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}

.audit-mark.is-warning {
  color: var(--orange);
  background: var(--orange-soft);
}

.audit-mark svg {
  width: 16px;
  height: 16px;
}

.audit-copy {
  min-width: 0;
}

.audit-copy strong,
.audit-copy span,
.audit-meta span,
.audit-meta time {
  display: block;
}

.audit-copy strong {
  overflow: hidden;
  color: var(--ink-950);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-copy span,
.audit-meta time {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 10px;
}

.audit-meta {
  min-width: 116px;
  text-align: right;
}

.audit-result {
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
}

.audit-result.is-warning {
  color: var(--orange);
}

.role-tabs {
  display: flex;
  gap: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

.role-tab {
  position: relative;
  min-height: 45px;
  padding: 0 16px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  background: transparent;
}

.role-tab::after {
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 2px;
  background: transparent;
  content: "";
}

.role-tab.is-active {
  color: var(--ink-800);
}

.role-tab.is-active::after {
  background: var(--orange);
}

.permission-list {
  display: grid;
}

.permission-row {
  display: grid;
  grid-template-columns: 1fr 56px 56px;
  align-items: center;
  min-height: 54px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}

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

.permission-row.header {
  min-height: 38px;
  color: var(--text-soft);
  font-size: 10px;
  background: var(--paper-300);
}

.permission-row strong {
  color: var(--ink-800);
  font-size: 12px;
  font-weight: 650;
}

.permission-toggle {
  display: flex;
  justify-content: center;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 18px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: #d6ded7;
  border-radius: 999px;
  transition: background 160ms ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  background: var(--paper-100);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(19, 40, 36, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + .switch-track {
  background: var(--teal);
}

.switch input:checked + .switch-track::after {
  transform: translateX(12px);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 21, 20, 0.62);
}

.modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  background: var(--paper-100);
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: 9px;
  box-shadow: 0 28px 80px rgba(5, 16, 15, 0.32);
  animation: modal-in 180ms ease-out both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  color: var(--ink-950);
  font-size: 17px;
  font-weight: 800;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.modal-body {
  padding: 20px 22px 22px;
}

.modal-body .form-grid {
  gap: 14px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(350px, calc(100vw - 32px));
  min-height: 42px;
  padding: 0 14px;
  color: var(--paper-100);
  font-size: 12px;
  background: var(--ink-900);
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 6px;
  box-shadow: 0 14px 38px rgba(9, 21, 20, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-success::before,
.toast.is-warning::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
}

.toast.is-success::before {
  background: #8bca62;
}

.toast.is-warning::before {
  background: var(--orange);
}

.mobile-only {
  display: none;
}

.mini-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 22px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mini-stat-row:last-child {
  border-bottom: 0;
}

.mini-stat-row span {
  color: var(--text-soft);
  font-size: 11px;
}

.mini-stat-row strong {
  color: var(--ink-950);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mini-stat-row strong.is-alert {
  color: var(--orange-dark);
}

.inline-note {
  padding: 12px 16px;
  color: var(--text-soft);
  font-size: 11px;
  background: var(--paper-300);
  border-bottom: 1px solid var(--line);
}

.inline-note strong {
  color: var(--ink-800);
}

#reward-room-members {
  display: grid;
  gap: 4px;
}

.status-cell {
  min-width: 92px;
}

.status-badge-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.room-repair-badge {
  color: #9b522f;
  background: var(--orange-soft);
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .content {
    padding-right: 24px;
    padding-left: 24px;
  }

  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .overview-grid,
  .form-layout,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .floor-row {
    grid-template-columns: 60px minmax(200px, 1.2fr) minmax(140px, 1fr) 110px;
  }

  .floor-summary-row {
    grid-template-columns: minmax(90px, 0.9fr) repeat(3, 56px) minmax(120px, 1fr) 18px;
  }

  .room-type-stat {
    grid-template-columns: minmax(130px, 1.2fr) 70px 80px minmax(120px, 1fr);
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: min(292px, 84vw);
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 20px 0 50px rgba(5, 16, 15, 0.24);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar.is-open::after {
    position: fixed;
    z-index: -1;
    inset: 0 -100vw 0 100%;
    background: rgba(9, 21, 20, 0.45);
    content: "";
  }

  .main-shell {
    width: 100%;
    margin-left: 0;
  }

  .audit-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .audit-meta {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    text-align: left;
  }

  .audit-meta time {
    margin-top: 0;
  }

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

  .content {
    padding-top: 26px;
  }

  .metric-item {
    min-height: 106px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .floor-row {
    grid-template-columns: 56px minmax(160px, 1fr) 90px;
  }

  .floor-summary-row {
    grid-template-columns: minmax(90px, 1fr) repeat(3, 52px) minmax(110px, 1.1fr) 18px;
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .room-type-stat {
    grid-template-columns: minmax(120px, 1fr) 64px 72px minmax(100px, 1fr);
  }

  .floor-state {
    display: none;
  }
}

@media (max-width: 640px) {
  .settings-add-row {
    flex-wrap: wrap;
  }

  .settings-add-row input {
    flex: 1 1 180px;
  }

  body {
    font-size: 13px;
  }

  .topbar {
    min-height: 62px;
    padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  }

  .topbar-right {
    gap: 3px;
  }

  .demo-badge {
    display: none;
  }

  .content {
    padding: 21px 14px max(36px, env(safe-area-inset-bottom));
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 18px;
  }

  .page-head h1 {
    font-size: 23px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn-primary {
    flex: 1;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
  }

  .metric-item {
    min-height: 100px;
    padding: 15px 14px 13px;
    border-bottom: 1px solid var(--line);
  }

  .metric-item:nth-child(2n) {
    border-right: 0;
  }

  .metric-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .metric-value {
    font-size: 26px;
  }

  .panel-header {
    padding: 16px 15px 13px;
  }

  .panel-title {
    font-size: 14px;
  }

  .panel-subtitle {
    font-size: 10px;
  }

  .floor-filter {
    max-width: 146px;
    overflow-x: auto;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .floor-row {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    min-height: 82px;
    padding: 13px 15px;
  }

  .floor-summary-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, 46px) 16px;
    min-height: 78px;
    padding: 12px 15px;
  }

  .floor-summary-row .floor-summary-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .floor-summary-row .floor-summary-action {
    grid-column: 5;
    grid-row: 1;
  }

  .floor-summary-metric strong {
    font-size: 15px;
  }

  .room-type-stat {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    min-height: 76px;
    padding: 12px 15px;
  }

  .room-type-stat-share {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

  .floor-name {
    font-size: 18px;
  }

  .bed-dots {
    justify-content: flex-start;
    margin-top: 7px;
  }

  .repair-panel {
    margin-top: 16px;
  }

  .repair-row {
    grid-template-columns: 58px minmax(0, 1fr) 72px;
    gap: 9px;
    min-height: 66px;
    padding: 10px 15px;
  }

  .repair-time,
  .repair-row > .row-more {
    display: none;
  }

  .toolbar {
    align-items: stretch;
    padding: 11px;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .search-control {
    width: 100%;
    min-width: 0;
  }

  .toolbar-right .btn {
    flex: 1;
  }

  .table-panel .panel-header {
    border-bottom: 1px solid var(--line);
  }

  body {
    overflow-x: hidden;
  }

  .table-scroll {
    overflow: visible;
  }

  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .pagination-pages {
    width: 100%;
    justify-content: space-between;
  }

  .data-table {
    display: block;
    min-width: 0;
    white-space: normal;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px 12px 12px;
  }

  .data-table tbody tr {
    display: grid;
    gap: 0;
    overflow: hidden;
    background: var(--paper-100);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
  }

  .data-table tbody tr:hover td {
    background: transparent;
  }

  .data-table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    white-space: normal;
    border-bottom: 1px solid var(--line);
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    color: var(--text-soft);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
  }

  .data-table td > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .data-table td[colspan] {
    display: block;
    padding: 0;
    border: 0;
  }

  .data-table td[colspan]::before,
  .data-table td.check-cell::before {
    display: none;
  }

  .data-table td.check-cell {
    display: block;
    padding: 8px 12px 0;
    border-bottom: 0;
  }

  .data-table .person-cell,
  .data-table .cell-stack,
  .data-table .table-actions {
    min-width: 0;
  }

  .data-table .table-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .toolbar-left,
  .toolbar-right {
    min-width: 0;
  }

  .toolbar-right {
    flex-wrap: wrap;
  }

  .admin-tools-grid {
    grid-template-columns: 1fr;
    padding-right: 15px;
    padding-left: 15px;
  }

  .admin-tools-hint {
    padding-right: 15px;
    padding-left: 15px;
  }

  .segmented {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .segment {
    flex: 0 0 auto;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 14px 15px;
  }

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

  .field-span-2 {
    grid-column: span 1;
  }

  .form-body,
  .bed-preview-body {
    padding: 16px 15px;
  }

  .form-footer {
    margin-top: 17px;
  }

  .room-picker {
    padding: 13px;
  }

  .room-picker strong {
    font-size: 20px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 90vh;
    border-radius: 10px 10px 0 0;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-right: 15px;
    padding-left: 15px;
  }

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

  .permission-row {
    grid-template-columns: 1fr 48px 48px;
    padding: 0 15px;
  }

  .role-tabs {
    padding: 0 15px;
  }

  .role-tab {
    padding: 0 11px;
  }

  .role-tab::after {
    right: 11px;
    left: 11px;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

/* 通知列表样式 */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--paper-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.notification-item.notification-urgent {
  background: var(--red-soft);
  border-color: #f5c6bd;
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
  flex-shrink: 0;
}

.notification-urgent .notification-icon {
  color: #aa3e32;
  background: var(--paper-100);
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notification-content strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-950);
}

.notification-content span {
  font-size: 11px;
  color: var(--text-soft);
}

/* 个人菜单样式 */
.profile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: all 140ms ease;
}

.profile-menu-item:hover {
  background: var(--paper-200);
  border-color: var(--line);
}

.profile-menu-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-soft);
}

.profile-menu-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-950);
}

.profile-menu-item-danger:hover {
  background: var(--red-soft);
  border-color: #f5c6bd;
}

.profile-menu-item-danger span {
  color: #aa3e32;
}

.profile-menu-item-danger svg {
  color: #aa3e32;
}

/* 顶部头像按钮样式 */
.topbar-avatar {
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.topbar-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(19, 40, 36, 0.15);
}

/* 通知铃铛按钮高亮 */
.notification-dot {
  position: absolute;
  top: 3px;
  right: 2px;
  display: none;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  background: #d94c3d;
  border: 2px solid var(--paper-100);
  border-radius: 999px;
  pointer-events: none;
}

.icon-btn {
  position: relative;
}

/* 通知数量可能超过两位，徽标使用内容宽度并保留在按钮边界内。 */
.notification-dot {
  top: -6px;
  right: -7px;
  z-index: 2;
  width: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  box-sizing: border-box;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
}

#notification-btn.is-notification-unread > [data-icon="bell"] {
  animation: notification-bell-shake 1.8s ease-in-out infinite;
  transform-origin: 50% 8%;
}

#notification-btn.is-notification-unread::after {
  content: attr(data-notification-hint);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  max-width: 220px;
  padding: 7px 10px;
  color: var(--paper-100);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  background: var(--ink);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(19, 40, 36, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

#notification-btn.is-notification-unread:hover::after,
#notification-btn.is-notification-unread:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

@keyframes notification-bell-shake {
  0%, 100% { transform: rotate(0deg); }
  8%, 24%, 40% { transform: rotate(8deg); }
  16%, 32% { transform: rotate(-8deg); }
  48% { transform: rotate(0deg); }
}

.notification-item-system {
  align-items: flex-start;
  cursor: default;
}

.notification-version-action {
  align-self: flex-start;
  margin-top: 7px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  #notification-btn.is-notification-unread > [data-icon="bell"] {
    animation: none;
  }
}

/* 用户列表样式 */
.user-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px !important;
  min-height: 68px !important;
}

.user-list-item .person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.user-identity .avatar {
  display: grid;
  place-items: center;
  align-self: center;
  overflow: hidden;
  line-height: 1;
  text-align: center;
}

.user-list-item .cell-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-list-item .cell-stack strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-950);
}

.user-list-item .cell-stack span {
  font-size: 11px;
  color: var(--text-soft);
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.list-item-actions .state-badge {
  margin-right: 4px;
}

.settings-subtitle {
  margin: 18px 0 8px;
  color: var(--ink-950);
  font-size: 13px;
}

.notification-item {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.unread-marker {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  background: #d94c3d;
  border-radius: 999px;
}

.repair-conversation {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.repair-conversation-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.repair-conversation-title h3,
.repair-conversation-title p {
  margin: 0;
}

.repair-conversation-title h3 {
  color: var(--ink-950);
  font-size: 15px;
}

.repair-conversation-title p {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}

.repair-message-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 280px;
  padding: 12px;
  overflow: auto;
  background: var(--paper-200);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.repair-message-entry {
  display: flex;
  width: min(82%, 460px);
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  color: var(--ink-950);
  text-align: left;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 3px;
}

.repair-message-entry.is-self {
  align-self: flex-end;
  background: var(--teal-soft);
  border-color: rgba(38, 134, 115, 0.2);
  border-radius: 10px 10px 3px 10px;
}

.repair-message-entry[data-reply-message] {
  cursor: pointer;
}

.repair-message-entry[data-reply-message]:hover {
  border-color: var(--teal);
}

.repair-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.repair-message-head strong {
  font-size: 11px;
}

.repair-message-head small,
.repair-reply-hint {
  color: var(--text-soft);
  font-size: 10px;
  font-style: normal;
}

.repair-message-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}

.repair-reply-hint {
  color: var(--teal);
}

.repair-message-compose {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.5fr);
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.repair-message-compose .field {
  min-width: 0;
}

.repair-message-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repair-message-closed {
  margin-top: 12px;
}

.repair-readonly-status {
  padding: 0;
}

.repair-chat-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

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

.repair-chat-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.repair-chat-heading-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(38, 134, 115, 0.18);
  border-radius: 10px;
}

.repair-chat-heading-icon svg {
  width: 16px;
  height: 16px;
}

.repair-chat-heading h3,
.repair-chat-heading p {
  margin: 0;
}

.repair-chat-heading h3 {
  color: var(--ink-950);
  font-size: 15px;
}

.repair-chat-heading p {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}

.repair-chat-list {
  min-height: 150px;
  max-height: 340px;
  gap: 12px;
  padding: 14px;
  background: #e9efeb;
  border-radius: 14px;
}

.repair-chat-bubble {
  display: flex;
  width: min(88%, 470px);
  align-items: flex-start;
  gap: 8px;
  padding: 0;
  color: var(--ink-950);
  text-align: left;
  background: transparent;
  border: 0;
}

.repair-chat-bubble.is-self {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.repair-chat-bubble[data-reply-message] {
  cursor: pointer;
}

.repair-chat-bubble[data-reply-message]:hover .repair-chat-bubble-body {
  border-color: var(--teal);
}

.repair-chat-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 11px;
}

.repair-chat-bubble-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 9px 12px;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 13px 13px 13px 4px;
}

.repair-chat-bubble.is-self .repair-chat-bubble-body {
  background: var(--teal-soft);
  border-color: rgba(38, 134, 115, 0.2);
  border-radius: 13px 13px 4px 13px;
}

.repair-chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.repair-chat-meta strong {
  font-size: 11px;
}

.repair-chat-meta time {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 10px;
}

.repair-chat-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}

.repair-chat-reply {
  color: var(--teal);
  font-size: 10px;
}

.repair-chat-composer {
  margin-top: 12px;
  padding: 14px;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.repair-chat-composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.repair-chat-composer-head strong,
.repair-chat-composer-head .field-hint {
  display: block;
}

.repair-chat-composer-head strong {
  color: var(--ink-950);
  font-size: 12px;
}

.repair-chat-composer-head .field-hint {
  margin-top: 4px;
}

.repair-chat-counter {
  flex: 0 0 auto;
  padding: 4px 8px;
  color: var(--teal);
  font-size: 10px;
  background: var(--teal-soft);
  border-radius: 999px;
}

.repair-chat-recipient-row {
  margin-bottom: 10px;
}

.repair-chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

.repair-chat-input-row textarea {
  min-height: 70px;
  resize: vertical;
}

.repair-chat-send {
  min-width: 88px;
}

.repair-chat-input-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 10px;
}

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

.repair-media-group + .repair-media-group {
  margin-top: 16px;
}

.repair-media-group h3 {
  margin: 0 0 8px;
  color: var(--ink-950);
  font-size: 12px;
}

.repair-media-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  color: var(--ink-950);
  text-align: left;
  background: var(--paper-100);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.repair-media-item:hover,
.repair-media-item:focus-visible {
  border-color: var(--teal);
  outline: none;
}

.repair-media-thumb {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}

.repair-media-item strong,
.repair-media-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repair-media-item small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
}

.repair-media-viewer {
  display: grid;
  min-height: min(58vh, 560px);
  place-items: center;
  overflow: auto;
  background: #17201e;
  border-radius: var(--radius-sm);
}

.repair-media-viewer img {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 560px);
  object-fit: contain;
}

.repair-message-attachments {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .repair-message-entry {
    width: 94%;
  }

  .repair-chat-bubble {
    width: 94%;
  }

  .repair-message-compose {
    grid-template-columns: 1fr;
  }

  .repair-message-actions {
    grid-column: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .repair-chat-input-row {
    grid-template-columns: 1fr;
  }

  .repair-chat-send {
    width: 100%;
    min-height: 42px;
  }

  .repair-chat-input-foot {
    flex-direction: column;
    gap: 2px;
  }
}
/* ui-ux-pro-max operations refresh is appended below. */

/* 2026-09 工作台界面：统一密度、对比度与逐级弹窗。 */
body { font-size: 14px; line-height: 1.6; }
body.modal-open { overflow: hidden; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .6; }
[aria-busy="true"] button:disabled, button:disabled[data-open-repair-gallery] { cursor: wait; }
#app-content:focus { outline: none; }
:where(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.sidebar { padding: 28px 16px 18px; background: var(--ink-950); overflow-y: auto; }
.brand-logo { width: 42px; height: 42px; flex-basis: 42px; border-radius: 11px; }
.brand-copy { min-width: 0; }
.brand-copy span { font-size: 10px; color: #b1c1b9; letter-spacing: .1em; }
.brand-copy strong { font-size: 16px; letter-spacing: 0; white-space: nowrap; }
.workspace-label { margin-top: 34px; color: #b1c1b9; font-size: 12px; }
.primary-nav { gap: 6px; }
.nav-item { min-height: 46px; padding: 10px 12px; font-size: 14px; color: #c9d5cd; border-radius: 9px; }
.nav-item.is-active { color: var(--paper-100); background: var(--ink-800); box-shadow: inset 3px 0 0 var(--orange); font-weight: 700; }
.nav-item.is-active .nav-icon { color: var(--orange); }
.nav-key { display: none; }
.nav-item:active, .btn:active, .icon-btn:active { transform: none; }
.sidebar-status { margin: 0 0 16px; padding: 12px; border-color: var(--line-dark); background: rgba(255, 253, 248, .06); }
.sidebar-status span:last-child, .profile-copy span { font-size: 12px; color: #b9c6bd; }
.sidebar-profile { grid-template-columns: 36px minmax(0, 1fr) 40px; }
.sidebar-profile .icon-btn { width: 40px; height: 44px; }
.profile-copy { min-width: 0; }
.profile-copy strong { font-size: 14px; overflow-wrap: anywhere; }
.topbar { min-height: 76px; background: var(--paper-300); backdrop-filter: none; padding-inline: 32px; }
.topbar-right { gap: 12px; }
.breadcrumb { font-size: 13px; }
.breadcrumb strong { font-size: 15px; }
.demo-badge { min-height: 30px; color: var(--teal); font-size: 12px; }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; }
.topbar-avatar { width: 40px; height: 40px; border: 3px solid var(--paper-100); box-shadow: 0 0 0 1px var(--line); }
.content { max-width: 1600px; padding: 32px 32px 48px; }
.page-head { margin-bottom: 28px; gap: 20px; }
.page-head h1 { font-size: 28px; font-weight: 750; letter-spacing: -.04em; }
.page-head p { color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.btn { min-height: 44px; padding: 10px 16px; font-size: 14px; border-radius: 9px; box-shadow: none; }
.btn-primary, .form-submit { color: var(--ink-950); background: var(--orange); border-color: var(--orange); box-shadow: none; }
.btn-primary:hover, .form-submit:hover { color: #fff; background: var(--orange-dark); border-color: var(--orange-dark); box-shadow: none; }
.btn-ink { color: var(--paper-100); background: var(--ink-800); border-color: var(--ink-800); }
.btn-ink:hover { color: var(--paper-100); background: var(--ink-700); border-color: var(--ink-700); }
.btn-sm { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.btn-danger { color: var(--danger); }
.metric-strip { gap: 16px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
.metric-item, .metric-item:last-child { min-height: 150px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-100); }
.metric-label { font-size: 13px; font-weight: 600; }
.metric-label svg { width: 18px; height: 18px; }
.metric-value { margin-top: 16px; font-size: 36px; font-weight: 750; }
.metric-note { margin-top: 10px; font-size: 12px; }
.metric-item:nth-child(3) { background: var(--paper-100); border-color: var(--line); }
.metric-item:nth-child(3) .metric-value { color: var(--teal-text); }
.metric-item-alert .metric-note strong, .metric-item-alert .metric-label svg { color: #b9502c; }
.panel { box-shadow: var(--shadow-soft); }
.panel-header { padding: 22px 24px 18px; }
.panel-title { font-size: 17px; }
.panel-subtitle { font-size: 12px; margin-top: 5px; line-height: 1.6; }
.floor-summary-row { min-height: 86px; }
.floor-name { font-size: 17px; }
.floor-summary-metric small, .floor-summary-track small, .room-type-stat span { font-size: 12px; }
.room-type-stat { padding-block: 18px; }
.floor-track, .type-share-track { background: var(--teal-soft); }
.action-item { min-height: 88px; }
.action-icon { color: var(--teal); background: var(--teal-soft); }
.action-copy strong { font-size: 14px; }
.action-copy span { font-size: 12px; }
.toolbar { padding: 18px 22px; gap: 14px; }
.search-control { min-width: 0; }
.search-control input { min-height: 44px; font-size: 14px; background: var(--paper-200); }
.filter-chip, .role-tab, .section-link, .action-link { min-height: 36px; font-size: 13px; }
.data-table th { padding: 14px 18px; font-size: 12px; font-weight: 650; color: var(--text-soft); background: var(--paper-200); }
.data-table td { padding: 16px 18px; font-size: 13px; }
.data-table tbody tr:hover td { background: var(--paper-200); }
.tag, .state-badge, .priority-badge { font-size: 12px; line-height: 1.5; white-space: nowrap; }
.field label { color: var(--text); font-size: 13px; font-weight: 650; }
.field :is(input:not([type=checkbox]):not([type=radio]), select, textarea), .settings-add-row input { min-height: 44px; font-size: 14px; border-color: #b8c9be; border-radius: 9px; }
.field textarea { padding: 11px 12px; line-height: 1.7; }
.field-hint, .settings-config-hint { font-size: 12px; color: var(--text-soft); line-height: 1.65; }
.field-optional { margin-left: 8px; font-weight: 400; color: var(--text-soft); font-size: 12px; }
input[type=file] { width: 100%; max-width: 100%; padding: 8px; background: var(--paper-200); }
input[type=file]::file-selector-button { margin-right: 10px; padding: 8px 12px; color: var(--teal); background: var(--teal-soft); border: 0; border-radius: 6px; cursor: pointer; font: inherit; }
.form-feedback { padding: 10px 12px; margin: 12px 0 0; color: #10584e; background: var(--teal-soft); border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
.form-feedback.is-error { color: var(--danger); background: var(--red-soft); }
.settings-config-head h3, .permission-row strong { font-size: 14px; }
.settings-config-list .list-item { min-width: 0; }
.permission-row { min-height: 58px; }
.table-pagination { padding: 16px 22px; }
.pagination-arrow, .pagination-page { min-width: 36px; min-height: 36px; }
.modal-backdrop { background: rgba(16, 29, 28, .5); padding: 24px; }
.modal { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); overflow: hidden; border: 0; border-radius: 16px; background: var(--paper-100); }
.modal-head { flex-shrink: 0; padding: 22px 24px 18px; }
.modal-head h2 { font-size: 21px; }
.modal-head p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.modal-body { min-height: 0; overflow: auto; padding: 22px 24px; overscroll-behavior: contain; }
.modal-foot { flex-shrink: 0; align-items: center; flex-wrap: wrap; padding: 16px 24px; background: var(--paper-200); }
.modal-footer-note { margin-right: auto; color: var(--text-soft); font-size: 12px; }
.modal-work-order { width: min(1060px, 100%); }
.work-order-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.work-order-details { min-width: 0; }
.work-order-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.work-order-section-head h3 { margin: 0; font-size: 16px; }
.repair-people-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.repair-people-summary .detail-item { padding: 12px; min-width: 0; border: 0; }
.repair-people-summary .detail-item span { font-size: 12px; }
.repair-people-summary .detail-item strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.work-order-gallery { justify-content: flex-start; width: 100%; margin-bottom: 22px; background: var(--paper-200); }
.work-order-gallery svg:last-child { margin-left: auto; }
#repair-status-form .form-grid { grid-template-columns: minmax(0, 1fr); }
#repair-status-form .field-span-2 { grid-column: auto; }
.repair-chat-section { min-width: 0; margin: 0; padding: 0 0 0 26px; border: 0; border-left: 1px solid var(--line); }
.repair-chat-header { margin-bottom: 14px; }
.repair-chat-heading h3 { font-size: 16px; }
.repair-chat-heading p { font-size: 12px; }
.repair-chat-list { max-height: 300px; min-height: 160px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-200); overflow: auto; overscroll-behavior: contain; }
.repair-chat-bubble { width: 94%; gap: 8px; margin-bottom: 14px; }
.repair-chat-bubble:last-child { margin-bottom: 0; }
.repair-chat-bubble-body { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0 12px 12px 12px; background: var(--paper-100); }
.repair-chat-bubble.is-self .repair-chat-bubble-body { border-color: #bdd7cb; background: var(--teal-soft); border-radius: 12px 0 12px 12px; }
.repair-chat-meta { flex-wrap: wrap; gap: 4px 10px; }
.repair-chat-meta strong, .repair-chat-meta time { font-size: 12px; color: var(--text-soft); }
.repair-chat-copy { margin: 6px 0 0; color: var(--text); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.repair-chat-reply { display: inline-flex; align-items: center; min-height: 32px; margin: 4px 0 -4px; padding: 0 4px; font-size: 12px; background: transparent; color: var(--teal); border-radius: 4px; }
.repair-chat-composer { margin-top: 16px; padding: 0; border: 0; background: transparent; }
.repair-chat-composer-head { gap: 8px; margin-bottom: 12px; }
.repair-chat-composer-head strong { font-size: 14px; }
.repair-chat-composer > .field { margin-bottom: 12px; }
.repair-message-actions { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.repair-message-actions .field-hint { max-width: 30ch; }
.repair-chat-shortcut { margin: 8px 0 0; }
.repair-upload-field { min-width: 0; }
.repair-message-closed { margin-top: 16px; }
.repair-message-closed p { margin: 4px 0 0; }
.modal-media { width: min(980px, 100%); }
.repair-media-group h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.repair-media-group + .repair-media-group { margin-top: 24px; }
.repair-media-item { min-height: 76px; padding: 14px; border-radius: 10px; }
.repair-media-item > span:nth-child(2) { min-width: 0; }
.repair-media-item strong { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.repair-media-item small { font-size: 12px; white-space: normal; }
.media-view-label { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-size: 13px; }
.media-view-label svg { width: 16px; height: 16px; }
.repair-media-viewer { min-height: 240px; background: var(--paper-300); }
.repair-media-viewer img { max-height: 62dvh; }
.notification-anchor { position: relative; display: flex; flex-shrink: 0; }
#notification-btn { background: var(--paper-200); border: 1px solid var(--line); border-radius: 11px; }
#notification-btn.is-notification-unread::after { content: none; }
.notification-dot { top: -5px; right: -6px; width: auto; min-width: 22px; height: 22px; padding: 0 5px; font-size: 11px; font-weight: 700; background: var(--danger); }
.notification-callout { position: absolute; z-index: 45; top: calc(100% + 16px); right: -52px; display: flex; align-items: flex-start; gap: 12px; width: 310px; max-width: calc(100vw - 24px); padding: 18px 44px 18px 16px; background: var(--paper-100); color: var(--text); border: 1px solid #95c7bf; border-radius: 12px; box-shadow: 0 12px 28px rgba(20,46,48,.16); animation: callout-in 180ms ease-out; }
.notification-callout::before { content: ""; position: absolute; top: -7px; right: 66px; width: 13px; height: 13px; background: var(--paper-100); border-top: 1px solid #95c7bf; border-left: 1px solid #95c7bf; transform: rotate(45deg); }
.notification-callout-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; color: var(--teal); background: var(--teal-soft); border-radius: 10px; }
.notification-callout-icon svg { width: 20px; height: 20px; }
.notification-callout-copy { min-width: 0; }
.notification-callout-copy strong { display: block; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.notification-callout-open { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0; color: var(--teal); background: transparent; font-size: 13px; font-weight: 700; }
.notification-callout-open svg { width: 15px; height: 15px; }
.notification-callout-dismiss { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; color: var(--text-soft); }
body.modal-open .notification-callout { display: none; }
.notification-content { min-width: 0; }
.notification-content :is(strong, span) { overflow-wrap: anywhere; }
.notification-content strong { font-size: 14px; }
.notification-content span, .notification-content small { font-size: 12px; }
@keyframes callout-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
body.auth-locked .modal-backdrop { background: var(--paper-300); }
body.auth-locked .modal { box-shadow: var(--shadow); }
body.auth-locked .modal-head { flex-direction: column; padding-top: 28px; }
body.auth-locked .modal-head::before { content: ""; width: 48px; height: 48px; margin-bottom: 8px; background: url("assets/hotel-logo.png") center / contain no-repeat; }
/* 保留旧版青绿装饰色，文字使用同色系深色以保证可读性。 */
.section-link, .config-toggle, .metric-note strong, .demo-badge, .action-link,
.notification-callout-open, .repair-chat-reply, .media-view-label { color: var(--teal-text); }
input[type=file]::file-selector-button { color: var(--teal-text); }
@media (max-width: 1180px) {
  .overview-grid { grid-template-columns: minmax(0, 1.35fr) minmax(240px, .7fr); }
  .content, .topbar { padding-inline: 24px; }
  .metric-item, .metric-item:last-child { padding: 18px; }
}
@media (max-width: 900px) {
  .sidebar:not(.is-open) { box-shadow: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .work-order-layout { grid-template-columns: 1fr; gap: 24px; }
  .repair-chat-section { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .modal-work-order { width: min(700px, 100%); }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .content { padding: 22px 14px max(32px, env(safe-area-inset-bottom)); }
  .topbar { min-height: 66px; padding-inline: 12px; }
  .topbar-left { gap: 6px; min-width: 0; }
  .breadcrumb > span { display: none; }
  .breadcrumb strong { font-size: 14px; }
  .topbar-right { gap: 10px; }
  .notification-callout { right: -50px; width: min(304px, calc(100vw - 24px)); }
  .notification-callout::before { right: 65px; }
  .notification-callout-dismiss { width: 44px; height: 44px; }
  .notification-callout-open { min-height: 44px; }
  .page-head h1 { font-size: 25px; }
  .page-head p { font-size: 13px; }
  .page-actions { display: flex; flex-wrap: wrap; }
  .page-actions .btn { flex: 1 1 auto; min-width: 104px; min-height: 44px; padding-inline: 10px; white-space: nowrap; }
  .metric-strip { gap: 10px; }
  .metric-item, .metric-item:last-child { min-height: 138px; padding: 16px; border: 1px solid var(--line); }
  .metric-item:nth-child(3) { border-color: var(--line); }
  .metric-value { font-size: 30px; }
  .metric-label, .metric-note { font-size: 12px; }
  .panel-header { padding: 18px 16px; }
  .panel-title { font-size: 16px; }
  .panel-subtitle { font-size: 12px; }
  .floor-summary-row { grid-template-columns: minmax(0, 1fr) repeat(3, 44px) 12px; padding: 14px; gap: 8px; }
  .floor-name { font-size: 15px; overflow-wrap: anywhere; }
  .floor-summary-row .floor-summary-track { grid-row: 2; grid-column: 1 / -1; }
  .toolbar { padding: 16px; }
  .data-table td { font-size: 13px; }
  .field :is(input:not([type=checkbox]):not([type=radio]), select, textarea), .search-control input, .settings-add-row input { font-size: 16px; }
  .btn-sm, .action-link, .section-link, .filter-chip, .role-tab, .pagination-arrow, .pagination-page { min-height: 44px; }
  .modal-backdrop { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .modal { max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 14px; }
  .modal-head { padding: 18px 16px 14px; }
  .modal-head h2 { font-size: 19px; }
  .modal-body { padding: 18px 16px; }
  .modal-foot { padding: 12px 16px; gap: 8px; }
  .modal-footer-note { flex-basis: 100%; font-size: 12px; }
  .repair-chat-list { max-height: 280px; padding: 10px; }
  .repair-chat-bubble { width: 100%; }
  .repair-chat-meta time { font-size: 12px; }
  .repair-chat-reply { min-width: 44px; min-height: 44px; padding-inline: 8px; }
  .repair-message-actions { flex-direction: column; align-items: stretch; }
  .repair-message-actions .field-hint { max-width: none; }
  .repair-media-item { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .repair-media-thumb { width: 32px; height: 32px; }
  .repair-media-item strong { font-size: 13px; }
  .repair-media-item small { font-size: 11px; }
  .repair-media-viewer { min-height: 180px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  body.auth-locked .modal-backdrop { padding: 12px; }
  body.auth-locked .modal { max-height: calc(100dvh - 24px); }
  body.auth-locked .modal-head { flex-direction: row; gap: 12px; padding: 14px 20px; }
  body.auth-locked .modal-head::before { width: 36px; height: 36px; margin: 0; flex-shrink: 0; }
  body.auth-locked .modal-head h2 { font-size: 19px; }
  body.auth-locked .modal-body { padding: 12px 20px; }
  body.auth-locked .modal-foot { padding: 10px 20px; }
  body.auth-locked #login-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.auth-locked #login-form .field { margin-top: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
