﻿:root {
    --primary-light: #e6f7ff;
    --primary: #0180CF;
    --primary-dark: #91d5ff;
    --secondary: #1890ff;
    --accent: #0050b3;
    --text: #262626;
    --text-light: #595959;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --border: #d9d9d9;
    --success: #52c41a;
    --warning: #faad14;
    --error: #f5222d;
}

* {
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
}

.container {
    width: 99%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--primary);
}

.card-header {
    background-color: var(--primary);
    color: #fff;
    padding: 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn {
    display: inline-block;
    padding: 10px 18px;
    background-color: var(--white);
    color: var(--secondary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.875rem;
}

.card-body {
    padding: 10px;
}

.form-label {
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
    color: var(--text);
}

.form-control,
.form-select {
    width: 100%;
    border-radius: 8px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    font-size: 1rem;
    background-color: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-dark);
    outline: none;
    box-shadow: 0 0 0 3px rgba(145, 213, 255, 0.3);
}

.mb-3 {
    margin-bottom: 1rem;
}

.btn-primary {
    display: block;
    width: 100%;
    background-color: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 16px;       /* 改为固定像素值，避免 rem 差异 */
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-table caption {
    background: #1976d2;
    color: white;
    padding: 15px;
    font-weight: bold;
}

.result-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.result-table tr:last-child {
    border-bottom: none;
}

.result-table td {
    padding: 10px 10px;
    line-height: 1.4;
}

.result-table td.r {
    font-weight: bold;
    background: #e3f2fd;
    width: 45%;
    color: #1565c0;
}

.alert {
    border-radius: 8px;
    padding: 10px 10px;
    margin-bottom: 2px;
    align-items: center;   /* 垂直居中 */
    border: 1px solid transparent;
}

.alert-info {
    background-color: #e6f7ff;
    border-color: #91d5ff;
    color: #0050b3;
    display: block;
}

.alert-danger {
    background-color: #fff2f0;
    border-color: #ffccc7;
    color: #f5222d;
    display: flex;
}

.alert-light {
    background-color: #f9f9f9;
    border-color: #e6e6e6;
    color: var(--text-light);
}

.alert-icon {
    margin-right: 15px;
    font-size: 24px;
    flex-shrink: 0;
}

.verification-code {
    display: flex;
    align-items: center;
    gap: 15px;
}

.verification-code img {
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border);
    max-width: 120px;
    transition: all 0.3s ease;
}

.verification-code img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-center {
    text-align: center;
}

.d-none {
    display: none;
}

.d-grid {
    display: grid;
}

.gap-2 {
    gap: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}


@media print {
    /* 隐藏所有不需要打印的元素 */
    .card-header,
    form,
    .btn,
    .d-grid,
    .alert-light,
    .foot,
    .container .card .card-header,
    #bmForm,
    #queryForm,
    .btn-primary,
    .btn-sm,
    .alert-danger,
    /* ★ 隐藏所有 .alert-info（欢迎信息 + 结果提示） */
    .alert-info {
        display: none !important;
    }

    /* ★ 删除 .print-area .alert-info 的显示规则 */

    /* 强制显示打印区域 */
    .print-area {
        display: block !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .card-body {
        padding: 0 !important;
    }


    /* 表格优化 */
    .result-table {
        box-shadow: none !important;
        border: 1px solid #333 !important;
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: avoid !important;
        margin: 0 auto !important;
        font-size: 10pt !important;
    }

    .result-table caption {
        background: #f0f0f0 !important;
        color: #000 !important;
        font-weight: bold !important;
        padding: 8px !important;
        border: 1px solid #333 !important;
        border-bottom: none !important;
        font-size: 12pt !important;
    }

    .result-table tr {
        border-bottom: 1px solid #ccc !important;
    }

    .result-table td {
        padding: 6px 10px !important;
        border: 1px solid #ccc !important;
        background: white !important;
        color: #000 !important;
    }

    .result-table td.r {
        background: #f5f5f5 !important;
        color: #000 !important;
        font-weight: bold !important;
        width: 40% !important;
    }

    /* 每个表格自动分页 */
    .result-table {
        page-break-after: always;
    }
    .result-table:last-child {
        page-break-after: avoid;
    }

    a {
        text-decoration: none !important;
        color: #000 !important;
    }
}

        /* ===== 全新工资条卡片样式 ===== */
        .salary-slip {
            background: #fff;
            border-radius: 16px;
            padding: 24px 20px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            margin: 10px 0;
            border: 1px solid #e8e8e8;
        }
        .salary-slip .header {
            text-align: center;
            padding-bottom: 6px;
            margin-bottom: 6px;
            border-bottom: 1px solid #eee;
        }
        .salary-slip .header .month {
            font-size: 18px;
            color: #1a1a1a;
            font-weight: 600;
        }
		.salary-slip .header .tishi {
            font-size: 16px;
            color: #1a1a1a;
            font-weight: 600;
        }
        .salary-slip .header .amount {
            font-size: 40px;
            font-weight: 700;
            color: #1a1a1a;
            margin: 0px 0 8px;
        }
        .salary-slip .header .thanks {
            font-size: 16px;
            color: #0180CF;
            font-weight: 600;
            margin-top: 6px;
        }
        .salary-slip .extra-fields {
            display: flex;
            flex-wrap: wrap;
            gap: 8px 30px;
			font-weight: 600;
            border-radius: 8px;
            padding: 10px 14px;
            margin-bottom: 14px;
            border: 1px solid #e8edf4;
            justify-content: center;
            font-size: 1.2em;
        }
        .salary-slip .extra-fields .extra-item {
            color: #333;
        }
        .salary-slip .extra-fields .extra-item strong {
            color: #0180CF;
            font-weight: 500;
        }
        .salary-slip .grid-items {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px 10px;
            margin: 12px 0 16px;
        }
        .salary-slip .grid-item {
            background: #f7f7f7;
            border-radius: 10px;
            padding: 14px 6px;
            text-align: center;
            border: 1px solid #e8e8e8;
            min-height: 70px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }
        .salary-slip .grid-item .grid-label {
            font-size: 15px;
            color: #0180CF;
            margin-bottom: 4px;
            font-weight: 700;
        }
        .salary-slip .grid-item .grid-value {
            font-size: 20px;
            font-weight: 600;
            color: #1a1a1a;
        }
        .salary-slip .grid-item .grid-value.negative {
            color: #d32f2f;
        }
        .salary-slip .footer-note {
            text-align: center;
            font-size: 14px;
            color: #999;
            padding-top: 14px;
            border-top: 1px dashed #ddd;
            margin-top: 6px;
        }
        /* 打印样式 */
        @media print {
            .salary-slip {
                border: 1px solid #ddd !important;
                box-shadow: none !important;
                padding: 16px !important;
            }
            .salary-slip .grid-item {
                background: #f5f5f5 !important;
                border: 1px solid #ccc !important;
                padding: 8px 4px !important;
                min-height: 50px !important;
            }
            .salary-slip .grid-item .grid-label {
                font-size: 10pt !important;
                color: #333 !important;
            }
            .salary-slip .grid-item .grid-value {
                font-size: 13pt !important;
                color: #000 !important;
            }
            .salary-slip .extra-fields {
                background: #f5f5f5 !important;
                border-color: #ccc !important;
            }
        }
        /* 手机适配 */
        @media (max-width: 480px) {
            .salary-slip .grid-items {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px 8px;
            }
            .salary-slip .grid-item {
                padding: 10px 4px;
                min-height: 60px;
            }
            .salary-slip .grid-item .grid-label {
                font-size: 13px;
            }
            .salary-slip .grid-item .grid-value {
                font-size: 17px;
            }
            .salary-slip .header .amount {
                font-size: 34px;
            }
        }