:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --text: #172033;
  --muted: #6f7a8a;
  --line: #e5e8ed;
  --blue: #173968;
  --blue-2: #2b5ca3;
  --blue-soft: #eef4fc;
  --green: #238556;
  --green-soft: #eaf7f0;
  --yellow: #a86d05;
  --yellow-soft: #fff6dc;
  --orange: #c85a24;
  --orange-soft: #fff0e7;
  --red: #bd3e3e;
  --red-soft: #fdecec;
  --purple: #7254b8;
  --purple-soft: #f0ebfb;
  --gray-soft: #eef0f3;
  --shadow: 0 12px 32px rgba(20, 31, 48, .08);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif; }
body { overflow-x: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.topbar { height: 58px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 24px; gap: 18px; position: sticky; top: 0; z-index: 60; backdrop-filter: blur(8px); }
.brand { color: var(--blue); font-size: 19px; font-weight: 760; letter-spacing: -.2px; }
.nav { display: flex; height: 100%; align-items: stretch; }
.nav a { min-height: 57px; display: flex; align-items: center; padding: 0 14px; color: #526071; font-size: 13px; position: relative; white-space: nowrap; }
.nav a.active { color: var(--blue); font-weight: 700; }
.nav a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.topbar-spacer { flex: 1; }
.demo-badge { border: 1px solid #ead8a7; background: #fff8e5; color: #8b691d; border-radius: 999px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }

.app-shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 42px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.page-title h1 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.4px; }
.page-title p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.link { color: var(--blue-2); font-size: 11px; font-weight: 650; cursor: pointer; }

.toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding: 13px; margin-bottom: 12px; }
.field { min-width: 150px; }
.field label { display: block; color: var(--muted); font-size: 10px; margin: 0 0 5px 3px; }
.input, .select { width: 100%; height: 36px; border: 1px solid #dce1e8; border-radius: 8px; background: #fff; padding: 0 10px; outline: none; font-size: 12px; }
.input:focus, .select:focus { border-color: #8eabd3; box-shadow: 0 0 0 3px rgba(56,104,171,.08); }
.toolbar-spacer { flex: 1; }
.btn { min-height: 36px; border-radius: 8px; padding: 0 13px; border: 1px solid #d8dee7; background: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; }
.btn:hover { background: #f7f9fb; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.primary:hover { background: #102f59; }
.btn.danger { color: var(--red); border-color: #edcaca; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.segmented { display: flex; border: 1px solid #dce1e8; border-radius: 8px; overflow: hidden; height: 36px; background: #fff; }
.segmented button { border: 0; border-right: 1px solid #e5e8ed; background: #fff; padding: 0 14px; font-size: 12px; min-width: 54px; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }

/* 日历 */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; align-items: start; }
.calendar-card { overflow: hidden; }
.decision-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.decision-chip { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 7px; font-size: 10px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.rec-normal_sale { background: var(--green-soft); color: var(--green); }
.rec-no_discount { background: var(--yellow-soft); color: var(--yellow); }
.rec-flexible_quote { background: #fff0e4; color: #b85c1a; }
.rec-moderate_markup { background: var(--orange-soft); color: var(--orange); }
.rec-capacity_control { background: var(--purple-soft); color: var(--purple); }
.rec-pause_accepting { background: var(--gray-soft); color: #596273; }
.weekday-row { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); background: #fbfcfd; border-bottom: 1px solid var(--line); }
.weekday-row span { text-align: center; padding: 8px 4px; font-size: 10px; color: var(--muted); }
.continuous-calendar { min-width: 0; }
.week-row { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); position: relative; }
.week-row + .week-row { border-top: 1px solid var(--line); }
.month-band { position: absolute; left: 0; top: 0; z-index: 2; transform: translateY(-1px); background: #edf2f8; color: var(--blue); border-radius: 0 0 6px 0; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.day-cell, .day-blank { min-height: 106px; border-right: 1px solid var(--line); padding: 10px 9px 8px; background: #fff; min-width: 0; }
.day-cell:nth-child(7n), .day-blank:nth-child(7n) { border-right: 0; }
.day-blank { background: #fbfcfd; }
.day-cell { cursor: pointer; transition: background .13s ease, box-shadow .13s ease; position: relative; }
.day-cell:hover { background: #fbfdff; box-shadow: inset 0 0 0 1px #bfd0e6; }
.day-cell.today { box-shadow: inset 0 0 0 2px #376aa9; }
.day-cell.attention { background: #fffdf6; }
.day-cell.tight { background: #fff9f4; }
.day-cell.full { background: #fff8f8; }
.day-top { display: flex; align-items: center; gap: 5px; min-height: 19px; white-space: nowrap; }
.day-date { font-size: 12px; font-weight: 760; }
.day-special { color: #a76a12; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-mark { background: var(--blue); color: #fff; border-radius: 999px; font-size: 8px; padding: 2px 5px; }
.day-metrics { margin-top: 5px; font-size: 10px; color: #586577; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-metrics b { color: var(--text); font-weight: 700; }
.day-rec { margin-top: 6px; }
.day-reason { margin-top: 6px; color: #667286; font-size: 9px; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-stack { display: grid; gap: 10px; position: sticky; top: 72px; }
.side-card { padding: 14px; }
.side-card h3 { margin: 0 0 11px; font-size: 13px; }
.side-list { display: grid; gap: 12px; }
.side-row { display: grid; gap: 3px; font-size: 10px; }
.side-row b { font-size: 11px; }
.side-row .row-main { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 5px; }

/* 采集 */
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-bottom: 12px; }
.kpi-card { min-height: 104px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.kpi-copy span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.kpi-copy b { display: block; font-size: 28px; line-height: 1; }
.kpi-copy small { display: block; color: var(--muted); font-size: 10px; margin-top: 7px; }
.kpi-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); font-size: 18px; font-weight: 800; }
.kpi-icon.warn { background: var(--orange-soft); color: var(--orange); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; background: #fbfcfd; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.source-title { font-weight: 700; font-size: 11px; }
.source-sub { color: var(--muted); font-size: 9px; margin-top: 2px; }
.source-mode { color: #546173; white-space: nowrap; }
.source-status { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-weight: 650; white-space: nowrap; }
.source-status.delay { color: var(--yellow); }
.source-status.error { color: var(--red); }
.action-group { display: flex; gap: 6px; white-space: nowrap; }
.action-group .btn { min-height: 30px; padding: 0 10px; font-size: 10px; }
.logs-card { margin-top: 12px; }
.log-list { display: grid; }
.log-row { display: grid; grid-template-columns: 88px 140px 70px 1fr; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 10px; align-items: center; }
.log-row:last-child { border-bottom: 0; }
.log-time, .log-message { color: var(--muted); }

/* 通知 */
.notice-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.notice-list { overflow: hidden; }
.notice-item { display: grid; grid-template-columns: 132px minmax(0,1fr) 90px 88px; gap: 14px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--line); min-height: 72px; }
.notice-item:last-child { border-bottom: 0; }
.notice-time { color: var(--muted); font-size: 10px; line-height: 1.6; }
.notice-title { font-size: 12px; font-weight: 720; margin-bottom: 4px; }
.notice-meta { color: var(--muted); font-size: 10px; }
.notice-badge { display: inline-flex; border-radius: 999px; padding: 3px 7px; font-size: 9px; justify-content: center; }
.notice-badge.linked { background: var(--green-soft); color: var(--green); }
.notice-badge.pending { background: var(--yellow-soft); color: var(--yellow); }
.notice-badge.ignored { background: var(--gray-soft); color: var(--muted); }

/* 设置 */
.settings-grid { display: grid; grid-template-columns: .85fr 1.5fr; gap: 12px; align-items: start; }
.settings-card { padding: 16px; }
.settings-card h2 { margin: 0; font-size: 14px; }
.settings-card > p { margin: 4px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-card.full { grid-column: 1 / -1; }
.settings-grid .wide { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.form-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.form-field label { display: block; font-size: 10px; color: var(--muted); margin: 0 0 5px; }
.rule-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.rule-table .rule-head, .rule-table .rule-row { display: grid; grid-template-columns: 90px 130px minmax(150px,1fr) 105px; gap: 8px; align-items: center; padding: 8px 9px; }
.rule-table .rule-head { background: #fbfcfd; color: var(--muted); font-size: 9px; border-bottom: 1px solid var(--line); }
.rule-table .rule-row + .rule-row { border-top: 1px solid var(--line); }
.rule-range { display: flex; align-items: center; gap: 4px; }
.rule-range .input { width: 42px; padding: 0 5px; text-align: center; }
.rule-times { display: flex; gap: 5px; }
.rule-times .input { min-width: 0; }
.info-table { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.info-row { display: grid; grid-template-columns: 150px 100px 120px minmax(120px,1fr); gap: 8px; align-items: center; padding: 8px 9px; font-size: 10px; }
.info-row + .info-row { border-top: 1px solid var(--line); }
.info-row > b { font-size: 10px; }
.setting-summary { display: grid; gap: 9px; }
.setting-line { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 10px; }
.setting-line:last-child { border-bottom: 0; }
.system-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.system-item { border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: var(--surface-soft); }
.system-item span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.system-item b { font-size: 11px; }
.keyword-preview { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag { display: inline-flex; border: 1px solid #dfe4ea; background: #fff; border-radius: 6px; padding: 4px 7px; font-size: 9px; color: #536073; }

/* 抽屉 */
.drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
.drawer.open { pointer-events: auto; visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(18,27,41,.25); opacity: 0; transition: opacity .18s ease; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(610px, 95vw); height: 100%; background: #fff; transform: translateX(100%); transition: transform .2s ease; box-shadow: var(--shadow); overflow-y: auto; padding: 22px 20px 34px; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: translateX(0); }
.drawer-close { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: #f3f5f7; font-size: 20px; color: var(--muted); }
.drawer-title { margin: 0 46px 3px 0; font-size: 19px; }
.drawer-subtitle { margin: 0; color: var(--muted); font-size: 10px; }
.drawer-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer-section h3 { margin: 0 0 10px; font-size: 12px; }
.decision-hero { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: linear-gradient(135deg,#fff,#fbfcff); }
.decision-hero .decision-chip { font-size: 12px; padding: 5px 9px; }
.decision-hero p { margin: 9px 0 0; font-size: 11px; line-height: 1.6; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.metric-box { border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: #fbfcfd; }
.metric-box span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.metric-box b { font-size: 15px; }
.detail-table { width: 100%; }
.detail-table td { padding: 7px 0; border: 0; font-size: 10px; }
.detail-table td:last-child { text-align: right; font-weight: 650; }
.signal-list { display: grid; gap: 7px; }
.signal-row { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 10px; }
.signal-row .signal-top { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.signal-row p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.level { display: inline-flex; min-width: 18px; justify-content: center; border-radius: 5px; padding: 2px 5px; font-size: 9px; font-weight: 800; }
.level.A { background: var(--green-soft); color: var(--green); }
.level.B { background: var(--yellow-soft); color: var(--yellow); }
.level.C { background: var(--blue-soft); color: var(--blue-2); }
.action-list { display: grid; gap: 0; }
.action-row { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.action-row:last-child { border-bottom: 0; }
.snapshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.snapshot { border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 10px; }
.data-hint { font-size: 9px; color: var(--muted); line-height: 1.6; background: #f7f9fb; border-radius: 8px; padding: 8px 9px; margin-top: 7px; }
.product-list { display: grid; gap: 5px; }
.product-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 10px; }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.notice-body { white-space: pre-wrap; line-height: 1.7; font-size: 10px; color: #3d4654; max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface-soft); }
.rule-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.rule-summary-box { border: 1px solid var(--line); border-radius: 8px; padding: 9px; }
.rule-summary-box span { display: block; font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.rule-summary-box b { font-size: 11px; }
.keyword-editor { width: 100%; min-height: 90px; resize: vertical; border: 1px solid #dce1e8; border-radius: 8px; padding: 9px; font-size: 10px; line-height: 1.6; }

.modal { position: fixed; inset: 0; z-index: 150; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,24,38,.38); }
.modal-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(520px, 92vw); max-height: 80vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 14px; }
.icon-button { border: 0; background: #f3f5f7; border-radius: 7px; width: 30px; height: 30px; font-size: 18px; color: var(--muted); }
.modal-content { padding: 16px; font-size: 10px; line-height: 1.65; }
.hotel-detail-row { display: grid; grid-template-columns: 1fr auto 48px; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1f2938; color: white; padding: 10px 14px; border-radius: 9px; font-size: 11px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 200; max-width: min(480px, 88vw); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #8f3535; }
.skeleton { min-height: 240px; background: linear-gradient(90deg,#f1f3f5 25%,#fafafa 37%,#f1f3f5 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius); }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:0 0} }

@media (max-width: 1180px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .side-stack { position: static; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.full { grid-column: auto; }
}
@media (max-width: 820px) {
  .app-shell { width: min(100% - 24px, 1480px); padding-top: 14px; }
  .topbar { padding: 0 12px; gap: 8px; overflow-x: auto; }
  .brand { display: none; }
  .nav { min-width: max-content; }
  .nav a { padding: 0 10px; }
  .demo-badge { display: none !important; }
  .page-header { flex-wrap: wrap; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .toolbar { align-items: stretch; }
  .toolbar .field { flex: 1 1 140px; min-width: 0; }
  .toolbar-spacer { display: none; }
  .toolbar .btn { flex: 1 1 100%; }
  .side-stack { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .log-row { grid-template-columns: 70px 1fr auto; }
  .log-message { grid-column: 1 / -1; }
  .notice-item { grid-template-columns: 1fr auto; }
  .notice-time { grid-column: 1 / -1; }
  .notice-item .notice-badge { justify-self: start; }
  .form-grid.four, .system-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rule-table { overflow-x: auto; }
  .rule-table .rule-head, .rule-table .rule-row { min-width: 560px; }
  .info-table { overflow-x: auto; }
  .info-row { min-width: 580px; }
}
@media (max-width: 540px) {
  .weekday-row { display: none; }
  .week-row { display: block; border-top: 0 !important; }
  .day-blank { display: none; }
  .day-cell { min-height: 92px; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .month-band { position: static; display: block; transform: none; width: 100%; border-radius: 0; padding: 6px 10px; }
  .day-metrics, .day-reason { font-size: 10px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .drawer-panel { width: 100%; padding: 20px 14px 30px; }
  .form-grid, .form-grid.four, .system-grid, .rule-summary-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 92px; }
  .table-wrap table { min-width: 760px; }
}

/* V1.1.1 酒店核心产品观察 */
.settings-subtitle { margin: 14px 0 8px; font-size: 11px; }
.hotel-target-table { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 12px; }
.hotel-target-head, .hotel-target-row { display: grid; grid-template-columns: minmax(130px, .9fr) minmax(220px, 1.6fr) minmax(150px, 1fr) minmax(150px, 1fr); gap: 8px; align-items: center; padding: 8px 10px; }
.hotel-target-head { background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 700; }
.hotel-target-row { border-top: 1px solid var(--line); font-size: 10px; }
.hotel-target-row b { font-size: 10px; }
.locked-policy { color: var(--green); background: var(--green-soft); border-radius: 6px; padding: 5px 7px; width: fit-content; font-size: 9px; }
.hotel-offer-card { border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; margin-bottom: 8px; background: #fff; }
.hotel-offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.hotel-offer-price { margin-top: 7px; font-size: 11px; }
.hotel-offer-price b { font-size: 15px; }

@media (max-width: 820px) {
  .hotel-target-table { overflow-x: auto; }
  .hotel-target-head, .hotel-target-row { min-width: 760px; }
}

/* V1.1.1 可读性与大屏布局优化
   目标基准：3072×1920 显示器 + Windows 150% 缩放（约 2048 CSS px 宽）。
   原版大量 9–11px 文本在该环境下过小；此处统一提升字号层级并扩大有效内容宽度。 */
html { font-size: 16px; }
body { font-size: 14px; line-height: 1.45; }
.topbar { height: 64px; padding: 0 28px; gap: 20px; }
.brand { font-size: 20px; }
.nav a { min-height: 63px; padding: 0 16px; font-size: 14px; }
.demo-badge { padding: 7px 11px; font-size: 12px; }

.app-shell { width: min(1760px, calc(100% - 32px)); padding: 26px 0 52px; }
.page-header { margin-bottom: 16px; }
.page-title h1 { font-size: 26px; }
.page-title p { margin-top: 7px; font-size: 14px; line-height: 1.55; }
.card-header { padding: 16px 18px; }
.card-header h2, .card-header h3 { font-size: 16px; }
.small { font-size: 12px; }
.link { font-size: 12px; }

.toolbar { gap: 12px; padding: 15px; margin-bottom: 14px; }
.field { min-width: 164px; }
.field label { font-size: 12px; margin-bottom: 6px; }
.input, .select { height: 40px; padding: 0 11px; font-size: 13px; }
.btn { min-height: 40px; padding: 0 15px; font-size: 13px; }
.segmented { height: 40px; }
.segmented button { padding: 0 16px; font-size: 13px; min-width: 58px; }

/* 日历：更宽、更易扫读，避免大屏上“字小但留白多” */
.calendar-layout { grid-template-columns: minmax(0, 1fr) 305px; gap: 14px; }
.decision-legend { gap: 10px 16px; padding: 12px 16px; }
.legend-item { gap: 6px; font-size: 12px; }
.decision-chip { border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.weekday-row span { padding: 10px 4px; font-size: 12px; }
.month-band { padding: 5px 8px; font-size: 12px; }
.day-cell, .day-blank { min-height: 124px; padding: 12px 11px 10px; }
.day-top { min-height: 22px; gap: 6px; }
.day-date { font-size: 14px; }
.day-special { font-size: 11px; }
.today-mark { font-size: 10px; padding: 2px 6px; }
.day-metrics { margin-top: 7px; font-size: 12px; }
.day-rec { margin-top: 8px; }
.day-reason { margin-top: 7px; font-size: 11px; line-height: 1.35; }
.side-stack { gap: 12px; top: 78px; }
.side-card { padding: 17px; }
.side-card h3 { margin-bottom: 13px; font-size: 15px; }
.side-list { gap: 14px; }
.side-row { gap: 4px; font-size: 12px; line-height: 1.45; }
.side-row b { font-size: 13px; }
.status-dot { width: 8px; height: 8px; }

/* 采集管理 */
.kpi-grid { gap: 14px; margin-bottom: 14px; }
.kpi-card { min-height: 118px; padding: 19px 21px; }
.kpi-copy span { font-size: 13px; margin-bottom: 8px; }
.kpi-copy b { font-size: 32px; }
.kpi-copy small { font-size: 12px; margin-top: 8px; }
.kpi-icon { width: 52px; height: 52px; font-size: 20px; }
th, td { padding: 12px 14px; font-size: 13px; }
th { font-size: 12px; }
.source-title { font-size: 13px; }
.source-sub { font-size: 11px; margin-top: 3px; }
.action-group { gap: 7px; }
.action-group .btn { min-height: 34px; padding: 0 11px; font-size: 12px; }
.log-row { grid-template-columns: 100px 160px 82px 1fr; gap: 12px; padding: 12px 16px; font-size: 12px; }

/* 通知 */
.notice-filters { gap: 10px; margin-bottom: 12px; }
.notice-item { grid-template-columns: 150px minmax(0,1fr) 100px 96px; gap: 16px; padding: 15px 16px; min-height: 82px; }
.notice-time { font-size: 12px; line-height: 1.6; }
.notice-title { font-size: 14px; margin-bottom: 5px; }
.notice-meta { font-size: 12px; }
.notice-badge { padding: 4px 8px; font-size: 11px; }

/* 设置 */
.settings-grid { gap: 14px; }
.settings-card { padding: 18px; }
.settings-card h2 { font-size: 16px; }
.settings-card > p { margin: 5px 0 17px; font-size: 12px; line-height: 1.55; }
.form-grid { gap: 11px; }
.form-field label { font-size: 12px; margin-bottom: 6px; }
.rule-table { margin-top: 12px; }
.rule-table .rule-head, .rule-table .rule-row { grid-template-columns: 104px 145px minmax(170px,1fr) 118px; gap: 10px; padding: 10px 11px; }
.rule-table .rule-head { font-size: 11px; }
.info-row { grid-template-columns: 170px 112px 135px minmax(140px,1fr); gap: 10px; padding: 10px 11px; font-size: 12px; }
.info-row > b { font-size: 12px; }
.setting-line { padding: 10px 0; font-size: 12px; }
.system-grid { gap: 10px; }
.system-item { padding: 12px; }
.system-item span { font-size: 11px; margin-bottom: 6px; }
.system-item b { font-size: 13px; }
.tag { padding: 5px 8px; font-size: 11px; }
.settings-subtitle { margin: 17px 0 10px; font-size: 13px; }
.hotel-target-head, .hotel-target-row { grid-template-columns: minmax(150px,.9fr) minmax(240px,1.6fr) minmax(170px,1fr) minmax(170px,1fr); gap: 10px; padding: 10px 12px; }
.hotel-target-head { font-size: 11px; }
.hotel-target-row { font-size: 12px; }
.hotel-target-row b { font-size: 12px; }
.locked-policy { padding: 6px 8px; font-size: 11px; }

/* 抽屉 / 弹窗 */
.drawer-panel { width: min(690px, 96vw); padding: 26px 24px 40px; }
.drawer-close { width: 36px; height: 36px; font-size: 22px; }
.drawer-title { margin-right: 52px; font-size: 22px; }
.drawer-subtitle { font-size: 12px; line-height: 1.5; }
.drawer-section { margin-top: 21px; padding-top: 18px; }
.drawer-section h3 { margin-bottom: 12px; font-size: 14px; }
.decision-hero { padding: 16px; }
.decision-hero .decision-chip { font-size: 14px; padding: 6px 10px; }
.decision-hero p { font-size: 13px; line-height: 1.65; }
.metric-grid { gap: 9px; }
.metric-box { padding: 11px; }
.metric-box span { font-size: 11px; margin-bottom: 6px; }
.metric-box b { font-size: 18px; }
.detail-table td { padding: 9px 0; font-size: 12px; }
.signal-list { gap: 9px; }
.signal-row { padding: 11px 12px; font-size: 12px; }
.level { font-size: 10px; }
.action-row { padding: 11px 0; font-size: 12px; }
.snapshot-grid { gap: 9px; }
.snapshot { padding: 11px; font-size: 12px; }
.data-hint { font-size: 11px; line-height: 1.65; padding: 10px 11px; }
.product-row { font-size: 12px; }
.notice-body { font-size: 12px; padding: 12px; }
.rule-summary-grid { gap: 9px; }
.rule-summary-box { padding: 11px; }
.rule-summary-box span { font-size: 11px; }
.rule-summary-box b { font-size: 13px; }
.keyword-editor { min-height: 110px; padding: 11px; font-size: 12px; }
.modal-panel { width: min(600px, 92vw); }
.modal-header { padding: 16px 18px; }
.modal-header h3 { font-size: 16px; }
.modal-content { padding: 18px; font-size: 12px; }
.hotel-detail-row { padding: 11px 0; }
.hotel-offer-card { padding: 12px 13px; margin-bottom: 10px; }
.hotel-offer-price { margin-top: 8px; font-size: 13px; }
.hotel-offer-price b { font-size: 18px; }
.toast { padding: 11px 15px; font-size: 12px; }

@media (max-width: 1500px) {
  .app-shell { width: calc(100% - 28px); }
  .calendar-layout { grid-template-columns: minmax(0,1fr) 280px; }
  .day-cell, .day-blank { min-height: 118px; padding: 11px 9px 9px; }
  .day-date { font-size: 13px; }
  .day-metrics { font-size: 11.5px; }
  .day-reason { font-size: 10.5px; }
}
@media (max-width: 1180px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  body { font-size: 14px; }
  .app-shell { width: min(100% - 20px, 1760px); padding-top: 16px; }
  .topbar { height: 60px; padding: 0 10px; }
  .nav a { min-height: 59px; font-size: 13px; padding: 0 11px; }
  .page-title h1 { font-size: 23px; }
  .page-title p { font-size: 13px; }
  .side-stack { grid-template-columns: 1fr; }
  .drawer-panel { width: 100%; padding: 22px 16px 32px; }
}
@media (max-width: 540px) {
  .day-cell { min-height: 104px; padding: 12px 13px; }
  .day-date { font-size: 15px; }
  .day-metrics { font-size: 13px; }
  .day-reason { font-size: 12px; }
  .decision-chip { font-size: 12px; }
}
.input[readonly] { background: #f7f9fb; color: #465365; cursor: default; }
/* 组件边界：宽表只在自身容器内横向滚动，不把页面撑宽 */
html, body { max-width: 100%; overflow-x: hidden; }
.card, .table-wrap, .logs-card { min-width: 0; max-width: 100%; }
.table-wrap { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
