@charset "UTF-8";
.doc-dropzone {
  display: block;
  margin: 0;
  border: 1.5px dashed #cbd5e1;
  border-radius: 0.6rem;
  padding: 0.85rem 0.75rem;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
  user-select: none;
}
.doc-dropzone:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
}
.doc-dropzone:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}
.doc-dropzone.is-dragover {
  border-color: var(--primary-500);
  background: var(--primary-50);
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(45, 67, 115, 0.12);
}
.doc-dropzone.is-busy {
  opacity: 0.6;
  pointer-events: none;
}
.doc-dropzone .dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
}
.doc-dropzone .dropzone-icon {
  font-size: 1.4rem;
  color: var(--primary-500);
}
.doc-dropzone .dropzone-text {
  font-size: 0.85rem;
  color: var(--secondary-900);
}
.doc-dropzone .dropzone-hint {
  font-size: 0.7rem;
  color: #94a3b8;
}

.doc-file-list:empty {
  display: none;
}

.doc-file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: background 0.15s ease;
}
.doc-file-card .doc-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--secondary-900);
  text-decoration: none;
}
.doc-file-card a.doc-file-name:hover {
  color: var(--primary-500);
  text-decoration: underline;
}
.doc-file-card .doc-file-remove {
  flex: 0 0 auto;
  padding: 0;
  line-height: 1;
  color: #dc3545;
  background: none;
  border: 0;
}
.doc-file-card .doc-file-remove:hover {
  color: #a71d2a;
}

.dv-panel {
  position: fixed;
  top: 5.5rem;
  right: 1rem;
  width: min(720px, 48vw);
  height: calc(100vh - 6.5rem);
  min-width: 360px;
  min-height: 240px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  background: var(--surface-white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--secondary-900);
}
.dv-panel.dv-dragging {
  user-select: none;
  cursor: grabbing;
}
.dv-panel.dv-dragging iframe {
  pointer-events: none;
}

.content-area > .dv-panel {
  animation: none;
}

.dv-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem 0.6rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: var(--surface-white);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dv-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1 1 auto;
}

.dv-icon {
  flex: none;
  color: var(--primary-500);
  font-size: 1.1rem;
}

.dv-titles {
  min-width: 0;
}

.dv-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.dv-label,
.dv-filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dv-count {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-600);
  background: var(--primary-50);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.dv-filename {
  font-size: 0.75rem;
  color: var(--secondary-500);
}

.dv-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}

.dv-group {
  display: flex;
  gap: 0.15rem;
  padding: 0.15rem;
  background: var(--surface-bg);
  border-radius: 8px;
}

.dv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--secondary-500);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dv-btn:hover {
  background: var(--surface-white);
  color: var(--primary-600);
  box-shadow: var(--shadow-sm);
}
.dv-btn:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 1px;
}
.dv-btn:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
  box-shadow: none;
}
.dv-btn.is-active {
  background: var(--primary-600);
  color: #fff;
}

.dv-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 1rem;
  background: var(--surface-bg);
}
.dv-stage:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: -2px;
}

.dv-imgbox {
  position: relative;
  flex: none;
  margin: auto;
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: 4px;
}
.dv-imgbox img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.dv-panel[data-dv-mode=fit] .dv-imgbox img {
  cursor: zoom-in;
}

.dv-panel[data-dv-mode=zoom] .dv-imgbox img {
  cursor: zoom-out;
}

.dv-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.dv-loading,
.dv-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--surface-bg);
}

.dv-loading {
  pointer-events: none;
}

.dv-error {
  color: var(--secondary-500);
}
.dv-error i {
  font-size: 1.75rem;
  color: var(--warning-500);
}
.dv-error p {
  margin: 0;
}

.dv-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  z-index: 2;
  cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg, transparent 55%, #cbd5e1 55%, #cbd5e1 65%, transparent 65%, transparent 78%, #cbd5e1 78%, #cbd5e1 88%, transparent 88%);
}
.dv-resize:hover {
  filter: brightness(0.85);
}

.dv-active {
  box-shadow: inset 3px 0 0 var(--primary-500);
  background-color: var(--primary-50) !important;
  border-color: var(--primary-200) !important;
}

a.dv-active {
  box-shadow: none;
  background: none !important;
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 991.98px) {
  .dv-panel {
    top: 4.75rem;
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    min-width: 0;
    height: min(70vh, 100vh - 5.5rem);
  }
  .dv-header {
    cursor: default;
  }
  .dv-resize {
    display: none;
  }
}
.site-notice {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.925rem;
  line-height: 1.6;
  text-align: left;
}
.site-notice > i {
  flex-shrink: 0;
  margin-top: 0.35em;
  color: #d97706;
}
.site-notice > span {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.site-notice--bar {
  border-bottom: 1px solid #fcd34d;
}

.site-notice--box {
  margin-bottom: 1.25rem;
  border: 1px solid #fcd34d;
  border-radius: 0.75rem;
}

.site-notice--glass {
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(252, 211, 77, 0.65);
  border-radius: 1rem;
  color: #fff;
}
.site-notice--glass > i {
  color: #fcd34d;
}

@media print {
  .site-notice {
    display: none;
  }
}
/* noto-sans-tc-regular - chinese-traditional_latin */
@font-face {
  font-display: swap;
  /* 效能核心：文字會先用系統字體顯示，載入完再抽換，避免畫面空白 (FOIT) */
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/NotoSansTC/noto-sans-tc-v39-chinese-traditional_latin-regular.woff2") format("woff2");
}
/* noto-sans-tc-500 - chinese-traditional_latin */
@font-face {
  font-display: swap;
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/NotoSansTC/noto-sans-tc-v39-chinese-traditional_latin-500.woff2") format("woff2");
}
/* noto-sans-tc-700 - chinese-traditional_latin */
@font-face {
  font-display: swap;
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/NotoSansTC/noto-sans-tc-v39-chinese-traditional_latin-700.woff2") format("woff2");
}
:root {
  --primary-50: #e8ecf4;
  --primary-100: #c5d0e6;
  --primary-200: #9fb0d3;
  --primary-500: #2d4373;
  --primary-600: #1B294B;
  --primary-700: #10192d;
  --secondary-50: #f8fafc;
  --secondary-500: #64748b;
  --secondary-900: #0f172a;
  --success-50: #ecfdf5;
  --success-500: #10b981;
  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --danger-50: #fef2f2;
  --danger-500: #ef4444;
  --danger-700: #b91c1c;
  --surface-white: #ffffff;
  --surface-bg: #f8fafc;
  --sidebar-bg-gradient: linear-gradient(180deg, #1B294B 0%, #10192d 100%);
  --header-height: 70px;
  --border-radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
  font-family: "Inter", "Noto Sans TC", system-ui, -apple-system, sans-serif;
  background-color: var(--surface-bg);
  color: var(--secondary-900);
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--secondary-900);
  letter-spacing: -0.025em;
}

a {
  text-decoration: none;
  color: var(--primary-600);
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-700);
}

.admin-navbar {
  background: var(--sidebar-bg-gradient);
  min-height: var(--header-height);
  box-shadow: var(--shadow-md);
  z-index: 1030;
}
.admin-navbar .navbar-brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
}
.admin-navbar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  border-radius: 0.375rem;
  padding: 0.6rem 1rem !important;
}
.admin-navbar .nav-link:hover, .admin-navbar .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.admin-navbar .dropdown-menu {
  border: none;
  box-shadow: var(--shadow-lg);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 200px;
  margin-top: 0.5rem;
}
.admin-navbar .dropdown-item {
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  color: var(--secondary-500);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
}
.admin-navbar .dropdown-item i {
  width: 1.5rem;
  text-align: center;
  margin-right: 0.5rem;
  color: var(--secondary-500);
  transition: color 0.15s ease;
}
.admin-navbar .dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}
.admin-navbar .dropdown-item:hover i {
  color: var(--primary-600);
}
.admin-navbar .dropdown-item.active {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
}
.admin-navbar .dropdown-item.active i {
  color: var(--primary-600);
}

.content-area {
  padding: 2rem;
  max-width: 100%;
}

.card {
  border: none;
  border-radius: var(--border-radius);
  background: var(--surface-white);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.card-header {
  background: white;
  border-bottom: 1px solid #f1f5f9;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--secondary-900);
}
.card-header:first-child {
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.card-body {
  padding: 1.5rem;
}
.card:hover {
  box-shadow: var(--shadow-lg);
}

.table {
  margin-bottom: 0;
}
.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--secondary-500);
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 1rem 1.5rem;
  white-space: nowrap;
}
.table td,
.table tfoot th,
.table tfoot td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  background: white;
  font-size: 0.925rem;
}
.table-hover tbody tr:hover td {
  background-color: #f8fafc;
}

.dataTables_scrollBody thead {
  visibility: hidden;
  height: 0;
}
.dataTables_scrollBody thead tr,
.dataTables_scrollBody thead th {
  height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.badge {
  padding: 0.35em 0.8em;
  font-weight: 600;
  border-radius: 9999px;
  font-size: 0.75em;
}
.badge.bg-primary {
  background-color: var(--primary-100) !important;
  color: var(--primary-700);
}
.badge.bg-success {
  background-color: var(--success-50) !important;
  color: var(--success-500);
}
.badge.bg-warning {
  background-color: var(--warning-50) !important;
  color: var(--warning-500);
}
.badge.bg-danger {
  background-color: var(--danger-50) !important;
  color: var(--danger-500);
}
.badge.bg-info {
  background-color: #ecfeff !important;
  color: #0e7490;
}
.badge.bg-secondary {
  background-color: #f1f5f9 !important;
  color: #64748b;
}

.btn:not(.btn-sm):not(.btn-lg) {
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1rem;
}

.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: white;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(27, 41, 75, 0.4);
  color: white;
}
.btn-secondary {
  background: white;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.btn-secondary:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}
.btn-outline-primary {
  --bs-btn-color: var(--primary-600);
  --bs-btn-border-color: var(--primary-500);
  --bs-btn-hover-bg: var(--primary-50);
  --bs-btn-hover-color: var(--primary-700);
  --bs-btn-hover-border-color: var(--primary-600);
  --bs-btn-active-bg: var(--primary-50);
  --bs-btn-active-color: var(--primary-700);
  --bs-btn-active-border-color: var(--primary-600);
  --bs-btn-focus-shadow-rgb: 45, 67, 115;
  --bs-btn-disabled-color: var(--primary-500);
  --bs-btn-disabled-border-color: var(--primary-500);
  background: transparent;
}
.btn-outline-primary:hover {
  transform: translateY(-1px);
}
.btn-outline-danger {
  --bs-btn-color: var(--danger-500);
  --bs-btn-border-color: var(--danger-500);
  --bs-btn-hover-bg: var(--danger-50);
  --bs-btn-hover-color: var(--danger-700);
  --bs-btn-hover-border-color: var(--danger-700);
  --bs-btn-active-bg: var(--danger-50);
  --bs-btn-active-color: var(--danger-700);
  --bs-btn-active-border-color: var(--danger-700);
  --bs-btn-focus-shadow-rgb: 239, 68, 68;
  --bs-btn-disabled-color: var(--danger-500);
  --bs-btn-disabled-border-color: var(--danger-500);
  background: transparent;
}
.btn-outline-danger:hover {
  transform: translateY(-1px);
}
.btn-sm {
  --bs-btn-padding-y: 0.375rem;
  --bs-btn-padding-x: 0.75rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0.625rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s;
  background-color: white;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(200, 78, 137, 0.15);
  outline: none;
}
.form-control::placeholder,
.form-select::placeholder {
  color: #94a3b8;
}

.form-label {
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.nav-tabs {
  border-bottom: 1px solid #e2e8f0;
}
.nav-tabs .nav-link {
  border: none;
  color: #64748b;
  font-weight: 500;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-tabs .nav-link:hover {
  color: var(--primary-600);
}
.nav-tabs .nav-link.active {
  color: var(--primary-600);
  border-bottom: 2px solid var(--primary-600);
  background: transparent;
}

.card-header-tabs {
  margin-bottom: -1.25rem;
  border-bottom: none;
}
.card-header-tabs .nav-link {
  border-radius: 0;
}
.card-header-tabs .nav-link.active {
  border-bottom: 2px solid var(--primary-600);
  background: transparent;
  color: var(--primary-600);
}
.card-header-tabs .nav-link:hover {
  border-bottom-color: transparent;
  color: var(--primary-700);
}

.alert {
  border: none;
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.alert i {
  margin-right: 0.75rem;
  font-size: 1.25rem;
}
.alert-success {
  background-color: var(--success-50);
  color: #065f46;
  border-left: 4px solid var(--success-500);
}
.alert-danger {
  background-color: var(--danger-50);
  color: #991b1b;
  border-left: 4px solid var(--danger-500);
}

.pagination {
  margin-bottom: 0;
}
.pagination .page-item {
  margin: 0 0.15rem;
}
.pagination .page-item.disabled .page-link {
  border-color: transparent;
  background-color: transparent;
  color: #94a3b8;
}
.pagination .page-item.active .page-link {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
  box-shadow: var(--shadow-sm);
}
.pagination .page-item.active .page-link:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
}
.pagination .page-link {
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  transition: all 0.2s ease;
}
.pagination .page-link:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-200);
  z-index: 2;
}
.pagination .page-link:focus {
  box-shadow: 0 0 0 3px rgba(45, 67, 115, 0.2);
}

.text-gray-800 {
  color: #1f2937 !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

.text-gray-500 {
  color: #6b7280 !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.rounded-lg {
  border-radius: var(--border-radius) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.content-area > * {
  animation: fadeIn 0.4s ease-out;
}

.login-page {
  background-color: #f7fafc;
  background-image: radial-gradient(at 0% 0%, rgba(27, 41, 75, 0.1) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(200, 78, 137, 0.1) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(240, 177, 196, 0.1) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.login-page::before, .login-page::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out;
}
.login-page::before {
  background: radial-gradient(circle, #2d4373 0%, rgba(255, 255, 255, 0) 70%);
  top: -200px;
  left: -200px;
}
.login-page::after {
  background: radial-gradient(circle, #C84E89 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -200px;
  right: -200px;
  animation-delay: -10s;
}

.login-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 1.5rem;
  padding: 3rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.6s ease-out;
}
.login-card .brand-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.login-card .brand-header .brand-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #1B294B 0%, #2d4373 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(27, 41, 75, 0.3);
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}
.login-card .brand-header .brand-icon:hover {
  transform: rotate(0deg) scale(1.05);
}
.login-card .brand-header .brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
  background: none;
  -webkit-text-fill-color: initial;
  background-clip: border-box;
}
.login-card .brand-header .brand-subtitle {
  color: #718096;
  font-size: 0.95rem;
}
.login-card .form-floating > .form-control {
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
}
.login-card .form-floating > .form-control:focus {
  background: white;
  border-color: #1B294B;
  box-shadow: 0 0 0 3px rgba(27, 41, 75, 0.15);
}
.login-card .form-floating > .form-control:focus ~ label {
  color: #1B294B;
}
.login-card .form-floating > label {
  color: #a0aec0;
}
.login-card .password-field {
  position: relative;
}
.login-card .password-field .form-control {
  padding-right: 3rem;
}
.login-card .password-field .password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 3rem;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease;
}
.login-card .password-field .password-toggle:hover, .login-card .password-field .password-toggle:focus-visible {
  color: #1B294B;
  outline: none;
}
.login-card .captcha-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}
.login-card .captcha-row .form-floating {
  flex: 1 1 auto;
  min-width: 0;
}
.login-card .captcha-row .captcha-img {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-card .captcha-row .captcha-img img {
  height: 40px;
  border-radius: 0.4rem;
  display: block;
}
.login-card .captcha-row .captcha-img:hover, .login-card .captcha-row .captcha-img:focus-visible {
  border-color: #1B294B;
  box-shadow: 0 0 0 3px rgba(27, 41, 75, 0.15);
  outline: none;
}
.login-card .btn-login {
  --bs-btn-border-color: transparent;
  background: linear-gradient(135deg, #1B294B 0%, #2d4373 100%);
  border: none;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  border-radius: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(27, 41, 75, 0.25);
}
.login-card .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(27, 41, 75, 0.3);
  filter: brightness(1.05);
}
.login-card .btn-login:active {
  transform: translateY(0);
}
.login-card .footer-text {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #a0aec0;
}
.login-card .footer-text span {
  font-weight: 600;
  color: #1B294B;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(30px, 30px);
  }
  100% {
    transform: translate(0, 0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* 後台審核備註顯示框（取代 inline style，符合 CSP 規範） */
.admin-remark-box {
  min-height: 60px;
  white-space: pre-wrap;
}

/* 表格欄位截斷寬度（取代 inline max-width） */
.cell-truncate-md {
  max-width: 200px;
}

.cell-truncate-lg {
  max-width: 260px;
}

/* 案件分派：清單 */
.assign-check-col {
  width: 48px;
}

/* 案件分派：勾選後浮出的底部指派列。必須放在 .card 外面，card 的 overflow:hidden 會讓 sticky 失效 */
.assign-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 1020;
  background: var(--surface-white);
  border-top: 1px solid #e2e8f0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  box-shadow: 0 -8px 24px -8px rgba(0, 0, 0, 0.15);
  padding: 1rem 1.5rem;
}

/* 案件分派：自動分派配額列與日期清單 */
.quota-list .quota-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.quota-list .quota-item:last-child {
  border-bottom: 0;
}
.quota-list .quota-item .quota-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quota-list .quota-item .quota-input {
  width: 6.5rem;
  flex: 0 0 auto;
}

.date-check-list {
  max-height: 220px;
  overflow-y: auto;
}

/* -------------------------------------------------------------------------- */
/* 後台 TempData flash：_AdminLayout 頂端 server-rendered，site.js 3 秒（錯誤 6 秒）後淡出。 */
/* 樣式原本只在前台 site.scss，後台從沒載到，這裡用後台 token 重寫一份：右上角、導覽列下方。 */
@keyframes flash-slide-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.flash-message {
  position: fixed;
  top: calc(var(--header-height) + 1rem);
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 18rem;
  max-width: min(28rem, 100vw - 3rem);
  padding: 0.875rem 1.125rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--success-500);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  color: var(--secondary-900);
  font-weight: 600;
  line-height: 1.4;
  animation: flash-slide-in 0.25s ease-out;
}
.flash-message > i {
  font-size: 1.35rem;
  flex-shrink: 0;
  color: var(--success-500);
}
.flash-message.flash-error {
  border-left-color: var(--danger-500);
}
.flash-message.flash-error > i {
  color: var(--danger-500);
}
@media (max-width: 768px) {
  .flash-message {
    top: calc(var(--header-height) + 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
    min-width: 0;
    max-width: none;
  }
}

.permit-wrap {
  margin-top: 0.2rem;
}
.permit-wrap .traveler-permit {
  min-width: 0;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}
.permit-wrap .traveler-permit.is-invalid {
  background-image: none;
  padding-right: 0.25rem;
}

.passport-change-detail-row .badge {
  white-space: normal;
  text-align: left;
}
