/* 本文件由 scripts/split_css.py 从原 main.css 切分而来，级联顺序不变。 */
/* ========== iOS 27风格确认对话框 v1.0 ========== */
.confirm-dialog-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.confirm-dialog-overlay.show {
    opacity: 1;
}

.confirm-dialog {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    box-shadow:
        0 1px 2px rgba(255,255,255,0.9) inset,
        0 10px 40px rgba(0,0,0,0.12),
        0 30px 80px rgba(0,0,0,0.15);
    padding: 32px 28px 24px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.confirm-dialog-overlay.show .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.confirm-dialog-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary, #1d1d1f);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.confirm-dialog-message {
    font-size: 14px;
    color: var(--text-secondary, #6e6e73);
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.confirm-dialog-buttons {
    display: flex;
    gap: 10px;
}

.confirm-dialog-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.confirm-dialog-btn:active {
    transform: scale(0.97);
}

.confirm-dialog-cancel {
    background: rgba(120, 120, 128, 0.12);
    color: var(--text-primary, #1d1d1f);
}

.confirm-dialog-cancel:hover {
    background: rgba(120, 120, 128, 0.2);
}

.confirm-btn-default {
    background: linear-gradient(180deg, #0A84FF 0%, #007AFF 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.confirm-btn-default:hover {
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.confirm-btn-danger {
    background: linear-gradient(180deg, #FF453A 0%, #FF3B30 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.confirm-btn-danger:hover {
    box-shadow: 0 6px 16px rgba(255, 59, 48, 0.4);
    transform: translateY(-1px);
}

.confirm-btn-warning {
    background: linear-gradient(180deg, #FFB340 0%, #FF9500 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.confirm-btn-warning:hover {
    box-shadow: 0 6px 16px rgba(255, 149, 0, 0.4);
    transform: translateY(-1px);
}

/* ========== 表单验证错误样式 v1.0 ========== */
.form-error {
    font-size: 12px;
    color: #FF3B30;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: errorShake 0.4s ease;
}

.form-error i {
    font-size: 14px;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.input-error {
    border-color: #FF3B30 !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12) !important;
    animation: inputErrorPulse 0.5s ease;
}

@keyframes inputErrorPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12); }
}

/* 移动端确认对话框 */
@media (max-width: 768px) {
    .confirm-dialog {
        padding: 28px 20px 20px;
        border-radius: 24px;
    }

    .confirm-dialog-title {
        font-size: 17px;
    }

    .confirm-dialog-message {
        font-size: 13px;
    }

    .confirm-dialog-buttons {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .confirm-dialog-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}


/* ========== 文件发放接收人员选择 ========== */
.recipient-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
    color: var(--text-primary);
}

.recipient-checkbox:hover {
    background: var(--bg-hover);
}

.recipient-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #007AFF;
    flex-shrink: 0;
}

.recipient-checkbox span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipient-list::-webkit-scrollbar {
    width: 6px;
}

.recipient-list::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.recipient-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ========== 商业智能(BI)模块样式 ========== */

/* KPI图标颜色 */
.kpi-icon-blue { background: linear-gradient(135deg, #007AFF, #5AC8FA); color: white; }
.kpi-icon-green { background: linear-gradient(135deg, #34C759, #30D158); color: white; }
.kpi-icon-purple { background: linear-gradient(135deg, #AF52DE, #BF5AF2); color: white; }
.kpi-icon-orange { background: linear-gradient(135deg, #FF9500, #FF9F0A); color: white; }

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
}

.kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-trend {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.up { color: #34C759; }
.kpi-trend.down { color: #FF3B30; }
.kpi-trend.stable { color: #8E8E93; }

/* 图表区域 */
.chart-section {
    margin-bottom: 20px;
}

.chart-card {
    background: var(--glass-bg, rgba(255,255,255,0.72));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-container {
    width: 100%;
    min-height: 300px;
    position: relative;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-secondary, #8E8E93);
    gap: 12px;
}

.chart-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.chart-placeholder p {
    margin: 0;
    font-size: 14px;
}

.chart-bar {
    transition: fill 0.2s ease, transform 0.2s ease;
}

.chart-bar:hover {
    filter: brightness(1.1);
}

/* 分析网格（异常检测+TOP N） */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.analysis-card {
    background: var(--glass-bg, rgba(255,255,255,0.72));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.analysis-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
}

.analysis-content {
    max-height: 320px;
    overflow-y: auto;
}

.analysis-content::-webkit-scrollbar {
    width: 6px;
}

.analysis-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

/* 异常检测项 */
.anomaly-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255,149,0,0.06);
    border: 1px solid rgba(255,149,0,0.15);
    transition: background 0.2s ease;
}

.anomaly-item:hover {
    background: rgba(255,149,0,0.1);
}

.anomaly-item.severity-high {
    background: rgba(255,59,48,0.06);
    border-color: rgba(255,59,48,0.15);
}

.anomaly-item.severity-medium {
    background: rgba(255,149,0,0.06);
    border-color: rgba(255,149,0,0.15);
}

.anomaly-item.severity-low {
    background: rgba(52,199,89,0.06);
    border-color: rgba(52,199,89,0.15);
}

.anomaly-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,149,0,0.15);
    color: #FF9500;
}

.anomaly-item.severity-high .anomaly-icon {
    background: rgba(255,59,48,0.15);
    color: #FF3B30;
}

.anomaly-content {
    flex: 1;
    min-width: 0;
}

.anomaly-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
    margin-bottom: 4px;
}

.anomaly-desc {
    font-size: 12px;
    color: var(--text-secondary, #8E8E93);
    line-height: 1.4;
}

.severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.severity-dot.high { background: #FF3B30; }
.severity-dot.medium { background: #FF9500; }
.severity-dot.low { background: #34C759; }

/* TOP N排行项 */
.topn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.topn-item:last-child {
    border-bottom: none;
}

.topn-rank {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(0,122,255,0.1);
    color: #007AFF;
}

.topn-rank.rank-1 { background: linear-gradient(135deg, #FFD60A, #FF9F0A); color: white; }
.topn-rank.rank-2 { background: linear-gradient(135deg, #E5E5EA, #AEAEB2); color: white; }
.topn-rank.rank-3 { background: linear-gradient(135deg, #FF9F0A, #FF6B00); color: white; }

.topn-content {
    flex: 1;
    min-width: 0;
}

.topn-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #1C1C1E);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topn-bar {
    width: 100%;
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.topn-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5AC8FA);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.topn-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

/* KPI详情区域 */
.kpi-detail-section {
    background: var(--glass-bg, rgba(255,255,255,0.72));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
}

.section-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.kpi-table-container {
    overflow-x: auto;
}

.kpi-table-container::-webkit-scrollbar {
    height: 6px;
}

.kpi-table-container::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.success { background: linear-gradient(90deg, #34C759, #30D158); }
.progress-fill.warning { background: linear-gradient(90deg, #FF9500, #FF9F0A); }
.progress-fill.danger { background: linear-gradient(90deg, #FF3B30, #FF453A); }

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary, #8E8E93);
}

/* 趋势指示器 */
.trend-indicator {
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.trend-indicator.trend-up { color: #34C759; background: rgba(52,199,89,0.1); }
.trend-indicator.trend-down { color: #FF3B30; background: rgba(255,59,48,0.1); }
.trend-indicator.trend-stable { color: #8E8E93; background: rgba(142,142,147,0.1); }

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary, #8E8E93);
    text-align: center;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* BI模块响应式 */
@media (max-width: 768px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-header,
    .analysis-header,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .kpi-table-container {
        font-size: 12px;
    }
}

/* ========== 移动端深度优化 v2.0 - iOS 27风格 ========== */

/* 1. iOS输入框16px防缩放（关键：iOS Safari在输入框<16px时自动缩放页面） */
@media (max-width: 768px) {
    input, select, textarea,
    .form-input, .form-select,
    .modal-body input, .modal-body select, .modal-body textarea {
        font-size: 16px !important;
    }
    
    /* 搜索框和小输入框也保持16px */
    .search-input input,
    .filter-bar input,
    .filter-bar select {
        font-size: 16px !important;
    }
}

/* 2. 动态视口高度适配（100dvh解决移动端浏览器地址栏问题） */
.app-layout,
.sidebar,
.main-content,
.auth-container,
.login-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
}

/* 3. 模态框移动端底部Sheet样式（iOS 27风格） */
@media (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    
    .modal {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 92vh !important;
        max-height: 92dvh !important;
        border-radius: 24px 24px 0 0 !important;
        margin: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        animation: modalSlideUpMobile 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }
    
    /* 模态框顶部拖拽指示器（iOS风格） */
    .modal::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 5px;
        background: rgba(0, 0, 0, 0.15);
        border-radius: 3px;
    }
    
    .modal-header {
        padding-top: 20px !important;
    }
    
    .modal-body {
        max-height: calc(92vh - 140px) !important;
        max-height: calc(92dvh - 140px) !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
}

@keyframes modalSlideUpMobile {
    from {
        transform: translateY(100%);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 4. 触摸目标最小44px（Apple HIG标准） */
@media (max-width: 768px) {
    .btn,
    .btn-sm,
    .btn-icon,
    .action-btn,
    .nav-item a,
    .sidebar-footer a,
    .dropdown-item,
    .tab-item,
    .pagination a,
    .close-btn {
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* 表格内操作按钮保持紧凑但可触摸 */
    .data-table .btn,
    .data-table .btn-sm {
        min-height: 36px !important;
        min-width: 36px !important;
        padding: 6px 10px !important;
    }
}

/* 5. iOS安全区域适配（刘海屏、底部Home条） */
@supports (padding: max(0px)) {
    .sidebar {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    .main-content {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .topbar {
        padding-top: max(0px, env(safe-area-inset-top));
    }
    
    .sidebar-footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
    
    .auth-container,
    .login-wrapper {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* 6. 防止双击缩放 + 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    * {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* 移除移动端hover效果（避免点击后残留hover状态） */
    .data-table tbody tr:hover,
    .nav-item:hover,
    .card:hover {
        background: inherit !important;
        transform: none !important;
        box-shadow: inherit !important;
    }
    
    /* 移动端点击反馈（active状态） */
    .btn:active,
    .nav-item:active,
    .card:active,
    .data-table tbody tr:active {
        transform: scale(0.97) !important;
        transition: transform 0.1s ease !important;
    }
}

/* 7. 表单网格移动端单列 */
@media (max-width: 600px) {
    .form-grid,
    .form-row,
    .filter-bar,
    .stats-grid,
    .card-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .filter-bar > * {
        width: 100% !important;
    }
}

/* 8. 移动端滚动性能优化 */
.main-content,
.sidebar-nav,
.modal-body,
.table-container,
.data-table-wrapper {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 9. 移动端图片和媒体自适应 */
@media (max-width: 768px) {
    img, video, canvas, svg {
        max-width: 100%;
        height: auto;
    }
    
    /* 报告PDF预览区域适配 */
    .pdf-viewer,
    .report-preview {
        width: 100% !important;
        height: 60vh !important;
        height: 60dvh !important;
    }
}

/* 10. 移动端字号优化（可读性） */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .page-title {
        font-size: 20px !important;
    }
    
    .card-title {
        font-size: 16px !important;
    }
    
    .data-table {
        font-size: 13px !important;
    }
    
    .data-table thead th {
        font-size: 11px !important;
        padding: 8px 6px !important;
    }
    
    .data-table tbody td {
        padding: 10px 6px !important;
    }
    
    .stat-value {
        font-size: 22px !important;
    }
    
    .stat-label {
        font-size: 12px !important;
    }
}

/* 11. 移动端顶部操作栏优化 */
@media (max-width: 768px) {
    .topbar {
        padding: 8px 12px !important;
        gap: 8px !important;
    }
    
    .topbar-title {
        font-size: 16px !important;
    }
    
    .topbar-actions {
        gap: 4px !important;
    }
    
    /* 搜索框移动端全宽 */
    .search-box {
        flex: 1 !important;
        min-width: 0 !important;
    }
}

/* 12. 移动端Toast通知位置优化（避开底部Home条） */
@media (max-width: 768px) {
    .toast-container,
    .toast-wrapper {
        bottom: calc(20px + env(safe-area-inset-bottom)) !important;
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
    }
    
    .toast {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px !important;
    }
}

/* 13. 移动端确认对话框底部Sheet */
@media (max-width: 768px) {
    .confirm-dialog-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    
    .confirm-dialog {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        margin: 0 !important;
        animation: modalSlideUpMobile 0.35s cubic-bezier(0.32, 0.72, 0, 1) !important;
    }
    
    .confirm-dialog-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

/* 14. 移动端侧边栏优化（已在之前添加，这里补充安全区域） */
@media (max-width: 1024px) {
    .sidebar {
        padding-top: calc(12px + env(safe-area-inset-top)) !important;
    }
    
    .sidebar-overlay {
        padding-top: env(safe-area-inset-top) !important;
    }
}

/* 15. 移动端打印样式优化 */
@media print {
    .sidebar, .topbar, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 20px !important;
    }
    
    .data-table {
        font-size: 11px !important;
    }
}

/* ========== iOS 27 风格登录页 v2.0 ========== */

.ios27-login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(160deg, #F4F6FB 0%, #EAEFF7 55%, #E2E8F3 100%);
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 动态背景光斑 */
.ios27-bg-orbs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.28;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px; height: 500px;
    background: linear-gradient(135deg, #0A84FF, #5E5CE6);
    top: -150px; left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px; height: 450px;
    background: linear-gradient(135deg, #30D158, #0A84FF);
    bottom: -120px; right: -80px;
    animation-delay: -5s;
}

.orb-3 {
    width: 380px; height: 380px;
    background: linear-gradient(135deg, #FF9F0A, #FF375F);
    top: 40%; left: 55%;
    animation-delay: -10s;
    opacity: 0.2;
}

.orb-4 {
    width: 320px; height: 320px;
    background: linear-gradient(135deg, #BF5AF2, #5E5CE6);
    bottom: 20%; left: 10%;
    animation-delay: -15s;
    opacity: 0.22;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.02); }
}

/* 网格背景 */
.ios27-bg-grid {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(60, 60, 67, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(60, 60, 67, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* 主容器 */
.ios27-login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 980px;
    padding: 24px;
    animation: wrapperFadeIn 0.8s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes wrapperFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 登录卡片 */
.ios27-login-card {
    display: flex;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 32px;
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.9) inset,
        0 30px 80px rgba(20, 35, 70, 0.14),
        0 10px 30px rgba(20, 35, 70, 0.08);
    overflow: hidden;
    min-height: 620px;
    position: relative;
}

.ios27-login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.95), transparent);
    z-index: 2;
}

/* 左侧品牌区 */
.ios27-login-brand {
    flex: 1.1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(10,132,255,0.08) 0%, rgba(94,92,230,0.05) 100%);
    border-right: 1px solid rgba(60, 60, 67, 0.08);
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo-full {
    position: relative;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.85) inset,
        0 8px 24px rgba(20, 35, 70, 0.08);
    transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.brand-logo-full:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.95) inset,
        0 12px 32px rgba(20, 35, 70, 0.12);
}

.brand-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(13, 71, 161, 0.15));
    transition: all 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.brand-logo-full:hover .brand-logo-img {
    filter: drop-shadow(0 4px 16px rgba(10, 132, 255, 0.35));
}

.brand-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 90px;
    background: radial-gradient(ellipse, rgba(10, 132, 255, 0.12) 0%, transparent 70%);
    filter: blur(24px);
    z-index: 1;
    animation: logoGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.brand-tagline {
    font-size: 13px;
    color: rgba(60, 60, 67, 0.65);
    margin: 0 0 28px 0;
    letter-spacing: 0.2px;
}

.brand-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #0A84FF, #5E5CE6);
    border-radius: 2px;
    margin-bottom: 28px;
}

.brand-headline {
    font-size: 32px;
    font-weight: 700;
    color: #1D1D1F;
    line-height: 1.25;
    margin: 0 0 32px 0;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, #0060DF 0%, #248A3D 50%, #E08E00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.55);
    border-radius: 14px;
    border: 1px solid rgba(60, 60, 67, 0.08);
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.brand-feature:hover {
    background: rgba(255,255,255,0.85);
    transform: translateX(4px);
    border-color: rgba(10, 132, 255, 0.25);
}

.feature-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, rgba(10,132,255,0.14), rgba(94,92,230,0.1));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #0A84FF;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #1D1D1F;
}

.feature-desc {
    font-size: 11px;
    color: rgba(60, 60, 67, 0.6);
}

.brand-footer {
    margin-top: 36px;
}

.version-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(60, 60, 67, 0.1);
    border-radius: 20px;
    font-size: 11px;
    color: rgba(60, 60, 67, 0.7);
    letter-spacing: 0.3px;
}

/* 右侧登录区 */
.ios27-login-form-area {
    flex: 1;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-content {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 32px;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1D1D1F;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.form-subtitle {
    font-size: 14px;
    color: rgba(60, 60, 67, 0.65);
    margin: 0;
}

/* 表单字段 */
.ios27-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(60, 60, 67, 0.8);
    padding-left: 4px;
}

.field-label i {
    font-size: 14px;
    color: #0A84FF;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ios27-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 44px;
    background: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(60, 60, 67, 0.14);
    border-radius: 14px;
    font-size: 15px;
    color: #1D1D1F;
    outline: none;
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.ios27-input::placeholder {
    color: rgba(60, 60, 67, 0.42);
}

.ios27-input:focus {
    background: #FFFFFF;
    border-color: rgba(10,132,255,0.6);
    box-shadow: 
        0 0 0 4px rgba(10,132,255,0.15),
        0 4px 12px rgba(10,132,255,0.1);
}

.input-wrapper.focused .input-glow {
    opacity: 1;
}

.input-glow {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(10,132,255,0.3), rgba(94,92,230,0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(8px);
}

.password-toggle {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(60, 60, 67, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: rgba(60, 60, 67, 0.9);
    background: rgba(60, 60, 67, 0.08);
}

/* 选项行 */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.ios27-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.ios27-checkbox input {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: rgba(255,255,255,0.9);
    border: 1.5px solid rgba(60, 60, 67, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    color: transparent;
}

.ios27-checkbox input:checked + .checkbox-box {
    background: linear-gradient(135deg, #0A84FF, #5E5CE6);
    border-color: transparent;
    color: white;
}

.checkbox-label {
    font-size: 13px;
    color: rgba(60, 60, 67, 0.75);
}

.forgot-link {
    font-size: 13px;
    color: #0A84FF;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.forgot-link:hover {
    opacity: 0.8;
}

/* 登录按钮 */
.ios27-login-btn {
    position: relative;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.2) inset,
        0 8px 24px rgba(10,132,255,0.3);
    overflow: hidden;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.ios27-login-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.ios27-login-btn:hover::before {
    left: 100%;
}

.ios27-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.2) inset,
        0 12px 32px rgba(10,132,255,0.4);
}

.ios27-login-btn:active {
    transform: translateY(0) scale(0.98);
}

.ios27-login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.ios27-login-btn.loading .btn-text,
.ios27-login-btn.loading .btn-arrow {
    display: none;
}

.ios27-login-btn .btn-loading {
    display: none;
    font-size: 20px;
    animation: spin 1s linear infinite;
}

.ios27-login-btn.loading .btn-loading {
    display: block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-arrow {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.ios27-login-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* 分割线 */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(60, 60, 67, 0.12);
}

.form-divider span {
    font-size: 12px;
    color: rgba(60, 60, 67, 0.5);
}

/* 演示账户 */
.demo-accounts {
    margin-bottom: 24px;
}

.demo-title {
    font-size: 12px;
    color: rgba(60, 60, 67, 0.55);
    text-align: center;
    margin: 0 0 12px 0;
}

.demo-buttons {
    display: flex;
    gap: 8px;
}

.demo-btn {
    flex: 1;
    padding: 10px 8px;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(60, 60, 67, 0.1);
    border-radius: 10px;
    color: rgba(60, 60, 67, 0.8);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.demo-btn i {
    font-size: 18px;
    color: #0A84FF;
}

.demo-btn:hover {
    background: rgba(10,132,255,0.1);
    border-color: rgba(10,132,255,0.35);
    color: #0A84FF;
    transform: translateY(-1px);
}

/* 底部 */
.form-footer {
    text-align: center;
}

.lang-switcher {
    display: inline-flex;
    background: rgba(60, 60, 67, 0.06);
    border: 1px solid rgba(60, 60, 67, 0.08);
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 16px;
}

.lang-pill {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: rgba(60, 60, 67, 0.65);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

.lang-pill.active {
    background: #FFFFFF;
    color: #1D1D1F;
    box-shadow: 0 1px 3px rgba(20, 35, 70, 0.12);
}

.copyright {
    font-size: 11px;
    color: rgba(60, 60, 67, 0.5);
    margin: 0;
}

/* 响应式 */
@media (max-width: 860px) {
    .ios27-login-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .ios27-login-brand {
        padding: 36px 32px 28px;
        border-right: none;
        border-bottom: 1px solid rgba(60, 60, 67, 0.08);
    }
    
    .brand-headline {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .brand-features {
        gap: 12px;
    }
    
    .ios27-login-form-area {
        padding: 36px 32px;
    }
}

@media (max-width: 480px) {
    .ios27-login-wrapper {
        padding: 16px;
    }
    
    .ios27-login-card {
        border-radius: 24px;
    }
    
    .ios27-login-brand {
        padding: 28px 24px 20px;
    }
    
    .brand-logo-full {
        padding: 14px 22px;
        border-radius: 16px;
    }
    
    .brand-logo-img {
        max-height: 42px;
    }
    
    .brand-tagline {
        margin-bottom: 20px;
    }
    
    .brand-headline {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .brand-features {
        display: none;
    }
    
    .brand-footer {
        margin-top: 20px;
    }
    
    .ios27-login-form-area {
        padding: 28px 24px;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .demo-buttons {
        flex-direction: column;
    }
    
    .demo-btn {
        flex-direction: row;
        justify-content: center;
        padding: 12px;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .ios27-login-wrapper {
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        padding-left: max(24px, env(safe-area-inset-left));
        padding-right: max(24px, env(safe-area-inset-right));
    }
}

/* ========== 状态流转进度条 ========== */
.flow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    position: relative;
}
.flow-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}
.flow-step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}
.flow-step-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 500;
}
.flow-step-line {
    position: absolute;
    top: 22px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--glass-border);
    z-index: -1;
}
.flow-step.completed .flow-step-icon {
    background: linear-gradient(135deg, var(--apple-green), #34c759);
    border-color: var(--apple-green);
    color: white;
}
.flow-step.completed .flow-step-label {
    color: var(--apple-green);
    font-weight: 600;
}
.flow-step.completed .flow-step-line {
    background: linear-gradient(90deg, var(--apple-green), var(--glass-border));
}
.flow-step.active .flow-step-icon {
    background: linear-gradient(135deg, var(--apple-blue), #007AFF);
    border-color: var(--apple-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
    animation: pulse-glow 2s ease-in-out infinite;
}
.flow-step.active .flow-step-label {
    color: var(--apple-blue);
    font-weight: 700;
}
.flow-step.cancelled .flow-step-icon {
    background: rgba(255,59,48,0.1);
    border-color: var(--apple-red);
    opacity: 0.6;
}
.flow-step.cancelled .flow-step-label {
    color: var(--apple-red);
    text-decoration: line-through;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0,122,255,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(0,122,255,0.08); }
}

/* ========== 下一步操作指引卡片 ========== */
.next-action-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(0,122,255,0.08), rgba(88,86,214,0.08));
    border: 1px solid rgba(0,122,255,0.2);
    border-radius: var(--radius-md);
    gap: 16px;
}
.next-action-info {
    flex: 1;
}
.next-action-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--apple-blue);
    margin-bottom: 4px;
}
.next-action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.next-action-card .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .flow-steps {
        padding: 12px 8px;
        overflow-x: auto;
    }
    .flow-step {
        min-width: 60px;
    }
    .flow-step-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .flow-step-label {
        font-size: 10px;
    }
    .flow-step-line {
        top: 18px;
    }
    .next-action-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .next-action-card .btn {
        width: 100%;
    }
}

/* ========== 导航栏拖拽排序 ========== */
.nav-item.nav-sortable {
    cursor: grab;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    user-select: none;
}

.nav-item.nav-sortable:active {
    cursor: grabbing;
}

.nav-item.nav-dragging {
    opacity: 0.4;
    transform: scale(0.98);
    background: rgba(0, 122, 255, 0.1);
}

.nav-item.nav-drag-over {
    position: relative;
}

.nav-item.nav-drag-before::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 122, 255, 0.5);
    z-index: 10;
}

.nav-item.nav-drag-after::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #5856D6);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 122, 255, 0.5);
    z-index: 10;
}

/* 重置导航顺序按钮 */
.nav-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-reset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-reset-btn i {
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-item.nav-sortable {
        cursor: default;
    }
    .nav-reset-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ============================================
   行业标签样式 (Industry Badge)
   ============================================ */

/* 顶部导航栏行业标签 */
.industry-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.1), rgba(0, 191, 165, 0.1));
    border: 1px solid rgba(13, 71, 161, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.industry-badge:hover {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.15), rgba(0, 191, 165, 0.15));
    border-color: rgba(13, 71, 161, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.15);
}

.industry-badge i {
    font-size: 16px;
    color: #0D47A1;
}

.industry-badge-name {
    font-size: 13px;
    font-weight: 600;
    color: #0D47A1;
    white-space: nowrap;
}

/* 侧边栏行业信息区域 */
.sidebar-industry-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    margin: 2px 8px;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.08), rgba(0, 191, 165, 0.08));
    border: 1px solid rgba(13, 71, 161, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-industry-info:hover {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.12), rgba(0, 191, 165, 0.12));
    border-color: rgba(13, 71, 161, 0.25);
    transform: translateX(2px);
}

.sidebar-industry-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0D47A1, #00BFA5);
    border-radius: 10px;
    flex-shrink: 0;
}

.sidebar-industry-icon i {
    font-size: 13px;
    color: white;
}

.sidebar-industry-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sidebar-industry-label {
    font-size: 10px;
    color: #6c757d;
    font-weight: 500;
}

.sidebar-industry-name {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-industry-arrow {
    font-size: 18px;
    color: #adb5bd;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-industry-info:hover .sidebar-industry-arrow {
    transform: translateX(3px);
    color: #0D47A1;
}

/* 行业标签响应式适配 */
@media (max-width: 768px) {
    .industry-badge {
        padding: 4px 10px;
        margin-left: 8px;
    }
    
    .industry-badge-name {
        font-size: 12px;
    }
    
    .industry-badge i {
        font-size: 14px;
    }
    
    .sidebar-industry-info {
        padding: 10px 12px;
        margin: 6px 10px;
    }
    
    .sidebar-industry-icon {
        width: 32px;
        height: 32px;
    }
    
    .sidebar-industry-icon i {
        font-size: 16px;
    }
    
    .sidebar-industry-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .industry-badge-name {
        display: none;
    }
    
    .industry-badge {
        padding: 6px 8px;
    }
}


/* ===== 移动端适配修复 ===== */
html, body { overflow-x: hidden; max-width: 100%; }

/* toast 在手机上居中全宽，不固定 right */
@media (max-width: 768px) {
    .toast {
        top: auto;
        bottom: 20px;
        left: 16px;
        right: 16px;
        max-width: none;
        transform: translateY(120%);
    }
    .toast.show { transform: translateY(0); }
}

/* 防止表格横向溢出 */
.table-responsive, .card, .modal-body { max-width: 100%; overflow-x: auto; }

/* 登录页在小屏上不留大 padding */
@media (max-width: 480px) {
    .ios27-login-form-area { padding: 24px 20px !important; }
    .ios27-login-brand { padding: 24px 20px 16px !important; }
    .ios27-login-wrapper { padding: 8px !important; }
}


/* ===== iOS Safari backdrop-filter 导致触摸事件被吞 ===== */
@media (max-width: 768px) {
    /* 禁用所有 glass 效果的 backdrop-filter，改用纯色，避免 GPU 合成层吞触摸事件 */
    .ios27-login-card,
    .toast-item,
    .data-table thead th,
    .table-card,
    .kpi-card,
    .modal,
    .glass-panel {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .ios27-login-card {
        background: rgba(30, 30, 40, 0.95) !important;
    }
    .toast-item {
        background: rgba(255,255,255,0.97) !important;
    }
    .toast-container {
        pointer-events: none;
    }
    .toast-item {
        pointer-events: auto;
    }
}

/* ========== 移动端表格和溢出优化 (20260921b) ========== */
@media (max-width: 768px) {
    /* 表格容器允许横向滚动，不截断 */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table {
        min-width: 600px; /* 确保列不被过度压缩 */
    }
    .data-table thead th,
    .data-table tbody td {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap; /* 表头和单元格不换行，靠横向滚动 */
    }
    /* 页面标题和描述在小屏幕缩小 */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    .page-header .btn {
        width: 100%;
    }
    /* 筛选栏在移动端换行 */
    .filter-bar {
        flex-direction: column;
        gap: 8px;
    }
    .filter-bar input,
    .filter-bar select,
    .filter-bar .btn {
        width: 100%;
    }
    /* KPI 卡片文字缩小防溢出 */
    .kpi-card .kpi-value {
        font-size: 22px !important;
    }
    /* 卡片内容最大宽度限制 */
    .card, .modal-body, .detail-grid {
        max-width: 100%;
        overflow-x: hidden;
    }
    /* 英文长文本在详情里换行 */
    .detail-item value, .detail-item span {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    .data-table { min-width: 500px; }
    .data-table thead th, .data-table tbody td { padding: 8px 10px; font-size: 11px; }
    .kpi-grid { gap: 8px; }
    .kpi-card { padding: 12px !important; }
    .kpi-card .kpi-value { font-size: 18px !important; }
}

/* ===== 菜单管理（编辑模式）===== */
.nav-hide-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,59,48,0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;
    opacity: 0.9;
}
.nav-hide-btn:hover { opacity: 1; transform: translateY(-50%) scale(1.15); }
.nav-item { position: relative; }
.nav-restore-panel {
    margin: 8px 12px;
    padding: 10px;
    background: rgba(255,255,255,0.6);
    border: 1px dashed #007AFF;
    border-radius: 8px;
    font-size: 12px;
}
.nav-restore-title { font-weight: 600; color: #007AFF; margin-bottom: 6px; }
.nav-restore-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-restore-row:last-child { border-bottom: none; }
.nav-restore-btn {
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 11px;
    cursor: pointer;
}
.nav-restore-btn:hover { background: #0056CC; }

/* ===== 移动端通用表格溢出修复 ===== */
@media (max-width: 768px) {
    .table-responsive, .card-body > .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive table {
        min-width: 600px;
    }
    .filter-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .filter-bar input, .filter-bar select {
        min-width: 120px;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    .modal-dialog {
        width: 95% !important;
        margin: 10px auto;
    }
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .tab-btn {
        white-space: nowrap;
    }
}

/* === 移动端深度优化（20260922r） === */
@media (max-width: 768px) {
  /* 表格横向滚动容器 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .table-responsive table {
    min-width: 600px;
  }
  /* 卡片网格改为单列 */
  .stats-grid, .cards-grid, .module-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  /* 按钮组垂直排列 */
  .btn-group, .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .btn-group .btn, .action-buttons .btn {
    width: 100%;
  }
  /* 模态框全屏 */
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    margin: 0;
  }
  .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 侧边栏折叠 */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  /* 字体调整 */
  body {
    font-size: 14px;
  }
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
}

@media (max-width: 480px) {
  /* 超小屏进一步优化 */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header .actions {
    width: 100%;
  }
  .page-header .btn {
    width: 100%;
  }
  /* 表格字号缩小 */
  table {
    font-size: 12px;
  }
  /* 表单标签堆叠 */
  .form-group {
    margin-bottom: 12px;
  }
  .form-group label {
    display: block;
    margin-bottom: 4px;
  }
}

/* ========== 移动端深度优化 v3.0 ========== */
@media (max-width: 768px) {
    /* 表格横向滚动 */
    .table-container, .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
    }
    
    /* 按钮组换行 */
    .btn-group, .action-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    /* 表单元素全宽 */
    .form-control, .form-select {
        width: 100%;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
    
    /* 卡片内边距优化 */
    .card, .kpi-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    /* 页面标题缩小 */
    .page-header h1 {
        font-size: 20px;
    }
    .page-desc {
        font-size: 13px;
    }
    
    /* 侧边栏折叠为抽屉 */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1002;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    
    /* 模态框全宽 */
    .modal {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh;
    }
    
    /* KPI卡片单列 */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* 工具栏换行 */
    .toolbar, .page-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    /* 标签页可横向滚动 */
    .tabs, .tab-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }
    .tab-btn {
        white-space: nowrap;
    }
    
    /* 详情网格单列 */
    .detail-grid, .info-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* 分页简化 */
    .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    /* 超小屏优化 */
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group .btn {
        flex: 1;
        text-align: center;
    }
    
    /* 顶栏简化 */
    .topbar {
        padding: 0 12px;
    }
    .topbar-title {
        font-size: 14px;
    }
    
    /* 模态框内容滚动 */
    .modal-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* 防止移动端双击缩放 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 移动端安全区域适配 */
@supports (padding: env(safe-area-inset-bottom)) {
    .bottom-nav, .mobile-tab-bar {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 移动端深度优化v4 - 20260923 */
@media (max-width: 480px) {
    /* 模态框全宽优化 */
    .modal {
        width: 98% !important;
        max-height: 95vh !important;
        margin: 10px !important;
    }
    .modal-header, .modal-footer {
        padding: 12px 16px !important;
    }
    .modal-body {
        padding: 16px !important;
    }
    
    /* 表格优化 */
    .table {
        font-size: 13px !important;
    }
    .table th, .table td {
        padding: 8px 6px !important;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }
    .btn-sm {
        padding: 4px 8px !important;
        font-size: 12px !important;
    }
    
    /* 表单优化 */
    .form-input, .form-select, .form-textarea {
        font-size: 16px !important; /* 防止iOS自动缩放 */
        padding: 10px 12px !important;
    }
    
    /* 卡片间距优化 */
    .glass-panel {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    /* KPI卡片单列 */
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 侧边栏隐藏优化 */
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
    }
    .sidebar.open {
        transform: translateX(0) !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* 平板适配 */
@media (min-width: 481px) and (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .detail-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   宽表格布局修复（英文模式/i18n 排版，解决表格撑开页面）
   根因：flex item 默认 min-width:auto 被宽表格撑开；操作按钮在
   窄列内换行堆叠导致行高异常。由卡片层负责横向滚动。
   ============================================================ */
.main-wrapper {
    min-width: 0;
}
.table-card {
    overflow-x: auto;
}
.table-card .table-responsive {
    overflow-x: visible;
}
.table-actions {
    flex-wrap: nowrap;
}
.table-actions .btn {
    white-space: nowrap;
}
