/* glassesman-v2 共享样式：桌面 + 手机浏览器响应式 */
:root { font-size: clamp(16px, calc(14px + 0.16vw), 17px); }

* { box-sizing: border-box; font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif; }

body {
  background: #f0f2f5;
  margin: 0;
  padding: 20px 16px;
  overflow-x: hidden;
  color: #1e293b;
}

.app-container { max-width: 1800px; margin: 0 auto; }

.card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header h2 { margin: 0; font-size: 1.15rem; font-weight: 600; color: #0f172a; }
.card-header .sub { font-size: 0.78rem; color: #64748b; font-weight: 400; }
.card-body { padding: 16px 20px; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

button {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: #1e293b;
  transition: 0.15s;
}
button:hover { background: #f1f5f9; }
button.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
button.primary:hover { background: #1d4ed8; }
button.danger { border-color: #fecaca; background: #fff5f5; color: #b91c1c; }
button.danger:hover { background: #fee2e2; }
button.sm { padding: 4px 10px; font-size: 0.76rem; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.chip {
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  background: #fff;
  user-select: none;
}
.chip.active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* 表格 */
.table-wrapper { overflow-x: auto; }
.excel-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; background: #fff; }
.excel-table th {
  background: #f1f5f9;
  color: #0c4a6e;
  font-weight: 600;
  padding: 10px 8px;
  border: 1px solid #d1d9e8;
  text-align: center;
  white-space: nowrap;
}
.excel-table td { border: 1px solid #e2e8f0; padding: 9px 7px; text-align: center; vertical-align: middle; }
.excel-table tr:hover td { background: #fefce8; }

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-renting { background: #dbeafe; color: #1e40af; }
.status-overdue { background: #fee2e2; color: #b91c1c; }
.status-upcoming { background: #fff3e3; color: #b45309; }
.status-idle { background: #e0f2fe; color: #0c4a6e; }
.status-checked-in { background: #dcfce7; color: #166534; }
.status-warning { background: #fef9c3; color: #854d0e; }
.status-retired { background: #e2e8f0; color: #475569; }

.money-cell { font-weight: 700; color: #0f766e; white-space: nowrap; }
/* 表单 */
.form-row {
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  border-bottom: 1px solid #edf2f7;
}
.input-group { display: flex; flex-direction: column; gap: 5px; flex: 1 1 150px; min-width: 0; }
.input-group label { font-size: 0.72rem; font-weight: 700; color: #334155; }
.input-group input, .input-group select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.85rem;
  background: #fff;
  width: 100%;
}
.input-group input:focus, .input-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.input-clear-wrap { position: relative; width: 100%; }
.input-clear-wrap input { padding-right: 32px; }
.input-clear-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}
.input-clear-btn:hover { background: #94a3b8; }
.sort-btn {
  padding: 1px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 0.78rem;
  cursor: pointer;
}
.sort-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.sort-btn:hover { border-color: #3b82f6; }

.remark-input {
  width: 150px;
  padding: 5px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  font-size: 0.78rem;
  background: #fffbeb;
  text-align: center;
}
.remark-input:focus { outline: none; border-color: #3b82f6; background: #fff; }

/* 统计卡 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  padding: 16px 20px;
}
.stat-item { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; text-align: center; background: #fff; }
.stat-item .num { font-size: 1.4rem; font-weight: 800; color: #0f172a; }
.stat-item .num.money { color: #0f766e; font-size: 1.15rem; }
.stat-item .lbl { font-size: 0.75rem; color: #64748b; margin-top: 4px; }
.stat-item.warn .num { color: #b91c1c; }
.stat-item.stat-action { width: 100%; cursor: pointer; }
.stat-item.stat-action:hover { border-color: #86efac; background: #f0fdf4; }
.stat-action-hint { display: block; margin-top: 7px; color: #2563eb; font-size: 0.72rem; font-weight: 700; }
.revenue-period-summary { margin: 16px 0 10px; font-size: 0.92rem; color: #334155; }
.revenue-period-summary strong { color: #0f766e; font-size: 1.15rem; }
.revenue-period-list { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.revenue-period-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 10px 14px; border-bottom: 1px solid #e2e8f0; font-size: 0.84rem; align-items: center; }
.revenue-period-row:last-child { border-bottom: none; }
.revenue-period-row strong { color: #0f766e; }
.revenue-growth { min-width: 64px; text-align: right; color: #64748b; }
.revenue-growth.up { color: #15803d; }
.revenue-growth.down { color: #b91c1c; }

/* 排行榜 */
.leaderboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.leaderboard-item {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
}
.leaderboard-rank {
  width: 34px; height: 34px; border-radius: 50%;
  background: #e0f2fe; color: #0369a1;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.leaderboard-item:first-child .leaderboard-rank { background: #fef3c7; color: #92400e; }
.leaderboard-chart-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.leaderboard-name { font-weight: 800; overflow-wrap: anywhere; }
.leaderboard-money { text-align: right; color: #0f766e; font-weight: 800; white-space: nowrap; font-size: 0.86rem; }
.leaderboard-money small { display: block; color: #64748b; font-weight: 600; margin-top: 3px; }
.leaderboard-toggle-wrap { display: none; text-align: center; margin-top: 10px; }
.empty-tip { padding: 18px; text-align: center; color: #64748b; border: 1px dashed #cbd5e1; border-radius: 14px; }

/* 经办人每日营业额折线图 */
.revenue-chart {
  width: 100%;
  min-height: 260px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.revenue-grid-line { stroke: #e2e8f0; stroke-width: 1; }
.revenue-axis-line { stroke: #94a3b8; stroke-width: 1.2; }
.revenue-axis-label { fill: #64748b; font-size: 12px; }
.revenue-area { fill: rgba(13, 148, 136, 0.12); }
.revenue-line { fill: none; stroke: #0f766e; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.revenue-point { fill: #fff; stroke: #0f766e; stroke-width: 2; }
.revenue-today-line { stroke: #f59e0b; stroke-width: 1.2; stroke-dasharray: 4 4; }
.revenue-today-point { fill: #f59e0b; stroke: #fff; stroke-width: 2; }
.revenue-today-label { fill: #92400e; font-size: 13px; font-weight: 800; }
.revenue-day-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}
.revenue-day-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
}
.revenue-day-row strong { color: #0f766e; white-space: nowrap; }

/* 日历范围选择 */
.cal-trigger {
  background: #fff;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: #334155;
}
.cal-trigger .placeholder { color: #94a3b8; }
.cal-dropdown {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 12px;
  width: 300px;
  user-select: none;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays { text-align: center; font-size: 0.72rem; color: #94a3b8; margin-bottom: 4px; }
.cal-grid { gap: 2px; }
.cal-day { text-align: center; padding: 6px 2px; border-radius: 6px; font-size: 0.84rem; cursor: pointer; }
.cal-day:hover { background: #f1f5f9; }
.cal-day.empty { cursor: default; }
.cal-day.today { font-weight: 700; color: #2563eb; }
.cal-day.in-range { background: #dbeafe; color: #1e40af; }
.cal-day.edge { background: #2563eb; color: #fff; font-weight: 600; }
.cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.cal-hint { font-size: 0.76rem; color: #64748b; }

/* 登录 */
.login-screen { min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; }
.login-card { width: min(400px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08); padding: 30px 26px; }
.login-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.login-card .desc { margin: 0 0 20px; color: #64748b; font-size: 0.88rem; }
.login-error { display: none; background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; border-radius: 12px; padding: 10px 12px; font-size: 0.8rem; margin-bottom: 14px; }
.login-card .input-group { margin-bottom: 14px; }

/* 提示 / Toast */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: #0f172a;
  color: #fff;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  z-index: 10001;
  transition: transform 0.25s;
  max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { background: #b91c1c; }

.notice-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 9px 14px;
  font-size: 0.8rem;
  margin: 10px 0;
}

/* 对话框 */
dialog {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  padding: 22px;
  width: min(440px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
dialog h3 { margin: 0 0 14px; }
dialog .input-group { margin-bottom: 12px; }
dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin-bottom: 10px; }
.checkbox-row input { width: 16px; height: 16px; }
.hint { font-size: 0.75rem; color: #64748b; }

dialog.wide-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.dialog-title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.dialog-title-row h3 { margin: 0; }

/* 设备热力图 */
.heatmap-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  margin-bottom: 12px;
}
.heatmap-range-title { font-weight: 800; color: #0f172a; }
.heatmap-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 14px;
  min-height: 420px;
}
.heatmap-device-list {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
  max-height: 64vh;
  overflow: auto;
}
.heatmap-device-option {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  text-align: left;
  border-radius: 12px;
  padding: 10px 11px;
  margin-bottom: 7px;
  background: #fff;
}
.heatmap-device-option.active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12); }
.heatmap-device-name { font-weight: 800; overflow-wrap: anywhere; }
.heatmap-device-meta { grid-column: 1 / 2; font-size: 0.74rem; color: #64748b; overflow-wrap: anywhere; }
.heatmap-device-count { grid-row: 1 / 3; grid-column: 2 / 3; align-self: center; color: #0f766e; font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
.heatmap-detail { min-width: 0; }
.heatmap-dialog.single-device .heatmap-layout { grid-template-columns: 1fr; }
.heatmap-dialog.single-device .heatmap-device-list { display: none; }
.heatmap-selected-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.heatmap-selected-head h4 { margin: 0 0 4px; font-size: 1.05rem; overflow-wrap: anywhere; }
.heatmap-section-label { font-size: 0.76rem; font-weight: 800; color: #334155; margin-bottom: 7px; }
.heatmap-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.heatmap-seg {
  position: relative;
  flex: 1 1 220px;
  min-width: 220px;
  min-height: 132px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.heatmap-seg.current {
  background: #dbeafe;
  border-color: #93c5fd;
  border-width: 2px;
}
.heatmap-seg.previous,
.heatmap-seg.future {
  background: #dcfce7;
  border-color: #86efac;
}
.heatmap-seg.previous { opacity: 0.86; }
.heatmap-today-marker {
  flex: 0 0 2px;
  min-height: 132px;
  align-self: stretch;
  background: #dc2626;
  border-radius: 999px;
}
.heatmap-free { background: #f8fafc; color: #475569; }
.heatmap-busy { color: #0f172a; font-weight: 700; }
.heatmap-idle {
  background: #f8fafc;
  border-style: dashed;
  color: #64748b;
}
.heatmap-seg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.heatmap-seg-range {
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.heatmap-stage {
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(15, 23, 42, 0.12);
  color: #334155;
  font-size: 0.66rem;
  font-weight: 900;
  white-space: nowrap;
}
.heatmap-seg.current .heatmap-stage {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 900;
}
.heatmap-seg-days { font-size: 0.66rem; opacity: 0.72; }
.heatmap-seg-info {
  font-size: 0.72rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.heatmap-seg-amount {
  color: #0f766e;
  font-size: 0.86rem;
  font-weight: 900;
}
.heatmap-seg-line {
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.heatmap-seg-remark { color: #dc2626; font-weight: 800; }
.heatmap-more {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.66rem;
  border-radius: 999px;
  padding: 1px 5px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}
.heatmap-busy-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.heatmap-busy-list .heatmap-section-label { width: 100%; margin-bottom: 0; }
.heatmap-rental {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}
.heatmap-archive-btn,
.heatmap-archived-label { margin-top: auto; align-self: flex-start; }
.heatmap-archived-label { font-size: 0.72rem; color: #64748b; }

/* 台账「下单时间」列默认折叠，点表头按钮展开 */
.excel-table.hide-created-col .created-col { display: none; }

/* 档期初筛说明列里的备注：红色加粗 */
.schedule-remark { color: #dc2626; font-weight: 700; }

/* 台账备注列里的收货地址（新版结构化数据；旧版地址写在备注里无需此行） */
.cell-addr {
  font-size: 0.74rem;
  color: #0f766e;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

/* 可点击复制文本 */
.copy-text {
  cursor: pointer;
  border-bottom: 1px dashed #94a3b8;
  color: #334155;
  transition: color 0.15s, border-color 0.15s;
}
.copy-text:hover { color: #2563eb; border-color: #2563eb; }

.schedule-result-table { table-layout: fixed; }
.schedule-result-table th:nth-child(1), .schedule-result-table td:nth-child(1) { width: 58px; }
.schedule-result-table th:nth-child(2), .schedule-result-table td:nth-child(2) { width: 170px; }
.schedule-result-table th:nth-child(3), .schedule-result-table td:nth-child(3) { width: 130px; }
.schedule-result-table th:nth-child(4), .schedule-result-table td:nth-child(4) { width: auto; }
.schedule-result-table th:nth-child(5), .schedule-result-table td:nth-child(5) { width: 150px; }
.schedule-device-name { vertical-align: middle; overflow-wrap: anywhere; font-weight: 700; }
.schedule-heatmap-btn {
  width: 30px;
  height: 26px;
  padding: 0;
  margin-left: 6px;
  border-radius: 10px;
  vertical-align: middle;
  line-height: 1;
}
.schedule-group-row td {
  text-align: left;
  font-weight: 800;
  color: #334155;
  background: #f8fafc;
}
.schedule-group-row.ready td { color: #0369a1; background: #e0f2fe; }
.schedule-group-row.pending td { color: #854d0e; background: #fef9c3; }
.schedule-group-row.conflict td { color: #b91c1c; background: #fee2e2; }
.schedule-detail-cell {
  text-align: center !important;
  min-width: 460px;
  line-height: 1.55;
  padding: 7px 9px;
}
.schedule-detail-lines { max-width: 720px; margin: 0 auto; }
.schedule-line { margin: 2px 0; color: #334155; overflow-wrap: anywhere; text-align: center; }
.schedule-current-line { color: #047857; font-weight: 700; }
.schedule-logistics-line { color: #0f172a; }
.schedule-warn { color: #b45309; font-weight: 700; }
.schedule-loading { color: #2563eb; font-weight: 700; text-align: center; padding: 18px 0; }
.schedule-action-cell { text-align: center !important; }
.schedule-fill-btn {
  display: block;
  margin: 0 auto 5px;
  color: #1d4ed8;
  border-color: #93c5fd;
  background: #eff6ff;
}
.schedule-fill-btn:hover { background: #dbeafe; }
.schedule-fill-note { color: #94a3b8; font-size: 0.72rem; line-height: 1.35; }

/* 移动端卡片列表（窄屏代替宽表） */
.card-list { display: none; padding: 12px 14px; flex-direction: column; gap: 10px; }
.m-card { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px; background: #fff; }
.m-card .m-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.m-card .m-title { font-weight: 700; font-size: 0.95rem; }
.m-card .m-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 3px 0; gap: 12px; }
.m-card .m-row .k { color: #64748b; flex-shrink: 0; }
.m-card .m-row .v { text-align: right; overflow-wrap: anywhere; }
.m-card .m-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.hidden { display: none !important; }
.footer-note { text-align: center; font-size: 0.75rem; color: #5b6e8c; margin-top: 18px; border-top: 1px solid #e2e8f0; padding-top: 16px; }

/* 列筛选 */
.col-filter { display: flex; flex-direction: column; gap: 4px; align-items: center; margin-top: 5px; }
.col-filter input, .col-filter select {
  width: 120px; padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 0.74rem;
}

@media (max-width: 760px) {
  body { padding: 12px 10px; }
  .card-header h2 { font-size: 1.02rem; }
  input, select, .remark-input, .cal-trigger { font-size: 16px !important; } /* 防 iOS 聚焦放大 */
  .responsive-table .table-wrapper { display: none; }
  .responsive-table .card-list { display: flex; }
  .leaderboard-grid:not(.expanded) .leaderboard-extra { display: none; }
  .leaderboard-toggle-wrap { display: block; }
  .leaderboard-item { grid-template-columns: auto auto 1fr; }
  .leaderboard-money { grid-column: 1 / -1; text-align: left; padding-left: 84px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); padding: 12px; gap: 8px; }
  .stat-item { padding: 9px 6px; }
  .stat-item .num { font-size: 1.1rem; }
  .stat-item .num.money { font-size: 0.95rem; }
  .card-body { padding: 12px 14px; }
  .form-row { padding: 12px 14px; }
  dialog.wide-dialog { width: calc(100vw - 20px); padding: 14px; }
  .heatmap-toolbar { align-items: flex-start; }
  .heatmap-layout { grid-template-columns: 1fr; min-height: 0; }
  .heatmap-device-list { max-height: 220px; }
  .heatmap-grid { gap: 5px; }
  .heatmap-seg { flex-basis: calc(50% - 3px); min-width: 0; min-height: 72px; padding: 6px; }
  .heatmap-selected-head { align-items: flex-start; }
  .heatmap-device-option { grid-template-columns: 1fr; }
  .heatmap-device-meta, .heatmap-device-count { grid-column: auto; grid-row: auto; }
  .schedule-result-table { min-width: 820px; }
  .schedule-result-table th:nth-child(2), .schedule-result-table td:nth-child(2) { width: 140px; }
  .schedule-result-table th:nth-child(3), .schedule-result-table td:nth-child(3) { width: 120px; }
  .schedule-result-table th:nth-child(5), .schedule-result-table td:nth-child(5) { width: 140px; }
  .schedule-detail-cell { min-width: 380px; }
}
