:root {
  --brand: #ca4f0f;
  --text: #333;
  --muted: #666;
  --panel: #f5f5f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--panel);
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  min-height: 100vh;
  padding-bottom: 60px;
}

.login-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.visual-panel {
  position: relative;
  width: 64%;
  overflow: hidden;
  background: #32482f;
}

.visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-title {
  position: absolute;
  z-index: 1;
  top: 20%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  font-weight: 300;
  line-height: 1.15;
  white-space: nowrap;
  transform: translateX(-50%);
}

.visual-title span:last-child {
  margin-top: 0.55rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.25rem, 2.1vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.3rem;
}

.login-panel {
  position: relative;
  display: flex;
  width: 36%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.locale-switch {
  position: fixed;
  z-index: 120;
  top: 0.9rem;
  right: 1.1rem;
}

.locale-switch ul {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0;
  list-style: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.locale-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  color: #704f12;
  /* 登入頁根字級為 62.5%（1rem＝10px），與訂單頁頁首的語系切換同為 1.3rem；1.08rem 只有 10.8px，桌機比手機（1.38rem）還小。 */
  font-size: 1.3rem;
  font-weight: 500;
  text-decoration: none;
}

.locale-switch a:hover,
.locale-switch a:focus-visible {
  background: #f7e8df;
  color: var(--brand);
}

.locale-switch a[aria-current="true"] {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

/*
 * 訂單頁的語系切換放在頁首導覽列內，隨訂票規則與登出按鈕一起排版；
 * 取消登入頁使用的固定定位，否則會浮在頁首右上角蓋住同位置的按鈕。
 * 選擇器含 .site-header，權重高於各斷點對 .locale-switch 的定位設定。
 */
.site-header .locale-switch {
  position: static;
  transform: none;
}

.site-header .locale-switch ul {
  box-shadow: none;
  background: #f7e8df;
}

.site-header .locale-switch a {
  min-height: 2.8rem;
  padding: 0 1rem;
  font-size: 1.3rem;
  white-space: nowrap;
}

/* 訂票規則與登出按鈕文字不換行；空間不足時由斷點改變頁首排列，而不是把按鈕文字擠成兩行。 */
.site-header .nav-rule,
.site-header .btn-logout {
  white-space: nowrap;
}

.login-card {
  width: min(100%, 398px);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.login-page .login-card {
  width: auto;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.login-card__header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--brand);
}

.brand-logo {
  width: 58px;
  height: 58px;
  margin-right: 9px;
  object-fit: contain;
}

.brand-copy {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding-left: 12px;
  color: #fff;
  line-height: 1.15;
}

.brand-copy::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: #fff;
  content: "";
}

.brand-copy strong {
  margin-bottom: 0.55rem;
  font-size: clamp(1rem, 1.25vw, 1.25rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.brand-copy span {
  font-size: clamp(0.7rem, 0.85vw, 0.82rem);
  overflow-wrap: anywhere;
}

html[lang="en"] .brand-copy strong {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  line-height: 1.2;
}

html[lang="en"] .brand-copy span {
  font-size: 0.7rem;
  line-height: 1.25;
}

.login-card__body {
  padding: 30px 20px;
  border: 1px solid #c4c4c4;
  border-top: 0;
  border-radius: 0 0 24px 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form input {
  width: 100%;
  height: 46px;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #222;
  font-size: 0.95rem;
}

.login-form input:focus {
  padding: 9px;
  border: 2px solid var(--brand);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle,
.captcha-refresh {
  border: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  background-image: url("/images/login/view.svg");
  background-size: 30px;
}

.password-toggle[aria-pressed="true"] {
  background-image: url("/images/login/hidden.svg");
}

/* The Vue login renders the icon as an inline img; without an explicit size the
   source SVG keeps its 800x800 intrinsic box and overlaps the captcha controls. */
.password-toggle:has(img) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-image: none;
}

.password-toggle img {
  width: 30px;
  height: 30px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.login-form .captcha-input {
  width: auto;
  min-width: 0;
}

.captcha-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.captcha-image {
  display: block;
  width: auto;
  height: 46px;
  object-fit: contain;
  background: #fff;
}

.captcha-refresh {
  display: flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
}

.captcha-refresh img {
  width: 20px;
  height: 20px;
  filter: none;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.login-submit:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.login-submit[aria-busy="true"] {
  cursor: wait;
}

.login-submit[aria-busy="true"]::after {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: submit-spin 0.75s linear infinite;
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-submit:hover:not(:disabled),
.login-submit:focus-visible:not(:disabled) {
  background: #a93f09;
}

.recovery {
  margin: 1.25rem 0;
  text-align: center;
}

.login-success {
  margin: 0.9rem 0 0;
  color: #0a6b2b;
  font-weight: 600;
  text-align: center;
}

.recovery a {
  font-size: 0.85rem;
  text-underline-offset: 0.25rem;
}

.support-copy {
  color: var(--muted);
  text-align: center;
}

.support-copy p {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.25rem 0;
  font-size: 0.85rem;
}

.support-copy img {
  width: 22px;
  height: 22px;
  margin-right: 3px;
}

.announcement-trigger {
  position: fixed;
  z-index: 6;
  right: 12px;
  bottom: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  background: #555;
  color: #fff;
  cursor: pointer;
}

.announcement-trigger span {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #dc4d3d;
  font-size: 0.75rem;
}

.site-footer {
  position: fixed;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  padding: 5px 30px;
  background: #202020;
  color: #fff;
  font-size: 0.72rem;
}

.site-footer a {
  margin-right: 0.35rem;
  color: #fff;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 1rem 1rem;
}

.modal__backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
}

.announcement-modal {
  position: relative;
  z-index: 2;
  width: min(100%, 450px);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.announcement-modal > header {
  position: relative;
  height: 45px;
  border-radius: 22px 22px 0 0;
  background: var(--brand);
}

.announcement-modal h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 45px;
  text-align: center;
  letter-spacing: 2px;
}

.modal__x {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eee;
  color: #111;
  font-size: 1.35rem;
  cursor: pointer;
}

.announcement-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem 1rem 0.65rem;
  border-bottom: 1px solid #c5c5c5;
}

.announcement-heading strong {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.announcement-heading time {
  font-size: 0.85rem;
}

.announcement-content {
  min-height: 132px;
  padding: 1rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1.8;
}

.announcement-content a {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--brand);
}

.announcement-unread {
  min-height: 60px;
  margin: 0;
  border-bottom: 1px solid #c5c5c5;
  color: #333;
  font-size: 0.82rem;
  line-height: 60px;
  text-align: center;
}

.announcement-items {
  padding: 30px;
  margin: 0;
  list-style: none;
}

.announcement-items li {
  min-height: 50px;
  border-bottom: 1px solid #ddd;
}

.announcement-items li.is-unread {
  background: #fef0f0;
}

.announcement-items button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #4b4b4b;
  cursor: pointer;
  text-align: left;
}

.announcement-items button:hover,
.announcement-items button:focus-visible {
  background: #eee;
}

.announcement-items time {
  margin-right: 10px;
  font-size: 0.78rem;
}

.announcement-items span {
  font-size: 0.86rem;
}

.announcement-slide[hidden] {
  display: none;
}

.announcement-modal > footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0.9rem 1.5rem;
  border-top: 1px solid #ddd;
}

.modal__close {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--brand);
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
}

.announcement-pages {
  display: flex;
}

.announcement-pages button {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.announcement-pages button:disabled {
  color: #bbb;
  background: #f2f2f2;
}

.announcement-state {
  padding: 0.85rem 1rem;
  margin: 0;
  border-bottom: 1px solid #ddd;
  color: #374151;
}

/* Forgot-password / self-service recovery Modal — faithful to the approved Designer
   composition (login.html `id2`, DESIGN_SPEC snapshot-v5): rounded white 450px box,
   brand-orange header bar with centered title, circular close (×), stacked input body. */
.recovery-modal {
  position: relative;
  z-index: 2;
  width: min(100%, 450px);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.recovery-modal > header {
  position: relative;
  height: 45px;
  border-radius: 22px 22px 0 0;
  background: var(--brand);
}

.recovery-modal h2 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 45px;
  text-align: center;
  letter-spacing: 2px;
}

.recovery-modal__body {
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.recovery-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recovery-form label {
  font-size: 0.9rem;
  color: var(--text);
}

/* 輸入框外觀只套用在 .recovery-modal 版型；切板的忘記密碼視窗由 .password_box 規則決定外觀。 */
.recovery-modal .recovery-form input {
  width: 100%;
  height: 46px;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #222;
  font-size: 0.95rem;
}

.recovery-modal .recovery-form input:focus {
  padding: 9px;
  border: 2px solid var(--brand);
}

.recovery-form .login-submit {
  margin-top: 5px;
}

.recovery-help {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #fff5ef;
  color: #4d5559;
  font-size: 0.92rem;
  line-height: 1.65;
}

.recovery-expired-notice {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #fff0f0;
  color: #b00020;
  font-weight: 700;
  line-height: 1.55;
}

.recovery-expired-notice[hidden] {
  display: none;
}

.recovery-form .password-field {
  width: 100%;
}

.recovery-sep {
  width: 100%;
  margin: 22px 0 18px;
  border: 0;
  border-top: 1px solid #ddd;
}

/*
  前台頁面的狀態訊息字級。
  登入頁與訂單頁的設計稿把 html 字級設為 62.5%（1rem = 10px），StatusMessage 元件自帶的 0.95rem 在前台只剩 9.5px；
  後台未套用該基準（1rem = 16px），因此只針對前台頁面調整，與設計稿內文、登入表單訊息同為 1.4rem。
  選擇器帶 body 以高於元件作用域樣式（.thsr-status[data-v-…]）的權重，不受樣式載入順序影響。
*/
body.login-page .thsr-status,
body.order-page .thsr-status {
  font-size: 1.4rem;
  line-height: 1.5;
}

/* S-03 traveler order boundary pages (legacy/new/unknown + cancel states). */
body.order-page {
  background: #f3f5f9;
}

body.order-page .locale-switch {
  display: block;
}

.order-shell {
  min-height: 100vh;
  padding: 4.5rem 1rem 2rem;
}

.order-main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.order-card {
  width: 100%;
  padding: 20px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.order-card h1 {
  margin-top: 0;
}

.order-state-badge {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #f8e3d8;
  color: #8a3608;
  font-weight: 700;
}

.order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.9rem;
  margin: 1rem 0 0;
}

.order-summary div {
  min-width: 0;
  padding: 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
}

.order-summary dt {
  margin: 0 0 0.25rem;
  color: #475569;
  font-size: 0.84rem;
}

.order-summary dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-cancel-form {
  margin-top: 1rem;
}

.order-note {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-card .booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.booking-designer-modal {
  width: min(100%, 900px);
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.booking-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.booking-modal-header h1 {
  margin: 0;
}

.booking-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  color: #374151;
  text-decoration: none;
  font-size: 1.75rem;
  line-height: 1;
}

.booking-trip-group {
  margin: 0 0 0.9rem;
}

.booking-trip-group > span {
  display: block;
  color: #4b5563;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.booking-trip-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-trip-tabs button {
  min-height: 44px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font: inherit;
  font-weight: 700;
}

.booking-trip-tabs button.is-active {
  background: #ca4f0f;
  color: #fff;
  border-color: #ca4f0f;
}

.booking-card .booking-form label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.booking-card .booking-form input,
.booking-card .booking-form select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0.5rem;
  border: 1px solid #cfd6e1;
  border-radius: 10px;
  background: #fff;
}

.booking-options li {
  border: 1px solid #f39a67;
  background: #fff;
}

.booking-options li + li {
  border-color: #dfe4ec;
}

.booking-alert {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff6ef;
  color: #7a2f08;
}

.booking-options {
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.booking-options li {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}

.booking-options form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.booking-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.traveler-rule-content {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.traveler-rule-mark-list {
  margin: 0.5rem 0 0.9rem;
  padding-left: 1.2rem;
}

.rule-revision-clue {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 0.75rem;
  color: #1f2937;
}

.legacy-order-shell {
  padding-block-start: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 3px solid #ca4f0f;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.header-inner {
  width: min(100%, 1200px);
  margin-inline: auto;
  min-height: 60px;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: #222;
  font-size: 2rem;
  font-weight: 500;
  text-decoration: none;
}

.header-brand img {
  width: 55px;
  height: 50px;
}

.header-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user {
  color: #222;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-user img {
  width: 18px;
  height: auto;
}

.nav-logout-form {
  margin: 0;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 0;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: #ca4f0f;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-rule {
  color: #ca4f0f;
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.rule-arrow {
  margin-right: 5px;
  font-size: 1rem;
}

.nav-rule img,
.nav-rule svg {
  width: 10px;
  height: 10px;
  margin-right: 5px;
}

.page-main {
  padding: 24px 16px 40px;
}

.page-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legacy-order-main {
  width: 100%;
  margin-inline: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legacy-order-main .order-card {
  width: 100%;
  box-sizing: border-box;
}

.card-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: #333;
  font-size: 2.2rem;
  font-weight: 500;
}

.card-heading img {
  width: 24px;
  height: auto;
}

.book-order-num,
.tkt-order-num {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fff5f0;
  border: 1.5px solid #ca4f0f;
  border-radius: 999px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.book-label,
.tkt-order-num span,
.bi-label,
.tg-label,
.tt-label,
.sta-label {
  color: #888;
  font-size: 1.4rem;
}

.btn-logout img,
.btn-logout svg {
  width: 16px;
  height: 16px;
}

.book-value {
  overflow-wrap: anywhere;
  color: #333;
  font-size: 1.6rem;
  font-weight: 700;
}

.book-info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-info-row {
  display: flex;
  gap: 0;
}

.book-info-item {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  gap: 8px;
  border-bottom: 1px solid #c4c4c4;
  padding: 0 0 10px;
  border-radius: 0;
}

.book-info-item > div {
  min-width: 0;
}

.book-info-list > li:last-child .book-info-item {
  border-bottom: none;
}

.book-info-row .book-info-item {
  width: 50%;
}

.book-info-row .book-info-item:last-child {
  border-bottom: 1px solid #c4c4c4;
}

.bi-value,
.tg-value,
.sta-name {
  margin: 1px 0 0;
  color: #222;
  font-size: 1.6rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.bi-icon {
  width: 30px;
  height: 30px;
  border: 1px solid #ca4f0f;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ca4f0f;
  font-size: 1.5rem;
}

.tkt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tkt-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tkt-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1.5rem;
  color: #ca4f0f;
  font-weight: 500;
  background-color: #fff;
  border: 1px solid #ca4f0f;
  border-radius: 999px;
  padding: 8px 12px;
}

.tkt-filter-btn.green-border {
  border-color: #5e9a57;
  color: #5e9a57;
}

.tkt-filter-btn em {
  font-size: 2rem;
  font-style: normal;
  font-weight: 600;
}

.tkt-filter-btn img {
  width: 24px;
  height: 24px;
}

.btn-new-tkt {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  background-color: #ca4f0f;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color .2s;
}

.btn-new-tkt:hover {
  background-color: #f5a552;
}

.tkt-card {
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.tkt-card:last-child {
  margin-bottom: 0;
}

.tkt-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 1.6rem;
  font-weight: 500;
}

.st-success {
  background-color: #edfaf3;
  color: #1e7d46;
}

.st-waiting {
  background-color: #eef3ff;
  color: #2d5bb5;
}

.st-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
}

.st-icon.icon-green {
  background-color: #2da562;
}

.st-icon.icon-blue {
  background-color: #4a72cc;
}

.st-icon img {
  width: 24px;
  height: auto;
}

.st-badge {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  border-radius: 20px;
  padding: 7px 15px;
  white-space: nowrap;
}

.bg-success {
  background-color: #2da562;
}

.bg-waiting {
  background-color: #4a72cc;
}

.tkt-body {
  padding: 16px;
  background-color: #fff;
}

.tkt-info-wrap {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 12px;
}

.tkt-info-left {
  width: calc(50% - 10px);
  min-width: 0;
}

.tkt-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: calc(50% - 10px);
  flex-shrink: 0;
  padding-left: 20px;
  border-left: 1px solid #e0e0e0;
}

.seat-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.seat-num {
  text-align: right;
  color: #555;
}

.tkt-route {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 14px;
}

.sta-name {
  font-size: 1.8rem;
  font-weight: 700;
}

.tkt-arrow-icon {
  font-size: 1.4rem;
  color: #4b4b4b;
  margin: 0 4px;
  padding-top: 22px;
}

.tkt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 82px;
  padding-bottom: 12px;
  margin-bottom: 0;
}

.tkt-time-info {
  font-size: 1.6rem;
  color: #333;
  font-weight: 500;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tkt-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.tkt-total {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 10px;
}

.tt-amount {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
}

.tkt-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-fill-primary,
.btn-outline-danger,
.btn-rules-confirm,
.rules-scroll-hint {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-fill-primary,
.btn-rules-confirm {
  border: 1px solid #df6428;
  background: #f58245;
  color: #fff;
}

.btn-fill-primary:disabled {
  border-color: #a8afb9;
  background: #d4d8de;
  color: #5a626e;
  cursor: not-allowed;
}

.btn-outline-danger {
  border: 1px solid #b42318;
  background: #fff;
  color: #b42318;
}

.rules-modal::backdrop {
  background: rgba(16, 24, 40, 0.62);
}

.rules-load-error {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: 720px;
  margin-inline: auto;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #fff2f0;
  color: #8a1c13;
  box-shadow: 0 4px 18px rgba(20, 28, 45, 0.18);
}

body.rules-modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .legacy-order-shell {
    padding: 1rem 0.75rem;
  }

  .book-info-row,
  .tkt-info-wrap {
    flex-direction: column;
    gap: 12px;
  }

  .book-info-row .book-info-item,
  .tkt-info-left,
  .tkt-info-right {
    width: 100%;
  }

  .tkt-info-right {
    padding-left: 0;
    border-left: 0;
  }

  .tkt-route {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }

  .tkt-grid {
    justify-content: space-between;
    gap: 10px 24px;
  }

  .tkt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .tkt-filter-btn,
  .btn-new-tkt {
    width: 100%;
  }

  .btn-new-tkt {
    justify-content: center;
  }

  .ticket-fares {
    padding-block-start: 1rem;
    padding-inline-start: 0;
    border-block-start: 1px solid #e1e5eb;
    border-inline-start: 0;
  }

  .tkt-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .tkt-btns,
  .tkt-btns form,
  .btn-fill-primary,
  .btn-outline-danger {
    width: 100%;
  }

  .btn-fill-primary,
  .btn-outline-danger {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .rules-modal {
    width: calc(100% - 1rem);
    max-height: 94vh;
  }
}

/* S-02/S-04 administration shell */
body.admin-page {
  background: #f0f2f5;
}

body.admin-page--failure {
  min-height: 100vh;
  padding: clamp(1rem, 4vw, 1.25rem);
}

.admin-shell {
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem 1rem;
  background: #2d3748;
  color: #fff;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-principal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: flex-end;
  font-size: 0.86rem;
}

.admin-logout button,
.admin-reveal-form button {
  min-height: 2.3rem;
  padding: 0.45rem 0.9rem;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.admin-logout button:hover,
.admin-reveal-form button:hover,
.admin-logout button:focus-visible,
.admin-reveal-form button:focus-visible {
  background: #a93f09;
}

.admin-nav-toggle {
  display: none;
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #9ca3af;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.admin-sidebar {
  padding: 1rem;
  background: #111827;
  color: #fff;
}

.admin-sidebar ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-sidebar li + li {
  margin-top: 0.55rem;
}

.admin-sidebar a {
  display: inline-flex;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: #e5e7eb;
  text-decoration: none;
}

.admin-sidebar a[aria-current="page"],
.admin-sidebar a:hover,
.admin-sidebar a:focus-visible {
  background: #374151;
  color: #fff;
}

.admin-main {
  min-width: 0;
  padding: 1rem;
}

.admin-card {
  padding: 1rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.admin-card h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.admin-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.admin-content-locale {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.admin-content-locale h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.admin-content-cell,
.admin-content-text {
  width: 100%;
  min-height: 7.5rem;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
  resize: vertical;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 0;
}

.admin-fields div {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-fields dt {
  margin: 0 0 0.25rem;
  color: #475569;
  font-size: 0.84rem;
}

.admin-fields dd {
  margin: 0;
  color: #1e293b;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.admin-reveal-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: flex-end;
  margin-top: 1rem;
}

.admin-reveal-form label {
  display: block;
  color: #334155;
  font-size: 0.88rem;
}

.admin-reveal-form select {
  min-width: 180px;
  min-height: 2.3rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
}

.admin-reveal-form input {
  min-width: 180px;
  min-height: 2.3rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
}

/* 客戶控制項及警示沿用既有類別，避免 HTML style 違反 CSP。 */
.admin-reveal-form #customer-search {
  min-width: min(240px, 100%);
  max-width: 100%;
}

.admin-reveal-form #customer-locale-filter {
  min-width: 160px;
}

#customers-tbody .admin-status {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  margin: 0;
}

.admin-customers-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.admin-table-scroll-hint {
  display: none;
  margin: 0 0 0.55rem;
  color: #334155;
  font-size: 0.86rem;
}

.admin-reveal-result {
  margin-top: 1rem;
  padding: 0.7rem;
  border-radius: 10px;
  background: #fff7ed;
}

.admin-reveal-result h3 {
  margin-top: 0;
}

.admin-status {
  margin-bottom: 0.9rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

.admin-status.is-success {
  background: #ecfdf5;
  color: #065f46;
}

.admin-status.is-warning {
  background: #fff7ed;
  color: #9a3412;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}

.admin-modal__backdrop {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.admin-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  /* 扣除遮罩 padding 與面板 margin，手機仍可捲至操作列。 */
  box-sizing: border-box;
  max-height: calc(100vh - 4rem);
  max-height: calc(100dvh - 4rem);
  overflow: auto;
  margin: 1rem auto;
  padding: 1rem;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.admin-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-modal__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.admin-payment-actions button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
}

.admin-payment-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.admin-payment-actions label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.admin-modal__actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  margin-top: 1rem;
  background: #fff;
}

.admin-modal__button {
  min-height: 2.4rem;
  min-width: 5.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
}

.admin-modal__button--primary {
  border: 0;
  background: var(--brand);
  color: #fff;
}

.admin-modal__button--secondary {
  border: 1px solid #94a3b8;
  background: #fff;
  color: #1f2937;
}

.admin-failure {
  width: 100%;
  max-width: 640px;
  margin: 10vh auto 0;
  padding: 1.25rem;
  box-sizing: border-box;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow-wrap: anywhere;
}

.admin-failure h1 {
  margin-top: 0;
}

@media (max-width: 1366px) {
  .visual-panel {
    width: 60%;
  }

  .login-panel {
    width: 40%;
  }
}

@media (max-width: 1024px) {
  .visual-panel {
    width: 55%;
  }

  .login-panel {
    width: 45%;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (max-width: 820px) {
  .login-layout {
    position: relative;
    display: block;
    min-height: 100vh;
  }

  .visual-panel {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
  }

  .visual-title {
    top: 10vh;
  }

  .login-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    padding: 0 1rem 50px;
    background: transparent;
    box-shadow: none;
  }

  .locale-switch {
    top: 1.35rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .locale-switch ul {
    white-space: nowrap;
  }

  .announcement-trigger {
    right: 12px;
    bottom: 72px;
  }

  .site-footer {
    min-height: 60px;
    flex-direction: column;
  }

  .admin-topbar {
    grid-template-columns: auto 1fr auto;
  }

  .admin-principal {
    display: none;
  }

  .admin-nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    z-index: 40;
    top: 62px;
    bottom: 0;
    left: 0;
    width: min(78vw, 280px);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-fields {
    grid-template-columns: 1fr;
  }

  .admin-content-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    grid-template-columns: 1fr;
  }

  .admin-table-scroll-hint {
    display: block;
  }
}

/*
 * 訂單頁頁首在 1024px 以下改為兩列：品牌名稱一列，語系切換、訂票規則與登出一列靠右。
 * 三語中英文最長，品牌名稱加上導覽按鈕同一列約需 1020px；寬度不足時按鈕文字會被擠成兩行。
 */
@media (max-width: 1024px) {
  .order-page .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0;
  }

  .order-page .site-header {
    height: auto;
    padding: 12px 16px;
  }

  .order-page .header-nav {
    align-self: flex-end;
  }
}

@media (max-width: 600px) {
  /* 手機寬度放不下語系切換、訂票規則與登出同一列：語系切換獨立一列置中，其餘按鈕維持靠右。 */
  .order-page .header-nav {
    align-self: stretch;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* 權重須高於 body.order-page .locale-switch 的 display 設定。 */
  .order-page .site-header .locale-switch {
    display: flex;
    flex-basis: 100%;
    justify-content: center;
  }

  .login-panel {
    padding-right: 0.5rem;
    padding-bottom: 60px;
    padding-left: 0.5rem;
  }

  .visual-title {
    display: none;
  }

  .login-card {
    width: min(100%, 398px);
    margin: 0 auto;
  }

  .login-card__header {
    flex-direction: column;
  }

  .brand-logo {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .brand-copy {
    align-items: center;
  }

  .announcement-items {
    padding: 10px;
  }

  .announcement-modal > footer {
    padding-right: 10px;
    padding-left: 10px;
  }

  .admin-main {
    padding: 0.7rem;
  }

  .admin-card {
    padding: 0.8rem;
  }

  .admin-reveal-form {
    align-items: stretch;
  }

  .admin-reveal-form select,
  .admin-reveal-form button {
    width: 100%;
  }

  .admin-content-cell,
  .admin-content-text {
    min-height: 6rem;
  }

  .booking-card .booking-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-modal__actions {
    justify-content: stretch;
    padding-bottom: 0.25rem;
  }

  .admin-modal__button {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .login-card__header {
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
  }

  .brand-copy strong {
    font-size: 0.88rem;
  }

  .brand-copy span {
    font-size: 0.62rem;
  }

  .captcha-image {
    width: 96px;
  }

  .recovery-modal__body {
    padding: 20px;
  }
}

/* Designer login compatibility for server form controls */
.login-page .login-form > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-page .login_wrap {
  margin: 0 auto;
}

.login-page .btn.login_btn .login-submit {
  display: inline-flex;
  width: auto;
  min-width: 0;
  padding: 16px 20px;
  border: 0;
  border-radius: 12px;
  background-color: #ca4f0f;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.login-page .btn.login_btn .login-submit:hover {
  color: #000;
  background-color: #ccc;
}

.login-page .captcha .captcha-refresh {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.login-page .captcha {
  flex-wrap: wrap;
  row-gap: 5px;
}

.login-page .input_box ul li input.input-captcha {
  flex: 1 1 8rem;
  width: calc(100% - 142px);
  min-width: 8rem;
}

.login-page .captcha > .captcha-image {
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 40px);
  height: 46px;
  object-fit: contain;
}

.login-page .news a {
  position: relative;
}

.login-page .news .news-trigger {
  position: relative;
  right: auto;
  bottom: auto;
  display: block;
  width: 100%;
  padding: 13px 10px;
  border: 0;
  border-radius: 12px;
  background-color: #555;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.login-page .news .news-trigger:hover {
  color: #fff;
  background-color: #7a7a7a;
}

.login-page .news .news-trigger span {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #dc4d3d;
  font-size: 1.2rem;
}

@media (max-width: 820px) {
  .login-page .locale-switch {
    top: 1rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .login-page .locale-switch ul {
    gap: 0.2rem;
    padding: 0.22rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  }

  .login-page .locale-switch a {
    min-height: 2.4rem;
    padding: 0 1.05rem;
    font-size: 1.38rem;
    font-weight: 500;
  }
}

@media (max-width: 420px) {
  .login-page .locale-switch {
    top: 0.9rem;
  }

  .login-page .locale-switch a {
    min-height: 2.3rem;
    padding: 0 0.95rem;
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   高鐵聯票管理後台 — 方案 B（營運儀表板）切版樣式
   來源：admin-redesign/direction-b.html（設計定案）
   使用方式：後台頁面在 <body class="admin-page"> 之下載入本檔即可；
   全部規則以 .admin-page 為根，避免影響旅客端（前台）版型。
   內含 CSP 安全的固定級距 class（.lv0~.lv10 長條高度、.pw0~.pw10 比例寬度），
   動態數值請先換算成級距 class 再套用，勿使用行內 style。
   品牌橘 #ca4f0f 為唯一強調色，結構採中性灰。
   ========================================================================== */

.admin-page {
  --brand: #ca4f0f;
  --brand-hover: #a93f09;
  --brand-soft: #fdf1ea;
  --bg: #eef1f5;
  --panel: #fff;
  --ink: #1f2933;
  --ink-soft: #52606d;
  --ink-mute: #9aa5b1;
  --line: #e4e7eb;
  --line2: #f0f2f5;
  --ok: #0f7b46;
  --ok-bg: #e5f6ec;
  --warn: #b45309;
  --warn-bg: #fdf3e3;
  --info: #2b5fb5;
  --info-bg: #eaf1fc;
  --draft: #6b7280;
  --draft-bg: #f0f1f3;

  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.admin-page *,
.admin-page *::before,
.admin-page *::after { box-sizing: border-box; }
.admin-page h1,
.admin-page h2,
.admin-page h3 { margin: 0; font-weight: 600; }
.admin-page button { font-family: inherit; cursor: pointer; }
.admin-page a { color: var(--brand); text-decoration: none; }

/* 版面骨架 */
.admin-page .app { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: 100vh; }

/* 緊湊側欄 */
.admin-page .rail { background: #20272e; color: #c9d1d9; display: flex; flex-direction: column; padding: 12px 0; position: sticky; top: 0; height: 100vh; }
.admin-page .rail .logo { width: 42px; height: 42px; margin: 0 auto 16px; border-radius: 11px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.admin-page .rail a,
.admin-page .rail button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 2px; font-size: 10px; color: #8b949e; transition: .15s; text-align: center; border: none; background: none; width: 100%; }
.admin-page .rail a i,
.admin-page .rail button i { font-size: 17px; }
.admin-page .rail a:hover,
.admin-page .rail button:hover { color: #fff; }
.admin-page .rail a.active,
.admin-page .rail button.active { color: #fff; }
.admin-page .rail a.active::before,
.admin-page .rail button.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.admin-page .rail a.active i,
.admin-page .rail button.active i { color: #f5a552; }
.admin-page .rail .sep { height: 1px; background: #333b44; margin: 8px 14px; }
.admin-page .rail .bottom { margin-top: auto; }

/* 內容區與工具列 */
.admin-page .content { min-width: 0; display: flex; flex-direction: column; }
.admin-page .utilbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.admin-page .utilbar .crumb { font-size: 13px; color: var(--ink-mute); }
.admin-page .utilbar .crumb b { color: var(--ink); font-size: 16px; font-weight: 600; }
.admin-page .utilbar .spacer,
.admin-page .tbar .spacer { flex: 1; }
.admin-page .utilbar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.admin-page .utilbar .who i { color: var(--brand); }
.admin-page .utilbar .logout { border: none; background: var(--brand); color: #fff; border-radius: 8px; padding: 8px 14px; font-size: 13px; }
.admin-page .utilbar .logout:hover { background: var(--brand-hover); }

.admin-page .body { padding: 22px 24px; }
.admin-page .page { display: none; }
.admin-page .page.show { display: block; }

/* KPI 磚 */
.admin-page .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.admin-page .tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.admin-page .tile .top { display: flex; align-items: center; justify-content: space-between; }
.admin-page .tile .lbl { font-size: 13px; color: var(--ink-mute); }
.admin-page .tile .ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--brand-soft); color: var(--brand); }
.admin-page .tile .num { font-size: 30px; font-weight: 700; margin-top: 8px; letter-spacing: -.5px; }
.admin-page .tile .num .unit { color: var(--warn); font-size: 16px; }
.admin-page .tile .trend { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.admin-page .tile.warn { border-color: #f0cfa0; background: linear-gradient(180deg, #fffaf3, #fff); }
.admin-page .tile.warn .ic { background: #fbe7cd; color: var(--warn); }
.admin-page .tile.warn .trend { color: var(--warn); font-weight: 600; }
.admin-page .tile .ratio { height: 6px; border-radius: 3px; background: #f0e2d3; margin-top: 10px; overflow: hidden; }
.admin-page .tile .ratio span { display: block; height: 100%; background: var(--warn); }

/* CSP 安全級距：比例條寬度與長條圖高度以固定 class 表示，動態值先換算再套用 */
.admin-page .lv0 { height: 2%; }
.admin-page .lv1 { height: 10%; }
.admin-page .lv2 { height: 20%; }
.admin-page .lv3 { height: 30%; }
.admin-page .lv4 { height: 40%; }
.admin-page .lv5 { height: 50%; }
.admin-page .lv6 { height: 60%; }
.admin-page .lv7 { height: 70%; }
.admin-page .lv8 { height: 80%; }
.admin-page .lv9 { height: 90%; }
.admin-page .lv10 { height: 100%; }
.admin-page .ratio .pw0 { width: 0%; }
.admin-page .ratio .pw1 { width: 10%; }
.admin-page .ratio .pw2 { width: 20%; }
.admin-page .ratio .pw3 { width: 30%; }
.admin-page .ratio .pw4 { width: 40%; }
.admin-page .ratio .pw5 { width: 50%; }
.admin-page .ratio .pw6 { width: 60%; }
.admin-page .ratio .pw7 { width: 70%; }
.admin-page .ratio .pw8 { width: 80%; }
.admin-page .ratio .pw9 { width: 90%; }
.admin-page .ratio .pw10 { width: 100%; }

/* 面板與圖表 */
.admin-page .grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.admin-page .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.admin-page .panel .ph { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line2); font-size: 15px; font-weight: 600; }
.admin-page .panel .ph i { color: var(--brand); }
.admin-page .panel .ph .tag { margin-left: auto; font-size: 12px; color: var(--ink-mute); font-weight: 400; }
.admin-page .panel .pb { padding: 16px 18px; }

.admin-page .bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; }
.admin-page .bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.admin-page .bcol .v { font-size: 12px; font-weight: 700; color: var(--brand); }
.admin-page .bcol .b { width: 100%; max-width: 34px; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 3px; opacity: .85; }
.admin-page .bcol .b.is-latest { opacity: 1; }
.admin-page .bcol .d { font-size: 11px; color: var(--ink-mute); }

.admin-page .mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.admin-page .mini-row:last-child { border: none; }
.admin-page .mini-row .mid { font-size: 12px; color: var(--ink-mute); width: 44px; }
.admin-page .mini-row .mnm { flex: 1; font-size: 14px; }
.admin-page .mini-row a,
.admin-page .mini-row button { font-size: 12px; color: var(--brand); border: 1px solid var(--brand); border-radius: 7px; padding: 4px 10px; background: #fff; }
.admin-page .mini-row a:hover,
.admin-page .mini-row button:hover { background: var(--brand-soft); }
.admin-page .panel-more { text-align: center; margin-top: 10px; }
.admin-page .panel-more button { font-size: 13px; color: var(--brand); border: none; background: none; }

/* 工具列與資料表 */
.admin-page .tbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.admin-page .inp { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-width: 240px; }
.admin-page .inp input { border: none; outline: none; font-size: 14px; font-family: inherit; flex: 1; background: none; }
.admin-page .inp i { color: var(--ink-mute); }
.admin-page .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.admin-page .seg button { border: none; background: none; padding: 8px 14px; font-size: 13px; color: var(--ink-soft); }
.admin-page .seg button.on { background: var(--brand); color: #fff; }

.admin-page .btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 500; border: 1px solid var(--brand); }
.admin-page .btn:disabled { opacity: .55; cursor: not-allowed; }
.admin-page .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-page .btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.admin-page .btn.ghost { background: var(--panel); color: var(--brand); }
.admin-page .btn.ghost:hover:not(:disabled) { background: var(--brand-soft); }
.admin-page .btn.sm { padding: 6px 12px; font-size: 13px; }
/* 破壞性操作採與已下架標籤同一組紅色，讓「不可由畫面還原」的動作在視覺上與一般操作明確分開。 */
.admin-page .btn.danger { background: #b3261e; color: #fff; border-color: #b3261e; }
.admin-page .btn.danger:hover:not(:disabled) { background: #8f1e18; border-color: #8f1e18; }

.admin-page table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
/* 後台表格的表頭不採黏性定位。表格本身設有 overflow: hidden（配合圓角裁切），會成為 sticky 的捲動容器；
   此時表頭不會隨頁面捲動固定，只會依 top 值在表格內往下位移並蓋住第一列，
   造成第一筆資料在開發者工具中座標與內容都正確、畫面上卻完全看不到（例如高鐵查詢的比對表與乘客表少一列）。 */
.admin-page thead th { background: #f7f8fa; text-align: left; font-size: 12px; color: var(--ink-mute); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line); letter-spacing: .3px; }
.admin-page tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line2); font-size: 14px; vertical-align: middle; }
.admin-page tbody tr:hover { background: #fafbfc; }
.admin-page tbody tr:last-child td { border-bottom: none; }
.admin-page .cell-right { text-align: right; }
/* 公告清單的欄寬；切版以行內 style 指定，後台內容安全政策不允許行內樣式，改以同值的類別套用。 */
.admin-page .cell-pin { width: 44px; text-align: center; }
.admin-page .cell-date { width: 120px; }
.admin-page .cell-state { width: 110px; }
.admin-page .cell-act { width: 110px; }
.admin-page .mname { font-weight: 600; color: var(--ink); }
.admin-page .msub { font-size: 12px; color: var(--ink-mute); }
/* 狀態標籤是圓角膠囊，文字折行會讓膠囊變形且難以辨識，一律不換行；欄位不夠寬時由表格自行加寬。 */
.admin-page .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.admin-page .chip.ok,
.admin-page .chip.pub { background: var(--ok-bg); color: var(--ok); }
.admin-page .chip.no { background: var(--warn-bg); color: var(--warn); }
.admin-page .chip.draft { background: var(--draft-bg); color: var(--draft); }
.admin-page .chip.off { background: #fdeaea; color: #b3261e; }
.admin-page .pin { color: var(--brand); }
.admin-page .rowact { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 12px; font-size: 13px; color: var(--ink-soft); }
.admin-page .rowact:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.admin-page .rowact:disabled { opacity: .55; cursor: not-allowed; }
.admin-page .rowact.danger { color: #b3261e; }
.admin-page .rowact.danger:hover:not(:disabled) { border-color: #b3261e; color: #b3261e; background: #fdeaea; }
/* 公告清單的操作欄有編輯、發布、複製、刪除四個按鈕，沿用其他清單的 110px 會把按鈕擠成多行且無間距，
   因此單獨放寬並補上按鈕間距；仍允許換行，視窗變窄時按鈕不會被裁掉。 */
.admin-page .notice-table .cell-act { width: 300px; }
.admin-page .notice-table .cell-act .rowact { margin: 2px 0 2px 6px; }

/* Modal */
.admin-page .mback { position: fixed; inset: 0; background: rgba(15, 20, 26, .5); display: none; z-index: 200; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow: auto; }
.admin-page .mback.show { display: flex; }
.admin-page .modal { background: #fff; border-radius: 14px; width: min(100%, 620px); overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.admin-page .modal.wide { width: min(100%, 860px); }
.admin-page .modal header { display: flex; align-items: center; gap: 8px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.admin-page .modal header i { color: var(--brand); }
.admin-page .modal header h2 { font-size: 17px; }
.admin-page .modal header .x { margin-left: auto; border: none; background: none; font-size: 22px; color: #98a2b3; }
.admin-page .modal .mb { padding: 20px 22px; max-height: calc(100vh - 220px); overflow: auto; }
.admin-page .modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfc; }

/* 表單 */
.admin-page .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.admin-page .fg { display: flex; flex-direction: column; gap: 6px; }
.admin-page .fg.full { grid-column: 1 / -1; }
.admin-page .fg label { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.admin-page .fg label .req { color: #b3261e; }
.admin-page .fg input,
.admin-page .fg select,
.admin-page .fg textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; background: #fff; }
.admin-page .fg input:focus,
.admin-page .fg select:focus,
.admin-page .fg textarea:focus { outline: none; border-color: var(--brand); }
.admin-page .fg input[readonly] { background: #f4f5f7; color: var(--ink-soft); }
.admin-page .fg .hint { font-size: 12px; color: var(--ink-mute); }
.admin-page .fg .fg-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-page .fg .fg-list-head .rowact { flex: none; }
.admin-page .fg .fg-list-row { display: flex; align-items: center; gap: 8px; }
.admin-page .fg .fg-list-row input { flex: 1 1 auto; width: auto; min-width: 0; }
.admin-page .fg .fg-list-row .rowact { flex: none; min-width: 44px; text-align: center; padding: 8px 10px; display: inline-flex; align-items: center; justify-content: center; }
.admin-page .rowact.mini { min-width: 44px; padding: 8px 10px; text-align: center; }
.admin-page .sec-title { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); display: flex; align-items: center; gap: 8px; }
.admin-page .sec-title:first-child { margin-top: 0; }
.admin-page .sec-title i { color: var(--brand); }
.admin-page .switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.admin-page .switch .track { width: 42px; height: 24px; border-radius: 999px; background: #cbd2d9; position: relative; transition: .2s; }
.admin-page .switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.admin-page .switch.on .track { background: var(--brand); }
.admin-page .switch.on .track::after { transform: translateX(18px); }
.admin-page .est { display: flex; gap: 9px; align-items: flex-start; border-radius: 9px; padding: 12px 14px; font-size: 13px; margin-top: 12px; }
.admin-page .est.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0cfa0; }
.admin-page .est.mute { background: #f4f5f7; color: var(--ink-soft); border: 1px dashed #cbd2d9; }

/* 自動翻譯標記與按鈕 */
.admin-page .auto-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--info-bg); color: var(--info); }
.admin-page .btn-translate { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--brand); color: var(--brand); border-radius: 8px; padding: 7px 12px; font-size: 13px; }
.admin-page .btn-translate:hover { box-shadow: 0 0 0 3px var(--brand-soft); }

/* 語系頁籤編輯器（一次編輯一種語言） */
.admin-page .langtabs { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-page .langtabs .lt-head { display: flex; align-items: center; gap: 2px; background: #f7f8fa; border-bottom: 1px solid var(--line); padding: 6px 8px; }
.admin-page .langtabs .lt-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 9px 16px; font-size: 14px; color: var(--ink-soft); border-radius: 8px 8px 0 0; font-weight: 500; }
.admin-page .langtabs .lt-tab:hover { color: var(--brand); }
.admin-page .langtabs .lt-tab.on { color: var(--brand); background: #fff; box-shadow: inset 0 -2px 0 var(--brand); }
.admin-page .langtabs .lt-tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.admin-page .langtabs .lt-head .spacer { flex: 1; }
.admin-page .langtabs .lt-body { padding: 14px 16px; background: #fff; }
.admin-page .langtabs .lt-pane { display: none; }
.admin-page .langtabs .lt-pane.on { display: block; }
.admin-page .langtabs .lt-pane .auto-tag { margin-bottom: 8px; }
.admin-page .langtabs .lt-pane input.title { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; margin-bottom: 8px; }
.admin-page .langtabs .lt-pane textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: inherit; font-size: 14px; min-height: 96px; resize: vertical; outline: none; }
.admin-page .langtabs .lt-pane input.title:focus,
.admin-page .langtabs .lt-pane textarea:focus { outline: none; border-color: var(--brand); }

/* 文案分類 */
.admin-page .cat-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.admin-page .cat-chip { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 7px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.admin-page .cat-chip .n { background: #eef1f5; color: var(--ink-mute); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.admin-page .cat-chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-page .cat-chip.on .n { background: rgba(255, 255, 255, .25); color: #fff; }
.admin-page .cat-group .cat-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin: 16px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line2); }
.admin-page .cat-group .cat-title i { color: var(--brand); }
.admin-page .cat-group:first-child .cat-title { margin-top: 0; }

/* 介面文案清單 */
.admin-page .copy-item { display: grid; grid-template-columns: 220px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.admin-page .copy-item:last-child { border: none; }
.admin-page .copy-item .keyname { font-family: 'Consolas', monospace; font-size: 13px; color: var(--ink); }
.admin-page .copy-item .keydesc { font-size: 12px; color: var(--ink-mute); }
.admin-page .copy-item .preview { font-size: 14px; color: var(--ink-soft); }

/* 發布資訊列 */
.admin-page .publine { display: flex; gap: 26px; flex-wrap: wrap; }
.admin-page .publine .p .k { font-size: 12px; color: var(--ink-mute); }
.admin-page .publine .p .v { font-size: 22px; font-weight: 700; }
.admin-page .publine .p .v.small { font-size: 15px; color: var(--ink-soft); }

@media (max-width: 1000px) {
  .admin-page .tiles { grid-template-columns: repeat(2, 1fr); }
  .admin-page .grid2,
  .admin-page .form-grid,
  .admin-page .copy-item { grid-template-columns: 1fr; }
}

/* 訂票規則的旅客端呈現預覽；標題採品牌橘，與旅客端 rules-section-title 一致。 */
.admin-page .rule-preview {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.admin-page .rule-preview-section + .rule-preview-section {
  margin-top: 14px;
}

.admin-page .rule-preview-title {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 15px;
  font-weight: 700;
}

.admin-page .rule-preview ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.admin-page .rule-preview li + li {
  margin-top: 4px;
}

/* 規則中以 {red}…{/red} 標示的紅字；後台未載入旅客端 index.css，顏色與字重照旅客端切板的 .highlight。 */
.admin-page .rule-preview .highlight {
  color: #ff4b4b;
  font-weight: 700;
}

/* 規則中以 {link}…{/link} 標示的連結；顏色照旅客端切板全站 a 的樣式，尚無網址（不帶 href）時同樣顯示為連結色。 */
.admin-page .rule-preview a {
  color: #ca4f0f;
  text-decoration: none;
}

.admin-page .rule-preview a[href]:hover {
  color: #f5a552;
}

/* 共用強制回應視窗元件輸出 .admin-modal 作為外層，對應切版的 .mback；
   內層沿用切版的 .modal 結構，因此只補兩者的定位關係，不重寫切版樣式。 */
.admin-page .admin-modal {
  position: fixed;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow: auto;
  inset: 0;
}

.admin-page .admin-modal__backdrop {
  position: fixed;
  z-index: 0;
  background: rgba(15, 20, 26, 0.5);
  inset: 0;
}

/* 旅客端另有一組同名的 .modal（本檔前段），其 position:fixed 與 display:flex 會讓
   後台切版的 modal 三段（header／.mb／footer）變成橫向排列並脫離面板；
   後台這裡必須明確覆寫這些宣告，切版的版面才會成立。 */
.admin-page .modal {
  position: relative;
  z-index: 1;
  display: block;
  padding: 0;
  inset: auto;
}