/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1a2332 0%, #243044 100%);
    color: #bfcbd9;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0,0,0,.1);
}
.logo {
    padding: 20px 20px 16px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-icon { font-size: 26px; }
.logo-text { letter-spacing: 1px; }

/* 公司选择器 */
.company-selector {
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.company-selector label {
    display: block;
    font-size: 11px;
    color: #5a6a7d;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.company-select {
    width: 100%;
    padding: 8px 30px 8px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    color: #e0e6ed;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238899aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all .2s;
}
.company-select:hover { background-color: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.company-select:focus { border-color: #409eff; background-color: rgba(64,158,255,.1); }
.company-select option { background: #243044; color: #e0e6ed; padding: 6px; }

/* 导航 */
.nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: #a0aec0;
    transition: all .2s;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-size: 13.5px;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active {
    background: rgba(64,158,255,.12);
    color: #409eff;
    border-left-color: #409eff;
    font-weight: 500;
}
/* 自定义导航子菜单 */
.nav-group-toggle { display: flex; align-items: center; }
.nav-group-toggle .nav-arrow {
    margin-left: auto; font-size: 11px; transition: transform .2s; opacity: .6;
}
.nav-group-toggle.active .nav-arrow { transform: rotate(90deg); }
.nav-sub {
    display: none; background: rgba(0,0,0,.15); padding: 4px 0;
}
.nav-sub-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px 8px 44px; color: #b8c0cc; font-size: 13px;
    text-decoration: none; transition: all .15s; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.nav-sub-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-sub-item.active { color: #409eff; background: rgba(64,158,255,.1); font-weight: 500; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

/* 侧边栏底部用户（已移到顶栏，这里保留极简） */
.sidebar-user { display: none; }

/* ===== 主内容区 ===== */
.main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== 顶部栏 ===== */
.topbar {
    background: #fff;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 16px; font-weight: 600; color: #1f2d3d; }
.topbar-company-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecf5ff;
    color: #409eff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    transition: background .2s;
}
.topbar-user:hover { background: #f5f7fa; }
.topbar-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #2b7fd4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}
.topbar-user-meta { text-align: right; line-height: 1.3; }
.topbar-user-name { font-size: 13px; font-weight: 600; color: #1f2d3d; }
.topbar-user-role { font-size: 11px; color: #909399; }
.topbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    color: #606266;
    font-size: 13px;
    transition: all .2s;
    background: #fff;
}
.topbar-logout:hover { color: #f56c6c; border-color: #f56c6c; background: #fef0f0; }

/* ===== 用户下拉按钮 ===== */
.user-dropdown { position: relative; }
.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 22px;
    cursor: pointer;
    transition: all .2s;
    outline: none;
}
.user-dropdown-btn:hover { border-color: #409eff; background: #ecf5ff; box-shadow: 0 2px 8px rgba(64,158,255,.15); }
.user-dropdown-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #409eff, #2b7fd4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-dropdown-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.3;
}
.user-dropdown-name { font-size: 13px; font-weight: 600; color: #1f2d3d; }
.user-dropdown-role { font-size: 11px; color: #909399; }
.user-dropdown-arrow { font-size: 10px; color: #909399; transition: transform .2s; }
.user-dropdown-btn:hover .user-dropdown-arrow { transform: rotate(180deg); color: #409eff; }

/* 下拉菜单 */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12);
    border: 1px solid #ebeef5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all .2s ease;
    z-index: 200;
    overflow: hidden;
}
.user-dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
}
.user-dropdown-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13.5px;
    color: #606266;
    transition: all .15s;
}
.user-dropdown-item:hover { background: #f5f7fa; color: #409eff; padding-left: 20px; }
.user-dropdown-item.item-logout:hover { background: #fef0f0; color: #f56c6c; }
.badge-all { background: #f0f9eb !important; color: #67c23a !important; }

/* ===== 日历式月份选择器 ===== */
.month-picker { position: relative; display: inline-block; }
.month-picker-trigger {
    padding: 7px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
    color: #333;
}
.month-picker-trigger:hover { border-color: #409eff; color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.1); }
.mp-arrow { font-size: 10px; color: #909399; transition: transform .2s; }
.month-picker-trigger:hover .mp-arrow { color: #409eff; }
.month-picker-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid #ebeef5;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    z-index: 200;
    width: 280px;
    animation: mpIn .15s ease;
}
@keyframes mpIn { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }
.month-picker-panel.show { display: block; }
.month-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.mp-nav {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    color: #606266;
    font-size: 18px;
    font-weight: bold;
    transition: all .15s;
    text-decoration: none;
}
.mp-nav:hover { background: #ecf5ff; color: #409eff; }
.mp-year { font-size: 16px; font-weight: 700; color: #1f2d3d; }
.month-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.month-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 0;
    border-radius: 8px;
    font-size: 14px;
    color: #606266;
    background: #fff;
    border: 1px solid #ebeef5;
    transition: all .15s;
    cursor: pointer;
    text-decoration: none;
}
.month-cell:hover { border-color: #409eff; color: #409eff; background: #f0f7ff; }
.month-cell.has-data {
    background: #409eff;
    color: #fff;
    border-color: #409eff;
    font-weight: 500;
}
.month-cell.has-data:hover { background: #337ecc; border-color: #337ecc; color: #fff; }
.month-cell.selected {
    box-shadow: 0 0 0 2px #1f2d3d;
    font-weight: 700;
}
.month-cell.has-data.selected {
    box-shadow: 0 0 0 2px #1f2d3d;
}
.mp-legend {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #909399;
    display: flex;
    gap: 16px;
    justify-content: center;
}
.mp-legend span { display: flex; align-items: center; gap: 5px; }
.mp-legend .dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.dot-blue { background: #409eff; }
.dot-white { background: #fff; border: 1px solid #dcdfe6; }

/* 主内容padding */
.main-content { padding: 22px 28px; flex: 1; }

/* ===== 页面标题 ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.page-title { font-size: 20px; font-weight: 600; color: #1f2d3d; }

/* ===== 月份选择栏 ===== */
.month-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.month-bar label { font-weight: 600; color: #606266; }
.month-bar select {
    padding: 7px 14px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    background: #fff;
}
.month-bar select:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.1); }

/* ===== 统计卡片 ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    position: relative;
    overflow: hidden;
    transition: all .2s;
    border: 1px solid #f0f0f0;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.stat-card .stat-label { font-size: 13px; color: #909399; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; color: #1f2d3d; }
.stat-card .stat-value .unit { font-size: 14px; font-weight: 400; color: #909399; margin-left: 4px; }
.stat-card.total-card { background: linear-gradient(135deg, #409eff 0%, #2b7fd4 100%); border: none; }
.stat-card.total-card .stat-label, .stat-card.total-card .stat-value, .stat-card.total-card .unit { color: #fff; }
.stat-card.salary-card { border-top: 3px solid #67c23a; }
.stat-card.fixed-card { border-top: 3px solid #e6a23c; }
.stat-card.hidden-card { border-top: 3px solid #f56c6c; }

/* ===== 面板 ===== */
.panel {
    background: #fff;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    margin-bottom: 18px;
    border: 1px solid #f0f0f0;
}
.panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 7px 18px;
    border: none;
    border-radius: 6px;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .2s;
    text-align: center;
    line-height: 1.5;
    font-weight: 500;
}
.btn-primary { background: #409eff; color: #fff; }
.btn-primary:hover { background: #337ecc; box-shadow: 0 2px 8px rgba(64,158,255,.3); }
.btn-success { background: #67c23a; color: #fff; }
.btn-success:hover { background: #529b2e; box-shadow: 0 2px 8px rgba(103,194,58,.3); }
.btn-danger { background: #f56c6c; color: #fff; }
.btn-danger:hover { background: #c45656; box-shadow: 0 2px 8px rgba(245,108,108,.3); }
.btn-warning { background: #e6a23c; color: #fff; }
.btn-warning:hover { background: #b88230; }
.btn-default { background: #fff; color: #606266; border: 1px solid #dcdfe6; }
.btn-default:hover { border-color: #409eff; color: #409eff; background: #ecf5ff; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

/* ===== 表单 ===== */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { margin-bottom: 4px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #606266;
    font-weight: 500;
}
.form-group label .req { color: #f56c6c; margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all .2s;
    background: #fff;
    color: #333;
}
.form-control:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.1); }
textarea.form-control { resize: vertical; min-height: 38px; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
    background: #fafafa;
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    color: #606266;
    border-bottom: 2px solid #ebeef5;
    white-space: nowrap;
}
table.data-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; color: #333; }
table.data-table tr:hover td { background: #f8fafc; }
table.data-table .amount { font-weight: 600; color: #f56c6c; text-align: right; }
table.data-table .actions { white-space: nowrap; text-align: center; }
table.data-table .actions .btn { margin: 0 2px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.empty-row td { text-align: center; color: #c0c4cc; padding: 28px; }

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.tag-blue { background: #ecf5ff; color: #409eff; }
.tag-green { background: #f0f9eb; color: #67c23a; }
.tag-orange { background: #fdf6ec; color: #e6a23c; }
.tag-red { background: #fef0f0; color: #f56c6c; }
.tag-gray { background: #f4f4f5; color: #909399; }

/* ===== 提示 ===== */
.alert { padding: 11px 18px; border-radius: 6px; margin-bottom: 14px; font-size: 13.5px; }
.alert-success { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.alert-error, .alert-danger { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }
.tip {
    background: #ecf5ff;
    border-left: 3px solid #409eff;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #5a6a7a;
    margin-bottom: 16px;
    line-height: 1.7;
}

/* ===== 占比条 ===== */
.ratio-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; margin: 14px 0 8px; }
.ratio-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; min-width: 50px; transition: flex .3s; }
.ratio-legend { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: #606266; }
.ratio-legend span { display: flex; align-items: center; gap: 6px; }
.ratio-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ===== 分类汇总 ===== */
.cat-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 16px;
    background: #fafafa;
    border-radius: 6px;
    transition: background .2s;
}
.cat-item:hover { background: #f0f2f5; }
.cat-item .cat-name { color: #606266; }
.cat-item .cat-amount { font-weight: 600; color: #333; }

/* ===== 筛选栏 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 5px; }
.filter-item label { font-size: 12px; color: #909399; }
.filter-item .form-control { width: 150px; padding: 7px 10px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
.page-info { font-size: 14px; color: #606266; }

/* ===== 弹窗 ===== */
.modal-mask {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    width: 420px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 18px; color: #1f2d3d; }

/* ===== 用户绑定复选框 ===== */
.user-check-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 6px;
    background: #fafafa;
}
.user-check-list::-webkit-scrollbar { width: 6px; }
.user-check-list::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 3px; }
.user-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
    margin-bottom: 2px;
}
.user-check-item:hover { background: #ecf5ff; }
.user-check-item:has(input:checked) { background: #ecf5ff; border: 1px solid #b3d8ff; padding: 9px 13px; }
.user-check-item input[type="checkbox"] {
    width: 18px; height: 18px; cursor: pointer; accent-color: #409eff;
}
.user-check-item .user-check-name { font-weight: 500; color: #333; }
.user-check-item .user-check-username { font-size: 12px; color: #909399; margin-left: 6px; }

/* ===== 文件链接 ===== */
.file-link { color: #409eff; word-break: break-all; }
.file-link:hover { text-decoration: underline; }

/* ===== 登录页 ===== */
.login-body {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 40%, #34495e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(64,158,255,.15) 0%, transparent 70%);
    top: -150px; right: -100px;
    border-radius: 50%;
}
.login-body::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(103,194,58,.1) 0%, transparent 70%);
    bottom: -100px; left: -80px;
    border-radius: 50%;
}
.login-wrapper { width: 100%; max-width: 420px; padding: 20px; position: relative; z-index: 1; }
.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 40px 36px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: loginIn .4s ease;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.login-header { text-align: center; margin-bottom: 30px; }
.login-logo {
    font-size: 48px;
    margin-bottom: 14px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.login-header h1 { font-size: 22px; color: #1f2d3d; margin-bottom: 8px; font-weight: 700; }
.login-header p { font-size: 13px; color: #909399; }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #606266;
    font-weight: 500;
}
.login-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all .2s;
    background: #fafafa;
}
.login-form .form-control:focus {
    border-color: #409eff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64,158,255,.1);
}
.login-btn {
    width: 100%;
    padding: 13px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #409eff 0%, #2b7fd4 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s;
    margin-top: 6px;
    letter-spacing: 2px;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(64,158,255,.35); }
.login-btn:active { transform: translateY(0); }
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #c0c4cc;
}

/* ===== 响应式 ===== */
@media (max-width: 1399px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 汉堡菜单按钮（仅手机端显示） ===== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px; height: 36px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s;
}
.hamburger-btn:hover { background: #f0f2f5; }
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #606266;
    border-radius: 1px;
    transition: all .3s;
}

/* ===== 侧边栏遮罩 ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    opacity: 0;
    transition: opacity .3s;
}

/* ===== 手机端（≤768px） ===== */
@media (max-width: 768px) {
    /* 汉堡按钮显示 */
    .hamburger-btn { display: flex; }

    /* 遮罩显示 */
    .sidebar-overlay { display: block; }
    body.sidebar-open .sidebar-overlay { opacity: 1; }

    /* 侧边栏抽屉 */
    .sidebar {
        width: 240px;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 100;
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .logo-text, .nav-item span:not(.nav-icon), .company-selector { display: block; }

    /* 主内容区 */
    .main { margin-left: 0; }
    .main-content { padding: 12px; }

    /* 顶栏 */
    .topbar {
        padding: 0 12px;
        height: 50px;
    }
    .topbar-title { font-size: 15px; }
    .topbar-company-badge { display: none; }
    .topbar-user-meta { display: none; }
    .user-dropdown-btn { padding: 4px 8px; }
    .user-dropdown-info { display: none; }
    .user-dropdown-arrow { display: none; }
    .topbar-logout { display: none; }

    /* 统计卡片 */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card .stat-label { font-size: 12px; }

    /* 表单 */
    .form-grid { grid-template-columns: 1fr; gap: 12px; }
    .form-control { padding: 10px 12px; font-size: 15px; }
    .btn { padding: 9px 16px; font-size: 14px; }

    /* 面板 */
    .panel { padding: 14px; border-radius: 8px; }
    .panel-title { font-size: 14px; }

    /* 表格 - 横向滚动 */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table.data-table { font-size: 13px; min-width: 500px; }
    table.data-table th, table.data-table td { padding: 8px 10px; }

    /* 月份栏 */
    .month-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }
    .month-bar label { font-size: 13px; }
    .month-picker { width: 100%; }
    .month-picker-trigger { width: 100%; justify-content: center; }
    .month-picker-panel {
        width: calc(100vw - 40px);
        left: 50%;
        transform: translateX(-50%);
    }

    /* 分类汇总 */
    .cat-summary { grid-template-columns: 1fr; gap: 8px; }
    .cat-item { padding: 10px 12px; }

    /* 筛选栏 */
    .filter-bar { gap: 10px; }
    .filter-item .form-control { width: 100%; }

    /* 页面标题 */
    .page-header { margin-bottom: 12px; }
    .page-title { font-size: 18px; }

    /* 弹窗 */
    .modal-box { width: 92%; padding: 18px; }

    /* 用户绑定复选框 */
    .user-check-list { max-height: 250px; }

    /* 占比条 */
    .ratio-bar { height: 24px; }
    .ratio-seg { font-size: 10px; min-width: 30px; }
    .ratio-legend { gap: 12px; font-size: 12px; }

    /* 提示 */
    .tip { font-size: 12px; padding: 8px 12px; }
    .alert { padding: 9px 14px; font-size: 13px; }

    /* 处罚系统：添加员工+记录错误两栏堆叠 */
    .panel-wrap-2col { grid-template-columns: 1fr !important; }
}

/* ===== 小屏手机（≤480px） ===== */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar-title { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .stat-card .stat-value { font-size: 22px; }
    .month-picker-panel { width: calc(100vw - 24px); }
    .page-title { font-size: 17px; }
    table.data-table { font-size: 12px; min-width: 460px; }
    table.data-table th, table.data-table td { padding: 7px 8px; }
    /* 处罚系统表单堆叠 */
    .panel > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* ===== 横屏手机优化 ===== */
@media (max-width: 768px) and (orientation: landscape) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar { width: 220px; }
}
