:root {
  --night-bg: #090a0f;
  --night-panel: #101116;
  --night-panel-soft: rgba(255, 255, 255, 0.035);
  --night-line: rgba(255, 255, 255, 0.1);
  --night-line-strong: rgba(255, 255, 255, 0.17);
  --night-text: #f5f2eb;
  --night-muted: #a9abb5;
  --night-dim: #7d808b;
  --night-gold: #dfbb78;
  --night-gold-bright: #ebcb90;
  --night-green: #70d29b;
  --night-amber: #e5b66e;
  --night-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body { min-height: 100vh; padding: 0; display: block; color: var(--night-text); background: var(--night-bg); font-family: "DM Sans", "Noto Sans TC", system-ui, sans-serif; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { width: 720px; height: 720px; top: -390px; left: auto; right: -270px; opacity: 1; filter: none; animation: none; background: radial-gradient(circle, rgba(107, 82, 230, 0.2), transparent 68%); }
body::after { width: 650px; height: 650px; left: 18%; right: auto; top: auto; bottom: -530px; opacity: 1; filter: none; animation: none; background: radial-gradient(circle, rgba(223, 187, 120, 0.11), transparent 68%); }

.container.app-shell { width: 100%; max-width: none; min-height: 100vh; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; animation: none; }
.container.app-shell::before { display: none; }
.header.app-header { height: 88px; padding: 0 4vw; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--night-line); background: rgba(9, 10, 15, 0.62); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); text-align: left; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(223, 187, 120, 0.5); border-radius: 50%; color: var(--night-gold); font-family: "Noto Serif TC", serif; font-size: 11px; }
.brand-lockup strong, .brand-lockup span { display: block; }
.brand-lockup strong { font-family: "Noto Serif TC", serif; font-size: 15px; letter-spacing: 0.12em; }
.brand-lockup span { margin-top: 3px; color: #92949e; font-size: 11px; letter-spacing: 0.12em; }
.header-period { padding: 9px 13px; border: 1px solid var(--night-line); border-radius: 999px; color: var(--night-muted); background: rgba(255, 255, 255, 0.03); font-size: 13px; }
#currentWeekPeriod span:first-child { color: var(--night-gold) !important; }
#currentWeekPeriod span:not(:first-child) { color: var(--night-muted) !important; }

.app-layout { width: min(1240px, calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 1; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.workflow-sidebar { min-height: calc(100vh - 88px); padding: 60px 28px 110px 0; border-right: 1px solid var(--night-line); }
.workflow-title { color: #9396a1; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.workflow-sidebar .step-indicator { margin: 27px 0 0; padding: 0; display: block; }
.workflow-sidebar .step-indicator::before { display: none; }
.workflow-sidebar .step { min-height: 80px; position: relative; flex-direction: row; align-items: flex-start; gap: 14px; }
.workflow-sidebar .step::after { content: ""; width: 1px; height: 38px; position: absolute; left: 14px; top: 34px; background: var(--night-line); }
.workflow-sidebar .step:last-child::after { display: none; }
.workflow-sidebar .step-number { width: 29px; height: 29px; flex: 0 0 auto; border: 1px solid var(--night-line-strong); border-radius: 50%; color: #656872; background: transparent; box-shadow: none; font-size: 10px; }
.workflow-sidebar .step-text { padding-top: 2px; color: #9497a2; font-size: 13px; font-weight: 600; text-align: left; }
.workflow-sidebar .step-text small { display: block; margin-top: 5px; color: #777a85; font-size: 11px; font-weight: 400; }
.workflow-sidebar .step.active .step-number { color: #18140d; border-color: var(--night-gold); background: var(--night-gold); box-shadow: 0 0 24px rgba(223, 187, 120, 0.2); transform: none; }
.workflow-sidebar .step.active .step-text { color: var(--night-text); }
.workflow-sidebar .step.completed .step-number { overflow: hidden; border-radius: 50% !important; color: var(--night-green); border-color: rgba(75, 180, 122, 0.34) !important; background: rgba(75, 180, 122, 0.08) !important; box-shadow: none !important; }
.workflow-sidebar .step.completed .step-text { color: #88b99e; }
.sidebar-rule { margin-top: 38px; padding: 16px; border: 1px solid var(--night-line); border-radius: 13px; background: rgba(255, 255, 255, 0.025); }
.sidebar-rule span, .sidebar-rule strong, .sidebar-rule small { display: block; }
.sidebar-rule span { color: #8c8f99; font-size: 11px; }
.sidebar-rule strong { margin: 8px 0 5px; font-size: 13px; }
.sidebar-rule small { color: #7d808b; font-size: 11px; }

.content.app-content { min-width: 0; padding: 58px 0 120px 64px; }
.form-section { animation: nightEnter 420ms var(--night-ease) both; }
@keyframes nightEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { margin-bottom: 34px; }
.page-heading > span, .page-heading-row > div:first-child > span { color: var(--night-gold); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; }
.page-heading h1 { margin: 12px 0 10px; font-family: "Noto Serif TC", serif; font-size: clamp(33px, 4vw, 51px); line-height: 1.25; letter-spacing: -0.04em; }
.page-heading p { margin: 0; color: var(--night-muted); font-size: 14px; line-height: 1.75; }
.page-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.mode-badge { margin-top: 5px; padding: 9px 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(75, 180, 122, 0.24); border-radius: 999px; color: #91dfb4; background: rgba(75, 180, 122, 0.07); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mode-badge > i:empty { width: 6px; height: 6px; border-radius: 50%; background: #5dd798; box-shadow: 0 0 12px #5dd798; }
.mode-badge--manual { color: var(--night-amber); border-color: rgba(223, 187, 120, 0.25); background: rgba(223, 187, 120, 0.06); }

.flow-card, .verification-panel { border: 1px solid var(--night-line-strong); border-radius: 20px; background: linear-gradient(145deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.022)); box-shadow: 0 28px 85px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.065); }
.login-card { max-width: 760px; padding: 36px; }
.account-field { margin-bottom: 20px; }
.form-group label { color: #b4b6bf; font-size: 13px; font-weight: 600; }
.input-shell { position: relative; }
.input-shell > i { position: absolute; left: 18px; top: 50%; z-index: 1; color: var(--night-gold); transform: translateY(-50%); }
.form-group .input-shell input { min-height: 56px; padding-left: 48px; border: 1px solid var(--night-line-strong); border-radius: 13px; color: var(--night-text); background: rgba(0, 0, 0, 0.2); }
.form-group .input-shell input:focus { border-color: rgba(223, 187, 120, 0.55); box-shadow: 0 0 0 3px rgba(223, 187, 120, 0.08); }
.btn { min-height: 50px; border-radius: 12px; font-size: 13px; font-weight: 700; transition: transform 160ms var(--night-ease), background-color 160ms ease-out, border-color 160ms ease-out; }
.btn-primary { border: 0; color: #19150e; background: var(--night-gold); box-shadow: none; }
.btn-primary:hover { color: #19150e; background: var(--night-gold-bright); box-shadow: none; transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.35; }
.btn-large { width: 100%; }
.btn-quiet { min-width: 130px; padding: 0 18px; border: 1px solid var(--night-line-strong); color: #bfc0c6; background: rgba(255, 255, 255, 0.035); }
.btn-quiet:hover { color: #fff; background: rgba(255, 255, 255, 0.075); transform: translateY(-1px); }

.verification-panel { overflow: hidden; }
.verification-loading { min-height: 220px; padding: 36px; display: flex; justify-content: center; align-items: center; gap: 16px; }
.verification-loading strong { font-family: "Noto Serif TC", serif; font-size: 19px; }
.verification-loading p { margin: 6px 0 0; color: var(--night-muted); font-size: 12px; }
.verification-spinner { width: 28px; height: 28px; flex: 0 0 auto; border: 3px solid rgba(223, 187, 120, 0.15); border-top-color: var(--night-gold); border-radius: 50%; animation: nightSpin 0.8s linear infinite; }
@keyframes nightSpin { to { transform: rotate(360deg); } }
.verification-state { min-height: 170px; padding: 34px 38px; display: flex; align-items: center; gap: 19px; }
.verification-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(75, 180, 122, 0.3); border-radius: 50%; color: var(--night-green); background: rgba(75, 180, 122, 0.08); }
.verification-state--warning .verification-icon { color: var(--night-amber); border-color: rgba(223, 187, 120, 0.3); background: rgba(223, 187, 120, 0.07); }
.verification-copy { flex: 1; }
.verification-kicker { color: #82d8a8; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.verification-state--warning .verification-kicker { color: var(--night-amber); }
.verification-state h3 { margin: 8px 0 6px; font-family: "Noto Serif TC", serif; font-size: clamp(22px, 3vw, 30px); }
.verification-state p { margin: 0; color: var(--night-muted); font-size: 13px; line-height: 1.6; }
.verification-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--night-line); }
.verification-state--warning .verification-metrics { margin-top: 18px; border: 0; }
.verification-metrics > div { min-width: 0; padding: 20px 26px; border-right: 1px solid var(--night-line); }
.verification-metrics > div:last-child { border-right: 0; }
.verification-metrics span, .verification-metrics strong { display: block; }
.verification-metrics span { margin-bottom: 8px; color: #999ca7; font-size: 12px; }
.verification-metrics strong { color: #f0eee8; font-size: 14px; overflow-wrap: anywhere; }
.verification-metrics .metric-accent { color: var(--night-gold); font-family: "Noto Serif TC", serif; font-size: 17px; }
.auto-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.auto-actions .btn { margin: 0; }
.manual-route { width: 100%; margin-top: 12px; padding: 15px 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border: 1px solid var(--night-line); border-radius: 13px; color: #d2d3d7; background: transparent; text-align: left; cursor: pointer; transition: transform 160ms var(--night-ease), border-color 160ms ease-out, background-color 160ms ease-out; }
.manual-route:hover { border-color: rgba(223, 187, 120, 0.26); background: rgba(223, 187, 120, 0.035); }
.manual-route:active { transform: scale(0.985); }
.manual-route:disabled { opacity: 0.38; cursor: not-allowed; transform: none; }
.manual-route__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--night-gold); background: rgba(223, 187, 120, 0.07); }
.manual-route strong, .manual-route small { display: block; }
.manual-route strong { font-size: 13px; }
.manual-route small { margin-top: 4px; color: #9699a4; font-size: 12px; }
.manual-route > i { color: #7a715f; }
.text-button { margin-top: 18px; padding: 4px 0; border: 0; color: #9699a4; background: none; font-size: 12px; font-weight: 600; cursor: pointer; }
.text-button:hover { color: var(--night-text); }
.back-button { margin: 0 0 25px; }

.week-summary { margin-bottom: 18px; padding: 15px 17px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--night-line); border-radius: 13px; background: rgba(255, 255, 255, 0.025); }
.week-summary__icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: var(--night-gold); background: rgba(223, 187, 120, 0.07); }
.week-info { flex: 1; }
.week-info p { color: var(--night-muted); font-size: 13px; line-height: 1.55; }
#progressSection { margin-bottom: 22px; }
.progress-info { border-color: var(--night-line-strong) !important; background: rgba(255, 255, 255, 0.025) !important; box-shadow: none !important; }
.progress-header h3 { color: var(--night-text) !important; }
.progress-table { color: var(--night-text); }
.progress-table th { color: #70737d !important; background: rgba(255, 255, 255, 0.025) !important; }
.progress-table td { border-color: var(--night-line) !important; }

.manual-rule { margin: 0 0 24px; padding: 15px 17px; display: flex; gap: 15px; border-left: 2px solid var(--night-gold); color: #b5b7bf; background: rgba(223, 187, 120, 0.055); font-size: 13px; line-height: 1.65; }
.manual-rule strong { color: var(--night-gold); white-space: nowrap; }
.manual-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.form-step-title { margin-bottom: 11px; display: flex; align-items: center; gap: 8px; color: #b9bbc3; font-size: 13px; font-weight: 600; }
.form-step-title span { color: var(--night-gold); }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option-card { min-width: 0; min-height: 166px; padding: 15px; border: 1px solid var(--night-line) !important; border-radius: 13px; color: var(--night-text); background: rgba(255, 255, 255, 0.025); box-shadow: none; transform: none; transition: transform 160ms var(--night-ease), border-color 160ms ease-out, background-color 160ms ease-out; }
.option-card::before { display: none; }
.option-card:hover { border-color: rgba(223, 187, 120, 0.3) !important; background: rgba(223, 187, 120, 0.035); transform: translateY(-2px); box-shadow: none; }
.option-card:active { transform: scale(0.98); }
.option-card.selected { border-color: rgba(223, 187, 120, 0.68) !important; background: rgba(223, 187, 120, 0.075); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14); }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; }
.plan-label { color: #a0a3ad; font-size: 12px; }
.plan-selector { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #52555f; border-radius: 50%; color: transparent; font-size: 7px; }
.option-card.selected .plan-selector { color: #17130c; border-color: var(--night-gold); background: var(--night-gold); }
.plan-threshold { margin-top: 28px; text-align: center; }
.plan-threshold span { display: block; color: #a0a3ad; font-size: 12px; }
.plan-threshold strong { font-family: "Noto Serif TC", serif; font-size: 21px; }
.plan-threshold em { margin-left: 3px; color: #a7aab4; font-size: 12px; font-style: normal; }
.plan-divider { height: 1px; margin: 17px 0 12px; background: var(--night-line); }
.plan-reward { display: flex; justify-content: space-between; color: #a4a7b0; font-size: 12px; }
.plan-reward strong { color: var(--night-gold-bright); font-size: 13px; }
.selected-plan { min-height: 48px; margin-top: 10px; padding: 12px 14px; display: flex; align-items: center; border: 1px dashed var(--night-line-strong); border-radius: 11px; color: #a3a6b0; background: rgba(255, 255, 255, 0.024); font-size: 11px; line-height: 1.55; }
.selected-plan h3 { color: var(--night-text); font-size: 13px; }
.selected-plan p { margin: 3px 0; font-size: 11px; }
.upload-area { min-height: 210px; padding: 28px; display: flex; flex-direction: column; justify-content: center; border: 1px dashed var(--night-line-strong); border-radius: 13px; background: rgba(255, 255, 255, 0.018); }
.upload-area:hover, .upload-area.dragover { border-color: rgba(223, 187, 120, 0.38); background: rgba(223, 187, 120, 0.035); }
.upload-icon { margin-bottom: 12px; color: var(--night-gold); font-size: 28px; }
.upload-text { font-size: 12px; font-weight: 700; }
.upload-hint { margin-top: 7px; color: #979aa5; font-size: 11px; line-height: 1.55; }
.photo-preview { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.manual-submit { margin-top: 18px; }

.completion-card { padding: 70px 40px; text-align: center; }
.completion-icon { width: 66px; height: 66px; margin: 0 auto 25px; display: grid; place-items: center; border: 1px solid rgba(75, 180, 122, 0.34); border-radius: 50%; color: var(--night-green); background: rgba(75, 180, 122, 0.08); box-shadow: 0 0 50px rgba(75, 180, 122, 0.1); }
.completion-label { color: var(--night-gold); font-size: 11px; letter-spacing: 0.13em; }
.completion-card h1 { margin: 12px 0; font-family: "Noto Serif TC", serif; font-size: 34px; }
.completion-card p { color: var(--night-muted); }
.completion-secondary { margin-top: 6px; }
.next-task-panel { margin: 24px 0; }

.error-message { border-color: rgba(222, 92, 92, 0.28); border-radius: 12px; color: #f0a0a0; background: rgba(222, 92, 92, 0.07); }
.loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: var(--night-text);
  background: rgba(5, 6, 10, 0.76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms var(--night-ease), visibility 0s linear 180ms;
}
.loading.show {
  display: grid;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 180ms var(--night-ease), visibility 0s linear 0s;
}
.loading-card {
  width: min(410px, 100%);
  padding: 42px 38px 32px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--night-line-strong);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(27, 28, 35, 0.98), rgba(14, 15, 20, 0.98));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.07);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 220ms var(--night-ease), transform 220ms var(--night-ease);
}
.loading.show .loading-card { opacity: 1; transform: translateY(0) scale(1); }
.loading-emblem { width: 72px; height: 72px; margin: 0 auto 25px; position: relative; display: grid; place-items: center; }
.loading-ring { position: absolute; inset: 0; border: 1px solid rgba(223, 187, 120, 0.16); border-top-color: var(--night-gold); border-right-color: rgba(223, 187, 120, 0.52); border-radius: 50%; animation: nightSpin 1.05s linear infinite; }
.loading-ring::after { content: ""; width: 5px; height: 5px; position: absolute; top: 5px; right: 9px; border-radius: 50%; background: var(--night-gold-bright); box-shadow: 0 0 14px rgba(235, 203, 144, 0.76); }
.loading-core { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(223, 187, 120, 0.18); border-radius: 50%; color: var(--night-gold); background: rgba(223, 187, 120, 0.06); font-size: 15px; }
.loading-copy span, .loading-copy strong { display: block; }
.loading-copy span { color: var(--night-gold); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.loading-copy strong { margin-top: 11px; font-family: "Noto Serif TC", serif; font-size: 25px; letter-spacing: 0.02em; }
.loading-copy p { margin: 9px 0 0; color: var(--night-muted); font-size: 13px; line-height: 1.7; }
.loading-meter { height: 2px; margin-top: 28px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); }
.loading-meter span { width: 42%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--night-gold), transparent); animation: loadingProgress 1.35s linear infinite; }
@keyframes loadingProgress { from { transform: translateX(-110%); } to { transform: translateX(250%); } }
body.is-loading { overflow: hidden; }
.modal { background: rgba(0, 0, 0, 0.8); }
.modal-content { color: var(--night-text); background: #121318; border-color: var(--night-line-strong); }
.modal-header { border-color: var(--night-line); }
.history-search input { color: var(--night-text); background: rgba(0, 0, 0, 0.2); border-color: var(--night-line-strong); }
.swal2-container { padding: 18px !important; background: rgba(5, 6, 10, 0.78) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.swal2-popup,
.swal2-popup.swal2-popup-custom {
  width: min(440px, 100%) !important;
  padding: 36px 34px 30px !important;
  overflow: hidden;
  border: 1px solid var(--night-line-strong) !important;
  border-radius: 20px !important;
  color: var(--night-text) !important;
  background: linear-gradient(145deg, rgba(27, 28, 35, 0.99), rgba(14, 15, 20, 0.99)) !important;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.56), inset 0 1px rgba(255, 255, 255, 0.07) !important;
}
.swal2-popup.swal2-show { animation: nightDialogIn 220ms var(--night-ease) both !important; }
.swal2-popup.swal2-hide { animation: nightDialogOut 160ms var(--night-ease) both !important; }
@keyframes nightDialogIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes nightDialogOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(8px) scale(0.98); } }
.swal2-popup .swal2-icon {
  width: 62px !important;
  height: 62px !important;
  margin: 0 auto 22px !important;
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(223, 187, 120, 0.34) !important;
  border-radius: 50% !important;
  color: var(--night-gold) !important;
  background: rgba(223, 187, 120, 0.07) !important;
  box-shadow: none !important;
}
.swal2-popup .swal2-icon.swal2-error { color: #ee8585 !important; border-color: rgba(238, 133, 133, 0.34) !important; background: rgba(238, 133, 133, 0.07) !important; }
.swal2-popup .swal2-icon.swal2-success { color: var(--night-green) !important; border-color: rgba(112, 210, 155, 0.34) !important; background: rgba(112, 210, 155, 0.07) !important; }
.swal2-popup .swal2-icon.swal2-warning { color: var(--night-amber) !important; border-color: rgba(229, 182, 110, 0.34) !important; background: rgba(229, 182, 110, 0.07) !important; }
.swal2-popup .swal2-icon:has(.fa-circle-exclamation) { color: #ee8585 !important; border-color: rgba(238, 133, 133, 0.34) !important; background: rgba(238, 133, 133, 0.07) !important; }
.swal2-popup .swal2-icon:has(.fa-circle-check),
.swal2-popup .swal2-icon:has(.fa-check) { color: var(--night-green) !important; border-color: rgba(112, 210, 155, 0.34) !important; background: rgba(112, 210, 155, 0.07) !important; }
.swal2-popup .swal2-icon-content { color: inherit !important; font-size: 34px !important; font-weight: 500 !important; line-height: 1 !important; }
.swal2-popup .swal2-icon i { color: inherit !important; font-size: 25px !important; }
.swal2-popup .swal2-title {
  padding: 0 !important;
  color: var(--night-text) !important;
  font-family: "Noto Serif TC", serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: -0.02em !important;
  text-shadow: none !important;
}
.swal2-popup .swal2-html-container {
  margin: 14px 0 0 !important;
  padding: 0 !important;
  color: var(--night-muted) !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}
.swal2-popup .swal2-html-container p { margin: 0 !important; color: var(--night-muted) !important; }
.swal2-popup .swal2-html-container h3 { margin: 8px 0 0 !important; color: var(--night-text) !important; font-size: 19px !important; font-weight: 700 !important; }
.swal2-popup .swal2-actions { width: 100% !important; margin: 28px 0 0 !important; padding: 0 !important; display: flex !important; justify-content: center !important; gap: 10px !important; }
.swal2-popup .swal2-confirm-custom,
.swal2-popup .swal2-cancel-custom {
  min-width: 124px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 22px !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 12px !important;
  font-family: "DM Sans", "Noto Sans TC", system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: transform 140ms var(--night-ease), background-color 140ms ease, border-color 140ms ease !important;
}
.swal2-popup .swal2-confirm-custom,
.swal2-popup .swal2-confirm-custom.btn-primary,
.swal2-popup .swal2-confirm-custom.btn-success {
  border: 1px solid var(--night-gold) !important;
  color: #19150e !important;
  background: var(--night-gold) !important;
}
.swal2-popup .swal2-cancel-custom,
.swal2-popup .swal2-cancel-custom.btn-secondary {
  border: 1px solid var(--night-line-strong) !important;
  color: #d5d6db !important;
  background: rgba(255, 255, 255, 0.055) !important;
}
.swal2-popup .swal2-confirm-custom:active,
.swal2-popup .swal2-cancel-custom:active { transform: scale(0.98) !important; }
.swal2-popup .swal2-validation-message { margin: 16px 0 0 !important; border-radius: 10px !important; color: #f1a0a0 !important; background: rgba(238, 133, 133, 0.08) !important; font-size: 12px !important; }

@media (hover: hover) and (pointer: fine) {
  .swal2-popup .swal2-confirm-custom:hover { color: #19150e !important; background: var(--night-gold-bright) !important; transform: translateY(-1px) !important; }
  .swal2-popup .swal2-cancel-custom:hover { color: #fff !important; border-color: rgba(255, 255, 255, 0.28) !important; background: rgba(255, 255, 255, 0.09) !important; transform: translateY(-1px) !important; }
}

@media (max-width: 820px) {
  body { padding: 0; }
  .container.app-shell { min-height: 100vh; border-radius: 0; }
  .header.app-header { height: 74px; padding: 0 18px; }
  .brand-mark { width: 37px; height: 37px; }
  .header-period { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-layout { width: calc(100% - 32px); display: block; }
  .workflow-sidebar { min-height: 0; padding: 18px 0; border-right: 0; }
  .workflow-title, .sidebar-rule, .workflow-sidebar .step-text { display: none; }
  .workflow-sidebar .step-indicator { margin: 0; display: flex; justify-content: flex-start; gap: 11px; }
  .workflow-sidebar .step { min-height: 29px; flex: 0 0 auto; }
  .workflow-sidebar .step::after { width: 20px; height: 1px; left: 34px; top: 14px; }
  .content.app-content { padding: 18px 0 90px; }
  .page-heading-row { display: block; }
  .mode-badge { margin-top: 15px; }
  .verification-state { padding: 25px; align-items: flex-start; }
  .verification-metrics { grid-template-columns: 1fr 1fr; }
  .verification-metrics > div:nth-child(2) { border-right: 0; }
  .verification-metrics > div:nth-child(-n + 2) { border-bottom: 1px solid var(--night-line); }
  .auto-actions { grid-template-columns: 1fr; }
  .manual-grid { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: 1fr; }
  .option-card { min-height: 125px; }
  .login-card { padding: 25px; }
  .loading { padding: 18px; }
  .loading-card { padding: 36px 24px 28px; border-radius: 17px; }
}

@media (max-width: 480px) {
  .swal2-container { padding: 14px !important; }
  .swal2-popup, .swal2-popup.swal2-popup-custom { padding: 30px 22px 22px !important; border-radius: 17px !important; }
  .swal2-popup .swal2-title { font-size: 23px !important; }
  .swal2-popup .swal2-actions { flex-direction: column-reverse !important; gap: 9px !important; }
  .swal2-popup .swal2-confirm-custom, .swal2-popup .swal2-cancel-custom { width: 100% !important; }
}

@media (prefers-reduced-motion: reduce) {
  .form-section { animation: none; }
  .verification-spinner { animation-duration: 1.3s; }
  .loading, .loading-card { transition: opacity 180ms var(--night-ease), visibility 0s linear 180ms; }
  .loading.show { transition: opacity 180ms var(--night-ease), visibility 0s linear 0s; }
  .loading-card { transform: none; }
  .loading.show .loading-card { transform: none; }
  .loading-ring { animation: loadingPulse 1.6s var(--night-ease) infinite; }
  .loading-meter span { animation: loadingPulse 1.6s var(--night-ease) infinite; transform: translateX(70%); }
  .btn, .manual-route, .option-card { transition-duration: 0.01ms; }
  .swal2-popup.swal2-show, .swal2-popup.swal2-hide { animation: none !important; }
}

@media (prefers-contrast: more) {
  :root { --night-muted: #d2d3d8; --night-dim: #b7bac3; --night-line: rgba(255, 255, 255, 0.22); --night-line-strong: rgba(255, 255, 255, 0.34); }
  .flow-card, .verification-panel, .option-card, .upload-area { background: #121319; }
}

@keyframes loadingPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
