:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #182230;
  --muted: #667085;
  --border: #e4e9f1;
  --primary: #174968;
  --primary-hover: #103a54;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --red: #dc2626;
  --red-soft: #fff0f0;
  --yellow: #d97706;
  --yellow-soft: #fff8e6;
  --gray: #7b8491;
  --gray-soft: #f0f2f5;
  --shadow: 0 12px 32px rgba(16, 24, 40, 0.07);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

[v-cloak] {
  display: none;
}

.boot-screen,
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-screen {
  gap: 14px;
  align-content: center;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #d7dee8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-page {
  background:
    radial-gradient(circle at 15% 20%, rgba(23, 73, 104, 0.16), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(22, 163, 74, 0.12), transparent 28%),
    linear-gradient(135deg, #eef4f8, #f8fafc);
}

.login-card {
  width: min(430px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(27, 50, 70, 0.16);
  padding: 36px;
  position: relative;
}

.login-brand,
.brand-inline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-brand {
  margin-bottom: 28px;
}

.login-brand h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 1.2px;
}

.login-brand p,
.brand-inline span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 800;
  font-size: 24px;
  background: linear-gradient(145deg, #1f5d80, #123d57);
  box-shadow: 0 10px 25px rgba(23, 73, 104, 0.25);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 18px;
}

.login-form,
.form-grid {
  display: grid;
  gap: 16px;
}

.login-form label,
.form-grid label,
.dock-manage-card label,
.modal > form > label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d5dce7;
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #5d8ca8;
  box-shadow: 0 0 0 3px rgba(23, 73, 104, 0.1);
}

textarea {
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}

.check-line {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}

.check-line input {
  width: auto;
}

.btn {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 16px;
  font-weight: 650;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--primary);
  color: white;
}

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

.btn.ghost {
  background: white;
  color: #344054;
  border-color: #d7dee8;
}

.btn.ghost:hover {
  background: #f8fafc;
}

.btn.success-btn {
  background: var(--green);
  color: white;
}

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

.btn.wide {
  width: 100%;
}

.small-btn {
  padding: 7px 11px;
  font-size: 13px;
}

.text-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 650;
}

.text-btn:hover {
  text-decoration: underline;
}

.text-btn.success {
  color: var(--green);
}

.text-btn.danger {
  color: var(--red);
}

.language-btn {
  position: absolute;
  right: 28px;
  top: 24px;
}

.login-hint {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f8fb;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 5px;
}

.login-hint code {
  color: #1d4b66;
  font-size: 13px;
}

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

.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-inline > div:last-child {
  display: grid;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.nav-tabs button {
  border: 0;
  background: transparent;
  padding: 24px 14px 21px;
  color: #475467;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}

.nav-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 13px;
}

.user-meta {
  display: grid;
  text-align: right;
}

.user-meta span {
  color: var(--muted);
  font-size: 12px;
}

.timezone-bar {
  min-height: 37px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  padding: 7px 28px;
  font-size: 12px;
  color: var(--muted);
  background: #eef3f7;
  border-bottom: 1px solid #e0e6ed;
}

.page-container {
  width: min(1600px, calc(100% - 40px));
  margin: 24px auto 42px;
}

.page-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-heading {
  margin-bottom: 18px;
}

.page-heading h1,
.panel-heading h2 {
  margin: 0;
}

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

.panel-heading h2 {
  font-size: 18px;
}

.page-heading p,
.panel-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.heading-actions {
  display: flex;
  gap: 10px;
}

.dock-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(96px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dock-card {
  min-height: 102px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  cursor: pointer;
}

.dock-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.dock-available {
  background: var(--green-soft);
  border-color: #b8e6c7;
}

.dock-busy {
  background: var(--red-soft);
  border-color: #f0bfc2;
}

.dock-maintenance {
  background: var(--yellow-soft);
  border-color: #f2d39a;
}

.dock-closed {
  background: var(--gray-soft);
  border-color: #d5dae0;
}

.dock-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

.dock-available .status-dot { color: var(--green); }
.dock-busy .status-dot { color: var(--red); }
.dock-maintenance .status-dot { color: var(--yellow); }
.dock-closed .status-dot { color: var(--gray); }

.dock-status-label {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.dock-container {
  margin-top: 8px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.dock-time,
.dock-note,
.dock-next {
  margin-top: 5px;
  font-size: 12px;
  color: #536171;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.035);
}

.summary-card {
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.summary-card strong {
  font-size: 25px;
}

.calendar-panel {
  padding: 20px;
}

.panel-heading {
  margin-bottom: 18px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-booked { background: #2e9e55; }
.legend-progress { background: #d63f49; }
.legend-completed { background: #7b8491; }

#calendar {
  min-height: 650px;
}

.fc .fc-toolbar-title {
  font-size: 19px;
}

.fc .fc-button-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:not(:disabled).fc-button-active {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.fc .fc-event {
  border: 0;
  border-radius: 5px;
  padding: 2px 4px;
  cursor: pointer;
}

.fc .calendar-booked {
  background: #2e9e55;
}

.fc .calendar-progress {
  background: #d63f49;
}

.fc .calendar-completed {
  background: #7b8491;
}

.filters {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #475467;
  background: #f8fafc;
  font-weight: 700;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-cell,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 38px !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-booked,
.computed-available {
  color: #16743a;
  background: #eaf8ef;
}

.badge-in_progress,
.computed-busy {
  color: #ad2530;
  background: #ffedef;
}

.badge-completed,
.badge-cancelled,
.computed-closed {
  color: #5d6673;
  background: #edf0f3;
}

.computed-maintenance {
  color: #9a5b04;
  background: #fff4d6;
}

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

.dock-manage-card {
  padding: 18px;
  display: grid;
  gap: 13px;
}

.dock-manage-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dock-manage-title h3 {
  margin: 0 0 7px;
}

.active-container {
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
}

.table-input {
  min-width: 120px;
  padding: 7px 8px;
}

.log-detail {
  max-width: 460px;
  max-height: 120px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #475467;
  font-size: 11px;
}

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

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 26px;
  position: relative;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.modal-wide {
  width: min(820px, 100%);
}

.modal h2 {
  margin: 0 0 18px;
  padding-right: 34px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f7;
  color: #566171;
  font-size: 22px;
  line-height: 1;
}

.modal-subtitle {
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

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

.full-field {
  grid-column: 1 / -1;
}

.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notice {
  border: 1px solid #f0d8a5;
  background: #fff9e9;
  color: #805b17;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

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

.detail-grid > div {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.detail-grid strong {
  word-break: break-word;
}

.detail-wide {
  grid-column: 1 / -1;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  min-width: 220px;
  max-width: 420px;
  padding: 13px 16px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.18s ease-out;
}

.toast.success { background: #187d42; }
.toast.error { background: #b4232d; }
.toast.info { background: #245f81; }

@keyframes toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* 每日卸货口预约看板：18列卸货口，15分钟一格，面板内部滚动。 */
.schedule-panel {
  padding: 18px;
  overflow: hidden;
}

.schedule-heading {
  gap: 16px;
}

.schedule-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-controls input[type="date"] {
  min-width: 148px;
  height: 38px;
}

.compact-btn {
  width: 38px;
  min-width: 38px;
  padding-left: 0;
  padding-right: 0;
  font-size: 20px;
}

.schedule-legend {
  margin: -4px 0 12px;
  align-items: center;
}

.schedule-date-title {
  margin-left: auto;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.schedule-scroll {
  position: relative;
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.schedule-scroll.loading {
  opacity: 0.68;
  pointer-events: none;
}

.schedule-board {
  width: max-content;
  min-width: 100%;
}

.schedule-header,
.schedule-body {
  display: grid;
  width: max-content;
  min-width: 100%;
}

.schedule-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 58px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--border);
}

.schedule-time-header,
.schedule-dock-header {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
  color: var(--text);
}

.schedule-time-header {
  position: sticky;
  left: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.schedule-dock-header {
  padding: 7px 4px;
  cursor: pointer;
}

.schedule-dock-header:hover {
  background: #edf4f8;
}

.schedule-dock-header span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.schedule-dock-header strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.schedule-time-axis {
  position: sticky;
  left: 0;
  z-index: 20;
  background: #fbfcfd;
  border-right: 1px solid var(--border);
}

.schedule-time-axis span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.schedule-dock-lane {
  position: relative;
  border-right: 1px solid #e3e8ee;
  background-color: #fff;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--slot-height) - 1px),
      #edf1f5 calc(var(--slot-height) - 1px),
      #edf1f5 var(--slot-height)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--hour-height) - 1px),
      #cfd7e1 calc(var(--hour-height) - 1px),
      #cfd7e1 var(--hour-height)
    );
  cursor: crosshair;
}

.schedule-dock-lane:hover {
  background-color: #f8fbfd;
}

.schedule-dock-lane.lane-disabled {
  cursor: not-allowed;
  background-color: #f1f3f5;
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(120, 130, 145, 0.08) 8px 16px);
}

.schedule-booking {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 5;
  border: 0;
  border-radius: 7px;
  padding: 5px 6px;
  overflow: hidden;
  text-align: left;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.16);
}

.schedule-booking:hover {
  filter: brightness(0.96);
  z-index: 8;
}

.schedule-booking span,
.schedule-booking small,
.schedule-booking strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-booking span {
  font-size: 10px;
  opacity: 0.92;
}

.schedule-booking strong {
  margin-top: 2px;
  font-size: 12px;
}

.schedule-booking small {
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.9;
}

.schedule-booked { background: #2e9e55; }
.schedule-in_progress { background: #d63f49; }
.schedule-completed { background: #7b8491; }

.schedule-now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  height: 2px;
  background: #d63f49;
  pointer-events: none;
}

.schedule-empty {
  position: absolute;
  top: 76px;
  left: 90px;
  width: min(520px, calc(100vw - 180px));
  margin: 14px;
  padding: 12px 16px;
  border-radius: 9px;
  background: #f7f9fb;
  color: var(--muted);
  font-size: 13px;
}

.dock-name-fields {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: auto 1fr;
    height: auto;
    padding-top: 10px;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    order: 3;
  }

  .user-menu {
    justify-self: end;
  }

  .dock-grid {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
  }

  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 820px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }

  .brand-inline span,
  .user-meta,
  .small-btn {
    display: none;
  }

  .timezone-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-container {
    width: min(100% - 24px, 1600px);
    margin-top: 16px;
  }

  .page-heading,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    flex: 1;
  }

  .dock-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }

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

  .dock-manage-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .full-field,
  .detail-wide {
    grid-column: 1;
  }

  .schedule-panel {
    padding: 12px;
  }

  .schedule-controls {
    width: 100%;
  }

  .schedule-date-title {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }

  .dock-grid {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .dock-card {
    min-height: 96px;
  }

  .dock-name-fields {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 22px 16px;
  }
}

/* V1.3 日 / 周 / 月预约看板 */
.schedule-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.schedule-view-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f3f6f8;
}

.view-tab {
  min-width: 54px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.view-tab:hover {
  color: var(--text);
}

.view-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(20, 40, 60, 0.14);
}

.overview-scroll {
  position: relative;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}

.overview-scroll.loading {
  opacity: 0.68;
  pointer-events: none;
}

.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  min-width: 1260px;
  min-height: 420px;
}

.week-day {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #fff;
}

.week-day:last-child {
  border-right: 0;
}

.week-day.is-today {
  background: #f4fbf7;
}

.week-day-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  background: #f7f9fb;
}

.week-day.is-today .week-day-header {
  background: #e9f7ef;
}

.week-day-title {
  display: flex;
  align-items: baseline;
  gap: 7px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.week-day-title strong {
  font-size: 23px;
}

.week-day-title span {
  color: var(--muted);
  font-size: 12px;
}

.mini-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.mini-add:hover {
  border-color: var(--primary);
  background: #edf6fa;
}

.week-booking-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
}

.week-booking {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 8px 9px;
  border: 0;
  border-radius: 8px;
  color: white;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}

.week-booking:hover {
  filter: brightness(0.96);
}

.week-booking span,
.week-booking strong,
.week-booking small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-booking-time {
  font-size: 11px;
  opacity: 0.92;
}

.week-booking strong {
  margin-top: 4px;
  font-size: 12px;
}

.week-booking small {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.9;
}

.week-empty {
  min-height: 72px;
  border: 1px dashed #ccd5df;
  border-radius: 8px;
  background: #fafcfd;
  color: var(--muted);
  cursor: pointer;
}

.week-empty:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f3fafc;
}

.month-overview {
  max-height: 720px;
}

.month-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(138px, 1fr));
  min-width: 966px;
}

.month-weekday {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #f7f9fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.month-day {
  min-height: 142px;
  padding: 7px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.month-day:hover {
  background: #f8fbfd;
}

.month-day.outside-month {
  background: #f7f8fa;
  color: #9aa4b1;
}

.month-day.is-today {
  box-shadow: inset 0 0 0 2px #2e9e55;
}

.month-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  margin-bottom: 5px;
}

.month-day-header > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-weight: 700;
}

.month-day.is-today .month-day-header > span {
  background: #2e9e55;
  color: white;
}

.month-booking-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.month-booking {
  display: grid;
  grid-template-columns: 35px 38px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 25px;
  padding: 4px 5px;
  border: 0;
  border-radius: 5px;
  color: white;
  text-align: left;
  cursor: pointer;
}

.month-booking span,
.month-booking strong,
.month-booking em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-style: normal;
}

.month-booking strong {
  font-size: 10px;
}

.month-booking em {
  font-weight: 700;
}

.month-more {
  width: 100%;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--primary);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 900px) {
  .schedule-toolbar {
    width: 100%;
    align-items: stretch;
  }

  .schedule-view-tabs {
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  .view-tab {
    min-width: 48px;
    padding: 0 10px;
  }

  .month-board {
    min-width: 840px;
    grid-template-columns: repeat(7, 120px);
  }

  .week-board {
    min-width: 1120px;
    grid-template-columns: repeat(7, 160px);
  }
}

/* V1.4 视觉优化：RAMPE 状态卡片与统一预约看板工具栏 */
.page-container {
  width: min(1760px, calc(100% - 32px));
}

.dock-grid {
  gap: 14px;
}

.dock-card {
  position: relative;
  min-height: 128px;
  padding: 14px 14px 13px;
  overflow: hidden;
  border-color: var(--border);
  background: #fff;
  box-shadow: 0 5px 16px rgba(24, 43, 63, 0.055);
}

.dock-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--gray);
}

.dock-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(24, 43, 63, 0.12);
}

.dock-available {
  background: linear-gradient(180deg, #ffffff 0%, #f5fcf7 100%);
  border-color: #c7e7d1;
}
.dock-available::before { background: var(--green); }

.dock-busy {
  background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
  border-color: #efc7ca;
}
.dock-busy::before { background: var(--red); }

.dock-maintenance {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
  border-color: #efd7a9;
}
.dock-maintenance::before { background: var(--yellow); }

.dock-closed {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f8 100%);
  border-color: #d5dae0;
}
.dock-closed::before { background: var(--gray); }

.dock-card-head {
  align-items: flex-start;
  gap: 8px;
}

.dock-code-block {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.dock-code-block span {
  color: #5f6b78;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.dock-code-block strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.5px;
}

.dock-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.dock-status-badge .status-dot {
  width: 7px;
  height: 7px;
}

.dock-available .dock-status-badge { color: #208348; }
.dock-busy .dock-status-badge { color: #b92f38; }
.dock-maintenance .dock-status-badge { color: #9a6a0d; }
.dock-closed .dock-status-badge { color: #66707d; }

.dock-card-content {
  min-height: 58px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(116, 130, 145, 0.13);
}

.dock-container {
  margin-top: 0;
  font-size: 14px;
}

.dock-time {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(182, 47, 57, 0.1);
  color: #a52731;
  font-size: 12px;
  font-weight: 800;
}

.dock-next-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.dock-next {
  margin-top: 4px;
  color: var(--text);
  font-weight: 700;
}

.dock-note {
  margin-top: 5px;
}

.dock-available-text {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: #248249;
  font-size: 13px;
  font-weight: 700;
}

.summary-card {
  position: relative;
  overflow: hidden;
  min-height: 70px;
  padding: 16px 18px;
}

.summary-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #91a0af;
}
.summary-card:nth-child(2)::before { background: var(--red); }
.summary-card:nth-child(3)::before { background: #77818e; }
.summary-card:nth-child(4)::before { background: #cf3f49; }
.summary-card:nth-child(5)::before { background: var(--green); }

.schedule-panel {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(24, 43, 63, 0.07);
}

.schedule-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 12px;
}

.schedule-panel-title h2 {
  margin: 0;
  font-size: 20px;
}

.schedule-panel-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, auto) minmax(290px, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px 22px;
  border-top: 1px solid #edf0f3;
  border-bottom: 1px solid #e2e8ee;
  background: #f8fafb;
}

.schedule-view-tabs {
  justify-self: start;
}

.schedule-date-navigation {
  display: grid;
  grid-template-columns: 42px minmax(250px, auto) 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.date-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cfd8e2;
  border-radius: 10px;
  background: #fff;
  color: #344454;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(24, 43, 63, 0.05);
}

.date-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f8fb;
}

.schedule-date-title {
  min-width: 250px;
  margin: 0;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.25px;
}

.schedule-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-date-picker {
  width: 145px;
  height: 38px;
}

.schedule-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 43px;
  padding: 8px 22px;
  background: #fff;
}

.schedule-legend {
  margin: 0;
}

.schedule-board-tip {
  color: var(--muted);
  font-size: 12px;
}

.schedule-scroll,
.overview-scroll {
  margin: 0 18px 18px;
  border-radius: 11px;
}

.schedule-header {
  min-height: 66px;
}

.schedule-time-header {
  color: #3a4857;
  font-size: 14px;
  font-weight: 800;
}

.schedule-dock-header {
  padding: 9px 5px;
}

.schedule-dock-header span {
  color: #5f6b78;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.9px;
}

.schedule-dock-header strong {
  margin-top: 3px;
  font-size: 22px;
}

.schedule-time-axis {
  background: #f7f9fb;
}

.schedule-time-axis span {
  left: 0;
  right: 0;
  transform: translateY(-50%);
  padding: 0 8px;
  color: #344454;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.schedule-dock-lane:nth-child(even) {
  background-color: #fcfdfe;
}

.week-day-header {
  min-height: 66px;
}

.week-day-title strong {
  font-size: 26px;
}

.month-weekday {
  height: 44px;
  color: #435160;
  font-size: 13px;
}

.month-day {
  min-height: 148px;
}

@media (max-width: 1280px) {
  .dock-grid {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
  }

  .schedule-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-view-tabs,
  .schedule-date-navigation,
  .schedule-actions {
    justify-self: center;
  }
}

@media (max-width: 820px) {
  .page-container {
    width: min(100% - 20px, 1760px);
  }

  .dock-grid {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .schedule-date-navigation {
    grid-template-columns: 38px minmax(180px, auto) 38px;
    gap: 7px;
  }

  .schedule-date-title {
    min-width: 180px;
    font-size: 18px;
  }

  .date-nav-btn {
    width: 38px;
    height: 38px;
  }

  .schedule-actions {
    flex-wrap: wrap;
  }

  .schedule-subbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .dock-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .dock-code-block strong {
    font-size: 24px;
  }

  .schedule-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .schedule-date-picker {
    width: 140px;
  }
}

/* V1.5 状态逻辑：预约不等于实际占用 */
.summary-grid {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
}

.dock-waiting {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
  border-color: #f0d7a6;
}
.dock-waiting::before { background: #d99a18; }
.dock-waiting .dock-status-badge { color: #9b6708; }
.dock-waiting .dock-time {
  background: rgba(217, 154, 24, 0.12);
  color: #8a5b05;
}

.dock-overdue {
  background: linear-gradient(180deg, #ffffff 0%, #fff6ed 100%);
  border-color: #f0c59e;
}
.dock-overdue::before { background: #ea7b20; }
.dock-overdue .dock-status-badge { color: #b8540a; }
.dock-overdue .dock-time {
  background: rgba(234, 123, 32, 0.12);
  color: #a54608;
}

.dock-alert {
  margin-top: 7px;
  color: #b42318;
  font-size: 11px;
  font-weight: 800;
}

.warning-text strong {
  color: #b42318 !important;
}

.badge-booked,
.computed-waiting {
  color: #8a5b05;
  background: #fff4d6;
}

.computed-overdue {
  color: #a54608;
  background: #ffead8;
}

.schedule-booked { background: #d99a18; }
.legend-booked { background: #d99a18; }

.summary-card:nth-child(5)::before { background: #d99a18; }
.summary-card:nth-child(6)::before { background: #ea7b20; }
.summary-card:nth-child(7)::before { background: var(--green); }

@media (max-width: 1380px) {
  .summary-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
}

@media (max-width: 820px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .summary-grid { grid-template-columns: 1fr; }
}


/* V1.6 targeted fixes: Frankfurt timezone is configured in config.py/.env.
   Keep the realtime status under the RAMPE number so it never overlaps it. */
.dock-card-head {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 9px;
}

.dock-status-badge {
  align-self: flex-start;
  max-width: 100%;
  white-space: nowrap;
}

/* The day board covers 00:00–24:00. Keep its boundary labels fully visible. */
.schedule-time-axis span:first-child {
  transform: translateY(0);
}

.schedule-time-axis span:last-child {
  transform: translateY(-100%);
}
