﻿/* ==================== 全局样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --sidebar-width: 200px;
    --header-height: 60px;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.tool-section {
    scroll-margin-top: 80px; /* header 60px + 预留 20px */
}

/* ==================== 顶部导航栏 ==================== */
.header-lwf {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: white;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.logo_lwf {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    color: #1e293b;
}

.logo-icon_lwf {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.search-bar_lwf {
    flex: 1;
    max-width: 440px;
    margin: 0 60px;
    position: relative;
    margin-left:220px;
}

.search-inputNew {
    width: 300px;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
    background: #f1f5f9;
}

    .search-inputNew:focus {
        outline: none;
        border-color: var(--primary-color);
        background: white;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

.search-icon_lwf {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
}

.login-btn_lwf {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

    .login-btn:hover {
        background: var(--primary-hover);
    }

/* ==================== 主布局容器 ==================== */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* ==================== 左侧固定导航 ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    margin: 4px 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: #475569;
}

    .nav-item:hover {
        background: #f1f5f9;
        color: var(--primary-color);
    }

    .nav-item.active {
        background: #EBF1FF;
        color: var(--primary-color);
        font-weight: 500;
    }

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* ==================== 右侧内容区域 ==================== */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
}

/* ==================== 功能卡片样式 ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid #e2e8f0;
}

    .feature-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: #cbd5e1;
    }

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 18px;
    color: white;
}

    .card-icon.blue {
        background: #3b82f6;
    }

    .card-icon.green {
        background: #10b981;
    }

    .card-icon.red {
        background: #ef4444;
    }

    .card-icon.orange {
        background: #f59e0b;
    }

    .card-icon.purple {
        background: #8b5cf6;
    }
    
    .card-icon.teal {
        background: #06b6d4;
    }

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #1e293b;
}

.card-desc {
    font-size: 12px;
    color: #64748b;
}

/* ==================== 特殊卡片样式 ==================== */
.add-function-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .add-function-card:hover {
        border-color: var(--primary-color);
        background: #f0f9ff;
    }

/* ==================== 右侧浮动元素 ==================== */
.floating-elements {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .download-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.download-icon {
    font-size: 16px;
    color: #475569;
}

/* ==================== 二维码弹窗 ==================== */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .modal-mask.active {
        opacity: 1;
        visibility: visible;
    }

.qrcode-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 300px;
    position: relative;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-mask.active .qrcode-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #64748b;
    border-radius: 50%;
    transition: var(--transition);
}

    .modal-close:hover {
        background: #f1f5f9;
        color: #1e293b;
    }

.modal-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1e293b;
}

.qrcode-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.qrcode-item {
    text-align: center;
}

.qrcode-placeholder {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
}

.qrcode-label {
    font-size: 12px;
    color: #475569;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1500px) {
    .sidebar {
        width: 60px;
    }

    .nav-item span {
        display: none;
    }

    .nav-icon {
        margin-right: 0;
    }

    .content {
        margin-left: 60px;
    }
   
    .card-grid {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-lwf {
        padding: 0 16px;
    }
    .search-bar_lwf {
        display: none;
    }
    .search-bar_lwf {
        margin: 0 16px;
        margin-left:0px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 1001;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        color: #475569;
        font-size: 20px;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

        .overlay.active {
            opacity: 1;
            visibility: visible;
        }

    .card-grid {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
        gap: 12px;
    }

    .feature-card {
        padding: 16px;
    }

    .qrcode-modal {
        width: 280px;
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .search-bar_lwf {
        display: none;
    }
    .section-title {
        font-size: 14px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-desc {
        font-size: 11px;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* ==================== 辅助类 ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 16px;
}

.p-4 {
    padding: 16px;
}

.bg-white {
    background: white;
}

.rounded {
    border-radius: var(--border-radius);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}




.sidebar-group-title {
    padding: 16px 20px 8px;
    font-size: 14px;
    font-weight: bold;
    color: #1D2129;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f2f5; /* 颜色非常浅，接近白色，形成微妙的分隔效果 */
    margin-bottom:20px;
}

.manage-btn {
    color: #2D6AFF; /* 文字颜色：蓝色 */
    font-size: 14px; /* 字体大小 */
    font-weight: 500; /* 字体粗细 */
    text-align: center; /* 文字居中 */
    /* 按钮背景与形状 */
    background-color: #EBF1FF; /* 浅蓝色背景，与侧边栏选中状态保持一致 */
    border: none; /* 去掉默认边框 */
    border-radius: 20px; /* 圆角，数值越大越圆润 */
    padding: 6px 16px; /* 内边距：上下6px，左右16px */
    cursor: pointer; /* 鼠标悬停时显示手型 */
    transition: all 0.3s ease; /* 添加过渡动画，让变化更平滑 */
}
    /* 鼠标悬停时的效果 */
    .manage-btn:hover {
        background-color: #D6EBFF; /* 悬停时背景色稍微加深 */
        transform: translateY(-1px); /* 轻微向上移动，增加立体感（可选） */
    }
    /* 鼠标点击时的效果 */
    .manage-btn:active {
        transform: translateY(0); /* 点击时恢复原状 */
    }



/* 编辑和关闭图标（针对计算工具的特殊样式） */
.nav-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.action-icon {
    width: 16px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #86909C;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


.btn-primary {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

    .btn-primary:hover {
        opacity: 0.9;
    }

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    position:absolute;
    top: 5px;
    right:10px;
}

.add-btn {
    background-color: #2d6aff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    position: absolute;
    top: 5px;
    right: 10px;
}




/* =========================================
           2. 遮罩层效果 (Overlay)
           目标：实现半透明黑色背景，覆盖全屏，并模糊底层内容
           ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* 50% 透明度黑色 */
    backdrop-filter: blur(4px); /* 毛玻璃模糊效果 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* 确保在最上层 */
    padding: 20px;
}

/* =========================================
           3. 弹窗容器 (Modal Container)
           目标：白色背景卡片，圆角，阴影，内部滚动
           ========================================= */
.modal-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 1100px; /* 最大宽度限制 */
    max-height: 90vh; /* 最大高度不超过视口90% */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 隐藏溢出的内容，配合内部滚动 */
}

/* =========================================
           4. 弹窗头部 (Header)
           ========================================= */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-closelwf {
    font-size: 24px;
    color: #8c8c8c;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0 8px;
    transition: color 0.2s;
}

    .modal-closelwf:hover {
        color: #333;
    }

/* =========================================
           5. 弹窗主体内容区 (Body & Grid)
           目标：实现网格布局，适配移动端
           ========================================= */
.modal-body {
    padding: 20px;
    overflow-y: auto; /* 如果内容过多，出现纵向滚动条 */
    flex: 1; /* 占据剩余空间 */
}

/* 网格布局系统 */
.feature-grid {
    display: grid;
    /* 响应式断点：PC端每行4个，平板3个，手机1个 */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; /* 卡片间距 */
}

/* =========================================
           6. 功能卡片 (Card)
           目标：带边框，hover 效果，选中状态的蓝色背景
           ========================================= */
.feature-cardlwf {
    display: flex;
    align-items: flex-start; /* 顶部对齐 */
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
}

    /* 鼠标悬停效果 */
    .feature-cardlwf:hover {
        border-color: #d9d9d9;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    /* 选中状态样式 (对应图中“仲裁费”和“诉讼费”) */
    .feature-cardlwf.selected {
        border-color: #a6c5f6;
        background-color: #f0f6ff; /* 淡蓝色背景 */
        color: #1a73e8;
    }


/* =========================================
           7. 卡片内部元素 (Icon & Text)
           ========================================= */

/* 图标容器：带彩色背景圆 */
.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px; /* 使用 Emoji 模拟图标 */
    margin-right: 12px;
    flex-shrink: 0; /* 防止图标被压缩 */
    color: #fff;
}

/* 文字区域 */
.card-info {
    flex: 1;
    overflow: hidden; /* 防止文字过长破坏布局 */
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.4;
    /* 最多两行，超出显示省略号 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 选中状态下描述文字颜色微调 */
.feature-card.selected .card-desc {
    color: #4a7bc8;
}

/* =========================================
           8. 弹窗底部 (Footer)
           ========================================= */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.btn-confirm {
    background-color: #1a73e8; /* Google 蓝 */
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .btn-confirm:hover {
        background-color: #1558b3;
    }

    .btn-confirm:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

    /**---------------------------------*/

/* 弹窗容器 */
.modal-overlayClass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-containerClass {
    background: #fff;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px 24px;
    box-sizing: border-box;
}

/* 头部样式 */
.modal-headerClass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-titleClass {
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
}

.modal-closeClass {
    font-size: 20px;
    color: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    line-height: 1;
    border: none;
    background: transparent;
    padding: 0;
}

    .modal-closeClass:hover {
        color: rgba(0, 0, 0, 0.75);
    }

/* 内容区域 */
.modal-bodyClass {
    margin-bottom: 24px;
}

.input-group {
    width: 100%;
}

    .input-group input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        font-size: 14px;
        outline: none;
        box-sizing: border-box;
        transition: all 0.3s;
    }

        .input-group input:focus {
            border-color: #40a9ff;
            box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
        }

        .input-group input::placeholder {
            color: #bfbfbf;
        }

/* 底部按钮 */
.modal-footerClass {
    text-align: right;
}

.btn {
    padding: 6px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

    .btn-primary:hover {
        background-color: #40a9ff;
        border-color: #40a9ff;
    }