:root {
  --teal-900: #134e4a;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-100: #ccfbf1;
  --teal-50: #f0fdfa;
  --ink: #17202a;
  --muted: #667085;
  --line: #d8e0e7;
  --surface: #ffffff;
  --background: #f4f7f8;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --shadow: 0 18px 45px rgba(15, 76, 72, 0.09);
  font-family: Inter, 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(13, 148, 136, 0.1), transparent 34rem),
    var(--background);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--teal-700);
}

[hidden] {
  display: none !important;
}

.container,
.wide-container,
.narrow-container {
  width: min(100% - 32px, 880px);
  margin-inline: auto;
}

.wide-container {
  width: min(100% - 40px, 1240px);
}

.narrow-container {
  width: min(100% - 32px, 460px);
}

.site-header,
.admin-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-inner h1 {
  margin: 3px 0 0;
  font-size: clamp(1.2rem, 4vw, 1.65rem);
}

.eyebrow {
  margin: 0;
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-badge {
  padding: 8px 13px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  color: var(--teal-900);
  background: var(--teal-50);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.page-main {
  padding-block: 34px 64px;
}

.intro-card,
.form-card,
.detail-card,
.notice-card,
.case-hero,
.admin-hero,
.action-toolbar,
.loading-card,
.success-card,
.login-card {
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-card {
  padding: 28px;
  margin-bottom: 20px;
}

.intro-card h2,
.success-card h2,
.login-card h1 {
  margin: 8px 0;
  font-size: clamp(1.6rem, 5vw, 2.25rem);
}

.muted,
.intro-card p,
.card-heading p,
.form-note {
  color: var(--muted);
}

.form-card {
  padding: clamp(22px, 5vw, 38px);
}

.form-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 30px;
}

.form-progress span {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.form-progress span[aria-current='step'] {
  color: white;
  background: var(--teal-700);
}

.form-step {
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-heading > span {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.section-divider {
  margin-top: 38px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

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

.field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

.field b {
  color: var(--danger);
}

.field small {
  min-height: 1.5em;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd5df;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: white;
  font-weight: 400;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.field input,
.field select {
  height: 48px;
  padding: 0 13px;
}

.field textarea {
  resize: vertical;
  min-height: 136px;
  padding: 13px;
  line-height: 1.6;
}

.field-block {
  margin-top: 22px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfc;
  font-weight: 700;
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal-700);
}

.choice-field {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-field legend {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 10px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: normal;
}

.choice-field legend b {
  color: var(--danger);
}

.choice-field label {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfc;
  cursor: pointer;
  font-weight: 650;
}

.choice-field label + label {
  margin-top: 10px;
}

.choice-field label:has(input:checked) {
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.choice-field input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal-700);
}

.product-choice-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.product-choice-field legend {
  margin-bottom: 14px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

.product-choice-field legend b {
  color: var(--danger);
}

.product-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-choice {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcfc;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.product-choice:has(input:checked) {
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.product-choice input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal-700);
}

.field-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
}

.nested-fields {
  margin-top: 18px;
  padding: 20px;
  border-radius: 16px;
  background: var(--teal-50);
}

.step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.step-actions-split {
  justify-content: space-between;
}

.faq-grid {
  display: grid;
  gap: 22px;
}

.faq-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.faq-card figcaption {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  font-weight: 750;
}

.faq-card img {
  display: block;
  width: 100%;
  height: auto;
}

.submit-reminder {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #99f6e4;
  border-radius: 14px;
  color: var(--teal-900);
  background: var(--teal-50);
  line-height: 1.6;
}

.submit-reminder-top {
  margin-top: 0;
  margin-bottom: 36px;
}

.submit-reminder strong {
  font-size: 1.05rem;
}

.submit-reminder p {
  margin: 8px 0 0;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.form-note {
  max-width: 520px;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 750;
  transition:
    transform 0.12s,
    background 0.12s,
    border-color 0.12s;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.button-primary {
  color: white;
  background: var(--teal-700);
}

.button-primary:hover {
  background: var(--teal-900);
}

.button-secondary,
.status-action {
  border-color: #b8c8cc;
  color: var(--teal-900);
  background: white;
}

.button-danger {
  border-color: #fda29b;
  color: var(--danger);
  background: var(--danger-soft);
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.button-small {
  min-height: 36px;
  padding: 7px 13px;
}

.button-full {
  width: 100%;
  margin-top: 18px;
}

.button-row,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-actions {
  margin-top: 20px;
  justify-content: flex-end;
}

.alert {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.55;
}

.alert-error {
  border: 1px solid #fda29b;
  color: #912018;
  background: var(--danger-soft);
}

.alert-warning {
  border: 1px solid #fedf89;
  color: #93370d;
  background: #fffaeb;
}

.line-push-warning {
  margin-top: -4px;
  margin-bottom: 20px;
  font-weight: 700;
}

.success-card {
  padding: 42px 28px;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-700);
  font-size: 1.6rem;
  font-weight: 900;
}

.success-card .button-row {
  margin-top: 24px;
  justify-content: center;
}

.case-number-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.case-number {
  display: block;
  color: var(--teal-900);
  font-size: clamp(1.6rem, 7vw, 2.3rem);
  letter-spacing: 0.04em;
}

.case-hero,
.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  margin-bottom: 20px;
}

.case-hero h2,
.admin-hero h2 {
  margin: 6px 0;
  font-size: clamp(1.7rem, 6vw, 2.5rem);
}

.status-badge {
  display: inline-flex;
  min-width: 82px;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  color: #175cd3;
  background: #eff8ff;
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge[data-status='contacted'] {
  color: #854a0e;
  background: #fffaeb;
}

.status-badge[data-status='scheduled'] {
  color: #6941c6;
  background: #f4f3ff;
}

.status-badge[data-status='completed'] {
  color: #067647;
  background: #ecfdf3;
}

.status-badge[data-status='cancelled'] {
  color: #b42318;
  background: #fef3f2;
}

.detail-card,
.notice-card {
  padding: 26px 28px;
  margin-bottom: 20px;
}

.card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.card-heading h2,
.notice-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.card-heading p,
.notice-card p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}

.detail-grid > div {
  min-width: 0;
  padding: 15px;
  background: white;
}

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

.detail-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.55;
}

.notice-card {
  border-color: #99f6e4;
  background: var(--teal-50);
}

.loading-card {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.admin-header {
  color: white;
  background: var(--teal-900);
  border-bottom: 0;
}

.admin-header-title {
  min-width: 0;
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-list-main {
  display: grid;
  gap: 20px;
}

.admin-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.admin-list-heading h2 {
  margin: 6px 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.admin-list-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 14px;
}

.stat-card {
  display: grid;
  gap: 9px;
  width: 100%;
  min-height: 112px;
  align-content: center;
  padding: 19px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 17px;
  color: inherit;
  background: white;
  box-shadow: var(--shadow);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.stat-card:hover {
  border-color: rgba(15, 118, 110, 0.42);
  transform: translateY(-1px);
}

.stat-card:focus-visible {
  outline: 3px solid rgba(20, 184, 166, 0.3);
  outline-offset: 3px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.stat-card strong {
  color: var(--teal-900);
  font-size: 2rem;
}

.stat-card[aria-pressed='true'] {
  color: white;
  background: var(--teal-700);
}

.stat-card[aria-pressed='true'] span,
.stat-card[aria-pressed='true'] strong {
  color: white;
}

.admin-filter-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 15px;
  padding: 20px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.filter-search {
  grid-column: span 2;
}

.date-filter-group {
  display: grid;
  grid-column: span 3;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 15px;
}

.date-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: end;
  gap: 8px;
  min-height: 48px;
}

.date-shortcut-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-900);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.date-shortcut-button:hover,
.date-shortcut-button:focus-visible {
  border-color: var(--teal-600);
  background: white;
}

.date-shortcut-button[aria-pressed='true'] {
  border-color: var(--teal-700);
  background: var(--teal-700);
  color: white;
}

.sort-filter-group {
  display: grid;
  align-self: start;
  grid-column: span 1;
  gap: 8px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
}

.sort-dropdown {
  position: relative;
}

.sort-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid #cbd5df;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.sort-select-button:hover,
.sort-select-button:focus-visible,
.sort-select-button[aria-expanded='true'] {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.sort-select-meta {
  display: inline-flex;
  align-items: center;
  color: var(--teal-700);
  font-weight: 800;
  gap: 10px;
}

.sort-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.sort-menu[hidden] {
  display: none;
}

.sort-option-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 6px;
  white-space: nowrap;
}

.sort-option-button:hover,
.sort-option-button:focus-visible {
  background: var(--teal-50);
}

.sort-option-button[aria-checked='true'] {
  background: var(--teal-700);
  color: white;
}

.sort-direction {
  min-width: 1em;
  text-align: center;
}

.filter-actions {
  display: flex;
  align-items: center;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
}

.filter-export-help {
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.admin-table-card {
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
}

.table-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.table-card-heading h3 {
  margin: 0;
  font-size: 1.1rem;
}

.table-card-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.table-loading {
  margin: 20px;
  box-shadow: none;
}

.table-scroll {
  overflow: visible;
}

.admin-case-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.case-col-summary {
  width: 12%;
}

.case-col-time {
  width: 12%;
}

.case-col-contact {
  width: 15%;
}

.case-col-location {
  width: 17%;
}

.case-col-repair {
  width: 22%;
}

.case-col-third-party {
  width: 10%;
}

.case-col-actions {
  width: 12%;
}

.admin-case-table th,
.admin-case-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #e7ecef;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.admin-case-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #475467;
  background: #f8fafb;
  font-size: 0.77rem;
  letter-spacing: 0.02em;
}

.admin-case-table tbody tr:hover {
  background: #f8fffd;
}

.case-table-link {
  color: var(--teal-700);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.case-table-link:hover {
  text-decoration: underline;
}

.case-actions-cell {
  min-width: 0;
}

.case-summary-cell,
.case-cell-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.case-summary-cell {
  justify-items: start;
}

.line-push-failed-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #b42318;
  background: #fef3f2;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.case-cell-detail {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.case-cell-detail-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.case-cell-detail-value {
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.case-cell-detail-multiline {
  white-space: pre-wrap;
}

.case-row-actions,
.quick-status-control {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-status-control {
  margin-top: 8px;
}

.quick-status-control select {
  width: 100%;
  max-width: 100%;
  min-height: 36px;
  border: 1px solid #b8c8cc;
  border-radius: 9px;
  color: var(--ink);
  background: white;
}

.quick-status-control select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.case-row-actions .button {
  flex: 1 1 auto;
}

.admin-empty-state {
  padding: 54px 20px;
  text-align: center;
}

.admin-empty-state strong {
  font-size: 1.05rem;
}

.admin-empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.pagination-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid #b8c8cc;
  border-radius: 10px;
  color: var(--teal-900);
  background: white;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}

.pagination-link.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination-summary {
  color: var(--muted);
  font-size: 0.86rem;
}

.action-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 17px;
  margin-bottom: 20px;
}

.clone-case-form {
  display: grid;
  gap: 22px;
}

.clone-case-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 20px;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 22px 22px;
  border-left: 2px solid #ccfbf1;
}

.timeline li::before {
  position: absolute;
  top: 3px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-600);
  content: '';
}

.timeline p {
  margin: 5px 0;
  color: #475467;
  line-height: 1.5;
}

.timeline time,
.related-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.related-grid h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.related-list {
  display: grid;
  gap: 9px;
}

.related-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.related-item:hover {
  border-color: var(--teal-600);
  background: var(--teal-50);
}

.related-item span {
  color: #475467;
  font-size: 0.84rem;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.login-card {
  padding: 30px;
  margin-top: 8vh;
}

.entry-card {
  margin-top: 12vh;
}

.entry-card h1 {
  margin: 8px 0;
}

.login-card > p {
  color: var(--muted);
  line-height: 1.6;
}

.print-page {
  background: #dce2e5;
}

.print-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px;
  color: #344054;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 20px rgba(16, 24, 40, 0.1);
  backdrop-filter: blur(10px);
}

.print-back-link {
  min-width: 132px;
}

.print-error {
  width: min(100% - 30px, 780px);
  margin: 20px auto;
}

.a4-sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto;
  padding: 12.7mm;
  color: #111;
  background: white;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.18);
}

.template-image-sheet {
  position: relative;
  min-height: 0;
  height: 297mm;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.template-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.template-field {
  position: absolute;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  color: #000;
  background: #fff;
  font-family: 'DFKai-SB', '標楷體', 'Microsoft JhengHei', sans-serif;
  font-size: 10.5pt;
  line-height: 1.25;
  white-space: pre-wrap;
}

.template-field-date {
  top: 1.2%;
  left: 59.6%;
  width: 39.6%;
  height: 4.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16.5pt;
  letter-spacing: 0.04em;
}

.template-field-case-no {
  top: 8.05%;
  left: 37.2%;
  width: 15.8%;
  height: 2.5%;
  padding-top: 0.15%;
  border-bottom: 1px solid #000;
  font-family: 'Microsoft JhengHei', Arial, sans-serif;
  font-size: 9.5pt;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.template-field-project,
.template-field-customer,
.template-field-mobile,
.template-field-landline,
.template-field-address,
.template-field-second-name,
.template-field-second-mobile {
  padding: 0.1% 0.8%;
  font-size: 10pt;
  line-height: 1.25;
}

.template-field-project {
  top: 14.25%;
  left: 12.7%;
  width: 34%;
  height: 2.25%;
}

.template-field-customer {
  top: 14.25%;
  left: 60.2%;
  width: 35.5%;
  height: 2.25%;
}

.template-field-mobile {
  top: 17%;
  left: 12.7%;
  width: 34%;
  height: 2.05%;
}

.template-field-landline {
  top: 17%;
  left: 60.2%;
  width: 35.5%;
  height: 2.05%;
}

.template-field-address {
  top: 19.7%;
  left: 12.7%;
  width: 83%;
  height: 2.05%;
}

.template-field-second-name {
  top: 23%;
  left: 12.7%;
  width: 34%;
  height: 2.05%;
}

.template-field-second-mobile {
  top: 23%;
  left: 60.2%;
  width: 35.5%;
  height: 2.05%;
}

.template-field-product,
.template-field-issue {
  left: 0.9%;
  width: 96.5%;
  padding-inline: 0.4%;
  font-size: 10.5pt;
  line-height: 1.35;
}

.template-field-product {
  top: 29.95%;
  height: 4%;
}

.template-field-issue {
  top: 33.75%;
  height: 3.8%;
}

.service-sheet {
  font-family: 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  font-size: 12pt;
  line-height: 1.15;
}

.service-sheet section,
.service-sheet table {
  break-inside: avoid;
}

.service-form-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 0.5pt solid #111;
  font-size: 12pt;
}

.service-form-table .template-col-1 {
  width: 12.16%;
}

.service-form-table .template-col-2 {
  width: 12.84%;
}

.service-form-table .template-col-3 {
  width: 22.41%;
}

.service-form-table .template-col-4 {
  width: 1.35%;
}

.service-form-table .template-col-5 {
  width: 10.84%;
}

.service-form-table .template-col-6 {
  width: 15.4%;
}

.service-form-table .template-col-7 {
  width: 25%;
}

.service-form-table th,
.service-form-table td {
  padding: 0.7mm 1.75mm;
  border: 0.5pt solid #111;
  font-weight: 400;
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.template-top-row {
  height: 12.45mm;
}

.template-top-row > * {
  border-top: 0 !important;
  border-bottom: 3pt solid #111 !important;
}

.template-logo-cell {
  padding: 0 2mm 1mm 6mm !important;
  border-right: 0 !important;
  text-align: left;
  vertical-align: bottom !important;
}

.template-logo-cell img {
  display: block;
  width: 30.16mm;
  max-height: 13.12mm;
  object-fit: contain;
  object-position: left bottom;
}

.template-arrival-cell {
  padding: 0 2mm 1.5mm !important;
  border-left: 0 !important;
  border-right: 0 !important;
  vertical-align: bottom !important;
  font-size: 9pt;
  line-height: 1.15;
}

.template-arrival-cell div {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.template-line {
  display: inline-block;
  width: 12mm;
  height: 4mm;
  margin-inline: 1mm;
  border-bottom: 0.5pt solid #111;
}

.template-date-cell {
  font-size: 20pt;
  white-space: nowrap;
}

.template-date-cell strong {
  display: inline-block;
  min-width: 34mm;
  margin-left: 2mm;
  font-size: 15pt;
  font-weight: 400;
  text-align: right;
}

.template-heading-row {
  height: 22mm;
}

.template-heading-row > * {
  border-top: 3pt solid #111 !important;
  border-bottom: 3pt solid #111 !important;
}

.template-form-name {
  border-left: 3pt solid #111 !important;
  border-right: 3pt solid #111 !important;
  font-size: 36pt;
  font-weight: 900 !important;
  letter-spacing: 0.03em;
  text-align: center;
}

.template-case-number {
  font-size: 22pt;
  text-decoration: underline;
  text-underline-offset: 1mm;
  white-space: nowrap;
}

.template-case-number strong {
  margin-left: 1mm;
  font-size: 11pt;
  font-weight: 700;
}

.template-company-cell {
  border-right: 3pt solid #111 !important;
  padding: 1.5mm 2mm !important;
}

.template-company-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21mm;
  align-items: center;
  gap: 1.5mm;
}

.template-company-layout > div {
  display: grid;
  gap: 0.5mm;
  min-width: 0;
}

.template-company-layout strong {
  font-size: 12pt;
}

.template-company-layout span {
  font-size: 9pt;
  line-height: 1.15;
  white-space: nowrap;
}

.template-company-layout .template-line-id {
  font-family: Georgia, serif;
  font-size: 12pt;
  font-weight: 700;
}

.template-company-layout img {
  display: block;
  width: 18.31mm;
  height: 18.31mm;
  object-fit: contain;
}

.template-label {
  text-align: center;
  line-height: 1.1;
}

.template-small-label,
.template-small-text {
  font-size: 10pt;
}

.template-row-project {
  height: 7.78mm;
}

.template-row-project > * {
  border-top: 3pt solid #111 !important;
}

.template-row-phone {
  height: 6.56mm;
}

.template-row-address {
  height: 7.94mm;
}

.template-row-second-contact {
  height: 6.77mm;
}

.template-row-warranty {
  height: 6.09mm;
}

.template-title-row {
  height: 5.4mm;
}

.template-title-row th {
  padding: 0.5mm 1.75mm;
  text-align: center;
}

.template-problem-row {
  height: 41.84mm;
}

.template-problem-row td,
.template-disposition-row td {
  vertical-align: top !important;
}

.template-problem-row p {
  display: flex;
  gap: 1mm;
  margin: 0 0 1mm;
  line-height: 1.45;
}

.template-problem-row b {
  flex: 0 0 auto;
  font-weight: 400;
}

.template-problem-row span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.template-disposition-row {
  height: 75.26mm;
}

.template-terms-row {
  height: 14.31mm;
}

.template-terms-row td {
  padding: 1.5mm 1.75mm;
  font-size: 10pt;
  line-height: 1.15;
}

.template-terms-row p {
  margin: 0;
}

.template-invoice-row {
  height: 6.37mm;
}

.template-invoice-address-row {
  height: 8.01mm;
}

.template-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
  white-space: nowrap;
}

.template-inline-line {
  display: inline-block;
  height: 4mm;
  border-bottom: 0.5pt solid #111;
}

.template-title-line {
  width: 55mm;
}

.template-tax-line {
  width: 20mm;
}

.template-address-line {
  width: 63mm;
}

.template-payment-row {
  height: 7mm;
}

.template-payment-row th {
  border-right: 1.5pt solid #111 !important;
  border-bottom: 0.5pt solid #111 !important;
  font-weight: 700 !important;
  text-align: left;
}

.template-payment-row td {
  border-left: 1.5pt solid #111 !important;
  border-right: 2.25pt solid #111 !important;
  white-space: nowrap;
}

.template-signature-label-row {
  height: 11.95mm;
}

.template-signature-space-row {
  height: 19.05mm;
}

.template-signature-label-row th {
  padding: 1.5mm;
  text-align: center;
}

.template-signature-label-row strong {
  display: block;
  font-size: 12pt;
  font-weight: 700;
}

.template-signature-label-row span {
  display: block;
  margin-top: 0.5mm;
  font-size: 10pt;
}

.template-signature-col-1,
.template-signature-col-4 {
  border: 3pt solid #111 !important;
}

.template-signature-col-2 {
  border-left: 3pt solid #111 !important;
  border-right: 1.5pt solid #111 !important;
}

.template-signature-col-3 {
  border-left: 1.5pt solid #111 !important;
  border-right: 3pt solid #111 !important;
}

.template-signature-space-row .template-signature-col-2,
.template-signature-space-row .template-signature-col-3 {
  border-bottom: 2.25pt solid #111 !important;
}

.service-top {
  display: grid;
  grid-template-columns: 25% 34.6% 40.4%;
  min-height: 18mm;
  align-items: end;
  border-bottom: 3pt solid #111;
}

.service-logo-wrap {
  display: flex;
  align-items: end;
  min-height: 18mm;
  padding: 0 2mm 1mm 6mm;
}

.service-logo-wrap img {
  display: block;
  width: 37mm;
  max-height: 17mm;
  object-fit: contain;
  object-position: left bottom;
}

.arrival-times {
  display: grid;
  gap: 0;
  padding: 0 2mm 1.5mm;
  font-size: 10pt;
  line-height: 1.15;
}

.arrival-times div {
  display: flex;
  align-items: baseline;
  white-space: nowrap;
}

.handwrite-line {
  display: inline-block;
  width: 12mm;
  height: 4mm;
  margin-inline: 1mm;
  border-bottom: 0.5pt solid #111;
}

.repair-date-box {
  display: flex;
  min-height: 15mm;
  align-items: center;
  justify-content: flex-start;
  gap: 2mm;
  padding: 2mm 3mm;
  border: 0.5pt solid #111;
  border-bottom: 0;
  font-size: 20pt;
  font-weight: 400;
  white-space: nowrap;
}

.repair-date-box strong {
  flex: 1;
  font-size: 15pt;
  font-weight: 400;
  letter-spacing: 0;
  text-align: right;
}

.service-heading-grid {
  display: grid;
  grid-template-columns: 25% 34.6% 40.4%;
  min-height: 22mm;
  border: 3pt solid #111;
  border-top: 0;
}

.service-heading-grid > div {
  min-width: 0;
  border-right: 0.5pt solid #111;
}

.service-heading-grid > div:first-child {
  border-right-width: 3pt;
}

.service-heading-grid > div:last-child {
  border-right: 0;
}

.service-form-name,
.service-case-number {
  display: flex;
  align-items: center;
  padding: 2mm;
}

.service-form-name {
  justify-content: center;
  font-size: 30pt;
  font-weight: 900;
  letter-spacing: 0;
}

.service-case-number {
  gap: 1mm;
  font-size: 20pt;
  text-decoration: underline;
  text-underline-offset: 1mm;
  white-space: nowrap;
}

.service-case-number strong {
  font-size: 11pt;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.service-company-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21mm;
  align-items: center;
  gap: 1.5mm;
  padding: 1.5mm 2mm;
}

.service-company-info > div {
  display: grid;
  gap: 0.5mm;
  min-width: 0;
}

.service-company-info strong {
  font-size: 12pt;
}

.service-company-info span {
  font-size: 9pt;
  line-height: 1.15;
  white-space: nowrap;
}

.service-company-info .service-line-id {
  font-family: Georgia, serif;
  font-size: 12pt;
  font-weight: 700;
}

.service-company-info img {
  display: block;
  width: 19mm;
  height: 19mm;
  object-fit: contain;
}

.service-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 0.5pt solid #111;
  border-top: 0;
}

.service-table .label-col-first {
  width: 12.16%;
}

.service-table .value-col-first {
  width: 35.25%;
}

.service-table .label-col-second {
  width: 12.19%;
}

.service-table .value-col-second {
  width: 40.4%;
}

.service-table th,
.service-table td {
  height: 7.78mm;
  padding: 0.7mm 1.75mm;
  border: 0.5pt solid #111;
  vertical-align: middle;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.service-table th {
  font-size: 12pt;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

.service-table td {
  font-size: 12pt;
}

.customer-table tr:first-child > * {
  border-top: 0;
}

.customer-table tr:nth-child(2) th,
.customer-table tr:nth-child(2) td {
  height: 6.56mm;
}

.customer-table tr:nth-child(3) th,
.customer-table tr:nth-child(3) td {
  height: 7.94mm;
}

.customer-table tr:nth-child(4) th,
.customer-table tr:nth-child(4) td {
  height: 6.79mm;
}

.customer-table tr:nth-child(4) th,
.customer-table tr:nth-child(5) td:last-child {
  font-size: 10pt;
}

.customer-table tr:nth-child(5) th,
.customer-table tr:nth-child(5) td {
  height: 6.09mm;
}

.service-box {
  border: 0.5pt solid #111;
  border-top: 0;
}

.service-box h2 {
  margin: 0;
  padding: 0.7mm 2mm;
  border-bottom: 0.5pt solid #111;
  font-size: 12pt;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.service-writing {
  padding: 1.5mm 1.75mm;
  overflow: hidden;
  font-size: 12pt;
}

.service-writing p {
  display: flex;
  gap: 1mm;
  margin: 0 0 1mm;
  line-height: 1.45;
}

.service-writing p:last-child {
  margin-bottom: 0;
}

.service-writing b {
  flex: 0 0 auto;
  font-weight: 400;
}

.service-writing span {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.problem-writing {
  height: 38.1mm;
}

.disposition-writing {
  height: 55.03mm;
}

.service-terms {
  display: grid;
  gap: 0;
  height: 14.31mm;
  align-content: center;
  padding: 1.5mm 1.75mm;
  border: 0.5pt solid #111;
  border-top: 0;
  font-size: 10pt;
  line-height: 1.15;
}

.service-terms p {
  margin: 0;
}

.billing-row {
  display: flex;
  height: 10.85mm;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
  padding: 1.5mm 1.75mm;
  border: 0.5pt solid #111;
  border-top: 0;
  font-size: 12pt;
}

.billing-line {
  display: inline-block;
  width: 34mm;
  height: 4mm;
  border-bottom: 0.5pt solid #111;
}

.billing-line.short {
  width: 20mm;
}

.billing-line.address-line {
  width: 45mm;
}

.billing-row + .billing-row {
  height: 12.44mm;
}

.service-footer-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12pt;
}

.service-footer-table .footer-col-1 {
  width: 12.16%;
}

.service-footer-table .footer-col-2 {
  width: 12.84%;
}

.service-footer-table .footer-col-3 {
  width: 22.41%;
}

.service-footer-table .footer-col-4 {
  width: 1.35%;
}

.service-footer-table .footer-col-5 {
  width: 10.84%;
}

.service-footer-table .footer-col-6 {
  width: 15.4%;
}

.service-footer-table .footer-col-7 {
  width: 25%;
}

.service-footer-table th,
.service-footer-table td {
  padding: 0.7mm 1.75mm;
  border: 0.5pt solid #111;
  font-weight: 400;
  vertical-align: middle;
}

.payment-row {
  height: 7mm;
}

.payment-row > * {
  border-top: 0;
  white-space: nowrap;
}

.payment-note {
  border-right: 2.25pt solid #111 !important;
  border-bottom: 3pt solid #111 !important;
  font-weight: 700 !important;
  text-align: left;
}

.payment-status {
  border-left: 2.25pt solid #111 !important;
  border-right: 2.25pt solid #111 !important;
}

.signature-label-row {
  height: 11.95mm;
}

.signature-space-row {
  height: 19.05mm;
}

.signature-label-row th {
  padding: 1.5mm;
  text-align: center;
}

.signature-label-row strong {
  display: block;
  font-size: 10pt;
  font-weight: 700;
}

.signature-label-row span {
  display: block;
  margin-top: 0.5mm;
  font-size: 10pt;
}

.signature-label-row .signature-col-1,
.signature-label-row .signature-col-4 {
  border-top: 3pt solid #111;
  border-bottom: 3pt solid #111;
}

.signature-space-row .signature-col-1,
.signature-space-row .signature-col-4 {
  border-top: 3pt solid #111;
  border-bottom: 3pt solid #111;
}

.signature-label-row .signature-col-1,
.signature-space-row .signature-col-1 {
  border-left: 3pt solid #111;
  border-right: 3pt solid #111;
}

.signature-label-row .signature-col-2,
.signature-space-row .signature-col-2 {
  border-left: 3pt solid #111;
  border-right: 3pt solid #111;
}

.signature-label-row .signature-col-3,
.signature-space-row .signature-col-3 {
  border-left: 2.25pt solid #111;
  border-right: 3pt solid #111;
}

.signature-label-row .signature-col-4,
.signature-space-row .signature-col-4 {
  border-left: 3pt solid #111;
  border-right: 3pt solid #111;
}

.signature-space-row .signature-col-2,
.signature-space-row .signature-col-3 {
  border-bottom: 2.25pt solid #111;
}

@media (max-width: 760px) {
  .form-grid,
  .detail-grid,
  .admin-columns,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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

  .form-progress span:not([aria-current='step']) {
    display: none;
  }

  .product-choice-list {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .step-actions,
  .case-hero,
  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .header-inner {
    min-height: 80px;
  }

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

  .stat-card {
    min-height: 96px;
    padding: 16px;
  }

  .stat-card:first-child {
    grid-column: 1 / -1;
  }

  .admin-filter-card {
    grid-template-columns: 1fr;
  }

  .date-filter-group {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .date-shortcuts {
    grid-column: auto;
  }

  .date-shortcut-button {
    flex: 1;
  }

  .sort-filter-group {
    grid-column: auto;
  }

  .filter-actions {
    align-items: stretch;
    flex-wrap: wrap;
    grid-column: auto;
  }

  .filter-export-help {
    flex-basis: 100%;
  }

  .filter-actions .button {
    flex: 1;
  }

  .table-scroll {
    overflow: visible;
  }

  .admin-case-table {
    display: block;
    min-width: 0;
  }

  .admin-case-table thead {
    display: none;
  }

  .admin-case-table tbody {
    display: grid;
    gap: 14px;
    padding: 14px;
  }

  .admin-case-table tr {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
  }

  .admin-case-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 13px;
    border-bottom: 1px solid #edf1f3;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  .admin-case-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .admin-case-table td:last-child {
    border-bottom: 0;
  }

  .case-actions-cell {
    min-width: 0;
  }

  .case-row-actions,
  .quick-status-control {
    grid-column: 2;
  }

  .quick-status-control {
    margin-top: 4px;
  }

  .pagination {
    gap: 8px;
    padding-inline: 12px;
  }

  .form-actions .button {
    width: 100%;
  }

  .clone-case-actions .button {
    flex: 1 1 160px;
  }

  .a4-sheet {
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 20px 14px;
    box-shadow: none;
  }

  .template-image-sheet {
    width: min(100vw, 210mm);
    height: calc(min(100vw, 210mm) * 1.4142857);
    padding: 0;
  }

  .print-page {
    background: white;
  }

  .service-sheet {
    min-width: 720px;
    transform-origin: top left;
  }

  .print-page {
    overflow-x: auto;
  }
}

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    background: white;
  }

  .no-print {
    display: none !important;
  }

  .a4-sheet {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 12.7mm;
    overflow: hidden;
    box-shadow: none;
  }

  .template-image-sheet {
    padding: 0;
  }
}

.repair-template-sheet {
  position: relative;
  width: 210mm;
  min-height: 0;
  height: 297mm;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.repair-template-base {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 210mm;
  height: 297mm;
  object-fit: fill;
}

.repair-template-field {
  position: absolute;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  color: #000;
  font-family: 'DFKai-SB', '標楷體', 'Microsoft JhengHei', sans-serif;
  font-size: 10.5pt;
  line-height: 1.25;
  white-space: pre-wrap;
}

.repair-template-field-nowrap {
  white-space: nowrap;
}

.repair-template-field-multiline {
  overflow-wrap: anywhere;
}

.repair-template-field-center {
  text-align: center;
}

.repair-template-field-right {
  text-align: right;
}

.repair-template-field-bold {
  font-weight: 700;
}

@media (max-width: 760px) {
  .a4-sheet.repair-template-sheet {
    width: min(100vw, 210mm);
    height: calc(min(100vw, 210mm) * 1.4142857);
    margin: 0 auto;
    padding: 0;
  }

  .repair-template-base {
    width: 100%;
    height: 100%;
  }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    height: 297mm;
    margin: 0;
    background: white;
  }

  .print-page {
    margin: 0;
    overflow: hidden;
    background: white;
  }

  .a4-sheet.repair-template-sheet {
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .repair-template-base {
    width: 210mm;
    height: 297mm;
  }
}
