/* 文件: style.css */
/* 自定义样式 */
body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* 主标题样式 */
.north-panel {
    background: linear-gradient(135deg, #2d3a4b 0%, #4a5568 100%);
    color: white;
    padding: 15px 20px;
}

.title-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.title-icon {
    font-size: 30px;
    color: #409EFF;
}

.title-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* =============== 修复行高不一致问题 =============== */

/* 数据表格行样式优化 - 移除冲突的高度设置 */
.datagrid-row {
    /* 移除冲突的 height: 35px; 和 height: auto !important; */
    transition: background-color 0.3s;
}

/* 表格行高度统一设置 */
.datagrid-row,
.datagrid-row-alt {
    height: 40px !important; /* 统一行高 */
    line-height: 24px !important; /* 确保文本垂直居中 */
}

/* 特别处理序号列 - 确保与其他列行高一致 */
.datagrid-cell-rownumber {
    height: 40px !important;
    line-height: 24px !important;
    padding: 8px 5px !important;
}

/* 允许表格单元格换行 */
.datagrid-cell {
    white-space: normal !important;
    word-wrap: break-word !important;
    vertical-align: middle !important; /* 确保垂直居中 */
}

/* 调整单元格内边距，使文本更易读 */
.datagrid-cell {
    padding: 8px 5px !important;
    height: 40px !important; /* 确保单元格高度统一 */
    box-sizing: border-box !important; /* 包含padding在内的高度计算 */
}

/* 特别处理详细地址列 */
.datagrid-cell-c1-detailedAddress {
    white-space: normal !important;
    word-wrap: break-word !important;
    max-height: none !important; /* 移除固定高度，让行高控制 */
    overflow-y: visible !important; /* 移除滚动条 */
    line-height: 1.5;
    vertical-align: middle !important;
    padding: 8px 5px !important;
    height: 40px !important;
}

/* 移除冲突的滚动条样式 */
.datagrid-cell-c1-detailedAddress::-webkit-scrollbar {
    display: none; /* 不再需要滚动条 */
}

/* 确保表格滚动时地址列正确显示 */
.datagrid-view,
.datagrid-view1,
.datagrid-view2 {
    overflow: visible !important;
}

.datagrid-header-row {
    background: #f8f9fa !important;
    height: 40px !important; /* 表头高度也保持一致 */
}

.datagrid-header .datagrid-cell {
    height: 40px !important;
    line-height: 24px !important;
    padding: 8px 5px !important;
    vertical-align: middle !important;
}

.combobox-panel {
    max-height: 250px !important;
    overflow-y: auto !important;
}

/* 按钮样式 */
.l-btn {
    border-radius: 4px;
    transition: all 0.3s;
}

.l-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 表单样式 */
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

/* 标签页样式优化 */
.tabs-header {
    background: #fff;
    border-bottom: 2px solid #e4e7ed;
}

.tabs li {
    margin-right: 5px;
}

.tabs li a.tabs-inner {
    border-radius: 4px 4px 0 0;
    border: 1px solid #e4e7ed;
    border-bottom: none;
    background: #f8f9fa;
    padding: 8px 20px;
    font-weight: 500;
}

.tabs li a.tabs-inner:hover {
    background: #f0f9ff;
}

.tabs li.tabs-selected a.tabs-inner {
    background: #fff;
    color: #409EFF;
    border-top: 2px solid #409EFF;
    border-bottom: 1px solid #fff;
    margin-top: -1px;
}

/* 状态栏 */
.south-panel {
    background: #f8f9fa;
    border-top: 1px solid #e4e7ed;
    padding: 5px 20px;
    font-size: 12px;
    color: #666;
}

/* 详情对话框 */
.detail-dialog .dialog-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

.detail-table th {
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #e4e7ed;
    font-weight: 600;
    color: #333;
}

.detail-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e4e7ed;
}

.detail-table tr:hover {
    background: #f0f9ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .easyui-layout .west {
        width: 280px !important;
    }

    .title-text {
        font-size: 18px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 合计行样式 */
.datagrid-footer {
    background-color: #f8f9fa !important;
    border-top: 2px solid #409EFF !important;
}

.datagrid-footer td {
    padding: 8px !important;
    font-weight: bold !important;
}

/* 排序箭头样式 */
.datagrid-sort-icon {
    font-size: 12px;
    margin-left: 5px;
}

/* 排序列样式 */
.datagrid-header .datagrid-cell {
    cursor: pointer;
}

.datagrid-header .datagrid-cell:hover {
    background-color: #f0f9ff !important;
}

/* 处理长文本显示 */
.truncated-address {
    cursor: help;
    border-bottom: 1px dotted #666;
    position: relative;
}

.truncated-address:hover::after {
    content: attr(data-full);
    position: absolute;
    left: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    white-space: normal;
    width: 300px;
    max-width: 300px;
    word-wrap: break-word;
    font-size: 12px;
    color: #333;
}

/* 调整表格列宽 */
.datagrid-cell-c1-detailedAddress {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 确保表格可以水平滚动 */
.datagrid-view {
    overflow-x: auto;
}

.datagrid-body {
    overflow-x: auto;
}