* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background: #0b0f1a;
    color: #eaf0f8;
    height: 100vh;
    overflow: hidden;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a2332; border-radius: 12px; }
::-webkit-scrollbar-thumb { background: #2f8cf5; border-radius: 12px; box-shadow: 0 0 12px #2f8cf580; }

#loginPage {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/063.jpg') center/cover no-repeat;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
#loginPage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(47, 140, 245, 0.15) 0%, rgba(15, 32, 75, 0.8) 50%, rgba(47, 140, 245, 0.1) 100%);
    pointer-events: none;
}
#loginPage::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(47, 140, 245, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(138, 180, 248, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(47, 140, 245, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
#loginPage.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}
.login-card {
    background: rgba(12, 20, 35, 0.75);
    backdrop-filter: blur(14px) saturate(180%);
    padding: 3rem 2.8rem;
    border-radius: 48px;
    border: 1px solid rgba(47, 140, 245, 0.25);
    box-shadow: 0 30px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(47, 140, 245, 0.15);
    width: 380px;
    max-width: 92vw;
    text-align: center;
}
.login-card .logo {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #8ab4f8, #2f8cf5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
}
.login-card .sub {
    color: #9aaec9;
    font-weight: 400;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border-bottom: 1px solid #2a3950;
    padding-bottom: 1.2rem;
    margin-bottom: 1.8rem;
}
.login-card input {
    width: 100%;
    padding: 14px 18px;
    margin: 10px 0;
    background: #111b2b;
    border: 1px solid #28344a;
    border-radius: 40px;
    color: #eaf0f8;
    font-size: 1rem;
    transition: 0.25s;
    outline: none;
}
.login-card input:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.25);
    background: #0f1a2e;
}
.login-card .btn-login {
    width: 100%;
    padding: 14px;
    margin-top: 1.4rem;
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(47, 140, 245, 0.3);
}
.login-card .btn-login:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(47, 140, 245, 0.5);
}
.login-card .hint {
    color: #7b8aa6;
    font-size: 0.8rem;
    margin-top: 1.2rem;
}

#appMain {
    display: none;
    height: 100vh;
    width: 100vw;
    background: #0b111e;
    grid-template-columns: 72px 1fr;
    grid-template-rows: 64px 1fr;
    grid-template-areas: 
        "sidebar header"
        "sidebar content";
}
#appMain.active {
    display: grid;
}

.sidebar {
    grid-area: sidebar;
    background: rgba(16, 26, 45, 0.85);
    backdrop-filter: blur(8px);
    border-right: 1px solid #1f3147;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 0 8px;
    gap: 12px;
    overflow-y: auto;
}
.sidebar .brand-icon {
    font-size: 1.8rem;
    color: #2f8cf5;
    filter: drop-shadow(0 0 10px #2f8cf560);
    margin-bottom: 4px;
}
.sidebar .nav-item {
    color: #7b8fa8;
    font-size: 1.3rem;
    padding: 8px 0;
    width: 100%;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.sidebar .nav-item i {
    display: block;
    margin-bottom: 3px;
}
.sidebar .nav-item span {
    font-size: 0.6rem;
    letter-spacing: 0.3px;
    opacity: 0.7;
}
.sidebar .nav-item.active {
    color: #8abcfc;
    border-left-color: #2f8cf5;
    background: linear-gradient(90deg, #1f3147, transparent);
}
.sidebar .nav-item:hover {
    color: #b6d4ff;
}

.header {
    grid-area: header;
    background: rgba(12, 22, 40, 0.7);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #1f3147;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}
.header .page-title {
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #d6e6ff, #8ab4f8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header .user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b0c8e5;
    font-size: 0.9rem;
}
.header .user-badge i {
    font-size: 1.2rem;
    color: #2f8cf5;
}

.content {
    grid-area: content;
    overflow-y: auto;
    padding: 24px 28px 28px;
    background: rgba(8, 14, 26, 0.6);
    backdrop-filter: blur(2px);
    height: calc(100vh - 120px);
}

.module-panel {
    display: none;
    animation: fadeSlide 0.3s ease;
}
.module-panel.active {
    display: block;
    height: 100%;
}
@keyframes fadeSlide {
    0% { opacity: 0.4; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.glass-card {
    background: rgba(18, 30, 50, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid #293e5a;
    border-radius: 28px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6);
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-top-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    flex: 1;
    grid-auto-rows: 1fr;
}
.grid-4col .glass-card.stat-card {
    padding: 12px 16px !important;
    margin-bottom: 0;
    border-radius: 20px;
    height: 100%;
    box-sizing: border-box;
}

.dashboard-right-panel {
    flex: 1;
    display: flex;
    gap: 16px;
    align-items: stretch;
}
.dashboard-right-panel .right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dashboard-right-panel .right-col .glass-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* 重点工作卡片 */
.work-focus-card h4,
.daily-log-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-edit-btn {
    background: rgba(47, 140, 245, 0.15);
    border: 1px solid rgba(47, 140, 245, 0.3);
    color: #8abcfc;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.card-edit-btn:hover {
    background: rgba(47, 140, 245, 0.3);
    transform: translateY(-1px);
}
.work-focus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.work-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(47, 140, 245, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(47, 140, 245, 0.15);
    font-size: 0.85rem;
    color: #c8d6e5;
}
.work-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.work-priority.high {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}
.work-priority.medium {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}
.work-priority.low {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}
.work-text {
    flex: 1;
}

/* 工作日志卡片 */
.daily-log-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.daily-log-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
}
.daily-log-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.daily-log-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex: 1;
    min-height: 0;
}
.day-label {
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}
.day-label.mon { background: rgba(47, 140, 245, 0.2); color: #2f8cf5; }
.day-label.tue { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.day-label.wed { background: rgba(74, 222, 128, 0.2); color: #4ade80; }
.day-label.thu { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.day-label.fri { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.day-label.sat, .day-label.sun {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}
.day-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(18, 30, 50, 0.5);
    border-radius: 10px;
    border: 1px solid rgba(41, 62, 90, 0.6);
    font-size: 0.82rem;
    color: #b0c8e5;
}
.daily-log-row.weekend .day-content {
    color: #64748b;
    background: rgba(18, 30, 50, 0.3);
}

.stat-trend.negative {
    color: var(--color-danger);
}

.stat-trend.negative i {
    margin-right: 4px;
}

.stat-badge {
    background: #14233b;
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 0.8rem;
    color: #9bb9e6;
    display: inline-block;
}

.btn-outline-cyber {
    background: transparent;
    border: 1px solid #2f8cf5;
    color: #8abcfc;
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    transition: 0.15s;
    cursor: pointer;
}
.btn-outline-cyber:hover {
    background: #2f8cf5;
    color: #0b111e;
    box-shadow: 0 0 20px #2f8cf580;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-sm:hover {
    background: linear-gradient(135deg, #4a9fff, #2f8cf5);
    box-shadow: 0 0 10px #2f8cf560;
}

.org-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.org-node {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #0f1b30;
    border-radius: 40px;
    border-left: 4px solid #2f8cf5;
    cursor: pointer;
    transition: 0.1s;
}
.org-node:hover {
    background: #1a2d4a;
}

.org-chart-container {
    margin-top: 0;
    margin-bottom: 20px;
    overflow: visible;
    padding-bottom: 16px;
    border-radius: 16px;
    background: rgba(47, 140, 245, 0.05);
    padding: 20px;
    position: relative;
}

.org-chart-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.org-action-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: rgba(47, 140, 245, 0.05);
    border-radius: 12px;
    width: 220px;
    max-height: 500px;
    overflow-y: auto;
}

.org-responsibility-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: rgba(47, 140, 245, 0.05);
    border-radius: 12px;
    flex: 1;
    min-width: 280px;
    max-height: 500px;
    overflow-y: auto;
}

.org-responsibility-panel h4 {
    margin: 0;
    padding-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid rgba(47, 140, 245, 0.2);
}

#deptStaffing {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staffing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.staffing-label {
    font-size: 12px;
    color: #9bb9e6;
}

.staffing-value {
    font-size: 16px;
    font-weight: 600;
    color: #2f8cf5;
}

.staffing-active {
    color: #4ade80;
}

.staffing-vacant {
    color: #fbbf24;
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-section h4 {
    margin: 0;
    padding-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 1px solid rgba(47, 140, 245, 0.2);
}

.btn-block {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
}

.section-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid rgba(47, 140, 245, 0.3);
    background: rgba(47, 140, 245, 0.05);
    color: #9bb9e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.tab-btn:hover {
    background: rgba(47, 140, 245, 0.15);
    color: #fff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    border-color: #2f8cf5;
    color: #fff;
}

.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

#section-process.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9bb9e6;
    font-size: 13px;
}

.feature-item i {
    color: #2f8cf5;
    width: 16px;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: rgba(47, 140, 245, 0.05);
    border-radius: 12px;
    gap: 8px;
}

.mini-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.mini-content {
    font-size: 13px;
    color: #9bb9e6;
}

.mini-count {
    font-size: 24px;
    font-weight: 600;
    color: #2f8cf5;
}

#selectedDeptInfo {
    padding: 12px;
    background: rgba(47, 140, 245, 0.1);
    border-radius: 8px;
    text-align: center;
}

.dept-name {
    font-size: 14px;
    font-weight: 600;
    color: #2f8cf5;
    margin-bottom: 4px;
}

.dept-desc {
    font-size: 11px;
    color: #6b7280;
}

#deptResponsibility {
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #ffffff;
}

#deptResponsibility p {
    margin: 0;
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.org-level-1-with-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.org-level-1-row {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: flex-start;
    overflow-x: auto;
    max-width: 100%;
}

.org-level-1-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: max-content;
}

.org-level-1 {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.org-node-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.org-node-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.7);
}

.org-node-main.selected {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(47, 140, 245, 0.6), 0 0 40px rgba(47, 140, 245, 0.3);
    border-color: #2f8cf5;
}

.org-node-board {
    width: 220px;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
}

.org-connector-level-1 {
    width: 2px;
    height: 14px;
    background: linear-gradient(180deg, #2f8cf5, #1a5fc7);
    margin-bottom: 4px;
}

.org-level-2 {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.org-node-secondary {
    background: linear-gradient(135deg, #2f8cf5 0%, #1a5fc7 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(47, 140, 245, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 110px;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.org-node-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(47, 140, 245, 0.6);
    background: linear-gradient(135deg, #4a9eff 0%, #2f8cf5 100%);
}

.org-node-secondary.selected {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(47, 140, 245, 0.5), 0 0 30px rgba(47, 140, 245, 0.3);
    border-color: #60a5fa;
}

.org-level-3 {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.level-3-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.org-connector-level-2 {
    width: 2px;
    height: 16px;
    background: linear-gradient(180deg, #2f8cf5, #1a5fc7);
}

.org-node-tertiary {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1a2e 100%);
    color: #a8c5e0;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(47, 140, 245, 0.3);
    min-width: 65px;
    text-align: center;
}

.org-node-tertiary:hover {
    background: linear-gradient(135deg, #2f8cf5 0%, #1a5fc7 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(47, 140, 245, 0.4);
}

.org-node-tertiary.selected {
    background: linear-gradient(135deg, #2f8cf5 0%, #1a5fc7 100%);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(47, 140, 245, 0.5), 0 0 25px rgba(47, 140, 245, 0.3);
    border-color: #60a5fa;
}

.org-node-secondary.active,
.org-node-tertiary.active,
.org-node-main.active {
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.8), 0 6px 20px rgba(47, 140, 245, 0.5);
}

.node-content {
    position: relative;
}

.node-content::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -4px;
    right: -4px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 1px;
}

.table-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #1e3a5f;
}

.sticky-header {
    overflow-x: auto;
    scrollbar-width: none;
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1a2e 100%);
    border-bottom: 2px solid #2f8cf5;
}

.sticky-header::-webkit-scrollbar {
    display: none;
}

.table-body-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 300px;
    scrollbar-width: thin;
    scrollbar-color: #2f8cf5 #1e3a5f;
}

.table-body-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-body-container::-webkit-scrollbar-track {
    background: #1e3a5f;
    border-radius: 4px;
}

.table-body-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2f8cf5, #1a5fc7);
    border-radius: 4px;
}

.table-body-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4a9eff, #2f8cf5);
}

.employee-table-header,
.employee-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.employee-table-header th {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d1a2e 100%);
    color: #8abcfc;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: none;
}

.employee-table-header th:first-child,
.employee-table td:first-child {
    text-align: center;
}

.employee-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(47, 140, 245, 0.2);
    color: #c5d6eb;
    white-space: nowrap;
    background: #0d1a2e;
    text-align: left;
}

.employee-table tbody tr:hover td {
    background: rgba(47, 140, 245, 0.1);
}

.employee-table tbody tr:last-child td {
    border-bottom: none;
}

.org-node .dept-name {
    font-weight: 600;
}
.org-node .dept-count {
    margin-left: auto;
    background: #1f3147;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 12px;
}
.member-tag {
    background: #142b44;
    padding: 6px 16px;
    border-radius: 40px;
    border: 1px solid #2f8cf550;
    font-size: 0.9rem;
}

.action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 6px;
}

.table-mini {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table-mini td, .table-mini th {
    padding: 12px 8px;
    border-bottom: 1px solid #1f3147;
}
.table-mini th {
    color: #8aacd0;
    font-weight: 500;
    text-align: left;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px !important;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 4px 14px rgba(47, 140, 245, 0.3);
    position: relative;
    overflow: hidden;
}
.stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
}
.stat-icon i {
    position: relative;
    z-index: 1;
}
.stat-content {
    flex: 1;
}
.stat-label {
    font-size: 0.75rem;
    color: #7b8fa8;
    margin-bottom: 2px;
}
.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8abcfc;
    line-height: 1.2;
}
.stat-trend {
    font-size: 0.75rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-trend.positive {
    color: #4ade80;
}
.stat-trend.negative {
    color: #f87171;
}
.stat-trend.neutral {
    color: #9bb9e6;
}

.chart-section {
    background: linear-gradient(135deg, rgba(47, 140, 245, 0.05), rgba(138, 180, 248, 0.03));
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(47, 140, 245, 0.1);
}
.chart-title {
    font-size: 0.85rem;
    color: #7b8fa8;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 50px;
}
.chart-title i {
    color: #2f8cf5;
}
.data-bar-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.data-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.data-bar-label {
    width: 100px;
    font-size: 0.85rem;
    color: #9bb9e6;
    flex-shrink: 0;
}
.data-bar-track {
    flex: 1;
    height: 10px;
    background: rgba(26, 45, 74, 0.6);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.data-bar-fill {
    height: 100%;
    border-radius: 8px;
    position: relative;
    transition: width 0.5s ease;
}
.data-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 8px 8px 0 0;
}
.data-bar-value {
    width: 45px;
    text-align: right;
    font-size: 0.85rem;
    color: #8abcfc;
    font-weight: 500;
}
.bar-chart-container {
    display: flex;
    align-items: flex-end;
    height: 140px;
    gap: 10px;
    padding-top: 20px;
}
.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.bar-bar {
    width: 100%;
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: height 0.5s ease;
    min-height: 10px;
}
.bar-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
    border-radius: 8px 8px 0 0;
}
.bar-label {
    font-size: 0.75rem;
    color: #7b8fa8;
}
.bar-value {
    font-size: 0.7rem;
    color: #9bb9e6;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1f3147;
    transition: 0.3s;
    border-radius: 26px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #7b8fa8;
    transition: 0.3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: #2f8cf5;
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: white;
}

.todo-item:hover {
    background: #1a2d4a !important;
}
.todo-checkbox {
    cursor: pointer;
}
.todo-item.checked {
    opacity: 0.6;
}
.todo-item.checked [style*="font-weight: 500"] {
    text-decoration: line-through;
    color: #7b8fa8;
}

#payrollSearch {
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: 0.25s;
}
#payrollSearch:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.25);
}

select {
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: 0.25s;
}
select:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.25);
}

.table-mini tbody tr:hover td {
    background: rgba(47, 140, 245, 0.1);
}

.edu-chart-wrapper {
    height: 180px;
}

.bar-chart-wrapper {
    position: relative;
    height: 180px;
    margin-top: 16px;
    width: 1250px;
}

.bar-chart {
    width: 100%;
    height: 100%;
}

.bar-chart .bars rect {
    transition: height 0.3s ease, y 0.3s ease;
}

.bar-chart .bars rect:hover {
    opacity: 0.8;
}

@media (max-width: 800px) {
    #appMain { grid-template-columns: 60px 1fr; }
    .sidebar .nav-item span { display: none; }
    .grid-2col { grid-template-columns: 1fr; }
    .grid-4col { grid-template-columns: 1fr 1fr; }
    .login-card { padding: 2rem 1.5rem; }
}

@media (max-width: 600px) {
    .grid-4col { grid-template-columns: 1fr; }
    .edu-chart-wrapper { height: 135px; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal {
    background: rgba(12, 20, 35, 0.95);
    border: 1px solid #293e5a;
    border-radius: 24px;
    padding: 28px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #293e5a;
}
.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #eaf0f8;
}
.modal-close {
    background: none;
    border: none;
    color: #7b8fa8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: 0.2s;
}
.modal-close:hover {
    background: rgba(47, 140, 245, 0.1);
    color: #eaf0f8;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.doc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(31, 49, 71, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.doc-item:hover {
    background: rgba(47, 140, 245, 0.1);
}
.doc-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2f8cf5;
}
.doc-item label {
    cursor: pointer;
    color: #a8b8d0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.doc-item label i {
    color: #2f8cf5;
}
.upload-input {
    padding: 6px 10px;
    background: rgba(31, 49, 71, 0.8);
    border: 1px solid #293e5a;
    border-radius: 4px;
    color: #a8b8d0;
    font-size: 11px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.upload-input:hover {
    border-color: #2f8cf5;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #293e5a;
}
.btn-primary {
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(47, 140, 245, 0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background: transparent;
    border: 1px solid #293e5a;
    color: #9bb9e6;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-secondary:hover {
    border-color: #4a6584;
    color: #eaf0f8;
}
.btn-ghost {
    background: rgba(100, 116, 139, 0.15);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-ghost:hover {
    background: rgba(100, 116, 139, 0.25);
    color: #eaf0f8;
}

/* 编辑弹窗 */
.edit-modal {
    max-width: 600px;
}
.edit-tip {
    background: rgba(47, 140, 245, 0.08);
    border: 1px solid rgba(47, 140, 245, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #8abcfc;
    line-height: 1.6;
}
.edit-tip code {
    background: rgba(47, 140, 245, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, monospace;
    color: #a8c8f0;
}
.edit-textarea {
    width: 100%;
    min-height: 300px;
    background: rgba(12, 20, 35, 0.8);
    border: 1px solid #293e5a;
    border-radius: 12px;
    padding: 16px;
    color: #eaf0f8;
    font-size: 0.88rem;
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.edit-textarea:focus {
    border-color: #2f8cf5;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #7b8fa8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #a8b8d0;
}

.tab-btn.active {
    color: #4ecdc4;
    border-bottom-color: #4ecdc4;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.85rem;
    color: #9bb9e6;
    font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
    background: #0f1b30;
    border: 1px solid #28344a;
    border-radius: 12px;
    padding: 12px 14px;
    color: #eaf0f8;
    font-size: 0.95rem;
    transition: 0.25s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.2);
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 修改部门弹窗：五级部门并排 */
.edit-dept-levels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.edit-dept-levels label {
    font-size: 0.85rem;
    color: #9bb9e6;
    font-weight: 500;
}
.edit-dept-levels select,
.edit-dept-levels input {
    background: #0f1b30;
    border: 1px solid #28344a;
    border-radius: 8px;
    padding: 8px 6px;
    color: #eaf0f8;
    font-size: 0.85rem;
    outline: none;
    transition: 0.25s;
    width: 100%;
    box-sizing: border-box;
}
.edit-dept-levels select:focus,
.edit-dept-levels input:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 2px rgba(47, 140, 245, 0.15);
}
/* 底部：状态 + 按钮同行 */
.edit-dept-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.edit-dept-status {
    flex: 0 0 180px;
}
.edit-dept-actions {
    display: flex;
    gap: 12px;
    padding-bottom: 0;
}

.action-btn {
    background: transparent;
    border: 1px solid #2f8cf5;
    color: #8abcfc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}
.action-btn:hover {
    background: rgba(47, 140, 245, 0.1);
}
.action-btn.edit {
    border-color: #4ade80;
    color: #4ade80;
}
.action-btn.edit:hover {
    background: rgba(74, 222, 128, 0.1);
}
.action-btn.delete {
    border-color: #f87171;
    color: #f87171;
}
.action-btn.delete:hover {
    background: rgba(248, 113, 113, 0.1);
}
.action-btn.view {
    border-color: #a78bfa;
    color: #a78bfa;
}
.action-btn.view:hover {
    background: rgba(167, 139, 250, 0.1);
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.search-bar input {
    flex: 1;
    background: #0f1b30;
    border: 1px solid #28344a;
    border-radius: 40px;
    padding: 10px 18px;
    color: #eaf0f8;
    font-size: 0.9rem;
    outline: none;
    transition: 0.25s;
}
.search-bar input:focus {
    border-color: #2f8cf5;
    box-shadow: 0 0 0 3px rgba(47, 140, 245, 0.2);
}
.search-bar button {
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.2s;
}
.search-bar button:hover {
    box-shadow: 0 0 15px rgba(47, 140, 245, 0.3);
}

.btn-add {
    background: linear-gradient(135deg, #2f8cf5, #1a5fc7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-add:hover {
    box-shadow: 0 0 15px rgba(47, 140, 245, 0.3);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: rgba(47, 140, 245, 0.05);
    color: #9bb9e6;
    font-weight: 500;
    border-bottom: 2px solid #293e5a;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #1f3147;
    color: #eaf0f8;
}
.data-table tbody tr:hover {
    background: rgba(47, 140, 245, 0.05);
}
.data-table .actions {
    display: flex;
    gap: 8px;
}

.table-scroll-7 {
    max-height: 352px;
    overflow-y: auto;
}
.table-scroll-7 thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #0d1a2e;
}

.badge-active {
    background: #22c55e;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}
.badge-inactive {
    background: #6b7280;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}
.badge-warning {
    background: #f59e0b;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}
.badge-danger {
    background: #ef4444;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* === 流程模块 === */
.wf-btn-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.wf-btn-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: rgba(15, 27, 48, 0.6);
    border: 1px solid #1f3147;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}
.wf-btn-card:hover {
    border-color: #2f8cf5;
    background: rgba(47, 140, 245, 0.08);
    transform: translateY(-2px);
}
.wf-btn-card:active {
    transform: translateY(0);
}
.wf-btn-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}
.wf-btn-label {
    font-size: 13px;
    color: #e5e7eb;
    font-weight: 500;
}
@media (max-width: 1200px) {
    .wf-btn-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .wf-btn-grid { grid-template-columns: repeat(3, 1fr); }
    .wf-btn-icon { width: 44px; height: 44px; font-size: 18px; }
    .wf-btn-label { font-size: 12px; }
}
