/* 全局样式 - 现代设计风格 */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.10);
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    padding: 20px;
    color: #1e293b;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

/* 现代UI元素和动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 现代滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 现代选择文本样式 */
::selection {
    background: rgba(59, 130, 246, 0.2);
    color: #1e293b;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.2);
    color: #1e293b;
}

/* 现代焦点样式 */
*:focus {
    outline: none;
}

.form-group input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 现代过渡效果 */
.container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 现代阴影层次 */
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* 后台管理左右布局样式 */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.admin-sidebar {
    width: 256px;
    background: #0f172a;
    color: #ffffff;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.admin-nav {
    padding: 12px 0;
}

.nav-group-title {
    padding: 18px 24px 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.38);
    text-transform: uppercase;
}

.nav-group-title:first-child {
    padding-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: #3b82f6;
}

.nav-item.active {
    background: var(--primary-soft);
    color: #ffffff;
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 256px;
    background: var(--bg);
    min-height: 100vh;
}

.admin-main-header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 22px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-main-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-content {
    padding: 32px;
    background: #f8fafc;
    min-height: calc(100vh - 120px);
}

/* 移动端侧边栏适配 */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #64748b;
        font-size: 20px;
        cursor: pointer;
        padding: 8px;
        border-radius: 6px;
        transition: all 0.3s;
    }
    
    .mobile-menu-toggle:hover {
        background: #f1f5f9;
        color: #3b82f6;
    }
}

@media (max-width: 768px) {
    .admin-main-header {
        padding: 20px 24px;
    }
    
    .admin-content {
        padding: 24px 20px;
    }
    
    .admin-sidebar-header {
        padding: 24px 20px;
    }
    
    .nav-item {
        padding: 14px 20px;
    }
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* 后台管理移动端优化 */
    .admin-header {
        padding: 15px 10px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .admin-header h1 {
        font-size: 20px;
    }
    
    .admin-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        padding: 15px 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
    
    .stat-number {
        font-size: 18px;
    }
    
    .admin-content {
        padding: 15px 10px;
    }
    
    .admin-section h2 {
        font-size: 18px;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .analysis-card {
        padding: 15px;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .monthly-item {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .job-item {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .months-list {
        justify-content: center;
    }
    
    /* 查询记录页面移动端优化 */
    .search-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .query-logs-table {
        font-size: 14px;
    }
    
    .query-logs-table th,
    .query-logs-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .query-logs-table th {
        font-size: 12px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-info {
        order: -1;
    }
    
    /* 数据分析移动端优化 */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stat-icon {
        font-size: 32px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .distribution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .trend-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .trend-bar {
        width: 100%;
    }
    
    .job-comparison-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .job-bar {
        width: 100%;
    }
    
    .month-distribution {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .query-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .query-stat-item {
        padding: 12px;
    }
    
    .hot-month-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        text-align: left;
    }
}

/* 头部样式 - 现代设计 */
.header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    display: none;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    body {
        padding: 16px;
        background: #f8fafc;
    }
    
    .container {
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        border: 1px solid #e2e8f0;
    }
    
    .header {
        padding: 24px 20px;
    }
    
    .header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .query-form-wrapper {
        padding: 24px 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-group input {
        padding: 14px 12px;
        font-size: 16px;
        min-height: 48px;
        border-radius: 8px;
    }
    
    .btn {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 52px;
        border-radius: 10px;
    }
    
    .form-hint {
        font-size: 11px;
    }
}

/* 表单样式 - 现代设计 */
.query-form-wrapper {
    padding: 40px 30px;
}

.query-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.required {
    color: #ef4444;
}

.form-group input {
    width: 100%;
    padding: 16px 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    min-height: 52px;
    background: #ffffff;
    color: #1f2937;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: #9ca3af;
}

/* 下拉菜单样式 - 与输入框保持一致 */
.form-group select {
    width: 100%;
    padding: 16px 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    min-height: 52px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-group select:hover {
    border-color: #9ca3af;
}

/* 月份选择器样式 */
.form-group input[type="month"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
}

.form-group input[type="month"]:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* 年份月份选择器样式 */
.year-month-selector {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.year-month-selector .select-group {
    flex: 1;
}

.year-month-selector select {
    width: 100%;
    padding: 16px 14px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    min-height: 52px;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.year-month-selector select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.year-month-selector select:hover {
    border-color: #9ca3af;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .year-month-selector {
        flex-direction: column;
        gap: 8px;
    }
    
    .year-month-selector .select-group {
        flex: none;
    }
}

/* 按钮样式 - 现代设计 */
.btn {
    display: inline-block;
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    min-height: 56px;
    touch-action: manipulation;
    letter-spacing: -0.2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    display: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    width: 100%;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #475569;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* 页脚 */
.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.copyright {
    line-height: 1.5;
    color: #888;
    font-size: 13px;
}

.copyright p {
    margin: 5px 0;
}

.copyright p:first-child {
    font-weight: 500;
    color: #666;
}

.copyright p:last-child {
    font-size: 12px;
    color: #999;
}

.admin-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

/* 文件上传区域样式 */
.file-upload-section {
    display: flex;
    gap: 12px;
    align-items: center;
}

.file-upload-section input[type="file"] {
    flex: 1;
}

.download-template-btn {
    white-space: nowrap;
    padding: 12px 16px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .file-upload-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .file-upload-section input[type="file"] {
        width: 100%;
    }
    
    .download-template-btn {
        width: 100%;
        justify-content: center;
    }
}

.admin-link:hover {
    text-decoration: underline;
}

/* 后台管理样式 - 现代设计 */
.admin-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.admin-header h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8fafc;
}

.stat-card {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.3);
}

.stat-card h3 {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.admin-content {
    padding: 20px;
}

.admin-section {
    margin-bottom: 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}

.admin-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ink);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    position: relative;
}

.admin-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 44px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.analysis-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.analysis-content p {
    margin: 8px 0;
    font-size: 14px;
}

.monthly-salary-list {
    max-height: 200px;
    overflow-y: auto;
}

.monthly-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.monthly-item:last-child {
    border-bottom: none;
}

.months-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.month-badge {
    background: #3b82f6;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.job-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.job-item:last-child {
    border-bottom: none;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* 数据分析样式 - 现代设计 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e293b;
    padding: 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: #e2e8f0;
}

.stat-icon {
    font-size: 48px;
    opacity: 0.9;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 16px;
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #64748b;
    letter-spacing: -0.2px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.stat-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 8px 0 0 0;
    font-weight: 500;
}

/* 工资分布分析 */
.salary-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.distribution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.distribution-item:last-child {
    border-bottom: none;
}

.dist-label {
    font-weight: 500;
    color: #666;
    flex: 1;
}

.dist-value {
    font-weight: 600;
    color: #333;
}

.dist-value.highlight {
    color: #e74c3c;
    font-size: 16px;
}

/* 月度工资趋势 */
.monthly-trend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.trend-month {
    font-size: 12px;
    color: #666;
    min-width: 60px;
}

.trend-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.trend-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.trend-amount {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    min-width: 60px;
    text-align: right;
}

/* 工种工资对比 */
.job-comparison {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.job-comparison-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.job-name {
    font-size: 12px;
    color: #666;
    min-width: 80px;
}

.job-bar {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.job-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa726);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.job-avg {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
    text-align: right;
}

/* 月份分布 */
.month-distribution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.month-dist-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    border-left: 3px solid #3b82f6;
}

.month-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.month-count {
    font-size: 11px;
    color: #666;
}

/* 查询统计 */
.query-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.query-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.stat-value.success {
    color: #27ae60;
}

.stat-value.failed {
    color: #e74c3c;
}

.stat-value.rate {
    color: #3498db;
}

/* 热门查询月份 */
.hot-months {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.hot-month {
    font-weight: 600;
    color: #333;
}

.hot-count {
    font-size: 12px;
    color: #666;
}

/* 查询记录页面样式 */
.search-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.records-info {
    margin-bottom: 15px;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

/* 现代化搜索表单样式 */
.modern-search-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.search-group {
    display: flex;
    flex-direction: column;
}

.search-group .form-group {
    margin-bottom: 0;
}

.search-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
}

.search-group .search-icon {
    font-size: 16px;
    opacity: 0.8;
}

.search-group input,
.search-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.search-btn,
.reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.search-btn {
    background: var(--primary);
    color: white;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.reset-btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.reset-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-icon {
    font-size: 14px;
}

/* 现代化表格样式 */
.modern-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #ffffff;
    -webkit-overflow-scrolling: touch; /* 移动端平滑滚动 */
    max-width: 100%; /* 确保不超过容器宽度 */
}

.modern-table-container::-webkit-scrollbar {
    height: 8px;
}

.modern-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modern-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modern-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
    table-layout: auto; /* 使用自动布局，让内容决定列宽 */
}

/* 防御性修复：避免被全局/移动端“响应式表格”样式误伤导致 td/tr 变成块级从而错位 */
.modern-table {
    display: table;
}
.modern-table thead {
    display: table-header-group;
}
.modern-table tbody {
    display: table-row-group;
}
.modern-table tr {
    display: table-row;
}
.modern-table th,
.modern-table td {
    display: table-cell;
}

.modern-table th,
.modern-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    white-space: normal; /* 允许文本换行 */
    word-wrap: break-word; /* 长单词换行 */
    overflow-wrap: break-word; /* 确保长内容换行 */
}

/* 设置最小列宽，确保内容可读 */
.modern-table th:nth-child(1),
.modern-table td:nth-child(1) { min-width: 100px; } /* 姓名 */
.modern-table th:nth-child(2),
.modern-table td:nth-child(2) { min-width: 120px; } /* 手机号 */
.modern-table th:nth-child(3),
.modern-table td:nth-child(3) { min-width: 180px; } /* 身份证号 */
.modern-table th:nth-child(4),
.modern-table td:nth-child(4) { min-width: 100px; } /* 工资月份 */
.modern-table th:nth-child(5),
.modern-table td:nth-child(5) { min-width: 120px; } /* 查询结果 */
.modern-table th:nth-child(6),
.modern-table td:nth-child(6) { min-width: 160px; } /* 查询时间 */
.modern-table th:nth-child(7),
.modern-table td:nth-child(7) { min-width: 120px; } /* IP地址 */

.modern-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
}

.modern-table tr:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.modern-table tr.log-row:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 表格单元格特殊样式 */
.modern-table .user-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.modern-table .user-avatar {
    font-size: 16px;
    background: #e2e8f0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modern-table .phone-number,
.modern-table .id-card,
.modern-table .query-time,
.modern-table .ip-address {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modern-table .phone-icon,
.modern-table .id-icon,
.modern-table .time-icon,
.modern-table .ip-icon {
    font-size: 14px;
    opacity: 0.7;
}

.modern-table .salary-month .month-badge {
    background: #e0f2fe;
    color: #0284c7;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.modern-table .query-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.modern-table .query-result-badge.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.modern-table .query-result-badge.failed {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.modern-table .result-icon {
    font-size: 12px;
}

/* 可排序表头 */
.modern-table .sortable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-table .sortable:hover {
    background: #e2e8f0;
}

.modern-table .sortable .sort-icon {
    margin-left: 5px;
    opacity: 0.5;
    font-size: 12px;
}

/* 现代化分页样式 */
.modern-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-top: 24px;
}

.pagination-info {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.page-number:hover {
    background: #f1f5f9;
    color: #334155;
}

.page-number.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-ellipsis {
    padding: 0 8px;
    color: #94a3b8;
    font-size: 14px;
}

/* 响应式表格 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .modern-search-form {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .search-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-btn,
    .reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modern-table-container {
        margin-bottom: 16px;
        border-radius: 8px;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .modern-table .user-avatar {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .modern-table .phone-icon,
    .modern-table .id-icon,
    .modern-table .time-icon,
    .modern-table .ip-icon {
        font-size: 12px;
    }
    
    .modern-table .salary-month .month-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .modern-table .query-result-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .modern-pagination {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        text-align: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-number {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    /* 移动端表格列优化 */
    .modern-table th:nth-child(3),
    .modern-table td:nth-child(3) {
        display: none; /* 隐藏身份证号列 */
    }
    
    .modern-table th:nth-child(7),
    .modern-table td:nth-child(7) {
        display: none; /* 隐藏IP地址列 */
    }
    
    /* 移动端最小列宽设置 */
    .modern-table th:nth-child(1),
    .modern-table td:nth-child(1) { min-width: 80px; }
    .modern-table th:nth-child(2),
    .modern-table td:nth-child(2) { min-width: 100px; }
    .modern-table th:nth-child(4),
    .modern-table td:nth-child(4) { min-width: 80px; }
    .modern-table th:nth-child(5),
    .modern-table td:nth-child(5) { min-width: 100px; }
    .modern-table th:nth-child(6),
    .modern-table td:nth-child(6) { min-width: 120px; }
}

@media (max-width: 480px) {
    .modern-table th:nth-child(2),
    .modern-table td:nth-child(2) {
        display: none; /* 在小屏幕上隐藏手机号列 */
    }
    
    .modern-table th:nth-child(6),
    .modern-table td:nth-child(6) {
        display: none; /* 在小屏幕上隐藏查询时间列 */
    }
    
    /* 小屏幕最小列宽设置 */
    .modern-table th:nth-child(1),
    .modern-table td:nth-child(1) { min-width: 60px; }
    .modern-table th:nth-child(4),
    .modern-table td:nth-child(4) { min-width: 70px; }
    .modern-table th:nth-child(5),
    .modern-table td:nth-child(5) { min-width: 100px; }
    
    .modern-table .user-info {
        gap: 6px;
    }
    
    .modern-table .phone-number,
    .modern-table .id-card,
    .modern-table .query-time,
    .modern-table .ip-address {
        gap: 4px;
    }
}

/* 旧表格样式兼容 */
.query-logs-table {
    overflow-x: auto;
    margin-bottom: 20px;
}

.query-logs-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.query-logs-table th,
.query-logs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.query-logs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.query-logs-table tr:hover {
    background: #f5f5f5;
}

.query-result {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.query-result.success {
    background: #d4edda;
    color: #155724;
}

.query-result.failed {
    background: #f8d7da;
    color: #721c24;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    font-size: 14px;
    color: #666;
}

/* 工资条详情 */
.salary-record {
    padding: 20px;
}

.record-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.record-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.record-date {
    color: #999;
    font-size: 14px;
}

.record-content {
    margin-bottom: 30px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row .label {
    flex: 0 0 150px;
    font-weight: 500;
    color: #666;
}

.info-row .value {
    flex: 1;
    color: #333;
}

.info-row .value.highlight {
    color: #3b82f6;
    font-weight: 600;
}

.info-row .value.total {
    font-size: 24px;
    color: #e74c3c;
    font-weight: bold;
}

.total-row {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.divider {
    height: 1px;
    background: #e0e0e0;
    margin: 15px 0;
}

.record-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* 错误消息 */
.error-message {
    max-width: 480px;
    margin: 40px auto;
    padding: 44px 36px 38px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 50px -20px rgba(15,23,42,0.35);
    border: 1px solid #f1f5f9;
}

.error-message h2 {
    position: relative;
    color: #e11d48;
    margin: 0 0 22px;
    padding-top: 64px;
    font-size: 21px;
    font-weight: 700;
}

.error-message h2::before {
    content: "!";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb7185, #e11d48);
    color: #fff;
    font-size: 26px; font-weight: 800;
    line-height: 46px;
    box-shadow: 0 10px 22px -8px rgba(225,29,72,0.6);
}

.error-message ul {
    list-style: none;
    margin-bottom: 26px;
}

.error-message li {
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-left: 4px solid #f43f5e;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: left;
    color: #475569;
    font-size: 14px;
}

/* 登录页面 */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
}

/* 管理员后台 */
.admin-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.admin-header h1 {
    font-size: 24px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #3b82f6;
}

.admin-content {
    padding: 20px;
}

.admin-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 提示框 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-result {
    padding: 40px 20px;
    text-align: center;
}

.import-stats {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.action-buttons {
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 14px;
    }
    
    .query-form-wrapper {
        padding: 20px 15px;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-row .label {
        flex: 1;
        margin-bottom: 5px;
    }
    
    .record-footer {
        flex-direction: column;
    }
    
    .record-footer .btn {
        width: 100%;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .admin-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }
    
    .info-row .value.total {
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: #fff;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
    }
    
    .header {
        background: #3b82f6;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .record-footer {
        display: none;
    }
    
    .footer {
        display: none;
    }

    /* 工资凭证打印适配 */
    .ps-net-block {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .ps-actions { display: none; }
}

/* ===== 工资明细单（参考标准工资单样式） ===== */

/* 外层容器 */
.ps-wrap {
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #1e293b;
}

/* ---- 标题区 ---- */
.ps-head {
    text-align: center;
    padding: 28px 20px 16px;
}
.ps-head h1 {
    font-size: 26px;
    font-weight: 800;
    color: #2563eb;
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.ps-head p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}
.ps-name {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 6px 0 10px !important;
    letter-spacing: .5px;
}

/* ---- 个人信息卡 ---- */
.ps-info-card {
    margin: 0 20px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
}
.ps-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
}
.ps-info-row + .ps-info-row { border-top: 1px solid #e2e8f0; }
.ps-info-k {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}
.ps-info-v {
    font-size: 17px;
    color: #0f172a;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ---- 三栏明细 ---- */
.ps-detail {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 1px;
    margin: 0 20px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0; /* gap 模拟 */
}
.ps-col {
    background: #fff;
    padding: 16px 14px;
}
.ps-col-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ps-col-income .ps-col-title { color: #059669; }
.ps-col-deduct .ps-col-title { color: #dc2626; }
/* 右栏内第二个板块（实发工资）与扣除项的分隔 */
.ps-title-net {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
    color: #2563eb !important;
}

/* 图标：勾 / 减号 */
.ps-icon-check, .ps-icon-minus {
    width: 18px; height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
    position: relative;
}
.ps-icon-check::before {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: #10b981;
    border-radius: 4px;
}
.ps-icon-minus::before {
    content: "−";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: #ef4444;
    border-radius: 4px;
}

/* 明细行 */
.ps-d-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
}
.ps-d-k {
    color: #475569;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    font-weight: 400;
}
.ps-d-v {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.ps-d-money {
    color: #0f172a;
    font-weight: 700;
}
.ps-d-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 15px;
}
.ps-d-total .ps-d-k { font-weight: 700; }
.ps-d-total .ps-d-money { font-size: 16px; }

/* ---- 底部实发工资蓝色大块 ---- */
.ps-net-block {
    margin: 0 20px 20px;
    background: #2563eb;
    border-radius: 14px;
    padding: 24px 28px;
    text-align: center;
    color: #fff;
}
.ps-net-label {
    font-size: 15px;
    opacity: .9;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.ps-net-value {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}
.ps-net-upper {
    margin-top: 8px;
    font-size: 13px;
    opacity: .8;
    letter-spacing: 0.5px;
}

/* ---- 备注 & 签字 ---- */
.ps-footer-note {
    margin: 0 20px 18px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.8;
}
.ps-remark { margin-bottom: 10px; }

/* ---- 操作按钮 ---- */
.ps-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 8px 20px 28px;
}
/* 按钮按内容宽度排布：.btn-primary 默认 width:100%，
   在 PC 上会把「打印/保存」拉成一整条超长蓝条 */
.ps-actions .btn {
    width: auto;
    min-width: 160px;
}

/* 按钮变体 */
.btn-ghost {
    background: #f1f5f9;
    color: #475569;
    width: auto;
    box-shadow: none;
}
.btn-ghost:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* ---- 打印适配 ---- */
@media print {
    .ps-wrap { box-shadow: none; max-width: 100%; }
    .ps-net-block {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .ps-actions { display: none; }
    body { background: #fff; padding: 0; }
    .container { box-shadow: none; max-width: 100%; }
    .header { display: none; }
    .footer { display: none; }
}

/* ---- 移动端适配 ---- */
@media (max-width: 600px) {
    .ps-head { padding: 22px 16px 12px; }
    .ps-head h1 { font-size: 22px; }
    .ps-info-card { margin-left: 12px; margin-right: 12px; padding: 12px 14px; }
    .ps-detail {
        margin-left: 12px; margin-right: 12px;
        grid-template-columns: 1fr;
        gap: 0;
    }
    .ps-col { padding: 12px; }
    .ps-net-block { margin-left: 12px; margin-right: 12px; padding: 20px; }
    .ps-net-value { font-size: 32px; }
    .ps-footer-note { margin-left: 12px; margin-right: 12px; }
    .ps-actions { padding-left: 12px; padding-right: 12px; flex-direction: column; }
    .ps-actions .btn { width: 100%; }
}

/* ---- 宽屏适配（PC / 钉钉桌面端） ----
   原来的 680px 是按手机设计的，在 PC 上两侧大片留白，
   而且三栏每栏只剩 170px 左右，金额和标签挤在一起。
   这里在 900px 以上放开宽度、加大行距，并让信息卡改成两列并排。 */
@media (min-width: 900px) {
    .ps-wrap {
        max-width: 1040px;
        border-radius: 16px;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    }

    .ps-head { padding: 34px 24px 20px; }
    .ps-head h1 { font-size: 30px; }
    .ps-name { font-size: 24px; }

    /* 信息卡：两项并排，避免数值被甩到屏幕最右端 */
    .ps-info-card {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 40px;
        padding: 18px 26px;
    }
    .ps-info-row { padding: 6px 0; }
    .ps-info-row + .ps-info-row { border-top: none; }

    /* 三栏等宽，行距放宽，标签不再被挤压 */
    .ps-detail { grid-template-columns: 1fr 1fr 1fr; }
    .ps-col { padding: 20px 22px; }
    .ps-col-title { font-size: 15px; margin-bottom: 14px; }
    .ps-d-row { padding: 8px 0; font-size: 15px; }
    .ps-d-total { font-size: 16px; margin-top: 10px; padding-top: 10px; }
    .ps-d-total .ps-d-money { font-size: 17px; }

    .ps-net-block { padding: 26px 32px; }
    .ps-footer-note { font-size: 14px; }

    /* 内嵌部分（后台预览等）宽度不足时自然回落到 680px 逻辑 */
}

/* ============================================================
   复选框 / 单选框
   注意：上面的 .form-group input 通配规则会把 checkbox 也变成
   100% 宽的白方块（appearance:none 抹掉了原生对勾），导致
   「点了没反应」。这里单独把它恢复成原生控件。
   ============================================================ */

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    -webkit-appearance: auto;
    appearance: auto;
    accent-color: #1677ff;
    flex: 0 0 auto;
    vertical-align: middle;
    cursor: pointer;
    transform: none;
    box-shadow: none;
}

.form-group input[type="checkbox"]:hover,
.form-group input[type="radio"]:hover {
    border-color: #9ca3af;
}

.form-group input[type="checkbox"]:focus,
.form-group input[type="radio"]:focus {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
    border-color: #93c5fd;
    transform: none;
    box-shadow: none;
}

/* 带文字说明的勾选项，整行可点 */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: auto !important;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    margin: 0;
}

.checkbox-label span {
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
}

/* 卡片式开关行（钉钉对接页的启用开关） */
.checkbox-label.dt-switch {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    transition: background .2s, border-color .2s;
}

.checkbox-label.dt-switch:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
