﻿:root {
  color-scheme: light;
  --bg: #eef3f7;
  --sidebar: #101827;
  --sidebar-soft: #142238;
  --sidebar-line: rgba(226, 232, 240, 0.1);
  --surface: #ffffff;
  --surface-muted: #f7fafc;
  --ink: #172033;
  --muted: #68758a;
  --line: #dfe7ef;
  --accent: #0f8f72;
  --accent-dark: #0b6f5a;
  --accent-soft: #e4f6f1;
  --gold: #b7791f;
  --gold-soft: #fff3d8;
  --danger: #b42318;
  --danger-soft: #fee9e7;
  --info: #2563eb;
  --info-soft: #e9f0ff;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 143, 114, 0.22);
  outline-offset: 2px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: clamp(24px, 4vw, 48px);
  background:
    linear-gradient(90deg, rgba(5, 18, 39, 0.38), rgba(5, 18, 39, 0.08) 48%, rgba(5, 18, 39, 0.24)),
    url("./assets/login-bg.jpg") center / cover no-repeat;
  color: #ffffff;
}

.login-hero {
  width: min(100%, 560px);
  text-align: center;
}

.login-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.login-hero h1 {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 42px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.login-hero p {
  max-width: 560px;
  margin: 0 auto;
  margin-bottom: 0;
  color: #dbeafe;
  line-height: 1.75;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px);
  gap: 18px;
  width: min(100%, 420px);
  justify-items: stretch;
}

.login-footnote {
  margin: 2px 0 0;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.65;
}

.login-card .login-footnote {
  color: var(--muted);
}

.login-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.login-card label {
  display: grid;
  gap: 7px;
}

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

.sidebar-logout {
  min-height: 38px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe7f3;
  font-weight: 800;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.console-main {
  grid-column: 2;
  grid-row: 1;
}

.sidebar {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100vh;
  padding: 22px 16px;
  background: var(--sidebar);
  color: #dbe7f3;
  overflow-y: auto;
}

.topbar-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.sidebar-toggle {
  display: none;
  min-width: 68px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 25;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-shell.menu-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-logo {
  display: block;
  flex: none;
  width: 178px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.login-logo {
  width: min(320px, 88vw);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
}

.login-brand-copy strong {
  font-size: 22px;
  line-height: 1.1;
}

.login-brand-copy span {
  color: #dbeafe;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1.2;
}

.brand-copy span,
.sidebar-card small,
.sidebar-label,
.hotel-switcher label {
  color: #91a3bc;
}

.brand-copy span,
.sidebar-card small {
  font-size: 12px;
}

.sidebar-block {
  display: grid;
  gap: 8px;
}

.sidebar-label {
  margin: 0 0 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.hotel-switcher {
  display: grid;
  gap: 6px;
}

.hotel-switcher label,
.form-grid span {
  font-size: 13px;
}

.sidebar .hotel-switcher select {
  border-color: rgba(226, 232, 240, 0.14);
  background: #0c1424;
  color: #eef6ff;
}

.side-menu {
  display: grid;
  gap: 6px;
}

.menu-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #dbe7f3;
  padding: 0 10px;
  text-align: left;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-item.active {
  border-color: rgba(45, 212, 191, 0.2);
  background: #0f2d35;
  color: #ffffff;
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #91e7d6;
  font-size: 12px;
  font-weight: 800;
}

.menu-item.active .menu-icon {
  background: rgba(15, 143, 114, 0.24);
  color: #ffffff;
}

.menu-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #21b894;
  color: #ffffff;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 900;
}

.sidebar-card {
  display: grid;
  gap: 6px;
  margin-top: auto;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(15, 143, 114, 0.18), rgba(37, 99, 235, 0.12));
  padding: 14px;
}

.compact-card {
  margin-top: 0;
}

.sidebar-card span {
  color: #91e7d6;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-card strong {
  color: #ffffff;
  font-size: 16px;
}

.console-main {
  min-width: 0;
  padding: 26px 28px 36px;
}

.console-main.account-view .topbar,
.console-main.account-view .frontdesk-rail,
.console-main.account-view .status-strip {
  display: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar-brand {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.topbar-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.topbar-lead-window {
  flex: 1 1 420px;
  min-width: 320px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 14px 16px;
}

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

.lead-window-head h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.lead-window-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.lead-window-column {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lead-window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.lead-window-title span {
  color: var(--ink);
}

.lead-window-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 156px;
  overflow: auto;
}

.lead-window-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 8px 10px;
  line-height: 1.35;
}

.lead-window-item strong {
  color: var(--ink);
  font-size: 14px;
}

.lead-window-item small {
  color: var(--muted);
  font-size: 12px;
}

.lead-window-state {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.lead-window-state small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-window-status {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 11px;
  font-weight: 900;
}

.lead-window-status.complete {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.lead-window-status.assigned {
  background: #eef2ff;
  color: #2563eb;
}

.lead-window-status.matching {
  background: var(--gold-soft);
  color: #a16207;
}

.lead-window-status.stopped {
  background: var(--danger-soft);
  color: var(--danger);
}

.lead-window-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--muted);
  padding: 12px 10px;
  font-size: 13px;
  text-align: center;
}

.publish-block-reason {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  background: #fffbeb;
  color: #854d0e;
  padding: 12px 14px;
  line-height: 1.45;
}

.publish-block-reason strong {
  color: #713f12;
  font-size: 14px;
}

.publish-block-reason span {
  font-size: 13px;
}

.topbar-card {
  display: grid;
  gap: 4px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 13px 16px;
  box-shadow: var(--soft-shadow);
}

.topbar-card span,
.topbar-card small {
  color: var(--muted);
  font-size: 12px;
}

.topbar-card strong {
  font-size: 14px;
}

.frontdesk-rail {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(15, 143, 114, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 143, 114, 0.08), rgba(255, 255, 255, 0.92) 46%, rgba(37, 99, 235, 0.08)),
    #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  position: sticky;
  top: 14px;
  z-index: 4;
}

.frontdesk-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.frontdesk-copy h2 {
  margin-bottom: 0;
}

.frontdesk-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.frontdesk-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.frontdesk-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.frontdesk-action {
  --action-accent: var(--accent);
  --action-soft: rgba(15, 143, 114, 0.12);
  --action-line: rgba(15, 143, 114, 0.22);
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 82px;
  overflow: hidden;
  border: 1px solid rgba(206, 218, 231, 0.92);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 253, 0.96)),
    var(--surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  padding: 14px 42px 14px 14px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.frontdesk-action:nth-child(2) {
  --action-accent: #2563eb;
  --action-soft: rgba(37, 99, 235, 0.1);
  --action-line: rgba(37, 99, 235, 0.18);
}

.frontdesk-action::before {
  content: "";
  position: absolute;
  inset: auto 14px 10px 14px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--action-accent), transparent);
  opacity: 0.48;
}

.frontdesk-action::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--action-accent);
  border-bottom: 2px solid var(--action-accent);
  opacity: 0.62;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.frontdesk-action:hover {
  border-color: var(--action-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), var(--action-soft)),
    var(--surface);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.frontdesk-action:hover::after {
  opacity: 1;
  transform: translate(4px, -50%) rotate(-45deg);
}

.frontdesk-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--action-soft);
  color: var(--action-accent);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

.frontdesk-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.frontdesk-text strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.frontdesk-text small {
  color: var(--muted);
  line-height: 1.45;
}

main {
  display: grid;
  gap: 18px;
}

main > *,
.metric-panel,
.panel,
.overview-card,
.lead-card,
.topbar-card,
.list-toolbar,
.section-heading {
  min-width: 0;
}

select,
input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 143, 114, 0.14);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-panel {
  display: grid;
  min-height: 140px;
  padding: 16px;
  align-content: space-between;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-panel span,
.metric-panel small {
  color: var(--muted);
  font-size: 13px;
}

.metric-panel strong {
  display: block;
  margin: 10px 0;
  font-size: 30px;
  line-height: 1.1;
}

.metric-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.metric-dot.gold {
  background: var(--gold);
  box-shadow: 0 0 0 5px var(--gold-soft);
}

.metric-dot.blue {
  background: var(--info);
  box-shadow: 0 0 0 5px var(--info-soft);
}

.metric-dot.red {
  background: var(--danger);
  box-shadow: 0 0 0 5px var(--danger-soft);
}

.status-card {
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
}

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

.overview-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--soft-shadow);
  padding: 16px;
}

.overview-card span,
.overview-card small {
  color: var(--muted);
  font-size: 13px;
}

.overview-card strong {
  font-size: 30px;
  line-height: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.panel {
  padding: 18px;
}

.accent-panel {
  background: linear-gradient(180deg, #ffffff, #f5fbf9);
}

.info-panel {
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
}

.table-panel {
  padding-bottom: 10px;
}

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

.panel-title-row.standalone {
  margin-bottom: 0;
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.panel-tag.muted {
  background: var(--surface-muted);
  color: var(--muted);
}

.section-block {
  display: grid;
  gap: 12px;
}

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

.lead-workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  align-items: start;
}

.lead-workflow-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
}

.region-directory-panel {
  grid-column: 1 / -1;
  width: 100%;
  max-width: none;
}

.daily-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.daily-step {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  padding: 14px;
}

.daily-step > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.daily-step strong {
  color: var(--ink);
}

.daily-step small {
  color: var(--muted);
  line-height: 1.45;
}

.rules-panel {
  grid-column: 1 / -1;
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.rule-list li::marker {
  color: var(--accent);
  font-weight: 900;
}

.rule-list.single-column {
  grid-template-columns: 1fr;
}

.notice-panel,
.checklist-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  padding: 14px 16px;
}

.notice-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 900;
}

.notice-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checklist,
.mini-checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.check-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.check-item strong {
  color: var(--ink);
}

.check-item.ok {
  border-color: rgba(15, 143, 114, 0.25);
  background: var(--accent-soft);
}

.check-item.missing {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--danger-soft);
}

.check-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: inherit;
  font-size: 12px;
  font-weight: 900;
}

.mini-checklist .check-item {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 14px;
}

.compact-toolbar h3,
.compact-toolbar p {
  margin-bottom: 0;
}

.compact-toolbar p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.record-toolbar {
  margin-bottom: 14px;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: rgba(15, 143, 114, 0.35);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

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

.form-grid label {
  display: grid;
  gap: 7px;
}

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

.form-panel {
  align-items: end;
}

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

.form-action {
  align-self: end;
}

.admin-hotel-hint {
  margin: -4px 0 14px;
}

.admin-hotel-form {
  align-items: end;
}

.admin-form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-form-actions button {
  min-width: 116px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 143, 114, 0.18);
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.primary-btn.needs-save {
  background: var(--gold);
  box-shadow: 0 10px 22px rgba(183, 121, 31, 0.2);
}

.primary-btn.needs-save:hover {
  background: #9a6418;
}

.secondary-btn {
  border-color: var(--line);
  background: var(--surface);
  color: var(--accent-dark);
}

.secondary-btn:hover,
.ghost-btn:hover {
  border-color: #b9c8d8;
  background: #f9fbfd;
}

.ghost-btn {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--ink);
}

.danger-btn {
  background: var(--danger-soft);
  color: var(--danger);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

.capacity-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 14px;
}

.capacity-card span,
.capacity-card small {
  color: var(--muted);
}

.capacity-card strong {
  color: var(--ink);
  font-size: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

.admin-wide-table {
  min-width: 960px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.45;
}

.inline-input {
  width: 100%;
  min-width: 86px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
}

.score-input {
  max-width: 82px;
  text-align: center;
  font-weight: 900;
}

.compact-action {
  min-height: 32px;
  margin: 2px;
  padding: 0 10px;
  font-size: 12px;
}

.region-editor {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.region-editor span {
  color: var(--muted);
  font-weight: 800;
}

.region-editor textarea {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.region-node,
.region-node ul {
  list-style: none;
  padding-left: 0;
}

.region-node details {
  margin: 6px 0;
}

.region-node summary {
  cursor: pointer;
  font-weight: 900;
}

.region-node small {
  color: var(--muted);
  font-weight: 700;
}

.region-inline-hint {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.region-edit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 16px;
  align-items: start;
}

.region-edit-list li {
  padding: 0;
}

.region-branch {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  overflow: hidden;
}

.region-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 0 12px;
  color: var(--ink);
}

.region-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.region-branch[open] > .region-summary {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 143, 114, 0.1), rgba(255, 255, 255, 0.84));
}

.region-province-branch {
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.region-city-branch {
  box-shadow: none;
}

.region-area-branch {
  background: #ffffff;
  box-shadow: none;
}

.area-summary {
  min-height: 46px;
}

.region-edit-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.region-province-row {
  padding-left: 0;
  padding: 10px;
}

.region-city-row {
  padding-left: 10px;
}

.region-area-row {
  grid-template-columns: minmax(120px, 1fr) auto;
  padding-left: 10px;
}

.region-city-list,
.region-area-list {
  display: grid;
  gap: 8px;
  margin: 10px;
  padding-left: 0;
}

.region-name-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.region-name-cell small {
  flex: 0 0 auto;
  color: var(--muted);
  white-space: nowrap;
}

.region-name-input {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  font-weight: 900;
  font-size: 15px;
}

.region-name-input:hover,
.region-name-input:focus {
  border-color: rgba(15, 143, 114, 0.28);
  background: #ffffff;
}

.region-empty {
  padding: 4px 8px !important;
  color: var(--muted);
  font-size: 12px;
}

.region-hotel-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.region-hotel-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 10px;
}

.region-hotel-item div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.region-hotel-item strong {
  color: var(--ink);
}

.region-hotel-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.region-hotel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.toolbar-search {
  width: min(320px, 100%);
  height: 40px;
  flex: 0 1 320px;
}

.region-search {
  width: min(420px, 100%);
  margin-bottom: 10px;
}

.region-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.region-search-result {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}

.region-search-result:hover {
  border-color: rgba(15, 143, 114, 0.28);
  background: var(--accent-soft);
}

.region-search-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-empty {
  padding: 12px;
}

.revenue-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 143, 114, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, #effbf7, #ffffff);
  padding: 14px 16px;
}

.revenue-summary-copy {
  display: grid;
  gap: 3px;
}

.revenue-summary-copy span,
.revenue-summary-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.revenue-summary-copy strong {
  color: var(--accent-dark);
  font-size: 26px;
}

.revenue-total-badge {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  padding: 0 10px;
  font-weight: 900;
}

.countdown-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 12px 0;
  border: 1px solid rgba(220, 53, 69, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff4df, #fff9ed);
  padding: 14px 16px;
  color: #6f2d0d;
  font-weight: 900;
}

.countdown-panel strong {
  display: inline-grid;
  place-items: center;
  min-width: 88px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
  color: #d33b22;
  font-size: 26px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(220, 53, 69, 0.18), 0 8px 22px rgba(183, 121, 31, 0.12);
}

.countdown-panel span {
  line-height: 1.55;
  font-size: 15px;
}

.region-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-record-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.warning-text {
  color: var(--danger);
  font-weight: 900;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: #f6f9fc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

td {
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.open {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.badge.full {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.pending {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.info {
  background: var(--info-soft);
  color: var(--info);
}

.todo-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.todo-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 12px;
  line-height: 1.5;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.profile-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.profile-list dt {
  color: var(--muted);
}

.profile-list dd {
  margin: 0;
  font-weight: 700;
}

.lead-list {
  display: grid;
  gap: 12px;
}

.lead-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  padding: 16px;
}

.lead-card h3 {
  margin-bottom: 6px;
}

.lead-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.lead-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 12px;
}

.lead-detail strong {
  color: var(--ink);
}

.lead-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.lead-flow li {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.lead-flow li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  color: inherit;
  font-size: 12px;
}

.lead-flow li.done {
  border-color: rgba(15, 143, 114, 0.25);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.lead-flow li.current {
  border-color: rgba(183, 121, 31, 0.3);
  background: var(--gold-soft);
  color: var(--gold);
}

.lead-flow.stopped {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.response-board {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.response-title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.response-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.response-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  padding: 9px 10px;
}

.response-list.empty {
  color: var(--muted);
  font-size: 13px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.match-code-check {
  display: grid;
  gap: 6px;
  flex: 1 1 240px;
  min-width: 220px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.diamond-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #f1c66f;
  border-radius: 10px;
  padding: 0 12px;
  background: var(--gold-soft);
  color: #5c3d0b;
  font-size: 14px;
  font-weight: 700;
}

.diamond-choice input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.empty-state {
  border: 1px dashed #b9c8d8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  padding: 26px;
  text-align: center;
}

.toast {
  position: sticky;
  top: 16px;
  z-index: 5;
  border: 1px solid rgba(15, 143, 114, 0.35);
  border-radius: 12px;
  background: #eefbf7;
  color: var(--accent-dark);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

body.modal-open {
  overflow: hidden;
}

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

.modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
  padding: 18px;
}

.price-modal-panel {
  display: grid;
  gap: 14px;
}

.workflow-modal-panel {
  display: grid;
  gap: 14px;
  width: min(1280px, 100%);
}

.lead-desk-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
  gap: 16px;
  align-items: start;
}

.lead-desk-publish-column,
.lead-desk-incoming-column {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
}

.lead-desk-incoming-column {
  position: sticky;
  top: 0;
  max-height: calc(100vh - 132px);
  overflow: auto;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.lead-desk-publish-column .modal-data-grid,
.lead-desk-publish-column .checklist,
.lead-desk-publish-column .modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lead-desk-publish-column .wide-field {
  grid-column: 1 / -1;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.modal-close:hover {
  border-color: #b9c8d8;
  background: #ffffff;
}

.modal-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 14px;
}

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-actions button {
  min-width: 128px;
}

.modal-notice {
  box-shadow: none;
}

.modal-toolbar {
  margin-bottom: 0;
}

.modal-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.data-card {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  padding: 12px;
}

.data-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.data-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.data-card small {
  color: var(--muted);
  line-height: 1.45;
}

.plain-text {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1180px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-workflow-grid {
    grid-template-columns: 1fr;
  }

  .lead-desk-modal-grid {
    grid-template-columns: 1fr;
  }

  .lead-desk-incoming-column {
    position: static;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
}

@media (max-width: 1040px) {
  .login-screen {
    padding: 24px;
  }

  .login-grid {
    width: min(100%, 420px);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .console-main {
    grid-column: 1;
    padding: 18px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100dvh;
    padding: 16px;
    border-right: 1px solid var(--sidebar-line);
    transform: translateX(-102%);
    transition: transform 0.25s ease;
    z-index: 30;
    box-shadow: 20px 0 46px rgba(15, 23, 42, 0.32);
  }

  .app-shell.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-card {
    margin-top: 0;
  }

  .sidebar-backdrop {
    display: block;
  }

  .side-menu {
    grid-template-columns: 1fr;
  }

  .side-menu .sidebar-label {
    grid-column: auto;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-brand,
  .topbar-lead-window {
    width: 100%;
  }

  .topbar-cards {
    width: 100%;
    justify-content: flex-start;
  }

  .frontdesk-rail {
    grid-template-columns: 1fr;
    position: static;
  }

  .frontdesk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar,
  .section-heading,
  .list-toolbar {
    display: grid;
  }

  .status-strip,
  .overview-grid,
  .dashboard-grid,
  .daily-steps,
  .frontdesk-actions,
  .modal-data-grid,
  .capacity-summary,
  .form-grid,
  .modal-form,
  .lead-detail,
  .rule-list,
  .checklist {
    grid-template-columns: minmax(0, 1fr);
  }

  .wide-field {
    grid-column: auto;
  }

  .form-action {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .console-main {
    padding: 14px;
  }

  .side-menu {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .topbar-cards,
  .topbar-card {
    width: 100%;
  }

  h1 {
    font-size: 23px;
  }

  h2 {
    font-size: 19px;
  }

  .metric-panel {
    min-height: 118px;
  }

  .button-row > button,
  .button-row > label,
  .filter-group,
  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  .lead-flow,
  .lead-flow.stopped {
    grid-template-columns: 1fr;
  }

  .countdown-panel {
    grid-template-columns: 1fr;
  }

  .countdown-panel strong {
    width: 100%;
  }

  .region-edit-row,
  .region-area-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .region-edit-row > .region-name-input,
  .region-edit-row > .region-name-cell {
    grid-column: 1 / -1;
  }

  .region-city-list,
  .region-area-list {
    padding-left: 8px;
  }
}
