/* ==========================================================================
   水利工程档案管理系统 - 高级磨砂玻璃美学样式表 (styles.css)
   基于 SL/T 824-2024 与水办〔2023〕132号文标准定制
   ========================================================================== */

/* 1. 全局设计系统与变量 */
:root {
    /* 极致美学色彩体系 */
    --bg-dark: #070d19;
    --sidebar-bg: rgba(10, 20, 38, 0.6);
    --card-bg: rgba(20, 35, 60, 0.35);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-glow: rgba(0, 180, 216, 0.25);
    
    --text-primary: #f8f9fa;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    /* 核心语义颜色 */
    --blue: #00b4d8;
    --blue-glow: rgba(0, 180, 216, 0.4);
    --mint: #2ec4b6;
    --mint-glow: rgba(46, 196, 182, 0.35);
    --coral: #ff9f1c;
    --coral-glow: rgba(255, 159, 28, 0.35);
    --crimson: #e63946;
    --crimson-glow: rgba(230, 57, 70, 0.35);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Outfit', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

/* 2. 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
}

/* 3. 流光溢彩背景光斑效果 */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.25) 0%, rgba(0,0,0,0) 70%);
    top: -10%;
    left: -10%;
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46, 196, 182, 0.2) 0%, rgba(0,0,0,0) 70%);
    bottom: -15%;
    right: -10%;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(142, 68, 173, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: 30%;
    left: 45%;
}

/* 4. 应用程序主体布局 */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* 5. 侧边导航栏样式 */
.sidebar {
    width: 280px;
    height: 100%;
    background: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--blue), var(--mint));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.wave-icon {
    color: white;
    animation: wave-float 3s ease-in-out infinite;
}

@keyframes wave-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
}

/* 下拉菜单自定义样式 */
.project-selector-container {
    margin-bottom: 24px;
}

.project-selector-container label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.custom-select:focus {
    border-color: var(--blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px var(--blue-glow);
}

.custom-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-secondary);
    pointer-events: none;
}

/* 导航菜单列表 */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: var(--transition-smooth);
    position: relative;
}

.menu-item svg {
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

.menu-item.active {
    color: white;
    background: linear-gradient(90deg, rgba(0, 180, 216, 0.15) 0%, rgba(46, 196, 182, 0.05) 100%);
    border-left: 3px solid var(--blue);
    box-shadow: inset 5px 0 15px rgba(0, 180, 216, 0.05);
}

.menu-item.active svg {
    color: var(--blue);
    opacity: 1;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--crimson);
    border-radius: 50%;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.pulse {
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    animation: pulse-effect 1.8s infinite;
}

@keyframes pulse-effect {
    0% { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { transform: translateY(-50%) scale(1); box-shadow: 0 0 0 6px rgba(230, 57, 70, 0); }
    100% { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

/* 角色模拟面板 */
.role-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
    margin-top: auto;
}

.role-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
}

.role-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.role-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
    text-align: center;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.role-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--blue-glow);
}

/* 6. 主工作空间布局 */
.main-content {
    flex-grow: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px 32px 32px 32px;
    overflow: hidden;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.header-left h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.project-tag {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    color: var(--blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.role-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.role-dot {
    width: 8px;
    height: 8px;
    background-color: var(--mint);
    border-radius: 50%;
}

.text-glow {
    color: var(--blue);
    text-shadow: 0 0 10px var(--blue-glow);
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
}

.notification-bell:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.05);
}

.bell-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--coral);
    color: black;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px var(--coral-glow);
}

/* 7. 视图容器与切换 */
.view-viewport {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

.view-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    transform: translateY(10px);
}

.view-panel.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

/* 8. 精美卡片组件 */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(0, 180, 216, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.card-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.card-body.p-0 { padding: 0; }
.card-body.p-6 { padding: 24px; }

.card-header.border-bottom {
    border-bottom: 1px solid var(--card-border);
}

/* 9. 网格系统与辅助类 */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: 1fr 2fr; }

.col-span-2 { grid-column: span 2; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.p-0 { padding: 0; }
.p-6 { padding: 24px; }
.flex-grow { flex-grow: 1; }
.w-full { width: 100%; }
.font-mono { font-family: monospace; }
.text-center { text-align: center; }
.font-bold { font-weight: bold; }
.text-glow {
    text-shadow: 0 0 10px var(--blue-glow);
}

.scroll-y {
    overflow-y: auto;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 10. 看板（Dashboard）深度定制 */
/* 验收评分圆环 */
.gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.gauge-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s ease;
    stroke-dasharray: 440;
    stroke-dashoffset: 440; /* Calculated in JS */
}

.gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.gauge-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(120deg, #fff, var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gauge-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* 评分拆分指标 */
.score-details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-detail-item {
    font-size: 12px;
}

.score-detail-item span {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.progress-bar-wrapper {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.score-item-val {
    position: absolute;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

/* 824 标准分类进度网格 */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.category-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px 18px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.category-stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cat-stat-info {
    flex-grow: 1;
}

.cat-stat-info h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: white;
}

.progress-bar-compact {
    height: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.pb-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.category-stat-card[data-cat="前期文件"] .pb-fill { background: var(--blue); }
.category-stat-card[data-cat="设计文件"] .pb-fill { background: var(--mint); }
.category-stat-card[data-cat="监理文件"] .pb-fill { background: var(--coral); }
.category-stat-card[data-cat="施工文件"] .pb-fill { background: var(--crimson); }
.category-stat-card[data-cat="竣工文件"] .pb-fill { background: #c38fff; }

.cat-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.percent-label {
    font-weight: 600;
    color: var(--text-secondary);
}

/* 成套性报警列表 */
.alert-list-view {
    display: flex;
    flex-direction: column;
    max-height: 250px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-smooth);
}

.alert-item:hover {
    background: rgba(255, 159, 28, 0.03);
}

.alert-icon-warning {
    color: var(--coral);
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-desc h5 {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.alert-desc p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.alert-item-action {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* 项目审计时间线 */
.timeline-container {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    max-height: 250px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 16px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 2px;
    background: var(--card-border);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 0 8px var(--blue-glow);
    z-index: 1;
}

.timeline-item.success .timeline-node {
    background: var(--mint);
    box-shadow: 0 0 8px var(--mint-glow);
}

.timeline-content {
    flex-grow: 1;
}

.timeline-time {
    font-size: 10px;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin: 2px 0;
}

.timeline-user {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 11. 在线填报与表单 (Forms & Signature) */
.split-view {
    display: flex;
    height: 100%;
    gap: 20px;
    overflow: hidden;
}

.split-side {
    flex-shrink: 0;
}

.w-1-3 { width: 300px; }
.w-2-3 { flex-grow: 1; }
.w-1-2 { width: 50%; }

.form-template-list {
    display: flex;
    flex-direction: column;
}

.template-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.template-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.template-item.active {
    background: rgba(0, 180, 216, 0.08);
    border-left: 3px solid var(--blue);
}

.template-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: var(--blue);
}

.template-item.active .template-icon {
    background: var(--blue);
    color: black;
}

.template-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.template-info span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* 水利规范在线表单 */
.water-form-wrapper {
    background: white;
    color: #1a202c;
    border-radius: 8px;
    padding: 30px;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.water-form-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.water-form-header h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.form-code {
    font-size: 11px;
    text-align: right;
    margin-top: 6px;
    font-family: monospace;
}

.water-form-table {
    width: 100%;
    border-collapse: collapse;
}

.water-form-table td {
    border: 1px solid #000;
    padding: 8px 12px;
    font-size: 12px;
    vertical-align: middle;
}

.water-form-table td.lbl {
    font-weight: bold;
    background-color: #f7fafc;
    text-align: center;
}

.table-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 12px;
    padding: 4px;
    background: transparent;
    font-weight: 500;
}

.table-input:focus, .table-textarea:focus {
    background-color: #ebf8ff;
}

.table-textarea {
    width: 100%;
    border: none;
    outline: none;
    font-size: 12px;
    padding: 4px;
    background: transparent;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

/* 签字与印章容器 */
.signature-box-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.signature-draw-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px dashed #cbd5e0;
    padding-top: 8px;
    margin-top: 8px;
}

.sig-label {
    font-size: 11px;
    color: #4a5568;
}

.canvas-wrap {
    position: relative;
    border: 1px solid #cbd5e0;
    background: #fdfdfd;
    border-radius: 4px;
    height: 70px;
    width: 220px;
    overflow: hidden;
}

.canvas-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
}

.btn-clear-sig {
    position: absolute;
    right: 4px;
    top: 4px;
    background: rgba(0,0,0,0.05);
    border: none;
    color: #718096;
    padding: 2px 6px;
    font-size: 9px;
    border-radius: 2px;
    cursor: pointer;
    z-index: 10;
}

.btn-clear-sig:hover {
    background: rgba(0,0,0,0.1);
    color: black;
}

/* 12. 智能 OCR 与电子盖章 (OCR & Stamps) */
.drag-drop-area {
    border: 2px dashed rgba(255,255,255,0.15);
    border-radius: 12px;
    width: 100%;
    height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.drag-drop-area:hover, .drag-drop-area.dragover {
    border-color: var(--blue);
    background: rgba(0, 180, 216, 0.03);
    box-shadow: inset 0 0 20px rgba(0, 180, 216, 0.05);
}

.drag-icon {
    color: var(--text-secondary);
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.drag-drop-area:hover .drag-icon {
    color: var(--blue);
    transform: translateY(-5px);
}

.drag-drop-area h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.drag-drop-area h3 span {
    color: var(--blue);
    text-decoration: underline;
}

.drag-drop-area p {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
}

.hidden-file-input {
    display: none;
}

/* OCR Laser Scanning Preview */
.ocr-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.preview-img-wrapper {
    position: relative;
    max-width: 100%;
    max-height: 390px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
}

.preview-img-wrapper img {
    max-height: 388px;
    display: block;
    object-fit: contain;
}

/* 扫描红外激光线 */
.laser-scanner-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0,180,216,0) 0%, var(--blue) 50%, rgba(0,180,216,0) 100%);
    box-shadow: 0 0 10px var(--blue);
    z-index: 5;
    pointer-events: none;
    animation: laser-sweep 3s ease-in-out infinite;
}

@keyframes laser-sweep {
    0%, 100% { top: 0%; }
    50% { top: 100%; }
}

/* OCR Bounding Boxes */
.ocr-bounding-boxes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ocr-box {
    position: absolute;
    border: 1px solid rgba(46, 196, 182, 0.4);
    background-color: rgba(46, 196, 182, 0.08);
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(46, 196, 182, 0.2);
    animation: box-fade-in 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes box-fade-in {
    to { opacity: 1; }
}

/* 可拖拽红色电子归档章 */
.draggable-archive-stamp {
    position: absolute;
    z-index: 10;
    cursor: move;
    border: 1px dashed #cbd5e0;
    padding: 2px;
    background: transparent;
}

.stamp-border {
    border: 2px solid #ff4d4f;
    color: #ff4d4f;
    font-weight: bold;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    user-select: none;
}

.stamp-title {
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    border-bottom: 1.5px solid #ff4d4f;
    width: 100%;
    text-align: center;
    padding-bottom: 2px;
}

.stamp-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    row-gap: 2px;
    column-gap: 6px;
    font-size: 9px;
    text-align: left;
}

.stamp-grid .st-l {
    border-right: 1.5px solid #ff4d4f;
    padding-right: 4px;
}

.stamp-foot {
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 4px;
    border-top: 1.5px solid #ff4d4f;
    width: 100%;
    text-align: center;
    padding-top: 2px;
}

.stamp-drag-handle {
    position: absolute;
    right: -10px;
    bottom: -10px;
    background: #ff4d4f;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
}

.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    font-family: monospace;
}

/* DeepSeek AI Panel */
.deepseek-ai-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(46, 196, 182, 0.05));
    border: 1px solid rgba(0, 180, 216, 0.15);
    border-radius: 12px;
    padding: 16px;
}

.ai-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--blue), var(--mint));
    border-radius: 50%;
    color: black;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 15px var(--blue-glow);
}

.ai-status h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.ai-status span {
    font-size: 11px;
    color: var(--text-muted);
}

/* OCR元数据表单 */
.metadata-form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: white;
    padding: 10px 14px;
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--blue);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px var(--blue-glow);
}

.ai-classification-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 16px;
}

.ai-classification-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.confidence-badge {
    background: rgba(46, 196, 182, 0.15);
    color: var(--mint);
    border: 1px solid rgba(46, 196, 182, 0.2);
    border-radius: 4px;
    font-size: 10px;
    padding: 2px 6px;
    font-weight: 600;
}

.classification-path {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-top: 8px;
    border-left: 2px solid var(--blue);
    padding-left: 8px;
}

.card-subheader {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* 13. 树形案卷浏览器 (Volumes Tree) */
.archive-tree {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tree-node {
    display: flex;
    flex-direction: column;
}

.tree-node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.tree-node-row:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.tree-node-row.active {
    background: rgba(0, 180, 216, 0.08);
    color: white;
    font-weight: 500;
}

.tree-node-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.tree-node-arrow.expanded {
    transform: rotate(90deg);
}

.tree-node-children {
    display: none;
    flex-direction: column;
    padding-left: 22px;
    border-left: 1px dashed var(--card-border);
    margin-left: 19px;
    margin-top: 2px;
}

.tree-node-children.expanded {
    display: flex;
}

.tree-node-row.volume-leaf {
    color: var(--text-primary);
}

.tree-node-row.volume-leaf::before {
    content: '📁';
    font-size: 12px;
}

.tree-node-row.volume-leaf.active::before {
    content: '📂';
}

/* 案卷详情标签页 */
.volume-header-actions {
    display: flex;
    gap: 6px;
}

.volume-tab-view {
    animation: fade-in 0.3s ease-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.volume-cover-border {
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 40px;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255,255,255,0.01);
}

.vc-top-meta {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 14px;
    margin-bottom: 40px;
}

.vc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vc-meta-item span {
    font-size: 11px;
    color: var(--text-muted);
}

.vc-meta-item strong {
    font-size: 14px;
    color: white;
}

.vc-main-title {
    font-size: 28px;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 700;
    margin-bottom: 50px;
    background: linear-gradient(120deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vc-details-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vc-row {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding-bottom: 10px;
}

.vc-label {
    width: 140px;
    font-size: 13px;
    color: var(--text-secondary);
}

.vc-value {
    flex-grow: 1;
    font-size: 14px;
    color: white;
}

/* 规范化表格样式 */
.water-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.water-table th {
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--card-border);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

.water-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-primary);
    vertical-align: middle;
}

.water-table tbody tr {
    transition: var(--transition-smooth);
}

.water-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.w-5 { width: 5%; }
.w-8 { width: 8%; }
.w-10 { width: 10%; }
.w-12 { width: 12%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.text-center { text-align: center; }

/* 案卷备考表 */
.volume-memo-box {
    border: 1.5px solid var(--card-border);
    border-radius: 8px;
    padding: 40px;
    max-width: 680px;
    margin: 0 auto;
    background: rgba(255,255,255,0.01);
}

.memo-description p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.memo-signer-area {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    border-top: 1px dashed var(--card-border);
    padding-top: 30px;
}

.signer-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.signer-block span {
    font-size: 12px;
    color: var(--text-secondary);
}

.sig-placeholder {
    height: 70px;
    width: 220px;
    border: 1px dashed rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.01);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signer-block .date {
    font-size: 11px;
    color: var(--text-muted);
}

/* 卷内拖拽手柄样式 */
.drag-handle-cell {
    cursor: grab;
    color: var(--text-muted);
    font-size: 14px;
    user-select: none;
}

.drag-handle-cell:hover {
    color: white;
}

tr.dragging {
    opacity: 0.5;
    background: rgba(0, 180, 216, 0.15) !important;
}

/* 14. 语义检索 (Semantic Search) */
.ai-search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.ai-chat-decor {
    background: linear-gradient(135deg, var(--blue), var(--mint));
    border-radius: 8px;
    color: black;
    font-weight: 700;
    font-size: 11px;
    padding: 10px 14px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ai-search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 10px 16px;
    font-size: 14px;
}

.ai-search-input::placeholder {
    color: var(--text-muted);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tag-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.tag-btn.active {
    background: rgba(0, 180, 216, 0.15);
    border-color: var(--blue);
    color: white;
    font-weight: 600;
}

/* 语义搜索高匹配度高亮 */
.match-score-badge {
    background: rgba(46, 196, 182, 0.15);
    border: 1px solid rgba(46, 196, 182, 0.25);
    color: var(--mint);
    border-radius: 4px;
    font-size: 10px;
    padding: 2px 6px;
    font-weight: 700;
    display: inline-block;
    margin-right: 8px;
}

.highlighted-snippet {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.15);
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 6px;
    border-left: 2px solid var(--blue);
}

/* 15. 档案物理导出包 (ZIP Exporter) */
.exporter-stats-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 20px;
}

.ex-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.ex-stat .label {
    font-size: 11px;
    color: var(--text-muted);
}

.ex-stat strong {
    font-size: 22px;
    font-weight: 700;
}

.checklist-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.criteria-group {
    background: rgba(255,255,255,0.01);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
}

.criteria-group-header {
    background: rgba(255,255,255,0.02);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.criteria-group-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.criteria-group-header span {
    font-size: 11px;
    font-weight: 700;
}

.criteria-list {
    display: flex;
    flex-direction: column;
}

.criteria-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.03);
    font-size: 12px;
}

.criteria-checkbox {
    accent-color: var(--mint);
    margin-top: 3px;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.criteria-item span {
    color: var(--text-secondary);
    line-height: 1.4;
}

.criteria-item.failed span {
    color: var(--text-muted);
    text-decoration: line-through;
}

.criteria-item .score {
    margin-left: auto;
    font-weight: bold;
    color: var(--text-primary);
}

/* 高保真 HTML 档案验收自评报告 */
.self-report-paper {
    background: white;
    color: #1a202c;
    border-radius: 8px;
    padding: 40px;
    font-family: 'Noto Sans SC', sans-serif;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    line-height: 1.6;
}

.self-report-paper h2 {
    font-size: 22px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 30px;
    border-bottom: 2px solid #1a202c;
    padding-bottom: 12px;
}

.self-report-paper p {
    font-size: 13px;
    text-indent: 26px;
    margin-bottom: 14px;
}

.self-report-paper h3 {
    font-size: 15px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.self-report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    margin-bottom: 20px;
}

.self-report-table th, .self-report-table td {
    border: 1px solid #1a202c;
    padding: 8px 12px;
    font-size: 12px;
    text-align: left;
}

.self-report-table th {
    background-color: #f7fafc;
    font-weight: bold;
}

/* 16. 按钮与徽章 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--mint));
    color: black;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.35);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.5);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.2);
    color: white;
    background: rgba(255,255,255,0.03);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(46, 196, 182, 0.15);
    color: var(--mint);
    border: 1px solid rgba(46, 196, 182, 0.2);
}

.badge-warning {
    background: rgba(255, 159, 28, 0.15);
    color: var(--coral);
    border: 1px solid rgba(255, 159, 28, 0.2);
}

/* 归档流转状态徽章 */
.badge-missing {
    background: rgba(230, 57, 70, 0.15);
    color: var(--crimson);
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.badge-pending {
    background: rgba(255, 159, 28, 0.15);
    color: var(--coral);
    border: 1px solid rgba(255, 159, 28, 0.3);
    animation: badge-pulse 2s infinite;
}

.badge-info {
    background: rgba(0, 180, 216, 0.15);
    color: var(--blue);
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.badge-danger {
    background: rgba(230, 57, 70, 0.2);
    color: var(--crimson);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 17. 原生弹窗 (Dialog modal) */
.modal-dialog {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: rgba(10, 20, 38, 0.85);
    backdrop-filter: blur(25px);
    width: 90%;
    max-width: 520px;
    margin: auto;
    color: white;
    padding: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    outline: none;
}

.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: white;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-red { color: #f87171; }

.modal-dialog#project-modal {
    max-width: 640px;
}

/* 18. Toast 悬浮通知 */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(46, 196, 182, 0.85);
    backdrop-filter: blur(10px);
    color: black;
    font-weight: bold;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 16px;
}

/* 19. 隐藏逻辑 */
.hidden {
    display: none !important;
}

/* 基于角色动态隐藏/置灰功能 */
.disabled-by-role {
    opacity: 0.35 !important;
    pointer-events: none !important;
}

/* 新增项目按钮特制微动效与发光 */
#btn-create-project {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-create-project:hover {
    border-color: var(--blue) !important;
    color: white !important;
    background: rgba(0, 180, 216, 0.12) !important;
    box-shadow: 0 0 8px rgba(0, 180, 216, 0.35);
    transform: scale(1.05);
}
