/* ========================
   VetLIMS 全局样式
   大理州兽医实验室信息管理系统
   ======================== */

:root {
    --primary: #0d6efd;
    --sidebar-width: 260px;
}

/* 基础 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    font-size: 14px;
    min-height: 100vh;
}

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 400px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    padding: 20px 0;
}

.login-logo i {
    font-size: 48px;
    color: var(--primary);
}

/* 卡片 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 12px 20px;
}

.card-body {
    padding: 20px;
}

/* 统计卡片 */
.stat-card {
    transition: transform 0.2s;
    cursor: default;
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* 表格 */
.table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.table td {
    font-size: 13px;
    vertical-align: middle;
}

/* 状态徽章 */
.badge {
    font-weight: 500;
    padding: 4px 8px;
}

/* 表单 */
.form-control, .form-select {
    font-size: 14px;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

/* 按钮 */
.btn {
    border-radius: 8px;
    font-size: 14px;
    padding: 8px 18px;
}

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

/* 分页 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: 6px !important;
    margin: 0 2px;
    font-size: 13px;
}

/* 搜索栏 */
.search-bar {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 详情页信息行 */
.info-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-label {
    width: 140px;
    color: #666;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: #333;
}

/* 进度条 */
.progress-sm {
    height: 6px;
}

/* 孔板网格 */
.well-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
}

.well-cell {
    aspect-ratio: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.well-cell:hover {
    background: var(--primary);
    color: #fff;
}

.well-cell.sample {
    background: #e3f2fd;
    border-color: var(--primary);
}

.well-cell.control {
    background: #fff3e0;
    border-color: #ff9800;
}

/* 打印表头 */
.print-header {
    display: none;
}

/* 打印样式 */
@media print {
    @page {
        size: A4 portrait;
        margin: 1.5cm;
    }

    body {
        background: #fff;
        font-size: 10pt;
    }

    .navbar, .alert, .btn, .search-bar, .pagination, .no-print, form,
    .sidebar, footer {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: none;
    }

    .card-header {
        display: none;
    }

    .table th {
        background: #e0e0e0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .table tr:nth-child(even) {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    thead {
        display: table-header-group;
    }

    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
    }

    .print-unit-name {
        font-size: 16pt;
        font-weight: bold;
    }

    .print-report-title {
        font-size: 14pt;
        font-weight: bold;
        margin-top: 8px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 8px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
