/*
 * AI申报通门户统一浅色主题
 * 版本：2026-08-11 P0
 * 说明：顶部品牌导航和页面主视觉保留深蓝，所有内容区统一为浅灰背景、白色卡片。
 * 本文件始终在页面内嵌样式之后加载，用于统一旧页面而不改动其业务结构。
 */
:root {
  --portal-bg: #f4f7fb;
  --portal-surface: #ffffff;
  --portal-surface-soft: #f8fafc;
  --portal-navy: #0a2342;
  --portal-navy-2: #0b3157;
  --portal-primary: #2f6fa8;
  --portal-primary-hover: #255c8d;
  --portal-primary-soft: #edf4fb;
  --portal-text: #10243d;
  --portal-text-2: #506176;
  --portal-muted: #566273;
  --portal-line: #d8e2ee;
  --portal-success: #16803c;
  --portal-warning: #9a6400;
  --portal-danger: #dc2626;
  --portal-shadow: 0 12px 32px rgba(25, 55, 95, 0.08);
  /*
   * 兼容旧门户页面的深色主题变量。
   * 旧页面大量使用 --text-1/2/3、--border 和 --navy-card；若只改容器背景，
   * 会形成白底白字和透明边框。这里统一映射到浅色语义变量。
   */
  --text-1: var(--portal-text);
  --text-2: var(--portal-text-2);
  --text-3: var(--portal-muted);
  --border: var(--portal-line);
  --border-hover: rgba(47, 111, 168, 0.38);
  --navy-card: var(--portal-surface);
  color-scheme: light;
}

html {
  background: var(--portal-bg);
}

body {
  background: var(--portal-bg) !important;
  color: var(--portal-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
}

/*
 * 旧页面曾在大量普通标签上直接写白色。浅色主题下，普通文字统一继承所在
 * 容器的语义颜色；徽标、状态、按钮等组件在后续规则中再单独着色。
 */
body :where(h1, h2, h3, h4, h5, h6, p, span, div, label, strong, b, small, time, td, th, li) {
  color: inherit !important;
}

body :where(a) {
  color: var(--portal-primary) !important;
}

::selection {
  background: #cfe3f6;
  color: var(--portal-navy);
}

a,
button,
input,
select,
textarea {
  font-family: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(47, 111, 168, 0.28) !important;
  outline-offset: 2px;
}

/* 背景层：旧深色网格改为低对比度浅色纹理。 */
.page-bg {
  background:
    radial-gradient(circle at 15% 10%, rgba(91, 134, 188, 0.11), transparent 34%),
    radial-gradient(circle at 85% 90%, rgba(47, 111, 168, 0.08), transparent 34%),
    var(--portal-bg) !important;
}

.page-grid {
  opacity: 0.18 !important;
  background-image:
    linear-gradient(rgba(47, 111, 168, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 111, 168, 0.08) 1px, transparent 1px) !important;
}

/* 顶部品牌区域统一保留深蓝。 */
.header,
.top,
.topbar,
body > .nav,
body > nav.nav {
  background: var(--portal-navy) !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 12px rgba(10, 35, 66, 0.12);
}

.header-title,
.brand-title,
.nav-title,
.brand,
.header-brand,
.header-link,
.header-back,
.back,
.back-link,
.back-nav {
  color: #ffffff !important;
}

.top,
.top .brand,
.top .identity {
  color: #ffffff !important;
}

.header-sub {
  color: rgba(255, 255, 255, 0.64) !important;
}

.header-nav a,
.top a,
.nav a,
.nav-link,
.header-link,
.header-back,
.back {
  color: rgba(255, 255, 255, 0.76) !important;
}

.header-nav a:hover,
.header-nav a.active,
.nav a:hover,
.nav a.active,
.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
}

.header-nav a.active::after,
.nav a.active::after {
  background: #7bb3e0 !important;
}

.header-logo,
.brand-mark,
.nav-logo {
  background: #1d578c !important;
}

.user-menu-trigger,
.user-menu-name {
  color: #ffffff;
}

.user-menu-dropdown {
  background: var(--portal-surface) !important;
  border-color: var(--portal-line) !important;
  color: var(--portal-text) !important;
  box-shadow: var(--portal-shadow) !important;
}

.user-menu-dropdown .user-menu-item {
  color: var(--portal-text-2) !important;
}

.user-menu-dropdown .user-menu-item:hover {
  background: var(--portal-primary-soft) !important;
  color: var(--portal-navy) !important;
}

/* Hero只承担品牌识别，下面内容全部进入浅色区域。 */
.hero,
.policy-hero,
.share-hero {
  background-color: var(--portal-navy-2) !important;
  color: #ffffff !important;
}

.hero h1,
.hero h2,
.hero-title,
.hero-welcome h1,
.policy-hero h1,
.share-hero h1 {
  color: #ffffff !important;
}

.hero p,
.hero-sub,
.hero-lead,
.hero .welcome-sub,
.policy-hero p,
.share-hero p {
  color: rgba(255, 255, 255, 0.72) !important;
}

.hero .quota-card {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

/* 工作台首屏统计仍属于深色 Hero，不能被普通浅色卡片规则改成整块白色。 */
.hero .quota-strip {
  background: transparent !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero .quota-card {
  background: rgba(255, 255, 255, 0.09) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.hero .quota-label,
.hero .quota-tip {
  color: rgba(255, 255, 255, 0.78) !important;
}

.hero .quota-num.ice {
  color: #8ecbff !important;
}

.hero .quota-num.gold {
  color: #ffc24b !important;
}

.hero .quota-num.success {
  color: #45d79f !important;
}

/* 统一内容容器。 */
.main,
.wrap,
.container,
.dashboard,
.section,
.section-inner,
.main-inner,
.shell {
  color: var(--portal-text);
}

.card,
.panel,
.auth-card,
.info-card,
.policy-card,
.agency-card,
.detail-card,
.value-card,
.final-card,
.quick-card,
.quota-strip,
.stats,
.stat-bar-inner,
.agency-bar,
.filters,
.filter-bar,
.service-table-wrap,
.demand-card,
.service-item,
.match-panel,
.match-summary,
.match-status-box,
.match-result,
.match-empty,
.result-box,
.result-summary,
.resume-first-card,
.resume-patent-box,
.try-box,
.source-box,
.supplement-box,
.success-card,
.demand-summary,
.sync-panel,
.notice-box,
.notify-box,
.status-box,
.next-steps,
.contact-box,
.faq-item,
.credit-banner,
.credit-rule-card,
.credit-rules-panel,
.agency-match-panel,
.contact-panel,
.tracking-overview,
.log-list,
.fee-table,
.standard,
.result-head,
.toolbar,
.final-cap-card,
.preview-card,
.preview-section {
  background: var(--portal-surface) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-line) !important;
  box-shadow: var(--portal-shadow);
}

/* 关键内容卡必须存在真实轮廓，不能只设置 border-color。 */
.quick-card,
.policy-card,
.track-card,
.quota-card,
.stats,
.stat-bar-inner,
.tracking-overview,
.match-panel,
.result-box,
.service-item,
.demand-card,
.info-card,
.detail-card,
.final-card,
.value-card,
.agency-card,
.contact-panel,
.log-list,
.fee-table {
  border: 1px solid var(--portal-line) !important;
}

.card,
.panel,
.auth-card,
.info-card,
.policy-card,
.detail-card,
.success-card,
.contact-box,
.faq-item {
  border: 1px solid var(--portal-line) !important;
}

.card-title,
.section-title,
.panel-title,
.page-title,
.auth-title,
.title,
.policy-name,
.demand-policy,
.service-name,
.info-card-title,
.faq-q,
.notice-title,
.status-title,
.next-steps-title,
.flow-title,
.detail-section-title,
.modal-title,
.confirm-block h3 {
  color: var(--portal-navy) !important;
}

.muted,
.card-desc,
.page-sub,
.auth-sub,
.section-text,
.detail-section-body,
.demand-info,
.demand-time,
.service-stage,
.agency-contact,
.hint,
.small,
.form-hint,
.field-hint,
.policy-help,
.notice-text,
.status-desc,
.flow-desc,
.notify-text,
.summary-label,
.sync-label,
.faq-a {
  color: var(--portal-muted) !important;
}

/* 可访问且保持语义的状态颜色。 */
.required,
.req,
.error-text {
  color: #b42318 !important;
}

.success,
.verified,
.status-success,
.status-done,
.tag-pass,
.ps-green {
  color: #147a3d !important;
}

.warning,
.gold,
.hot-reward,
.status-matching {
  color: #8a5a00 !important;
}

.ice,
.more-link,
.result-link,
.filter-action,
.ps-blue {
  color: #245f9c !important;
}

.stat-label,
.data-label,
.info-label,
.source-label,
.summary-label,
.sync-label,
.flow-node-state,
.track-meta-item {
  color: var(--portal-text-2) !important;
}

.policy-hero .info-label {
  color: rgba(255, 255, 255, 0.72) !important;
}

.back,
.back-link,
.back-btn {
  color: var(--portal-primary) !important;
}

.header .back,
.header .back-link,
.header .back-btn,
.top .back,
.topbar .back,
.topbar .back-btn,
.hero .back,
.policy-hero .back,
.share-hero .back {
  color: rgba(255, 255, 255, 0.82) !important;
}

.lead {
  color: var(--portal-text-2) !important;
}

.btn-fav {
  background: #ffffff !important;
  color: var(--portal-primary) !important;
  border-color: #b9cbe0 !important;
}

.confirm-flow b {
  color: #ffffff !important;
}

#matchScoreNum {
  color: #176b49 !important;
}

.num,
.step-num {
  background: var(--portal-primary) !important;
  color: #ffffff !important;
}

.btn-edit-fields {
  background: #245b8f !important;
  border-color: #245b8f !important;
  color: #ffffff !important;
}

.message.error {
  background: #fff0f2 !important;
  border: 1px solid #f0c4ca !important;
  color: #8f1d2c !important;
}

.tracking-overview {
  padding: 24px !important;
  border-radius: 16px !important;
  background: var(--portal-surface) !important;
  box-shadow: var(--portal-shadow) !important;
}

/* 表单、搜索、下拉和上传。 */
input,
select,
textarea,
.form-input,
.form-select,
.form-textarea,
.filter-input,
.filter-select,
.search-input,
.cond-input,
.cond-select,
.resume-input,
.resume-select,
.h5-form-input,
.file {
  background: #ffffff !important;
  color: var(--portal-text) !important;
  border-color: #c8d7e7 !important;
}

input::placeholder,
textarea::placeholder {
  color: #8a98aa !important;
  opacity: 1;
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  cursor: not-allowed !important;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #eef2f6 !important;
  color: #6f7f92 !important;
}

.file-upload,
.upload-area,
.upload-row,
.policy-combobox-menu,
.policy-results,
.policy-result-list,
.search-results {
  background: #ffffff !important;
  color: var(--portal-text) !important;
  border-color: #c8d7e7 !important;
}

.policy-result-item,
.search-results button,
.policy-chip,
.selected-policy-chip {
  background: #ffffff !important;
  color: var(--portal-text) !important;
}

.policy-result-item:hover,
.policy-result-item:focus,
.search-results button:hover,
.search-results button:focus {
  background: var(--portal-primary-soft) !important;
  border-color: var(--portal-primary) !important;
}

/* 机构注册/资料页主营政策选择器使用 .policy-option，不能沿用深色页的白字。 */
.policy-picker {
  background: #f8fafc !important;
  border-color: #c8d7e7 !important;
}

.policy-selected .policy-empty,
.policy-help,
.policy-option-empty {
  color: var(--portal-muted) !important;
}

.policy-results {
  max-height: 240px !important;
  gap: 6px !important;
  padding: 8px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  box-shadow: 0 18px 40px rgba(25, 55, 95, 0.18) !important;
}

.policy-results .policy-option {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px !important;
  background: #ffffff !important;
  color: var(--portal-text) !important;
  border: 1px solid var(--portal-line) !important;
  border-radius: 10px !important;
  text-align: left;
}

.policy-results .policy-option:hover,
.policy-results .policy-option:focus-visible {
  outline: none !important;
  background: var(--portal-primary-soft) !important;
  border-color: var(--portal-primary) !important;
}

.policy-results .policy-option strong {
  min-width: 0;
  color: var(--portal-text) !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere;
}

.policy-results .policy-option-meta {
  flex: 0 0 auto;
  color: var(--portal-muted) !important;
}

.policy-results .policy-status-open {
  background: #e7f7ed !important;
  color: #16803c !important;
  border: 1px solid #bfe8cd;
}

.policy-results .policy-status-closed {
  background: #eef2f6 !important;
  color: #5f6f82 !important;
  border: 1px solid #d8e2ee;
}

.policy-chip span {
  color: var(--portal-primary) !important;
}

.submit-btn,
.btn-primary,
.btn-primary-sm,
.primary-action,
.btn-submit,
.btn-confirm,
.resume-btn,
.final-cta-btn {
  background: var(--portal-primary) !important;
  border-color: var(--portal-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(47, 111, 168, 0.16);
}

.submit-btn:hover,
.btn-primary:hover,
.btn-primary-sm:hover,
.primary-action:hover,
.btn-submit:hover,
.btn-confirm:hover,
.resume-btn:hover,
.final-cta-btn:hover {
  background: var(--portal-primary-hover) !important;
  border-color: var(--portal-primary-hover) !important;
}

.btn-outline,
.btn-outline-sm,
.btn-sm,
.secondary-action,
.btn-cancel,
.page-btn,
.form-forgot {
  background: #ffffff !important;
  border-color: #b9cbe0 !important;
  color: var(--portal-primary) !important;
}

.btn-outline:hover,
.btn-outline-sm:hover,
.btn-sm:hover,
.secondary-action:hover,
.btn-cancel:hover,
.page-btn:hover {
  background: var(--portal-primary-soft) !important;
}

/* 登录、注册和成功页。 */
.auth-card {
  box-shadow: 0 20px 50px rgba(25, 55, 95, 0.12) !important;
}

.auth-tabs {
  background: #eef3f8 !important;
  border-color: var(--portal-line) !important;
}

.auth-tab {
  color: var(--portal-muted) !important;
}

.auth-tab.active {
  background: #ffffff !important;
  color: var(--portal-primary) !important;
  border-color: #b9cbe0 !important;
}

.form-label,
.form-remember,
.field label {
  color: var(--portal-text-2) !important;
}

.auth-footer {
  color: var(--portal-muted) !important;
  border-color: var(--portal-line) !important;
}

.auth-footer a {
  color: var(--portal-primary) !important;
}

.pwd-eye {
  color: var(--portal-primary) !important;
}

.pwd-eye svg {
  stroke: currentColor !important;
}

/* 数据、标签、时间轴。 */
.term-grid > div,
.meta > div,
.detail-item,
.detail-cell,
.data-cell,
.stat-item,
.sync-cell,
.summary-row,
.info-row,
.permission-card,
.confirm-agency,
.progress-flow-detail,
.info-share-state,
.hot-item,
.service-item,
.agency-list-item,
.log-item,
.flow-step,
.step-item,
.source-item {
  background: var(--portal-surface-soft) !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-line) !important;
}

.tag,
.badge,
.demand-tag,
.field-tag,
.region-tag,
.qual-tag,
.policy-tag,
.filter-tag,
.match-score,
.node-badge,
.confirm-badge {
  border-color: transparent;
}

.progress-flow::before,
.timeline-line,
.stat-divider,
.footer-divider {
  background: var(--portal-line) !important;
}

.flow-node-dot {
  background: #ffffff !important;
  border-color: var(--portal-line) !important;
  color: #394b60 !important;
}

.flow-node-label {
  color: var(--portal-text) !important;
}

.flow-node.current .flow-node-dot {
  background: var(--portal-primary) !important;
  border-color: var(--portal-primary) !important;
  color: #ffffff !important;
}

.flow-node.done .flow-node-dot {
  background: var(--portal-success) !important;
  border-color: var(--portal-success) !important;
  color: #ffffff !important;
}

.btn-back-chat {
  background: #f3f7fb !important;
  border-color: #b8cde2 !important;
  color: #245f9c !important;
}

/* 网站内弹窗，不使用浏览器原生 alert/confirm/prompt。 */
.modal-overlay,
.confirm-layer,
.identity-modal-bg,
.portal-dialog-layer,
.agency-offer-layer {
  background: rgba(4, 19, 36, 0.66) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.portal-dialog-layer {
  position: fixed;
  z-index: 100040;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.portal-dialog {
  width: min(520px, 100%);
  overflow: hidden;
  border-radius: 12px;
}

.portal-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.portal-dialog-head h2 {
  margin: 0;
  font-size: 20px;
}

.portal-dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.portal-dialog-body {
  padding: 22px;
}

.portal-dialog-message {
  margin: 0;
  color: var(--portal-text-2);
  white-space: pre-line;
}

.portal-dialog-input-wrap {
  margin-top: 14px;
}

.portal-dialog-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c8d7e7;
  border-radius: 8px;
  background: #ffffff;
  color: var(--portal-text);
}

textarea.portal-dialog-input {
  min-height: 140px;
  resize: vertical;
}

.portal-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--portal-line);
}

.portal-dialog-cancel,
.portal-dialog-confirm {
  min-width: 88px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.portal-dialog-cancel {
  border: 1px solid #b9cbe0;
  background: #ffffff;
  color: var(--portal-primary);
}

.portal-dialog-confirm {
  border: 1px solid var(--portal-primary);
  background: var(--portal-primary);
  color: #ffffff;
}

.modal,
.modal-box,
.resume-modal-box,
.confirm-dialog,
.identity-modal-box,
.portal-dialog,
.agency-offer-dialog {
  background: #ffffff !important;
  color: var(--portal-text) !important;
  border: 1px solid var(--portal-line) !important;
  box-shadow: 0 28px 70px rgba(4, 19, 36, 0.28) !important;
}

.resume-modal-box h3 {
  color: var(--portal-text) !important;
}

.resume-modal-box .resume-modal-sub {
  color: var(--portal-text-2) !important;
}

.modal-header,
.confirm-dialog-head,
.portal-dialog-head,
.agency-offer-dialog-head {
  background: var(--portal-navy-2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.confirm-dialog-head h2,
.modal-header h2,
.modal-header .modal-title,
.portal-dialog-head h2,
.agency-offer-dialog-head h2 {
  color: #ffffff !important;
}

/* 机构端首页/政策页的外层只负责定位，避免全局卡片规则生成第二个直角白框。 */
.hero + .agency-bar,
.hero + .stat-bar {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.hero + .agency-bar > .agency-bar-inner,
.hero + .stat-bar > .stat-bar-inner {
  border-radius: 16px !important;
  overflow: hidden;
}

.modal-body,
.confirm-dialog-body,
.portal-dialog-body,
.agency-offer-dialog-body,
.modal-footer,
.confirm-dialog-actions,
.portal-dialog-actions,
.agency-offer-dialog-actions {
  background: #ffffff !important;
  color: var(--portal-text) !important;
  border-color: var(--portal-line) !important;
}

.agency-offer-layer[hidden],
.portal-dialog-layer[hidden] {
  display: none !important;
}

body.agency-offer-open,
body.offer-confirm-open {
  overflow: hidden !important;
}

.agency-offer-layer {
  position: fixed;
  z-index: 100030;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.agency-offer-dialog {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}

.agency-offer-dialog > form {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.agency-offer-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}

.agency-offer-dialog-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72) !important;
}

.agency-offer-dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
}

.agency-offer-dialog-body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.agency-offer-policy {
  padding: 14px 16px;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  background: var(--portal-surface-soft);
  margin-bottom: 18px;
}

.agency-offer-policy h3 {
  color: var(--portal-navy);
}

.agency-offer-policy p {
  margin-top: 4px;
  color: var(--portal-muted);
}

.agency-offer-error {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
}

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

.agency-offer-field {
  margin-bottom: 14px;
}

.agency-offer-field.full {
  grid-column: 1 / -1;
}

.agency-offer-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--portal-text-2);
  font-weight: 700;
}

.agency-offer-field input,
.agency-offer-field select,
.agency-offer-field textarea {
  width: 100%;
  border: 1px solid #c8d7e7;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--portal-text);
}

.agency-offer-field textarea {
  min-height: 120px;
  resize: vertical;
}

.agency-offer-field small {
  display: block;
  margin-top: 5px;
  color: var(--portal-muted);
}

.agency-offer-dialog-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--portal-line);
  border-radius: 0 0 15px 15px;
}

.agency-offer-dialog-actions button,
.confirm-dialog-actions button,
.modal-footer button {
  min-height: 42px;
  max-width: 100%;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

.modal,
.confirm-dialog {
  border-radius: 16px !important;
  overflow: hidden !important;
}

.confirm-dialog {
  display: flex;
  flex-direction: column;
}

.confirm-dialog-body {
  min-height: 0;
  overflow-y: auto;
}

.confirm-dialog-actions {
  flex: 0 0 auto;
}

.modal-footer,
.confirm-dialog-actions {
  border-radius: 0 0 15px 15px;
}

/* 真实通知列表：点击单条消息后才标记已读并进入对应业务页面。 */
.portal-notification-badge {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9900;
  min-height: 44px;
  border: 1px solid rgba(125, 180, 255, 0.38);
  border-radius: 999px;
  padding: 10px 17px;
  background: #173b68;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(4, 19, 36, 0.24);
}

.portal-header-actions {
  position: relative;
  z-index: 120;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-header-actions .portal-notification-badge {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  min-height: 38px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  white-space: nowrap;
}

.portal-header-actions .portal-notification-badge:hover {
  background: rgba(255, 255, 255, 0.14);
}

.portal-notification-layer[hidden] {
  display: none !important;
}

.portal-notification-layer {
  position: fixed;
  z-index: 100040;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 19, 36, 0.58);
  backdrop-filter: blur(5px);
}

body.portal-notification-open {
  overflow: hidden;
}

.portal-notification-dialog {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--portal-text);
  box-shadow: 0 28px 70px rgba(4, 19, 36, 0.3);
}

.portal-notification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--portal-navy-2);
  color: #ffffff;
}

.portal-notification-head h2 {
  color: #ffffff !important;
  font-size: 22px;
}

.portal-notification-head p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 13px;
}

.portal-notification-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 23px;
  cursor: pointer;
}

.portal-notification-list {
  min-height: 120px;
  overflow-y: auto;
  padding: 10px 16px;
}

.portal-notification-item {
  width: 100%;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 10px;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  background: #ffffff;
  color: var(--portal-text);
  text-align: left;
  cursor: pointer;
}

.portal-notification-item:hover {
  background: var(--portal-surface-soft);
}

.portal-notification-item:disabled {
  opacity: 0.58;
  cursor: wait;
}

.portal-notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portal-primary);
}

.portal-notification-copy,
.portal-notification-copy strong,
.portal-notification-copy span,
.portal-notification-copy small {
  min-width: 0;
  display: block;
}

.portal-notification-copy strong {
  color: var(--portal-text);
  font-size: 15px;
}

.portal-notification-copy span {
  margin-top: 4px;
  color: var(--portal-text-2);
  line-height: 1.55;
}

.portal-notification-copy small {
  margin-top: 5px;
  color: var(--portal-muted);
}

.portal-notification-arrow {
  color: var(--portal-primary);
  font-size: 26px;
}

.portal-notification-empty {
  padding: 36px 20px;
  color: var(--portal-muted);
  text-align: center;
}

.portal-notification-actions {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--portal-line);
  border-radius: 0 0 15px 15px;
  background: #ffffff;
}

/* 旧页面中的大面积深色内容模块统一回到浅色。 */
.value-section,
.diff-section,
.final-section,
.try-strip,
.final-cta,
.resume-core-section {
  background: var(--portal-bg) !important;
  color: var(--portal-text) !important;
}

.footer,
.site-footer {
  background: var(--portal-navy) !important;
  color: rgba(255, 255, 255, 0.76) !important;
}

.footer a,
.site-footer a,
.footer-brand {
  color: #ffffff !important;
}

.empty-state,
.empty-row,
.search-empty,
.fav-empty,
.match-empty {
  background: #ffffff !important;
  color: var(--portal-muted) !important;
  border-color: var(--portal-line) !important;
}

.error,
.resume-error,
.alert-error {
  color: var(--portal-danger) !important;
}

/* 发布成功页：接口未提供的数据统一显示短横线，浅色背景上的文字保持清晰。 */
.success-sub,
.summary-label,
.sync-label,
.sync-status,
.notify-text {
  color: var(--portal-muted) !important;
}

.summary-title,
.summary-value,
.sync-title,
.notify-title,
.flow-title {
  color: var(--portal-text) !important;
}

/* 微信落地页左侧导航同步浅色主题，避免旧白字在浅色背景上不可见。 */
.side-panel {
  background: var(--portal-surface) !important;
  border: 1px solid var(--portal-line) !important;
  color: var(--portal-text) !important;
}

.side-header p,
.menu-group-title,
.menu-item-btn,
.side-notes h3,
.side-notes p {
  color: var(--portal-muted) !important;
}

.menu-item-btn:hover,
.menu-item-btn.active {
  background: var(--portal-primary-soft) !important;
  color: var(--portal-primary) !important;
}

.state-toggle {
  background: var(--portal-surface-soft) !important;
  border-color: var(--portal-line) !important;
}

.state-btn {
  color: var(--portal-muted) !important;
}

.state-btn.active {
  background: var(--portal-primary) !important;
  color: #fff !important;
}

/* 兼容窄屏。 */
@media (max-width: 900px) {
  .header,
  .topbar,
  body > .nav,
  body > nav.nav {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .agency-offer-layer {
    padding: 0;
  }

  .portal-dialog-layer {
    padding: 16px;
  }

  .agency-offer-dialog {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    border-radius: 16px;
  }

  .portal-notification-dialog {
    width: calc(100% - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    border-radius: 16px !important;
  }

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

  .agency-offer-field.full {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .auth-card,
  .card,
  .panel,
  .success-card {
    border-radius: 12px !important;
  }

  .agency-offer-dialog-actions,
  .confirm-dialog-actions {
    flex-direction: column-reverse;
  }

  .agency-offer-dialog-actions button,
  .confirm-dialog-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
