html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* ---------- 报销文件生成系统 ---------- */

body {
  background-color: #f4f6fb;
}

.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero p {
  color: var(--bs-secondary-color);
  margin-bottom: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.feature-card {
  display: block;
  padding: 1.5rem;
  border: 1px solid #e2e6ef;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: #9db8f5;
  box-shadow: 0 10px 24px rgba(28, 58, 128, 0.12);
  color: inherit;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 2rem;
  padding: 0 0.75rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: #e8efff;
  color: #2653c4;
  font-weight: 600;
  font-size: 0.85rem;
}

.feature-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--bs-secondary-color);
  font-size: 0.92rem;
  min-height: 3rem;
  margin-bottom: 1rem;
}

.feature-action {
  color: #2653c4;
  font-weight: 600;
  font-size: 0.92rem;
}

.feature-card-disabled {
  background: #fbfbfd;
  cursor: default;
  opacity: 0.7;
}

.feature-card-disabled:hover {
  transform: none;
  border-color: #e2e6ef;
  box-shadow: none;
}

.page-head {
  padding: 1.5rem 0 1.25rem;
}

.page-head h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.4rem 0 0.4rem;
}

.back-link {
  font-size: 0.9rem;
  color: #2653c4;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.app-card {
  border: 1px solid #e2e6ef;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(28, 58, 128, 0.05);
}

.app-card .card-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.drop-zone {
  border: 2px dashed #c7d2e8;
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  background: #fafcff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.drop-zone.dragging {
  border-color: #2c62db;
  background: #eef4ff;
}

.drop-zone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: #e8efff;
  color: #2653c4;
  font-weight: 700;
  font-size: 0.8rem;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #f8f9fd;
  border: 1px solid #eceff6;
  font-size: 0.9rem;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #e8efff;
  color: #2653c4;
  font-size: 0.8rem;
  flex: none;
}

.file-name {
  font-weight: 500;
  word-break: break-all;
}

.file-message {
  margin-left: auto;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
  white-space: nowrap;
  padding-left: 0.5rem;
}

.state-success .file-icon {
  background: #e3f6ea;
  color: #1c8b47;
}

.state-error .file-icon {
  background: #fdeaea;
  color: #c43030;
}

.state-skip .file-icon {
  background: #eef0f4;
  color: #6c757d;
}

.items-table {
  min-width: 920px;
}

.items-table th,
.items-table td {
  vertical-align: middle;
}

.items-table .col-check {
  width: 2.5rem;
  text-align: center;
}

.items-table .col-no {
  width: 3.5rem;
  text-align: center;
}

.items-table .col-name {
  width: 26%;
}

.items-table .col-spec {
  width: 20%;
}

.items-table .col-unit {
  width: 6rem;
}

.items-table .col-qty,
.items-table .col-price {
  width: 8rem;
}

.items-table .col-amount {
  width: 8rem;
}

.items-table .col-source {
  width: 12rem;
}

.cell-input {
  min-width: 4rem;
}

.items-table .col-source {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.totals {
  font-size: 0.95rem;
}

#pdfFrame {
  width: 100%;
  height: 76vh;
  border: 0;
}

/* 错误/警告消息：固定在视口右上角，长表格滚动时也可见 */
.toast-container {
  z-index: 1090;
}

.toast-container .toast {
  max-width: 460px;
}

.toast-container .toast-body {
  white-space: pre-line;
  word-break: break-word;
}
