/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  font-size: 13px;
  background: linear-gradient(135deg, #e8edf5 0%, #dce3ed 100%);
  color: #333;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  margin: 0;
  padding: 12px 10px;
}

.table-wrapper {
  overflow-x: auto;
  max-width: calc(100vw - 20px);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid #1a3c6e;
  margin-bottom: 0;
  gap: 2px;
}

.tab {
  padding: 9px 28px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #bbb;
  border-bottom: none;
  background: #e0e0e0;
  color: #666;
  cursor: pointer;
  transition: all .15s;
}

.tab:hover {
  background: #ccd5e0;
  color: #333;
}

.tab.active {
  background: #1a3c6e;
  color: #fff;
  border-color: #1a3c6e;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ── Toolbar ── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.search-input {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #aaa;
  width: 160px;
  background: #fff;
  transition: border-color .2s;
}

.search-input:focus {
  border-color: #1a3c6e;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 60, 110, .12);
}

.filter-select {
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid #aaa;
  background: #fff;
  cursor: pointer;
}

.filter-select:focus {
  border-color: #1a3c6e;
  outline: none;
}

/* ── Buttons ── */
.btn {
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #999;
  background: #fff;
  color: #333;
  transition: all .15s;
  font-weight: 500;
}

.btn:hover {
  background: #f0f0f0;
  border-color: #666;
}

.btn-primary {
  background: #1a3c6e;
  color: #fff;
  border-color: #1a3c6e;
}

.btn-primary:hover {
  background: #2a5090;
}

.btn-danger {
  color: #c00;
  border-color: #c00;
  background: #fff;
}

.btn-danger:hover {
  background: #fef0f0;
}

.btn-sm {
  padding: 3px 10px;
  font-size: 11px;
}

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

#mainTable {
  table-layout: fixed;
}

.data-table th,
.data-table td {
  border: 1px solid #d4d4d4;
  padding: 5px 7px;
  text-align: left;
  font-size: 12px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table th {
  background: #1a3c6e;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .3px;
  position: relative;
}

.data-table tr:nth-child(even) {
  background: #f8f9fb;
}

.data-table tr:hover {
  background: #edf2fb;
}

.empty-row td {
  text-align: center;
  color: #999;
  padding: 24px;
  font-size: 13px;
}

.thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #ddd;
}

.thumb-placeholder {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 1px dashed #d0d0d0;
  text-align: center;
  line-height: 34px;
  color: #ccc;
  font-size: 11px;
}

/* ── Preview hover popup (edit modal) ── */
.preview-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
}

.preview-wrapper .preview-img {
  margin: 0;
}

.preview-popup {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 6px;
  background: #fff;
  border: 2px solid #1a3c6e;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
}

.preview-popup img {
  max-width: 80vw;
  max-height: 80vh;
  display: block;
}

.preview-wrapper:hover .preview-popup {
  display: block;
}

.preview-wrapper:hover .preview-img {
  outline: 2px solid #1a3c6e;
  cursor: zoom-in;
}

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  letter-spacing: .2px;
}

.badge-draft {
  color: #666;
  border-color: #bbb;
  background: #f5f5f5;
}

.badge-ready {
  color: #1a3c6e;
  border-color: #4a7ec2;
  background: #e8f0ff;
}

.badge-submitted {
  color: #7c5e00;
  border-color: #c49b00;
  background: #fff8e1;
}

.badge-booked {
  color: #155724;
  border-color: #28a745;
  background: #d4edda;
}

.badge-cancelled {
  color: #7c5e00;
  border-color: #e0a800;
  background: #fff3cd;
}

.badge-error {
  color: #721c24;
  border-color: #dc3545;
  background: #f8d7da;
}

.badge-failed {
  color: #721c24;
  border-color: #c00;
  background: #fdd;
}



.badge-fetched {
  color: #0d47a1;
  border-color: #1976d2;
  background: #bbdefb;
  animation: pulse-badge 2s ease-in-out infinite;
}

.badge-pending_cancel {
  color: #e65100;
  border-color: #ef6c00;
  background: #fff3e0;
}

.badge-cancel_fetched {
  color: #e65100;
  border-color: #ef6c00;
  background: #fff3e0;
  animation: pulse-badge 2s ease-in-out infinite;
}

.badge-pending_change {
  color: #4a148c;
  border-color: #7b1fa2;
  background: #f3e5f5;
}

.badge-change_fetched {
  color: #4a148c;
  border-color: #7b1fa2;
  background: #f3e5f5;
  animation: pulse-badge 2s ease-in-out infinite;
}

.badge-booked_other {
  color: #00695c;
  border-color: #00897b;
  background: #e0f2f1;
}

.badge-stale {
  color: #616161;
  border-color: #9e9e9e;
  background: #eeeeee;
}

\r\n.badge-duplicate {
  color: #bf360c;
  border-color: #e64a19;
  background: #fbe9e7;
}

.badge-no_dates {
  color: #e65100;
  border-color: #ff9800;
  background: #fff3e0;
}

.badge-rejected {
  color: #880e4f;
  border-color: #c2185b;
  background: #fce4ec;
}

.badge-pending_find {
  color: #0277bd;
  border-color: #0288d1;
  background: #e1f5fe;
}

.badge-find_fetched {
  color: #0277bd;
  border-color: #0288d1;
  background: #e1f5fe;
  animation: pulse-badge 2s ease-in-out infinite;
}

.badge-find_success {
  color: #1b5e20;
  border-color: #2e7d32;
  background: #e8f5e9;
}

.badge-find_failed {
  color: #b71c1c;
  border-color: #c62828;
  background: #ffebee;
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .55;
  }
}

/* submission result badges */
.badge-success {
  color: #155724;
  border-color: #28a745;
  background: #d4edda;
}

.btn-warning {
  color: #e65100;
  border-color: #e65100;
  background: #fff;
}

.btn-warning:hover {
  background: #fff3e0;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  padding-top: 30px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  width: 640px;
  max-width: 95vw;
  border: 1px solid #aaa;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #1a3c6e;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: .8;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 14px 16px 19px 16px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
}

/* ── Form ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-section-title {
  grid-column: 1 / -1;
  font-weight: 600;
  padding: 6px 0 4px;
  border-bottom: 1px solid #e0e0e0;
  margin-top: 6px;
  font-size: 13px;
  color: #1a3c6e;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 11px;
  color: #555;
  margin-bottom: 3px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid #c0c0c0;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #1a3c6e;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 60, 110, .1);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.form-group.full {
  grid-column: 1 / -1;
}

.upload-area {
  grid-column: 1 / -1;
  display: flex;
  gap: 30px;
  justify-content: center;
}

.upload-box {
  text-align: center;
  flex: 0 0 auto;
}

.upload-label {
  display: block;
  font-size: 11px;
  color: #555;
  margin-bottom: 4px;
  font-weight: 500;
}

.preview-empty {
  width: 160px;
  height: 120px;
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 11px;
  background: #fafafa;
  margin: 0 auto;
}

.preview-img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #ccc;
  display: block;
  margin: 0 auto;
}

.upload-btn {
  margin-top: 4px;
  font-size: 11px;
  padding: 3px 10px;
  cursor: pointer;
  border: 1px solid #999;
  background: #fff;
  transition: all .15s;
}

.upload-btn:hover {
  background: #f0f0f0;
}

/* 证件识别 详情面板 (编辑模态框内) */
.recog-panel {
  width: 200px;
  margin: 6px auto 0;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fafafa;
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
}
.recog-panel.recog-match { border-color: #2e7d32; background: #f0f8f1; }
.recog-panel.recog-mismatch { border-color: #8e44ad; background: #f7f0fa; }
.recog-panel.recog-pending { border-color: #e67e22; background: #fdf6ed; }
.recog-panel.recog-failed { border-color: #c0392b; background: #fdf3f1; color: #c0392b; }
.recog-panel .recog-title { font-weight: 600; margin-bottom: 2px; }
.recog-panel .recog-row { display: flex; gap: 4px; }
.recog-panel .recog-row .recog-k { color: #888; min-width: 38px; }
.recog-panel .recog-row .recog-v { color: #333; word-break: break-all; flex: 1; }
.recog-panel .recog-row.recog-diff .recog-v { color: #8e44ad; font-weight: 600; }

input[type="file"] {
  display: none;
}

.checkbox-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.checkbox-group label {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* ── Placeholder toggle (占位) ── */
.placeholder-toggle {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 4px 0;
  background: #f3e8ff;
  border: 1px solid #d1b3ff;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}

.placeholder-toggle:hover {
  background: #ede0ff;
  border-color: #b388ff;
}

.placeholder-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #7c4dff;
  cursor: pointer;
}

.placeholder-toggle .pt-label {
  font-size: 13px;
  font-weight: 600;
  color: #5a32a3;
}

.placeholder-toggle .pt-desc {
  font-size: 11px;
  color: #7e57c2;
  margin-left: 4px;
}

/* ── Date Preferences ── */
.date-pref-list {
  grid-column: 1 / -1;
}

.date-pref-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.date-pref-row input {
  font-size: 11px;
  padding: 3px 5px;
  border: 1px solid #c0c0c0;
}

.date-pref-row input:focus {
  border-color: #1a3c6e;
  outline: none;
}

.date-pref-row .remove-pref {
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  font-size: 14px;
}

.date-pref-add {
  font-size: 11px;
  color: #1a3c6e;
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
  padding: 2px 0;
}

.date-pref-add:hover {
  color: #2a5090;
}

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border: 3px solid #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  padding: 8px 16px;
  font-size: 12px;
  color: #fff;
  border: 1px solid;
  animation: fadeIn .2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.toast-success {
  background: #155724;
  border-color: #28a745;
}

.toast-error {
  background: #721c24;
  border-color: #dc3545;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
  }
}

/* ── PDF download link ── */
.pdf-link {
  color: #1a3c6e;
  text-decoration: underline;
  cursor: pointer;
  font-size: 11px;
}

.pdf-link:hover {
  color: #2a5090;
}

/* ── Time column ── */
.col-time {
  font-size: 11px;
  white-space: nowrap;
  color: #666;
}

/* ── Table Resizer ── */
.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  user-select: none;
}

.col-resizer:hover,
.col-resizer.resizing {
  background-color: rgba(255, 255, 255, 0.4);
}

/* ── Folder Drag-and-Drop ── */
.tab-panel.drag-over {
  outline: 3px dashed #1a73e8;
  outline-offset: -3px;
  background: rgba(26, 115, 232, 0.05);
  transition: background .15s;
}

/* ── Exact Filter TAG ── */
.exact-filter-bar {
  display: none;
  padding: 6px 10px;
  margin-bottom: 8px;
  background-color: #f8f9fa;
  border: 1px dashed #bbb;
  border-radius: 4px;
}

.exact-filter-bar.active {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 500;
}

.filter-tag .remove-hz {
  margin-left: 8px;
  color: #1976d2;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: color .15s;
}

.filter-tag .remove-hz:hover {
  color: #d32f2f;
}

/* ── Wide Modal (two-column) ── */
.modal-wide {
  width: 1220px;
  max-width: 98vw;
}

.modal-columns {
  display: flex;
  gap: 20px;
}

.modal-col-left {
  flex: 0 0 450px;
  min-width: 0;
}

.modal-col-right {
  flex: 1;
  min-width: 0;
}

/* ── Calendar ── */
.cal-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 8px;
  background: #fafbfc;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cal-nav-btn {
  background: none;
  border: 1px solid #ccc;
  cursor: pointer;
  padding: 2px 10px;
  font-size: 13px;
  border-radius: 3px;
  color: #555;
}

.cal-nav-btn:hover {
  background: #eee;
}

.cal-nav-title {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.cal-grid {
  display: flex;
  gap: 6px;
}

.cal-month {
  flex: 1;
  border-collapse: collapse;
}

.cal-mh {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #1a3c6e;
  padding: 3px 0;
}

.cal-wh {
  text-align: center;
  font-size: 10px;
  color: #999;
  padding: 2px 0;
  font-weight: 400;
}

.cal-c {
  text-align: center;
  font-size: 11px;
  padding: 4px 1px;
  cursor: default;
  position: relative;
}

.cal-act {
  cursor: pointer;
  color: #333;
}

.cal-act:hover {
  background: #e3f2fd;
  border-radius: 3px;
}

.cal-past {
  color: #bbb;
  background: #fdfdfd;
  cursor: not-allowed;
}

.cal-today {
  font-weight: 700;
  color: #fff;
  background: #f57f17;
  border-radius: 3px;
}

.cal-s {
  background: #1a3c6e !important;
  color: #fff !important;
  border-radius: 4px 0 0 4px;
}

.cal-e {
  background: #1a3c6e !important;
  color: #fff !important;
  border-radius: 0 4px 4px 0;
}

.cal-se {
  background: #1a3c6e !important;
  color: #fff !important;
  border-radius: 4px;
}

.cal-r {
  background: #dce8f7;
}

/* ── Calendar Controls ── */
.cal-controls {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cal-ctrl-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.cal-ctrl-label {
  color: #666;
  white-space: nowrap;
}

.cal-ctrl-sep {
  color: #ccc;
}

.cal-time-input {
  padding: 2px 4px;
  font-size: 12px;
  border: 1px solid #ccc;
  width: 80px;
}

.cal-unlimited-label {
  font-size: 11px;
  margin-left: 8px;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

/* ── Date Preference Chips ── */
.dp-chips {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dp-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #f0f4ff;
  border: 1px solid #b0c4de;
  border-radius: 4px;
  font-size: 12px;
}

.dp-chip span {
  flex: 1;
}

.dp-chip-x {
  background: none;
  border: none;
  color: #c00;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  padding: 0 2px;
}

.dp-chip-x:hover {
  color: #f00;
}

/* ── Pagination Row ── */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.page-btns {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-wrap: wrap;
}

.page-ellipsis {
  display: inline-block;
  padding: 0 4px;
  color: #999;
  font-size: 13px;
  user-select: none;
}

.page-total {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  font-weight: 500;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 3px;
  border-left: 1px solid #d0d0d0;
  padding-left: 12px;
  margin-left: 2px;
}

.page-size-label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

.page-size-btn {
  padding: 2px 8px;
  font-size: 11px;
  min-width: 32px;
  text-align: center;
}

.page-size-custom {
  width: 60px;
  padding: 2px 6px;
  font-size: 11px;
  border: 1px solid #aaa;
  background: #fff;
  text-align: center;
  transition: border-color .2s;
}

.page-size-custom:focus {
  border-color: #1a3c6e;
  outline: none;
  box-shadow: 0 0 0 2px rgba(26, 60, 110, .15);
}

.page-size-custom::placeholder {
  color: #bbb;
  font-size: 10px;
}

/* ── 时段日历 (Slot Calendar) — 独立新功能, 全部矩形, 无圆角 ── */
.sc-legend {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 4px 0 12px;
  vertical-align: middle;
  border: 1px solid rgba(0, 0, 0, .12);
}
.slot-cal-container {
  padding: 6px 4px;
}
.slot-cal-weekhdr {
  display: grid;
  grid-template-columns: 42px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
}
.slot-cal-weekhdr > div {
  text-align: center;
  font-size: 11px;
  color: #666;
  padding: 1px 0;
  font-weight: 600;
}
.slot-cal-axis-cell { /* 左轴占位, 无内容 */ }
.slot-cal-week {
  display: grid;
  grid-template-columns: 42px repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 2px;
  align-items: stretch;
}

/* 左轴: 顶部 spacer (对齐 day-header + officehdr) + 8 个小时标签 (对齐 day cell hours block) */
.slot-cal-hours-axis {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: #555;
}
.slot-cal-axis-spacer {
  flex: 0 0 auto;
  /* day cell: border-top 1px + padding-top 2px + day-header (16+2px margin) + officehdr (11+1px margin) = 33px */
  height: 33px;
}
.slot-cal-axis-hours {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.slot-cal-axis-hours > div {
  flex: 1 1 0;
  min-height: 24px;
  text-align: right;
  padding-right: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 1;
  white-space: nowrap;
}
.slot-cal-axis-hours > div + div { margin-top: 1px; }                  /* 小时间 1px (与 hour-block 对齐) */
.slot-cal-axis-hours > div:nth-child(5) { margin-top: 2px; }           /* 上下午间 2px (与 hour-block 对齐) */
.slot-cal-day {
  background: #fff;
  border: 1px solid #cbd1da;
  padding: 2px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
}
.slot-cal-day.is-empty {
  background: transparent;
  border: 1px dashed #e5e7eb;
}
.slot-cal-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
  flex: 0 0 auto;
  padding: 0 1px;
  height: 16px;
  line-height: 1;
}
.slot-cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: #1a3c6e;
}
.slot-cal-month-hint {
  font-size: 10px;
  color: #ef4444;
  margin-left: 3px;
}
.slot-cal-day-offices {
  display: inline-flex;
}
.slot-cal-day-office {
  width: 7px;
  height: 10px;
  display: inline-block;
}
.slot-cal-day-office.is-foreign { margin-left: 3px; }   /* 国外 (金钟外) 用间距与国内 4 个区分 */

/* 每日 office 列头 (5 个小标签, 严格对齐下方 5 列) */
.slot-cal-officehdr {
  flex: 0 0 auto;
  display: flex;
  margin-bottom: 1px;
  font-size: 10px;
  color: #555;
  text-align: center;
  height: 11px;
  line-height: 11px;
}
.slot-cal-officehdr > div {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.slot-cal-officehdr > div + div { margin-left: 3px; }
.slot-cal-officehdr > div.is-foreign { color: #b45309; font-weight: 600; }

/* 每日 cell 主区: 8 行 × 5 列, 每个 (小时×办事处) 内嵌 4 个 mini (15min) */
.slot-cal-hours {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
}
.slot-cal-officecol {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}
.slot-cal-officecol + .slot-cal-officecol { margin-left: 3px; }       /* 办事处之间 3px */
.slot-cal-officecol.is-foreign { margin-left: 3px; }                  /* 国外列与国内同距, 兜底语义 */
.slot-cal-hour-block {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 24px;
}
.slot-cal-hour-block + .slot-cal-hour-block { margin-top: 1px; }      /* 小时之间 1px */
.slot-cal-hour-block:nth-child(5)            { margin-top: 2px; }     /* 上下午之间 2px (5 = PM 起始) */
.slot-cal-mini {
  flex: 1 1 0;
  min-height: 6px;
  /* 纯色块, 无边框, 小时内行间无间隔 */
}
/* 状态色 (矩形, 无圆角) */
.sc-unknown    { background: #e5e7eb; }
.sc-available  { background: #22c55e; }
.sc-soldout    { background: #94a3b8; }    /* 一开始就无货 */
.sc-soldout-was{ background: #ef4444; }    /* 曾有货后没了 */

