/**
 * 东川招商管理后台 — 政务通用风格
 * 参考国内政务/若依/Ant Design Pro 等常见后台视觉习惯
 */

:root {
    --gov-primary: #165dad;
    --gov-primary-dark: #0d3b7a;
    --gov-primary-light: #e8f2ff;
    --gov-sidebar-bg: #002856;
    --gov-sidebar-border: rgba(255, 255, 255, 0.06);
    --gov-accent-red: #c8102e;
    --gov-page-bg: #f0f2f5;
    --gov-text: #333333;
    --gov-text-secondary: #666666;
    --gov-border: #d9dee4;
}

/* 全网嗅探确认弹窗：宽 2xl，高度约提升至 1.5 倍便于阅读说明 */
.sniff-start-modal {
    min-height: 21rem !important;
}

/* 嗅探进度通栏：覆盖 Filament header subheading 的 max-w-2xl */
.fi-header-subheading:has(.sniff-progress-panel),
.fi-header:has(.sniff-progress-panel) .fi-header-subheading {
    max-width: none !important;
    width: 100% !important;
}

.sniff-start-modal .fi-modal-header {
    padding-top: 1.75rem !important;
    padding-bottom: 0.75rem !important;
}

.sniff-start-modal .fi-modal-content,
.sniff-start-modal .fi-modal-description {
    padding-top: 0.75rem !important;
    padding-bottom: 1.25rem !important;
}

.sniff-start-modal .fi-modal-description {
    font-size: 0.95rem !important;
    line-height: 1.75 !important;
}

.sniff-start-modal .fi-modal-footer {
    padding-top: 0.75rem !important;
    padding-bottom: 1.5rem !important;
}

/* 全局字体：优先系统中文字体 */
.fi-body,
.fi-body * {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif !important;
}

/* 顶栏红色标识线（政务网站常见元素） */
.fi-body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gov-accent-red) 0%, #e64545 50%, var(--gov-accent-red) 100%);
    z-index: 50;
}

/* ========== 侧栏：深蓝政务侧栏 ========== */
.fi-sidebar {
    background: var(--gov-sidebar-bg) !important;
    border-right: 1px solid var(--gov-sidebar-border) !important;
    color: #ffffff;
}

.fi-sidebar-header {
    background: rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid var(--gov-sidebar-border) !important;
    box-shadow: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.fi-sidebar-header .fi-logo,
.fi-sidebar-header .fi-logo span {
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    font-size: 1.2rem !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    justify-content: center;
}

.fi-sidebar-nav {
    padding-top: 1rem !important;
}

/* 分组标题 */
.fi-sidebar .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 12px !important;
    letter-spacing: 0.05em;
}

.fi-sidebar .fi-sidebar-group-icon {
    color: rgba(255, 255, 255, 0.55) !important;
}

.fi-sidebar .fi-sidebar-group-collapse-button {
    color: rgba(255, 255, 255, 0.45) !important;
}

/* 菜单项 */
.fi-sidebar .fi-sidebar-item-button {
    color: rgba(255, 255, 255, 0.88) !important;
    border-radius: 4px !important;
    background: transparent !important;
}

.fi-sidebar .fi-sidebar-item-button:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.fi-sidebar .fi-sidebar-item-label {
    color: rgba(255, 255, 255, 0.88) !important;
}

.fi-sidebar .fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* 当前选中项 */
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-button,
.fi-sidebar .fi-sidebar-item.fi-sidebar-item-active > .fi-sidebar-item-button {
    background: var(--gov-primary) !important;
    color: #ffffff !important;
    box-shadow: inset 3px 0 0 #ffffff;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-sidebar-item-active .fi-sidebar-item-label {
    color: #ffffff !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-sidebar .fi-sidebar-item.fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}

/* 分组内子项圆点 */
.fi-sidebar .fi-sidebar-item-grouped-border .rounded-full {
    background: rgba(255, 255, 255, 0.45) !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-grouped-border .rounded-full {
    background: #ffffff !important;
}

.fi-sidebar-collapse-button {
    color: rgba(255, 255, 255, 0.65) !important;
}

/* ========== 顶栏 ========== */
.fi-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid var(--gov-border) !important;
    box-shadow: 0 1px 4px rgba(0, 40, 86, 0.06) !important;
}

.fi-topbar .fi-logo,
.fi-topbar .fi-logo span {
    color: var(--gov-primary-dark) !important;
    font-weight: 700 !important;
    font-size: 1.15rem !important;
    letter-spacing: 0.06em;
}

/* 顶栏：当前用户信息（中部） */
.fi-topbar nav {
    position: relative;
}

.fi-topbar nav > .fi-admin-context {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.75rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .fi-topbar nav > .fi-admin-context {
        display: flex;
    }
}

.fi-topbar nav > .ms-auto {
    order: 2;
    flex-shrink: 0;
}

.fi-admin-context__item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    white-space: nowrap;
}

.fi-admin-context__item--phone {
    display: none;
}

@media (min-width: 1280px) {
    .fi-admin-context__item--phone {
        display: inline-flex;
    }
}

.fi-admin-context__label {
    color: var(--gov-text-secondary);
    font-size: 12px;
    flex-shrink: 0;
}

.fi-admin-context__value {
    color: var(--gov-text);
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fi-admin-context__value--role {
    color: var(--gov-primary);
    font-weight: 600;
}

.fi-admin-context__sep {
    width: 1px;
    height: 14px;
    background: var(--gov-border);
    flex-shrink: 0;
}

.fi-admin-context__sep--phone {
    display: none;
}

@media (min-width: 1280px) {
    .fi-admin-context__sep--phone {
        display: block;
    }
}

/* ========== 主内容区 ========== */
.fi-main-ctn {
    background: var(--gov-page-bg) !important;
}

.fi-main {
    background: var(--gov-page-bg) !important;
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 项目详情：仅强制「根」infolist 网格单列通栏（勿伤及 Section 内部多列） */
.fi-resource-view-record-page .grid.auto-cols-fr > dl > .fi-fo-component-ctn {
    --cols-default: repeat(1, minmax(0, 1fr)) !important;
    --cols-sm: repeat(1, minmax(0, 1fr)) !important;
    --cols-md: repeat(1, minmax(0, 1fr)) !important;
    --cols-lg: repeat(1, minmax(0, 1fr)) !important;
    --cols-xl: repeat(1, minmax(0, 1fr)) !important;
    --cols-2xl: repeat(1, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
}

.fi-resource-view-record-page .grid.auto-cols-fr > dl > .fi-fo-component-ctn > * {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
}

/* 页面大标题偏大：隐藏重复标题，保留面包屑 */
.fi-header-heading {
    display: none !important;
}

.fi-breadcrumbs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 0.35rem !important;
}

.fi-header {
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}

.fi-breadcrumbs-item-label {
    color: var(--gov-text-secondary) !important;
}

/* 线索详情顶部：状态 / AI等级 / AI评分 / 线索来源 同一行 */
.lead-hero-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
    width: 100%;
    margin-top: 0.35rem;
}

.lead-hero-meta-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 8px 10px;
    background: #f5f8fc;
    border: 1px solid #e8eef5;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.lead-hero-meta-label {
    color: var(--gov-text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.lead-hero-meta-value {
    color: var(--gov-text);
    font-weight: 600;
    word-break: break-word;
}

@media (max-width: 900px) {
    .lead-hero-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========== 卡片 / 区块 ========== */
.fi-section,
.fi-fo-section,
.fi-ta-ctn divide-y divide-gray-200 {
    border-radius: 4px !important;
}

.fi-section-header-heading,
.fi-fo-section-header-heading {
    color: var(--gov-primary-dark) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--gov-primary);
    padding-left: 0.75rem;
}

/* 去掉内容区二次描边，避免「套娃卡片」 */
.fi-section:not(.fi-aside) > .fi-section-content-ctn,
.fi-fo-section:not(.fi-aside) > .fi-section-content-ctn {
    border: none;
    border-radius: 0;
    background: transparent;
}

/* 项目详情可读性 */
.project-hero-section .fi-section-content {
    background: linear-gradient(180deg, #eef5fc 0%, #ffffff 70%) !important;
}

.project-hero-name,
.project-hero-name .fi-in-text-item-label,
.project-hero-name .fi-in-entry {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: var(--gov-primary-dark) !important;
    line-height: 1.35 !important;
}

.project-summary-body .fi-in-entry {
    font-size: 0.98rem !important;
    line-height: 1.7 !important;
    color: var(--gov-text) !important;
}

/* 详情行列表：打掉 TextEntry 内层 max-w-max（截图确认：div.flex.max-w-max → max-content） */
.project-detail-entry,
.project-detail-entry .fi-in-affixes,
.project-detail-entry .fi-in-affixes > .min-w-0,
.project-detail-entry .fi-in-affixes > .min-w-0 > .flex,
.project-detail-entry .max-w-max,
.project-detail-entry .fi-in-text-item,
.project-detail-entry .fi-in-text-item > div {
    max-width: none !important;
    width: 100% !important;
}

.project-detail-entry .max-w-max,
.project-detail-entry .fi-in-text-item {
    display: block !important;
}

.project-detail-rows {
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    overflow: hidden;
    display: block;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.project-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    line-height: 1.55;
    font-size: 0.92rem;
    border-bottom: 1px solid #e8eef5;
    width: 100%;
    box-sizing: border-box;
}

.project-detail-row:last-child {
    border-bottom: 0;
}

.project-detail-row:nth-child(odd) {
    background: #f5f8fc;
}

.project-detail-row:nth-child(even) {
    background: #ffffff;
}

.project-detail-label {
    flex: 0 0 6.5rem;
    color: var(--gov-text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.project-detail-value {
    flex: 1 1 auto;
    color: var(--gov-text);
    word-break: break-word;
}

.project-detail-value a {
    color: var(--gov-primary);
    text-decoration: none;
}

.project-detail-value a:hover {
    text-decoration: underline;
}

/* 全网嗅探结构化报告 */
.sniff-report {
    width: 100%;
}

.sniff-window {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.9rem;
}

.sniff-window--open {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.sniff-window--watch {
    background: #fffbe6;
    color: #d48806;
    border: 1px solid #ffe58f;
}

.sniff-window--none {
    background: #f5f5f5;
    color: #8c8c8c;
    border: 1px solid #d9d9d9;
}

.sniff-window--unknown {
    background: #f0f5ff;
    color: #2f54eb;
    border: 1px solid #adc6ff;
}

.sniff-log-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.lead-status-log-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    margin-top: 0.35rem;
}

.lead-status-log-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--gov-border);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gov-text);
    white-space: nowrap;
    overflow-x: auto;
}

.lead-status-log-row:last-child {
    border-bottom: none;
}

.lead-status-log-row:nth-child(odd) {
    background: #f7fafc;
}

.lead-status-log-action {
    font-weight: 600;
    color: var(--gov-primary-dark);
}

.lead-status-log-reason {
    color: var(--gov-text-secondary);
}

.lead-status-log-sep {
    margin: 0 0.4rem;
    color: #94a3b8;
    flex: 0 0 auto;
}

.sniff-log-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--gov-border);
}

.sniff-log-row:last-child {
    border-bottom: none;
}

.sniff-log-row:nth-child(odd) {
    background: #f7fafc;
}

.sniff-log-meta {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--gov-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.sniff-log-nth {
    font-weight: 600;
    color: var(--gov-primary-dark);
}

.sniff-log-sep {
    margin: 0 0.35rem;
    color: var(--gov-text-secondary);
}

.sniff-log-status {
    color: var(--gov-text-secondary);
}

.sniff-detail-link {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gov-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    text-align: right;
}

.sniff-detail-link:hover {
    text-decoration: underline;
}

.sniff-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.sniff-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.sniff-detail-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: min(84vh, 900px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    border: 1px solid var(--gov-border);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.sniff-detail-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gov-border);
    background: #f8fafc;
}

.sniff-detail-dialog__title {
    font-weight: 600;
    color: var(--gov-primary-dark);
}

.sniff-detail-dialog__close {
    border: 0;
    background: transparent;
    color: var(--gov-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.sniff-detail-dialog__body {
    padding: 1rem;
    overflow: auto;
}

.sniff-empty-banner {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    border: 1px solid #ffe58f;
    background: #fffbe6;
    color: #874d00;
}

.sniff-empty-banner__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sniff-empty-banner__body {
    font-size: 0.9rem;
    line-height: 1.55;
}

.sniff-progress-panel {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    line-height: 1.55;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.sniff-progress-panel--running {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.sniff-progress-panel--empty {
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #78350f;
}

.sniff-progress-panel--done {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}

.sniff-progress-panel--failed {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #7f1d1d;
}

.sniff-progress-panel__line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 0.75rem;
}

.sniff-progress-panel__title {
    font-weight: 700;
    flex: 0 0 auto;
}

.sniff-progress-panel__body {
    flex: 1 1 12rem;
    opacity: 0.95;
}

.sniff-progress-track {
    margin-top: 0.65rem;
    height: 6px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: #bfdbfe;
}

@keyframes sniff-progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.sniff-progress-bar {
    height: 100%;
    width: 32%;
    border-radius: 999px;
    background: #2563eb;
    animation: sniff-progress-slide 1.4s ease-in-out infinite;
}

/* 通栏：覆盖 Filament header subheading 的 max-w-2xl */
.fi-header-subheading:has(.sniff-progress-panel),
.fi-header:has(.sniff-progress-panel) .fi-header-subheading,
.sniff-progress-entry {
    max-width: none !important;
    width: 100% !important;
}

.sniff-progress-entry .fi-in-entry-wrp,
.sniff-progress-entry .fi-in-text-item {
    width: 100%;
}

.sniff-section {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--gov-border);
}

.sniff-section-title {
    font-weight: 600;
    color: var(--gov-primary-dark);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--gov-primary);
    padding-left: 0.65rem;
}

.sniff-section-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--gov-text);
    line-height: 1.7;
}

.sniff-section-list li {
    margin-bottom: 0.35rem;
}

.sniff-section--empty .sniff-section-list {
    color: var(--gov-text-secondary);
}

.sniff-raw {
    margin-top: 1.25rem;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    background: #fff;
}

.sniff-raw > summary {
    cursor: pointer;
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    color: var(--gov-text-secondary);
    user-select: none;
    list-style: none;
}

.sniff-raw > summary::-webkit-details-marker {
    display: none;
}

.sniff-raw > summary::before {
    content: '▸ ';
    color: var(--gov-primary);
}

.sniff-raw[open] > summary::before {
    content: '▾ ';
}

.sniff-raw-pre {
    margin: 0;
    padding: 0.85rem 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #475569;
    background: #f8fafc;
    border-top: 1px dashed var(--gov-border);
}

/* 线索详情：两列斑马（标题：内容并排） */
.lead-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    width: 100%;
}

@media (max-width: 900px) {
    .lead-detail-grid {
        grid-template-columns: 1fr;
    }
}

.project-muted {
    color: var(--gov-text-secondary);
    font-size: 0.9rem;
}

.project-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px 16px;
}

.project-kv {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f7fafc;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
}

.project-kv > span {
    color: var(--gov-text-secondary);
    font-size: 0.78rem;
}

.project-kv > strong {
    color: var(--gov-text);
    font-size: 0.95rem;
    font-weight: 600;
}

.project-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-chip {
    display: inline-block;
    padding: 2px 8px;
    background: #fff1f0;
    color: var(--gov-accent-red, #c8102e);
    border: 1px solid #ffccc7;
    border-radius: 3px;
    font-size: 0.8rem;
}

.project-raw-data-details {
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    background: #ffffff;
}

.project-raw-data-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
    padding: 0.85rem 1rem;
    user-select: none;
}

.project-raw-data-summary::-webkit-details-marker {
    display: none;
}

.project-raw-data-summary::before {
    content: '▸';
    color: var(--gov-primary);
    font-size: 0.85rem;
    line-height: 1;
}

.project-raw-data-details[open] > .project-raw-data-summary::before {
    content: '▾';
}

.project-raw-data-title {
    color: var(--gov-primary-dark);
    font-weight: 600;
    border-left: 3px solid var(--gov-primary);
    padding-left: 0.75rem;
}

.project-raw-data-desc {
    color: var(--gov-text-secondary);
    font-size: 0.8rem;
}

.project-raw-json {
    white-space: pre-wrap !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    color: #475569 !important;
    background: #f8fafc !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 0 0 4px 4px !important;
    border: none !important;
    border-top: 1px dashed var(--gov-border) !important;
}

.fi-in-entry-label {
    color: var(--gov-text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

/* 表格 */
.fi-ta-ctn {
    border: 1px solid var(--gov-border) !important;
    border-radius: 4px !important;
    overflow: hidden;
    background: #ffffff !important;
}

.fi-ta-header-cell {
    background: #fafbfc !important;
    color: var(--gov-text) !important;
    font-weight: 600 !important;
}

.fi-ta-row:hover {
    background: var(--gov-primary-light) !important;
}

/* 主按钮：略方正，符合政务系统习惯 */
.fi-btn.fi-color-primary {
    border-radius: 4px !important;
    font-weight: 500 !important;
}

.fi-btn {
    border-radius: 4px !important;
}

/* 输入框 */
.fi-input-wrp {
    border-radius: 4px !important;
}

/* ========== 登录页（全屏背景 + 右侧半透明登录框） ========== */
.gov-login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(145deg, #e8f2ff 0%, #cfe4ff 100%);
}

.fi-body:has(.gov-login-page)::before {
    display: none;
}

.gov-login-page__bg {
    position: absolute;
    inset: 0;
    background-color: #e8f2ff;
    background-image: var(--gov-login-bg, linear-gradient(145deg, #dbeafe 0%, #eff6ff 50%, #bfdbfe 100%));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.gov-login-page__aside {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 16%;
    transform: translateY(-50%);
    width: 440px;
    max-width: calc(100vw - 2.5rem);
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0 5rem;
    box-sizing: border-box;
}

.gov-login-page__hero {
    margin-bottom: 1.75rem;
    padding-right: 0.5rem;
}

.gov-login-page__hero-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d3b7a;
    letter-spacing: 0.04em;
    line-height: 1.35;
}

.gov-login-page__hero-subtitle {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.65;
}

.gov-login-page__card {
    width: 100%;
    background: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(22, 93, 173, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.65);
    padding: 1.75rem 1.75rem 1.5rem;
}

.gov-login-card-head {
    margin-bottom: 1.25rem;
}

.gov-login-card-head__title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1f2937;
}

.gov-login-page__legal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 12px;
    color: rgba(55, 65, 81, 0.88);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.gov-login-page__legal a {
    color: #165dad;
    text-decoration: none;
}

.gov-login-page__legal a:hover {
    text-decoration: underline;
}

.gov-login-page__legal-sep {
    opacity: 0.45;
    margin: 0 0.15rem;
    color: #6b7280;
}

.gov-login-page__psb {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
}

.gov-psb-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #165dad;
}

.gov-login-page .fi-simple-page {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-top: none !important;
    padding: 0 !important;
}

.gov-login-page .fi-simple-header {
    display: none;
}

.gov-login-page .fi-fo-field-wrp-label span {
    color: #374151 !important;
    font-weight: 500 !important;
}

.gov-login-page .fi-input-wrp {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(209, 213, 219, 0.9) !important;
}

.gov-login-page .fi-ac-btn-action.fi-color-primary {
    background: #165dad !important;
    border-radius: 6px !important;
    margin-top: 0.25rem;
}

.gov-login-page .fi-fo-field-wrp-helper-text {
    color: #6b7280 !important;
    font-size: 12px !important;
}

@media (max-width: 768px) {
    .gov-login-page__aside {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        margin: 0 auto;
        max-width: none;
        width: 100%;
        padding: 2rem 1.25rem 5rem;
    }

    .gov-login-page__hero-title {
        font-size: 1.45rem;
    }

    .gov-login-page__card {
        padding: 1.75rem 1.75rem 1.5rem;
    }
}

@media (min-width: 1200px) {
    .gov-login-page__aside {
        right: 20%;
    }
}

@media (min-width: 1600px) {
    .gov-login-page__aside {
        right: 24%;
    }
}

.fi-simple-layout {
    background: linear-gradient(145deg, #002856 0%, #165dad 55%, #1a6fc4 100%) !important;
}

.fi-simple-main-ctn {
    background: transparent !important;
}

.fi-simple-page {
    background: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 8px 32px rgba(0, 20, 60, 0.18) !important;
    border-top: 3px solid var(--gov-accent-red) !important;
    padding-top: 0.5rem !important;
}

.fi-simple-page .fi-simple-header-heading {
    color: var(--gov-primary-dark) !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
}

.fi-simple-page .fi-simple-header-subheading {
    color: var(--gov-text-secondary) !important;
}

.fi-simple-page .fi-ac-btn-action {
    width: 100%;
    border-radius: 4px !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    font-size: 1rem !important;
}

/* ========== 页脚 ========== */
.gov-admin-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 12px;
    color: var(--gov-text-secondary);
    border-top: 1px solid var(--gov-border);
    background: #ffffff;
}

/* ========== 工作台欢迎区 ========== */
.gov-welcome-panel {
    background: linear-gradient(135deg, var(--gov-primary-dark) 0%, var(--gov-primary) 100%);
    border-radius: 6px;
    color: #ffffff;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}

.gov-welcome-panel__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gov-welcome-panel__desc {
    font-size: 0.9rem;
    opacity: 0.88;
    line-height: 1.7;
}

.gov-welcome-panel--dashboard {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem 2rem;
}

.gov-welcome-panel__main {
    flex: 1 1 280px;
    min-width: 0;
}

.gov-welcome-panel__meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem 1.25rem;
    flex: 0 1 420px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem 1.25rem;
}

.gov-welcome-panel__meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.gov-welcome-panel__meta-label {
    font-size: 0.75rem;
    opacity: 0.75;
}

.gov-welcome-panel__meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    word-break: break-all;
}

.gov-welcome-panel__meta-value--role {
    color: #fde68a;
}

.gov-welcome-panel--empty {
    background: #ffffff;
    color: var(--gov-text);
    border: 1px solid var(--gov-border);
}

.gov-welcome-panel--empty .gov-welcome-panel__desc {
    opacity: 1;
    color: var(--gov-text-secondary);
}

.gov-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gov-quick-link {
    display: block;
    background: #ffffff;
    border: 1px solid var(--gov-border);
    border-radius: 4px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--gov-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gov-quick-link:hover {
    border-color: var(--gov-primary);
    box-shadow: 0 2px 8px rgba(22, 93, 173, 0.12);
    color: var(--gov-primary-dark);
}

.gov-quick-link__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.gov-quick-link__desc {
    font-size: 0.8rem;
    color: var(--gov-text-secondary);
}

/* —— 个人资料：标签与内容强制同一行并排 —— */
.fi-page:has(.profile-form) .fi-header,
body.fi-body-profile .fi-header {
    margin-bottom: 0.75rem;
}

.profile-form,
body.fi-body-profile .fi-form {
    max-width: none;
    width: 100%;
}

body.fi-body-profile .fi-section,
.profile-form .fi-section {
    margin-bottom: 0.75rem;
}

body.fi-body-profile .fi-section-content,
.profile-form .fi-section-content {
    padding: 0.5rem 0.75rem !important;
}

body.fi-body-profile .fi-section-header,
.profile-form .fi-section-header {
    padding: 0.5rem 0.75rem !important;
}

body.fi-body-profile .fi-section-header-heading,
.profile-form .fi-section-header-heading {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
}

body.fi-body-profile .fi-section-header-description,
.profile-form .fi-section-header-description {
    font-size: 0.75rem !important;
    margin-top: 0.1rem !important;
}

body.fi-body-profile .fi-fo-component-ctn,
.profile-form .fi-fo-component-ctn {
    gap: 0.3rem !important;
}

body.fi-body-profile [data-field-wrapper],
.profile-form [data-field-wrapper] {
    padding: 0.4rem 0.65rem;
    border-radius: 4px;
    border: 1px solid #e8eef6;
    background: #fff;
}

body.fi-body-profile .fi-fo-component-ctn > *:nth-child(odd) [data-field-wrapper],
body.fi-body-profile .fi-fo-component-ctn > .fi-grid-col:nth-child(odd) [data-field-wrapper],
.profile-form .fi-fo-component-ctn > *:nth-child(odd) [data-field-wrapper] {
    background: #f5f8fc;
}

/*
 * 强制：标题左、内容右，同一行。
 * Filament inlineLabel 使用 sm:col-span-2，在 2 列网格下会把内容挤到下一行，这里显式钉死列位。
 */
body.fi-body-profile [data-field-wrapper] > div,
.profile-form [data-field-wrapper] > div {
    display: grid !important;
    grid-template-columns: 8.5rem minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 1rem !important;
    row-gap: 0.25rem !important;
}

body.fi-body-profile [data-field-wrapper] > div > div:first-child,
.profile-form [data-field-wrapper] > div > div:first-child {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
}

body.fi-body-profile [data-field-wrapper] > div > div:last-child,
.profile-form [data-field-wrapper] > div > div:last-child {
    grid-column: 2 / 3 !important;
    grid-row: 1 !important;
}

/* 覆盖 Tailwind sm:col-span-2 */
body.fi-body-profile [data-field-wrapper] > div > [class*="col-span"],
.profile-form [data-field-wrapper] > div > [class*="col-span"] {
    grid-column: 2 / 3 !important;
}

/* 仅有内容（如头像无标签）时通栏 */
body.fi-body-profile [data-field-wrapper] > div:has(> :only-child),
.profile-form [data-field-wrapper] > div:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.fi-body-profile [data-field-wrapper] > div > :only-child,
.profile-form [data-field-wrapper] > div > :only-child {
    grid-column: 1 / -1 !important;
}

body.fi-body-profile [data-field-wrapper] .fi-fo-field-wrp-label,
body.fi-body-profile [data-field-wrapper] label,
body.fi-body-profile [data-field-wrapper] .fi-fo-field-wrp-label span,
.profile-form [data-field-wrapper] .fi-fo-field-wrp-label,
.profile-form [data-field-wrapper] label {
    margin-bottom: 0 !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.35 !important;
    white-space: nowrap;
}

body.fi-body-profile .fi-input,
body.fi-body-profile .fi-input-wrp,
.profile-form .fi-input,
.profile-form .fi-input-wrp {
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

body.fi-body-profile .fi-fo-placeholder,
.profile-form .fi-fo-placeholder {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    color: #374151;
    padding: 0.2rem 0;
}

body.fi-body-profile .fi-fo-field-wrp-helper-text,
.profile-form .fi-fo-field-wrp-helper-text {
    font-size: 0.72rem !important;
    margin-top: 0.15rem !important;
    font-weight: 400 !important;
}

/* 个人资料：保存 / 取消按钮宽度约放大 2 倍，高度保持默认 */
body.fi-body-profile .fi-form-actions {
    margin-top: 0.75rem;
    padding-top: 0.25rem;
    gap: 0.75rem !important;
}

body.fi-body-profile .fi-form-actions .fi-btn,
body.fi-body-profile .fi-form-actions button {
    min-width: 8.5rem !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* 头像居中 */
body.fi-body-profile .profile-avatar-section .fi-section-content,
.profile-form .profile-avatar-section .fi-section-content {
    display: flex !important;
    justify-content: center !important;
}

body.fi-body-profile .profile-avatar-section [data-field-wrapper],
.profile-form .profile-avatar-section [data-field-wrapper] {
    width: 100%;
    border: none;
    background: transparent !important;
    padding: 0.5rem 0;
}

body.fi-body-profile .profile-avatar-section [data-field-wrapper] > div,
.profile-form .profile-avatar-section [data-field-wrapper] > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    grid-template-columns: none !important;
}

body.fi-body-profile .profile-avatar-section [data-field-wrapper] > div > *,
.profile-form .profile-avatar-section [data-field-wrapper] > div > * {
    grid-column: auto !important;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.fi-body-profile .profile-avatar-section .fi-fo-file-upload,
body.fi-body-profile .profile-avatar-upload,
.profile-form .profile-avatar-section .fi-fo-file-upload {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100%;
}

/* —— 企业画像分块展示 —— */
.company-profile {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.company-profile-hint {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.company-profile-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #94a3b8;
}

.company-profile-block {
    border: 1px solid #e8eef6;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.company-profile-block-title {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    background: #f5f8fc;
    border-bottom: 1px solid #e8eef6;
}

.company-profile-rows {
    display: flex;
    flex-direction: column;
}

.company-profile-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}

.company-profile-row:nth-child(odd) {
    background: #fafbfd;
}

.company-profile-row:last-child {
    border-bottom: none;
}

.company-profile-label {
    flex: 0 0 6.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
}

.company-profile-value {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: #374151;
    line-height: 1.45;
    word-break: break-word;
}

.company-profile-risks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
}

.company-profile-risk-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 3px;
}
