:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --sidebar-bg: #fff;
  --sidebar-active: #e6f4ff;
  --sidebar-active-text: #1677ff;
  --text: #1f1f1f;
  --text-secondary: #666;
  --border: #e8e8e8;
  --bg: #f5f7fa;
  --white: #fff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

.flash-list { margin-bottom: 16px; }
.flash {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 8px;
}
.flash-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.flash-error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }

/* ===== 登录页 ===== */
.login-page { min-height: 100vh; }

.login-layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}

.login-brand {
  background: #001529;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-brand-carousel {
  position: relative;
  min-height: 100vh;
  width: 100%;
  align-self: stretch;
}

/* Swiper 会写入固定 px 宽度；拉大窗口时需始终铺满左侧栏 */
.login-hero-swiper.swiper {
  position: absolute;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  min-height: 100%;
  height: 100% !important;
  box-sizing: border-box;
}

.login-hero-swiper .swiper-wrapper,
.login-hero-swiper .swiper-slide {
  width: 100% !important;
  height: 100%;
  box-sizing: border-box;
}

.login-hero-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  position: relative;
  box-sizing: border-box;
  padding: 0;
}

.login-hero-slide--photo {
  overflow: hidden;
  background: #001529;
}

.login-hero-slide-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.login-hero-slide--placeholder {
  padding: 120px 48px 80px;
}

.login-hero-placeholder-text {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  opacity: 0.9;
}


/* 仅无图占位 slide 保留遮罩，便于阅读提示文案；上传的图片轮播不加遮罩 */
.login-hero-slide--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 21, 41, 0.82) 0%,
    rgba(22, 119, 255, 0.55) 100%
  );
  z-index: 1;
}

.login-hero-slide--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  z-index: 1;
}

.login-hero-slide.hero-slide-1,
.hero-slide-1.login-hero-slide {
  background: linear-gradient(135deg, #001529 0%, #003a8c 50%, #1677ff 100%);
}

.login-hero-slide.hero-slide-2,
.hero-slide-2.login-hero-slide {
  background: linear-gradient(135deg, #002766 0%, #0050b3 50%, #4096ff 100%);
}

.login-hero-slide.hero-slide-3,
.hero-slide-3.login-hero-slide {
  background: linear-gradient(135deg, #001a33 0%, #1677ff 50%, #69b1ff 100%);
}

.login-hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  text-align: left;
}

.login-hero-content h1 {
  font-size: 34px;
  line-height: 1.35;
  margin-bottom: 16px;
  font-weight: 600;
}

.login-hero-content p {
  opacity: 0.9;
  line-height: 1.75;
  font-size: 16px;
  margin-bottom: 24px;
}

.login-hero-btn {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
}

.login-hero-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.login-hero-pagination.swiper-pagination-bullets {
  bottom: 36px !important;
  z-index: 4;
}

.login-hero-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.45);
  opacity: 1;
}

.login-hero-pagination .swiper-pagination-bullet-active {
  background: #fff;
  width: 22px;
  border-radius: 4px;
}

.login-brand-inner { max-width: 480px; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.login-logo .logo-text {
  font-size: 24px;
  font-weight: 600;
}

.login-brand h1 {
  font-size: 36px;
  line-height: 1.4;
  margin-bottom: 16px;
}

.login-brand p {
  opacity: 0.85;
  margin-bottom: 32px;
  line-height: 1.7;
}

.login-features {
  list-style: none;
}

.login-features li {
  padding: 10px 0;
  opacity: 0.9;
  font-size: 15px;
}

.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 48px 32px;
}

.login-form-box {
  width: 100%;
  max-width: 360px;
}

.login-form-box h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}

.form-group input::placeholder {
  color: #737373;
  opacity: 1;
}

.form-group select,
.portal-select {
  width: 100%;
  padding: 11px 40px 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #262626;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-group select:hover:not(:disabled),
.portal-select:hover:not(:disabled) {
  border-color: #bfbfbf;
}

.form-group select:focus,
.portal-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231677ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.form-group select:disabled,
.portal-select:disabled {
  background-color: #f5f5f5;
  color: #8c8c8c;
  cursor: not-allowed;
  opacity: 1;
}

.form-group select.is-empty,
.portal-select.is-empty {
  color: #595959;
}

.form-group select option,
.portal-select option {
  color: #262626;
  font-weight: 400;
}

.form-group select option[value=""],
.portal-select option[value=""] {
  color: #595959;
}

.form-group .field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted, #888);
  font-weight: normal;
}

.login-footer-links {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
}

/* ===== 工作台布局 ===== */
.portal-layout {
  display: flex;
  min-height: 100vh;
}

.portal-sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  color: var(--text);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.03);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
}

.portal-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.portal-brand .logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.portal-brand .logo-img,
.login-logo .logo-img,
.logo-img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.login-logo .logo-img {
  margin-bottom: 32px;
}

a.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

a.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  color: #fff;
  text-decoration: none;
}

.portal-menu {
  padding: 16px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 2px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  font-size: 14px;
}

.menu-item:hover {
  background: #f5f7fa;
  color: var(--text);
}

.menu-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 500;
}

.menu-group {
  margin: 4px 0 8px;
}

.menu-group-title {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2px;
}

.menu-group-title:hover {
  background: #f5f7fa;
  color: var(--text);
}

.menu-group.is-open > .menu-group-title {
  color: var(--text);
  font-weight: 600;
}

.menu-submenu {
  display: none;
  padding: 0 0 4px 12px;
}

.menu-group.is-open .menu-submenu {
  display: block;
}

.menu-sub-item {
  display: block;
  padding: 8px 20px 8px 36px;
  margin: 2px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: 0.2s;
}

.menu-sub-item:hover {
  background: #f5f7fa;
  color: var(--text);
}

.menu-sub-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 500;
}

.menu-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #595959;
  background: #f4f6f9;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.menu-item:hover .menu-icon {
  color: #434343;
  background: #eef2f7;
  border-color: rgba(22, 119, 255, 0.12);
}

.menu-item.active .menu-icon {
  color: #fff;
  background: linear-gradient(145deg, #1677ff 0%, #4096ff 100%);
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(22, 119, 255, 0.28);
}

.menu-item-external {
  margin-top: 10px;
  padding-top: 14px;
  position: relative;
}

.menu-item-external::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 0;
  height: 1px;
  background: var(--border);
}

.menu-item-external:hover .menu-icon {
  color: var(--primary);
  background: #e6f4ff;
  border-color: rgba(22, 119, 255, 0.2);
}

.invoice-default-card {
  display: grid;
  gap: 12px;
}

.invoice-default-row {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.invoice-list {
  display: grid;
  gap: 16px;
}

.invoice-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  background: #fafafa;
}

.invoice-card--default {
  border-color: #91caff;
  background: #f0f7ff;
}

.invoice-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.invoice-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invoice-card-actions form {
  margin: 0;
}

.form-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.form-check-inline input {
  margin: 0;
}

.invoice-default-label {
  width: 80px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.portal-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.portal-header {
  background: #fff;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.portal-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.portal-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-meta {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.user-meta strong { font-size: 14px; }
.user-meta span { color: var(--text-secondary); }

.portal-content {
  padding: 24px;
  flex: 1;
}

.welcome-banner {
  background: linear-gradient(135deg, #1677ff, #4096ff);
  color: #fff;
  border-radius: 8px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.welcome-banner h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.welcome-banner p { opacity: 0.9; font-size: 14px; }

.welcome-banner .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid var(--primary);
}

.stat-card-blue { border-left-color: #1677ff; }
.stat-card-orange { border-left-color: #faad14; }
.stat-card-red { border-left-color: #ff4d4f; }

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.stat-card-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  padding: 20px;
  margin-bottom: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-action {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: 0.2s;
  color: var(--text);
}

.quick-action:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(22,119,255,0.12);
}

.quick-action span { font-size: 24px; display: block; margin-bottom: 8px; }
.quick-action strong { display: block; font-size: 14px; margin-bottom: 4px; }
.quick-action small { color: var(--text-secondary); font-size: 12px; }

.notice-list { display: flex; flex-direction: column; gap: 12px; }

.notice-item {
  padding: 12px;
  background: #fafafa;
  border-radius: 6px;
  border-left: 3px solid var(--primary);
}

.notice-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.notice-content { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.notice-date { font-size: 12px; color: #999; }

.table-wrap { overflow-x: auto; }

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.portal-table th,
.portal-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.portal-table th {
  background: #fafafa;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.status-processing { background: #e6f4ff; color: #1677ff; }
.status-active { background: #f6ffed; color: #389e0d; }
.status-expiring { background: #fff7e6; color: #d46b08; }
.status-review { background: #fff7e6; color: #fa8c16; }
.status-completed { background: #f6ffed; color: #52c41a; }
.status-pending { background: #f5f5f5; color: #666; }
.status-awaiting_sign { background: #e6f4ff; color: #1677ff; }
.status-awaiting_info { background: #fff7e6; color: #fa8c16; }

.agreement-sign-panel .agreement-sign-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.agreement-version {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

.agreement-sign-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agreement-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.agreement-content-box .eu-rep-agreement-preview {
  font-size: 14px;
  line-height: 1.6;
}

.agreement-content-box .eu-rep-agreement-preview table,
.agreement-content-box .agreement-bilingual table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.agreement-content-box .agreement-bilingual td {
  width: 50%;
  padding: 8px 10px;
  vertical-align: top;
  border: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.agreement-content-box .agreement-bilingual p,
.agreement-content-box p {
  margin: 0 0 0.65em;
}

.agreement-content-box .agreement-bilingual p:last-child,
.agreement-content-box .agreement-multiline:last-child {
  margin-bottom: 0;
}

.agreement-content-box .agreement-multiline {
  line-height: 1.8;
  word-wrap: break-word;
  white-space: pre-line;
}

.agreement-content-box .agreement-clause-title {
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1.5;
  margin: 0.85em 0 0.45em;
  color: inherit;
}

.agreement-content-box .agreement-clause-title:first-child {
  margin-top: 0;
}

.agreement-content-box .agreement-clause-title + .agreement-multiline {
  margin-top: 0.25em;
}

.agreement-content-box .agreement-multiline strong,
.agreement-content-box .agreement-bilingual strong {
  font-weight: 700;
}

.agreement-content-box .agreement-lang-en {
  background: #fff;
}

.agreement-content-box .agreement-lang-cn {
  background: #f9fafb;
}

@media (max-width: 768px) {
  .agreement-content-box .agreement-bilingual table,
  .agreement-content-box .agreement-bilingual tbody,
  .agreement-content-box .agreement-bilingual tr,
  .agreement-content-box .agreement-bilingual td {
    display: block;
    width: 100%;
  }

  .agreement-content-box .agreement-bilingual tr {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  .agreement-content-box .agreement-bilingual td {
    border: none;
    border-bottom: 1px solid var(--border);
  }

  .agreement-content-box .agreement-bilingual td:last-child {
    border-bottom: none;
  }
}

.agreement-content-box img,
.agreement-content-box .eu-rep-agreement-preview img {
  display: inline-block;
  max-width: min(200px, 100%);
  max-height: 72px;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  vertical-align: middle;
}

.agreement-content-box img.agreement-inline-signature {
  max-width: min(220px, 100%);
  max-height: 64px;
}

.agreement-inline-signature-pending {
  display: inline-block;
  min-width: 6em;
  padding: 4px 10px;
  border: 1px dashed var(--border, #d9d9d9);
  border-radius: 4px;
  color: var(--text-secondary, #888);
  font-size: 13px;
  vertical-align: middle;
  background: #fafafa;
}

.agreement-content-box--view {
  min-height: 480px;
  max-height: 720px;
}

.agreement-view-signature {
  margin-top: 4px;
}

.agreement-view-signature h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.agreement-view-signature .agreement-signature-preview {
  margin: 0;
}

.agreement-content-box {
  min-height: 420px;
  max-height: 560px;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  line-height: 1.8;
  font-size: 14px;
  margin-bottom: 20px;
}

.agreement-sign-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(280px, 400px);
  gap: 20px;
  justify-content: start;
  align-items: stretch;
}

.agreement-sign-layout--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
}

.agreement-sign-layout--inline .agreement-qr-card--compact {
  flex: 0 0 200px;
  width: 200px;
  padding: 14px;
}

.agreement-sign-layout--inline .agreement-qr-card--compact .agreement-qr {
  min-height: 0;
  margin: 8px 0 4px;
}

.agreement-sign-layout--inline .agreement-sign-preview-card {
  flex: 1 1 320px;
  max-width: none;
  min-width: 280px;
}

.agreement-qr-footer-inline {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agreement-qr-subtip {
  font-size: 12px;
  margin: 0;
  text-align: center;
}

.agreement-qr-footer-shared {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  background: #fff;
}

.agreement-dual-signature-preview {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin: 12px 0 16px;
  flex: 1;
  align-items: stretch;
}

.agreement-dual-signature-preview--view {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
}

.agreement-signature-slot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.agreement-signature-slot-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.agreement-sign-preview-card .agreement-signature-slot .agreement-signature-preview {
  flex: 1;
  min-height: 88px;
  margin: 0;
  max-width: none;
}

.signature-slot-placeholder {
  font-size: 13px;
}

.agreement-qr-card,
.agreement-sign-preview-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.agreement-sign-preview-card {
  max-width: 360px;
}

.agreement-qr-card h4,
.agreement-sign-preview-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.agreement-qr {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  min-height: 200px;
}

.agreement-qr-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.agreement-qr-tip {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  flex: 1;
  min-width: 0;
}

.agreement-qr-footer .btn {
  flex-shrink: 0;
}

.agreement-qr-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: var(--text-primary, #1a1a1a);
  letter-spacing: 0.05em;
}

.agreement-qr-countdown.is-expired {
  color: #cf1322;
}

.agreement-sign-preview-card > .agreement-signature-preview {
  flex: 1;
  min-height: 200px;
  width: 100%;
  max-width: none;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  margin: 16px 0;
  padding: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.agreement-signature-preview {
  min-height: 96px;
  max-width: 280px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  margin: 12px auto 16px;
  padding: 10px;
  overflow: hidden;
}

.agreement-signature-preview img,
.agreement-signature-preview .agreement-signature-image {
  display: block;
  max-width: 220px;
  max-height: 72px;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.agreement-sign-preview-card .agreement-sign-actions {
  margin-top: auto;
}

.agreement-sign-actions {
  display: grid;
  gap: 12px;
}

html.sign-force-landscape,
html.sign-force-landscape body.mobile-sign-body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.mobile-sign-body {
  background: #eef1f6;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
}

.mobile-sign-viewport {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

html.sign-force-landscape .mobile-sign-viewport {
  position: absolute;
  top: 0;
  left: 100vw;
  transform: rotate(90deg);
  transform-origin: top left;
  -webkit-transform: rotate(90deg);
  -webkit-transform-origin: top left;
}

@media screen and (orientation: portrait) {
  html .mobile-sign-viewport {
    position: absolute;
    top: 0;
    left: 100vw;
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    height: 100dvw;
    transform: rotate(90deg);
    transform-origin: top left;
    -webkit-transform: rotate(90deg);
    -webkit-transform-origin: top left;
  }

  html,
  html body.mobile-sign-body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
}

.mobile-sign-page {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 10px;
  box-sizing: border-box;
}

.mobile-sign-card {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.mobile-sign-card-error {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.mobile-sign-header {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.mobile-sign-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-sign-header-row h1 {
  font-size: 16px;
  margin: 0;
  flex-shrink: 0;
}

.mobile-sign-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.mobile-sign-error {
  margin-top: 8px;
  font-size: 12px;
  padding: 8px 10px;
}

.mobile-sign-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

.mobile-sign-canvas-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
}

/* 三个正方形米字格（虚线十字 + 虚线对角线，外框实线） */
.mobile-sign-grid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2.5vw, 14px);
  padding: clamp(6px, 2vw, 12px);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 0;
}

.mobile-sign-grid-cell {
  flex: 0 1 auto;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 1 / 1;
  width: auto;
  max-width: calc((100% - 28px) / 3);
  box-sizing: border-box;
}

.mobile-sign-mi {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 2px solid #1f1f1f;
  background: #fafafa;
}

.mi-line {
  position: absolute;
  pointer-events: none;
}

.mi-h {
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 1px dashed #8c8c8c;
}

.mi-v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-left: 1px dashed #8c8c8c;
}

.mi-d1,
.mi-d2 {
  top: 50%;
  left: 50%;
  width: 141.42%;
  height: 0;
  border-top: 1px dashed #8c8c8c;
  transform-origin: center center;
}

.mi-d1 {
  transform: translate(-50%, -50%) rotate(45deg);
}

.mi-d2 {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 英文签名：四线格（顶线 / 上辅助线 / 下辅助线 / 底线） */
.mobile-sign-canvas-wrap--english {
  background: #f3f3f3;
}

.mobile-sign-english-lines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: clamp(10px, 3vw, 20px);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 0;
}

.mobile-sign-four-line-band {
  flex: 0 0 clamp(72px, 22vh, 120px);
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
  background: #fafafa;
  border-top: 2px solid #1f1f1f;
  border-bottom: 2px solid #1f1f1f;
}

.mobile-sign-four-line-band::before,
.mobile-sign-four-line-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed #8c8c8c;
  pointer-events: none;
}

.mobile-sign-four-line-band::before {
  top: 33.333%;
}

.mobile-sign-four-line-band::after {
  top: 66.666%;
}

.signature-canvas-overlay {
  position: fixed;
  z-index: 9999;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.mobile-sign-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

.mobile-sign-actions .btn,
.mobile-sign-btn {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.mobile-sign-success {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
}

.mobile-sign-success h1 {
  margin-bottom: 8px;
}

@media (max-height: 360px) {
  .mobile-sign-header-row h1 {
    font-size: 15px;
  }

  .mobile-sign-desc {
    font-size: 12px;
  }

  .mobile-sign-btn {
    min-height: 44px;
    padding: 10px 20px;
    font-size: 15px;
  }

  .mobile-sign-header {
    margin-bottom: 6px;
  }
}

@media (max-width: 900px) {
  .agreement-sign-layout {
    grid-template-columns: 1fr;
  }

  .agreement-sign-layout--inline {
    flex-direction: column;
  }

  .agreement-sign-layout--inline .agreement-qr-card--compact {
    flex: 1 1 auto;
    width: 100%;
  }

  .agreement-dual-signature-preview {
    flex-direction: column;
  }
}
.status-expired { background: #fff2f0; color: #ff4d4f; }
.status-rejected { background: #fff2f0; color: #ff4d4f; }

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== 欧盟授权代表 ===== */
.eurep-intro-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 100%);
  color: #fff;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 20px;
}

.eurep-intro-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.eurep-intro-banner h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.eurep-intro-banner p {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.badge-on { background: #f6ffed; color: #52c41a; }
.badge-off { background: #f5f5f5; color: #999; }

.eurep-product-card {
  margin-bottom: 20px;
}
.eurep-product-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}
.eurep-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.eurep-product-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}
.eurep-product-hint {
  font-size: 13px;
  color: var(--text-secondary);
}
.eurep-order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.text-muted { color: #999; font-size: 13px; }

/* ===== 服务商城 ===== */
.shop-filters {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.shop-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 0;
}

.shop-filter-row + .shop-filter-row {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 14px;
}

.shop-filter-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 14px;
  color: var(--text-secondary);
  padding-top: 6px;
}

.shop-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-filter-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  background: #f5f5f5;
  transition: 0.2s;
}

.shop-filter-tab:hover,
.shop-filter-tab.active {
  background: #e6f4ff;
  color: var(--primary);
}

.shop-region-section {
  margin-bottom: 28px;
}

.shop-region-title {
  font-size: 18px;
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--primary);
}

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.shop-product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.shop-product-card:hover {
  border-color: #91caff;
  box-shadow: 0 4px 16px rgba(22,119,255,0.1);
}

.shop-product-image-wrap {
  margin: -20px -18px 16px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #f5f5f5;
  border: 2px solid #003399;
  box-sizing: border-box;
}

.shop-product-image {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.shop-product-image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  color: #999;
  font-size: 14px;
  background: #fafafa;
}

.shop-product-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.shop-product-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
  white-space: pre-line;
}

.shop-product-price-row {
  margin-bottom: 12px;
  min-height: 28px;
}

.shop-price {
  font-size: 22px;
  font-weight: 700;
  color: #ff4d4f;
}

.shop-price-old {
  display: block;
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.shop-product-actions {
  margin-top: auto;
}

.services-section {
  margin-bottom: 16px;
}

.services-section-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text);
}

.services-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.renew-panel .panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.renew-panel-desc {
  margin: 0;
  flex: 1 1 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.renew-alert-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3e0;
  color: #e65100;
  font-size: 12px;
  font-weight: 600;
}

/* EU brand auth — single account overview */
.eu-brand-hero {
  border: none;
  background: linear-gradient(135deg, #f0f7ff 0%, #fafbff 48%, #fff 100%);
  box-shadow: 0 1px 0 rgba(22, 119, 255, 0.08);
}
.eu-brand-hero-inner {
  text-align: center;
  padding: 48px 24px 56px;
  max-width: 480px;
  margin: 0 auto;
}
.eu-brand-hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  color: var(--primary);
}
.eu-brand-hero-icon svg {
  width: 100%;
  height: 100%;
}
.eu-brand-hero-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}
.eu-brand-hero-desc {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
}

.eu-brand-alert-panel .eu-brand-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.eu-brand-alert-panel .eu-brand-action-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}
.eu-brand-action-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.eu-brand-action-company {
  font-weight: 600;
  font-size: 14px;
}
.eu-brand-action-order {
  font-size: 12px;
}

.eu-brand-card {
  border: 1px solid rgba(22, 119, 255, 0.12);
  background: linear-gradient(180deg, #fff 0%, #fafcff 100%);
  overflow: hidden;
}
.eu-brand-card--expiring {
  border-color: rgba(212, 136, 6, 0.35);
}
.eu-brand-card--expired {
  border-color: rgba(207, 19, 34, 0.25);
}
.eu-brand-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.eu-brand-card-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
.eu-brand-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}
.status-badge.status-lg {
  padding: 6px 14px;
  font-size: 13px;
}
.eu-brand-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
}
.eu-brand-metric-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.eu-brand-metric-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.eu-brand-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 400;
}
.eu-brand-pnk-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.eu-brand-pnk-link:hover {
  text-decoration: underline;
}
.eu-brand-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.eu-brand-once-hint {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.eu-brand-steps-panel .panel-desc {
  margin: 4px 0 0;
}
.eu-brand-steps {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  counter-reset: none;
}
.eu-brand-step {
  position: relative;
  text-align: center;
  padding: 16px 8px;
  border-radius: 10px;
  background: #f8f9fb;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}
.eu-brand-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #e8eaef;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.eu-brand-step.is-done {
  background: #f6ffed;
  border-color: #b7eb8f;
  color: #389e0d;
}
.eu-brand-step.is-done .eu-brand-step-num {
  background: #389e0d;
  color: #fff;
}
.eu-brand-step.is-current {
  background: #e6f4ff;
  border-color: #91caff;
  color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.eu-brand-step.is-current .eu-brand-step-num {
  background: var(--primary);
  color: #fff;
}
.eu-brand-steps-summary {
  margin-top: 20px;
  font-size: 13px;
}

.eu-brand-card-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.eu-auth-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 8px 0 12px;
}
.eu-auth-overview-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.eu-auth-overview-link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}
.eu-auth-overview-link:hover {
  text-decoration: underline;
}
.eu-auth-overview-foot {
  margin: 12px 4px 0;
}

@media (max-width: 768px) {
  .eu-brand-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .eu-brand-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.renew-order-no {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.renew-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 11px;
  vertical-align: middle;
}

.renew-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.renew-status--active {
  background: #e8f5e9;
  color: #2e7d32;
}

.renew-status--expiring {
  background: #fff3e0;
  color: #ef6c00;
}

.renew-status--expired {
  background: #ffebee;
  color: #c62828;
}

.renew-days {
  font-weight: 600;
  font-size: 13px;
}

.renew-days--active {
  color: #2e7d32;
}

.renew-days--urgent {
  color: #c62828;
}

.renew-days--muted {
  color: var(--text-secondary);
}

.renew-row--expiring {
  background: #fffaf3;
}

.renew-row--expired {
  background: #fff8f8;
}

.btn-block { width: 100%; }

.eurep-intro-actions {
  flex-shrink: 0;
  text-align: right;
}

.eurep-intro-actions .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.eurep-permission-tip {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 220px;
}

.eurep-duty-list {
  display: grid;
  gap: 16px;
}

.eurep-duty-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
}

.eurep-duty-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6f4ff;
  border-radius: 10px;
  font-size: 22px;
  flex-shrink: 0;
}

.eurep-duty-item strong {
  display: block;
  margin-bottom: 6px;
}

.eurep-duty-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.eurep-subnav {
  margin-bottom: 20px;
}

.eurep-product-table-wrap {
  overflow-x: auto;
}

.eurep-product-table th {
  min-width: 96px;
  vertical-align: bottom;
}

.eurep-product-table .th-en {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.eurep-product-table .th-cn {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 2px;
}

.eurep-product-actions {
  white-space: nowrap;
}

.eurep-product-actions .inline-form {
  display: inline-block;
  margin-left: 4px;
}

.status-doc-pending { background: #f5f5f5; color: #666; }
.status-doc-submitted { background: #e6f4ff; color: #1677ff; }
.status-doc-reviewing { background: #fff7e6; color: #d48806; }
.status-doc-approved { background: #f6ffed; color: #389e0d; }
.status-doc-need_supplement { background: #fff2f0; color: #cf1322; }

.eurep-panel-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.eurep-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eurep-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #e6f4ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
}

.eurep-risk-list {
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.9;
  font-size: 14px;
}

.portal-form .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}

.portal-form .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.required {
  color: var(--danger);
}

.eurep-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.eurep-slot-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  background: #fff;
}

.eurep-slot-card--empty {
  background: #fafafa;
  border-style: dashed;
}

.eurep-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.eurep-slot-pending {
  font-size: 12px;
  color: var(--warning);
  background: #fff7e6;
  padding: 2px 10px;
  border-radius: 999px;
}

.eurep-slot-meta {
  display: grid;
  gap: 10px;
}

.eurep-slot-meta div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 8px;
  font-size: 14px;
}

.eurep-slot-meta dt {
  color: var(--text-secondary);
}

.eurep-slot-meta dd {
  margin: 0;
  color: var(--text);
}

.eurep-slot-empty-tip {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.6;
}

.progress-bar {
  width: 80px;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}

.progress-text { font-size: 12px; color: var(--text-secondary); }

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-tab {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-tab.active,
.filter-tab:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: #e6f4ff;
}

.profile-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-panel { max-width: 720px; }

.empty-tip {
  text-align: center;
  color: #999;
  padding: 24px;
}

/* ===== 购买弹窗 ===== */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
}

.portal-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.portal-modal {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}

.portal-modal-config { max-width: 760px; }
.portal-modal-checkout { max-width: 980px; }
.portal-modal-invoice { max-width: 640px; }
.portal-modal-product-filing {
  max-width: 960px;
  width: min(960px, calc(100vw - 40px));
}

.portal-modal-pnk-filing {
  max-width: 640px;
  width: min(640px, calc(100vw - 40px));
}

.portal-modal-pnk-filing .product-filing-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.portal-modal-pnk-filing .product-filing-form .form-group {
  margin-bottom: 16px;
}

.portal-modal-pnk-filing .product-filing-company {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pnk-code {
  font-size: 13px;
  padding: 2px 6px;
  background: #f5f5f5;
  border-radius: 4px;
}

.pnk-panel-header {
  flex-wrap: wrap;
  gap: 12px;
}
.pnk-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pnk-block-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #ad6800;
  font-size: 14px;
  line-height: 1.5;
}

.portal-modal-product-filing > form.portal-modal-body {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.portal-modal-product-filing .product-filing-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.portal-modal-product-filing .product-filing-form .form-group {
  margin-bottom: 16px;
}

.portal-modal-product-filing .product-filing-company {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.portal-modal-product-filing .product-filing-company select {
  font-size: 15px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.portal-modal-product-filing .product-filing-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}

.portal-modal-product-filing .product-filing-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}

.eurep-cell-clamp {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-filing-uploads {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.product-filing-uploads-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.form-error {
  padding: 10px 14px;
  margin-bottom: 16px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.compliance-upload-error {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.form-group-error {
  padding: 12px;
  margin: 0 0 16px;
  border-radius: 8px;
  background: #fff7f6;
  border: 1px solid #ffccc7;
}

.filing-existing-file {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 8px;
  font-size: 13px;
}

.filing-existing-file a {
  font-weight: 500;
}

.portal-file-input {
  display: block;
  width: 100%;
  font-size: 14px;
  color: #434343;
}

.portal-file-input::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
  font-size: 13px;
  cursor: pointer;
}

.portal-file-input::file-selector-button:hover {
  background: #f0f0f0;
  border-color: #bfbfbf;
}

.label-files-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.label-files-empty {
  grid-column: 1 / -1;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: #fafafa;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.label-files-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.label-files-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.label-files-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
}

.label-files-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
}

.label-files-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #595959;
  background: #f0f0f0;
}

.label-files-type-pdf {
  color: #cf1322;
  background: #fff1f0;
}

.label-files-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.label-files-name {
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a.label-files-name {
  color: var(--primary);
  font-weight: 500;
}

.label-files-remove {
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 12px;
}

.eurep-legislation-field > label {
  margin-bottom: 10px;
}

.eurep-legislation-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
  max-height: 200px;
  background: #fff;
}

.eurep-legislation-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.eurep-legislation-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fafafa;
}

.eurep-legislation-table th,
.eurep-legislation-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.eurep-legislation-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
}

.eurep-legislation-table tbody tr:last-child td {
  border-bottom: none;
}

.eurep-leg-col-check {
  width: 44px;
  text-align: center;
}

.eurep-legislation-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}

.eurep-leg-row-locked {
  background: #f6ffed;
}

.eurep-leg-row-locked td {
  color: var(--text);
}

.eurep-legislation-table td:nth-child(3) {
  white-space: nowrap;
  font-weight: 500;
  color: #434343;
}

.eurep-legislation-table td:nth-child(4) {
  color: var(--text-secondary);
  line-height: 1.45;
}

.field-hint-warn {
  color: #d48806;
}

@media (max-width: 720px) {
  .portal-modal-product-filing .product-filing-form .form-row {
    grid-template-columns: 1fr;
  }
}

.portal-modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.portal-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #fff;
}

.portal-modal-header-light h3 {
  font-size: 18px;
  font-weight: 600;
}

.option-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-toggle {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafafa;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
}

.option-toggle.active {
  border-color: #003399;
  color: #003399;
  background: #fff;
}

#invoiceModal .form-group input[type="text"],
#invoiceModal .form-group input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.portal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #003399;
  color: #fff;
  flex-shrink: 0;
}

.portal-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.portal-modal-header-light {
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.portal-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.85;
}

.portal-modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.purchase-notice {
  background: #fff1f0;
  color: #cf1322;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-line;
  margin-bottom: 20px;
}

.purchase-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.purchase-field label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.purchase-field-full { grid-column: 1 / -1; }

.purchase-select-box {
  position: relative;
  border: 1px solid #003399;
  border-radius: 4px;
  padding: 10px 36px 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

.purchase-select-sm { max-width: 160px; }

.purchase-select-check {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  background: #003399;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 4px;
}

.purchase-select-box--select {
  padding: 0;
  min-height: 42px;
  display: flex;
  align-items: stretch;
}

.purchase-embedded-select {
  flex: 1;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 10px 36px 10px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.purchase-embedded-select:focus {
  outline: none;
}

.purchase-select-box--select .purchase-select-check {
  pointer-events: none;
}

.purchase-toggle-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.purchase-toggle {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fafafa;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
}

.purchase-toggle.active {
  border-color: #003399;
  color: #003399;
  background: #fff;
}

.purchase-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: #fafafa;
  cursor: pointer;
  font-size: 18px;
}

.purchase-stepper input {
  width: 56px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
}

.purchase-coupon-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.purchase-coupon-label { color: var(--text-secondary); }
.purchase-coupon-empty { color: #999; }

.purchase-price-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.purchase-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.purchase-price-label { font-size: 14px; color: var(--text-secondary); }

.purchase-price-value {
  font-size: 28px;
  font-weight: 700;
  color: #ff4d4f;
}

.purchase-price-old {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}

.btn-pay-now {
  min-width: 120px;
  padding: 10px 28px;
}

.checkout-breadcrumb {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.checkout-back-link {
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.checkout-body { padding: 0; }

.checkout-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.checkout-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.checkout-order-table { font-size: 13px; }

.checkout-order-head,
.checkout-order-row {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 0.9fr 0.5fr 0.8fr;
  gap: 12px;
  align-items: start;
}

.checkout-order-head {
  color: var(--text-secondary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.checkout-product-cell {
  display: flex;
  gap: 12px;
}

.checkout-product-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border: 2px solid #003399;
  border-radius: 4px;
  flex-shrink: 0;
}

.checkout-product-desc {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-line;
  font-size: 12px;
  max-height: 120px;
  overflow: hidden;
}

.checkout-spec-cell,
.checkout-price-cell,
.checkout-qty-cell,
.checkout-subtotal-cell {
  line-height: 1.7;
}

.checkout-unit-old {
  display: block;
  color: #999;
  text-decoration: line-through;
  font-size: 12px;
}

.checkout-inline-label {
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: 14px;
}

.checkout-invoice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  font-size: 14px;
}

.checkout-invoice-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-invoice-edit {
  flex-shrink: 0;
  margin-left: auto;
}

.checkout-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e6f4ff;
  color: var(--primary);
  font-size: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.portal-modal-invoice-select {
  max-width: 560px;
}

.portal-table--invoice-orders th,
.portal-table--invoice-orders td {
  text-align: center;
  vertical-align: middle;
}

.portal-table--invoice-orders .invoice-title-cell {
  min-width: 140px;
}

.portal-table--invoice-orders .invoice-title-cell-inner {
  display: inline-block;
  max-width: 220px;
  text-align: center;
}

.portal-table--invoice-orders .invoice-title-cell .invoice-title-name {
  display: block;
  margin-bottom: 6px;
  word-break: break-all;
}

.portal-table--invoice-orders .invoice-orders-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.portal-table--invoice-orders .invoice-orders-actions form {
  margin: 0;
  display: inline-flex;
}
.order-invoice-pick-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-invoice-pick-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #e8e8e8);
  border-radius: 8px;
  cursor: pointer;
}
.order-invoice-pick-item:has(input:checked) {
  border-color: var(--primary, #1677ff);
  background: rgba(22, 119, 255, 0.04);
}
.order-invoice-pick-item input {
  margin-top: 4px;
}
.order-invoice-pick-item strong {
  display: block;
  margin-bottom: 4px;
}
.order-invoice-pick-item .text-muted {
  font-size: 13px;
}

.checkout-invoice-form-body {
  max-height: min(62vh, 560px);
  overflow: auto;
}

.checkout-invoice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-invoice-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.checkout-invoice-option-edit {
  flex-shrink: 0;
  margin-left: auto;
}

.checkout-invoice-option:hover,
.checkout-invoice-option:has(input:checked) {
  border-color: #003399;
  background: #f0f7ff;
}

.checkout-invoice-option input {
  margin-top: 4px;
}

.checkout-invoice-option-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.checkout-invoice-option-body strong {
  font-size: 15px;
  color: var(--text);
}

.payment-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.checkout-bank-info {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f0f7ff;
  border: 1px solid #91caff;
  border-radius: 8px;
}

.checkout-bank-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.checkout-bank-card {
  display: grid;
  gap: 10px;
}

.checkout-bank-row {
  display: flex;
  gap: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.checkout-bank-label {
  flex-shrink: 0;
  width: 72px;
  color: var(--text-secondary);
}

.checkout-bank-tip {
  margin-top: 12px;
  font-size: 13px;
  color: #cf1322;
  line-height: 1.6;
}

.checkout-bank-empty {
  font-size: 13px;
  color: var(--text-secondary);
}

.payment-method-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
}

.payment-method-card input { display: none; }

.payment-method-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.payment-method-check {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 4px;
}

.payment-method-card.active .payment-method-check { display: flex; }

.payment-method-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #fafafa;
}

.payment-method-logo {
  display: block;
  width: min(100%, 168px);
  height: auto;
  min-height: 56px;
  object-fit: contain;
}

.payment-method-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.payment-icon-bank { background: #597ef7; }
.payment-icon-balance { background: #bfbfbf; }

.checkout-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px 20px;
  flex-wrap: wrap;
}

.checkout-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.checkout-summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.checkout-summary-detail {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.checkout-payable {
  font-size: 14px;
}

.checkout-payable strong {
  color: #ff4d4f;
  font-size: 22px;
}

.btn-submit-order {
  min-width: 120px;
  padding: 10px 24px;
}

@media (max-width: 1024px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-brand-carousel {
    min-height: 280px;
    height: 280px;
    flex: none;
  }
  .login-hero-swiper {
    min-height: 280px;
    height: 280px;
  }
  .login-hero-slide--placeholder { padding: 72px 24px 56px; }
  .login-hero-content h1 { font-size: 26px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .portal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .portal-sidebar { display: none; }
  .stat-cards { grid-template-columns: 1fr; }
  .profile-form .form-row { grid-template-columns: 1fr; }
  .purchase-form-grid { grid-template-columns: 1fr; }
  .checkout-order-head { display: none; }
  .checkout-order-row { grid-template-columns: 1fr; }
  .checkout-invoice-row { flex-wrap: wrap; }
  .checkout-invoice-edit { margin-left: 0; }
  .payment-method-grid { grid-template-columns: repeat(2, 1fr); }
  .purchase-price-footer { flex-direction: column; align-items: stretch; }
  .checkout-summary-bar { flex-direction: column; align-items: stretch; }
  .checkout-summary-right { flex-direction: column; align-items: stretch; }
  .fill-form-grid { grid-template-columns: 1fr; }
}

/* ===== 填写资料弹窗 ===== */
.portal-modal-fill { max-width: 820px; }

.portal-modal-agreement-view {
  max-width: min(1180px, 96vw);
  width: min(1180px, 96vw);
  max-height: 94vh;
}

.agreement-view-modal-header {
  align-items: flex-start;
  gap: 16px;
}

.agreement-view-modal-head-text h3 {
  margin: 0 0 4px;
}

.agreement-view-modal-sub {
  margin: 0;
  font-size: 13px;
}

.agreement-view-modal-body {
  padding-top: 16px;
}

.agreement-view-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.agreement-content-box--modal {
  min-height: 360px;
  max-height: min(70vh, 760px);
  overflow: auto;
  margin-bottom: 0;
}

/* 弹窗仅展示协议正文内嵌签名，不展示底部独立签名预览区 */
#agreementViewModal .agreement-view-signature {
  display: none !important;
}

.agreement-view-modal-loading {
  padding: 48px 0;
  text-align: center;
}

.agreement-view-modal-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.agreement-view-modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.agreement-download-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.agreement-download-progress[hidden] {
  display: none !important;
}

.agreement-download-progress-bar {
  flex: 1;
  width: auto;
  height: 8px;
  margin-right: 0;
  background: #e8ecf4;
}

.agreement-download-progress .progress-fill {
  transition: width 0.25s ease;
}

.agreement-download-progress .progress-text {
  flex-shrink: 0;
  min-width: 8.5em;
  white-space: nowrap;
}

#agreementViewDownload:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.portal-modal-eurep-rejection {
  max-width: min(520px, 92vw);
}

.eurep-rejection-modal-sub {
  margin: 4px 0 0;
  font-size: 13px;
}

.eurep-rejection-reason-box {
  padding: 16px;
  background: #fff7f6;
  border: 1px solid #ffccc7;
  border-radius: 8px;
  color: #434343;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
}

.eurep-rejection-modal-footer {
  justify-content: flex-end;
  gap: 12px;
}

.fill-modal-head-main h3 {
  margin-top: 4px;
}

.fill-modal-breadcrumb {
  font-size: 12px;
  opacity: 0.88;
  margin-bottom: 2px;
}

.fill-modal-body {
  background: #f7f9fc;
}

.fill-order-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}

.fill-order-card-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fill-order-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.fill-order-price {
  color: #003399;
  font-size: 16px;
}

.fill-form-intro {
  background: #e6f4ff;
  border: 1px solid #bae0ff;
  color: #0958d9;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.fill-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.fill-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fill-form-field-wide {
  grid-column: 1 / -1;
}

.fill-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fill-form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fill-form-control:focus {
  outline: none;
  border-color: #003399;
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.fill-form-control.textarea,
.fill-form-field textarea.fill-form-control {
  min-height: 88px;
  resize: vertical;
}

.fill-form-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0;
}

@media (max-width: 768px) {
  .fill-order-card {
    grid-template-columns: 1fr;
  }
}
