/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #1e88e5;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 布局结构 */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-left h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1e88e5;
}

.topbar-left span {
    margin-left: 10px;
    color: #666;
}

.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-right input {
    height: 32px;
    width: 200px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 15px;
}

.user-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-profile .dot {
    width: 8px;
    height: 8px;
    background-color: #4caf50;
    border-radius: 50%;
    margin-right: 8px;
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.main-container {
    display: flex;
    min-height: 100vh;
    padding-top: 60px;
}

.sidebar {
    width: 220px;
    background-color: #2a3f54;
    color: #fff;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar nav {
    padding-top: 20px;
}

.sidebar nav a {
    display: block;
    padding: 12px 20px;
    color: #e7e7e7;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background-color: #3a5169;
    color: #fff;
}

.sidebar nav a i {
    width: 20px;
    margin-right: 10px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background-color: #1a293b;
    display: flex;
    align-items: center;
}

.sidebar-footer img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

.sidebar-footer span {
    font-size: 13px;
}

.content {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
}

/* 卡片组件 */
.card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card.bg-green {
    background-color: #4CAF50; /* 调解成功 - 绿色 */
}

.stat-card.bg-red {
    background-color: #F44336; /* 调解不成 - 红色 */
}

.stat-card.bg-purple {
    background-color: #9C27B0; /* 双方和解 - 紫色 */
}

.stat-card.bg-teal {
    background-color: #009688; /* 总拖欠金额 - 青色 */
}
.stat-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.bg-blue {
    background-color: #1e88e5;
    color: #fff;
}

.stat-card.bg-orange {
    background-color: #ff9800;
    color: #fff;
}

.stat-card.bg-green {
    background-color: #4caf50;
    color: #fff;
}

.stat-card.bg-red {
    background-color: #f44336;
    color: #fff;
}

.stat-card .icon {
    font-size: 36px;
    margin-right: 15px;
    opacity: 0.8;
}

.stat-card h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.stat-card p span {
    display: block;
    font-size: 12px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #1e88e5;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0d77d5;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

/* 表单 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e88e5;
}

.required {
    color: #f44336;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group .input-prefix {
    background-color: #f5f5f5;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.input-group input {
    border-radius: 0 4px 4px 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 表格 */
.case-table {
    width: 100%;
    border-collapse: collapse;
}

.case-table th,
.case-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.case-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.case-table tr:hover {
    background-color: #f9f9f9;
}

.status-pending {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ffebee;
    color: #f44336;
    border-radius: 4px;
    font-size: 12px;
}

.status-resolved {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e8f5e9;
    color: #4caf50;
    border-radius: 4px;
    font-size: 12px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    width: 250px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-bar select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    gap: 5px;
}

.page-link {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
}

.page-link:hover {
    background-color: #f5f5f5;
}

.page-link.active {
    background-color: #1e88e5;
    color: #fff;
    border-color: #1e88e5;
}

/* 字体图标 */
@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
    src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),
         url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
         url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),
         url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),
         url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

.fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.status-processing {
    display: inline-block;
    padding: 2px 8px;
    background-color: #fff9c4;
    color: #ffb300;
    border-radius: 4px;
    font-size: 12px;
}
.status-success {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e8f5e9;
    color: #4caf50;
    border-radius: 4px;
    font-size: 12px;
}

.status-failed {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ffebee;
    color: #f44336;
    border-radius: 4px;
    font-size: 12px;
}

.status-settled {
    display: inline-block;
    padding: 2px 8px;
    background-color: #fff9c4;
    color: #ffb300;
    border-radius: 4px;
    font-size: 12px;
}
/* 原有的状态样式 */
.status-pending {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ffebee;
    color: #f44336;
    border-radius: 4px;
    font-size: 12px;
}

.status-resolved {
    display: inline-block;
    padding: 2px 8px;
    background-color: #e8f5e9;
    color: #4caf50;
    border-radius: 4px;
    font-size: 12px;
}

/* 新增的状态样式 */
.status-mediation-success {
    display: inline-block;
    padding: 2px 8px;
    background-color: #c8e6c9; /* 绿色调，可根据喜好调整 */
    color: #2e7d32;
    border-radius: 4px;
    font-size: 12px;
}

.status-mediation-failure {
    display: inline-block;
    padding: 2px 8px;
    background-color: #ffcdd2; /* 红色调，可根据喜好调整 */
    color: #c62828;
    border-radius: 4px;
    font-size: 12px;
}

.status-both-sides-reconciliation {
    display: inline-block;
    padding: 2px 8px;
    background-color: #bbdefb; /* 蓝色调，可根据喜好调整 */
    color: #1565c0;
    border-radius: 4px;
    font-size: 12px;
}
/* 新增或修改 btn-action 类的样式 */
.btn-action {
    display: inline-block;
    padding: 8px 12px; /* 增大内边距 */
    font-size: 20px;   /* 增大字体大小 */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-action i {
    margin-right: 0; /* 如果有图标，可根据需要调整图标与文本的间距 */
}

.btn-action:hover {
    background-color: #f5f5f5;
}
/* 添加以下CSS样式 */
.compact-form .form-group {
    margin-bottom: 10px; /* 减小表单组间距 */
}

.compact-grid {
    gap: 10px; /* 减小网格间距 */
}

.fixed-actions {
    position: sticky;
    bottom: 0;
    background-color: white;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

/* 优化输入框和标签样式 */
.form-group label {
    margin-bottom: 5px;
    display: block;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px;
    font-size: 14px;
}

/* 调整卡片内边距 */
.card-body {
    padding: 15px;
}
.fa-folder-open:before { content: "\f07c"; }
.fa-clock-o:before { content: "\f017"; }
.fa-check-circle:before { content: "\f058"; }
.fa-rmb:before { content: "\f157"; }
.fa-plus:before { content: "\f067"; }
.fa-check:before { content: "\f00c"; }
.fa-download:before { content: "\f019"; }
.fa-edit:before { content: "\f044"; }
.fa-trash:before { content: "\f014"; }
.fa-refresh:before { content: "\f021"; }
.fa-save:before { content: "\f0c7"; }
.fa-search:before { content: "\f002"; }

/* 案件描述标记样式 */
.has-description {
    color: #28a745;
    margin-left: 5px;
    font-size: 14px;
    opacity: 0.8;
}

.has-description:hover {
    opacity: 1;
    cursor: help;
}

/* 默认显示移动端菜单按钮（在小屏幕上） */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1e88e5;
    font-size: 20px;
    cursor: pointer;
    margin-right: 10px;
    padding: 5px 10px;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    /* 确保菜单按钮在移动端显示 */
    .mobile-menu-toggle {
        display: block !important;
    }
    
    /* 调整顶部栏 */
    .topbar {
        padding: 0 10px;
    }
    
    .topbar-left h1 {
        font-size: 16px;
        white-space: nowrap;
    }
    
    .topbar-left span {
        display: none;
    }
    
    .topbar-right input {
        width: 120px;
        margin-right: 10px;
    }
    
    /* 侧边栏适配 - 确保移动端侧边栏可以通过按钮切换显示/隐藏 */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        width: 240px;
        height: calc(100vh - 50px);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* 内容区域适配 */
    .content {
        margin-left: 0;
        padding: 10px;
    }
    
    /* 统计卡片适配 */
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 表单适配 */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* 表格适配 - 让表格可以横向滚动 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
    }
    
    .case-table {
        min-width: 640px; /* 确保表格在小屏幕上可以滚动 */
    }
    
    .case-table th, .case-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* 搜索栏适配 */
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    /* 按钮适配 - 增大触摸区域 */
    .btn {
        padding: 10px 15px;
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
    }
    
    .btn-action {
        padding: 10px;
        font-size: 22px;
        margin: 0 2px;
    }
    
    /* 卡片适配 */
    .card-header, .card-body, .card-footer {
        padding: 15px 12px;
    }
    
    /* 分页适配 */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        padding: 8px 12px;
        margin: 2px;
    }
    
    /* 案件状态更新组件适配 */
    .case-status-update {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    /* 模态框适配 */
    .modal-dialog {
        margin: 10px;
        max-width: none;
    }
    
    /* 提高触摸区域大小 */
    .case-number-link, 
    .btn-action, 
    .page-link {
        touch-action: manipulation;
    }
    
    /* 增大描述标记在移动端的大小 */
    .has-description {
        font-size: 16px;
        margin-left: 8px;
    }
    
    /* 紧凑布局 */
    .main-container {
        padding-top: 50px;
    }
    
    .topbar {
        height: 50px;
    }
    
    .sidebar {
        top: 50px;
    }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    /* 侧边栏宽度调整 */
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
    }
    
    /* 统计卡片调整 */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 表格调整 */
    .case-table th, .case-table td {
        padding: 10px 12px;
    }
}
