/* =====================================================
   和利通智慧待办事项管理平台 - 全局样式 (优化版)
   使用现代化设计语言 + jQuery UI 风格增强
   ===================================================== */

/* ---- Reset & Base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f0f2f5;
}
a { color: #1890ff; text-decoration: none; transition: color 0.2s; }
a:hover { color: #40a9ff; }
ul, ol { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes progressBar {
    from { width: 0%; }
}
@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }
.animate-slideInLeft { animation: slideInLeft 0.4s ease-out; }
.animate-slideInRight { animation: slideInRight 0.4s ease-out; }

/* ---- Layout ---- */
#app { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #001529 0%, #002140 100%);
    color: #fff;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span:last-child { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .nav-icon { font-size: 18px; }

.sidebar-logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.1);
}
.logo-icon {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(24,144,255,0.4);
}
.logo-text { font-size: 16px; font-weight: 600; letter-spacing: 2px; }

.sidebar-nav { padding: 8px 0; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.65);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    margin: 2px 8px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}
.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border-left-color: transparent;
    box-shadow: 0 2px 8px rgba(24,144,255,0.3);
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.main-wrapper {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-wrapper.expanded { margin-left: 64px; }

/* ---- Topbar ---- */
.topbar {
    height: 56px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,21,41,0.08);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 6px 10px;
    margin-right: 16px;
    border-radius: 6px;
    transition: all 0.2s;
}
.sidebar-toggle:hover { background: #f5f5f5; color: #1890ff; }
.topbar-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    color: #333;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f0f2f5;
    transition: background 0.2s;
    cursor: pointer;
}
.user-info:hover { background: #e6f7ff; }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}
.user-name { font-size: 14px; color: #333; }
.btn-logout {
    color: #ff4d4f;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-logout:hover { background: #fff1f0; }

/* ---- Breadcrumb ---- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #1890ff; }
.breadcrumb .separator { color: #ccc; }
.breadcrumb .current { color: #333; font-weight: 500; }

/* ---- Content ---- */
.content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 12px;
    background: #fff;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

/* ---- Card ---- */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title i { color: #1890ff; }
.card-body { padding: 24px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}
.btn:hover {
    border-color: #1890ff;
    color: #1890ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(24,144,255,0.2);
}
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border-color: #1890ff;
    color: #fff;
    box-shadow: 0 2px 6px rgba(24,144,255,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
    border-color: #40a9ff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
    transform: translateY(-2px);
}
.btn-danger {
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
    border-color: #ff4d4f;
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,77,79,0.3);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #ff7875 0%, #ff4d4f 100%);
    border-color: #ff7875;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255,77,79,0.4);
    transform: translateY(-2px);
}
.btn-success {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border-color: #52c41a;
    color: #fff;
    box-shadow: 0 2px 6px rgba(82,196,26,0.3);
}
.btn-success:hover {
    background: linear-gradient(135deg, #73d13d 0%, #52c41a 100%);
    border-color: #73d13d;
    color: #fff;
    box-shadow: 0 4px 12px rgba(82,196,26,0.4);
    transform: translateY(-2px);
}
.btn-warning {
    background: linear-gradient(135deg, #faad14 0%, #d48806 100%);
    border-color: #faad14;
    color: #fff;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #ffc53d 0%, #faad14 100%);
    border-color: #ffc53d;
    color: #fff;
    transform: translateY(-2px);
}
.btn-default { background: #fff; border-color: #d9d9d9; }
.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 4px; }
.btn-lg { padding: 10px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; text-align: center; justify-content: center; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 6px; }

/* ---- Forms ---- */
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    color: #333;
}
.form-control:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24,144,255,0.12);
}
.form-control[readonly] { background: #f5f5f5; color: #999; cursor: not-allowed; }
.form-control:hover { border-color: #40a9ff; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}
.form-group label i { margin-right: 4px; color: #1890ff; }
.form-row { display: flex; gap: 24px; }
.form-row .form-group { flex: 1; }
.form-actions { margin-top: 28px; display: flex; gap: 12px; }
.form-hint { font-size: 12px; color: #999; margin-top: 6px; }
.required { color: #ff4d4f; }

.form-layout {
    max-width: 800px;
    background: #fff;
}

/* ---- Select2-like styled select ---- */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

/* ---- Table ---- */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.table th {
    text-align: left;
    padding: 14px 16px;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    color: #666;
    font-weight: 600;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
    font-size: 13px;
}
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    transition: background 0.2s;
}
.table tbody tr {
    transition: all 0.2s;
}
.table tbody tr:hover td { background: #e6f7ff; }
.table tbody tr:hover { transform: translateY(0); }
.table-compact th, .table-compact td { padding: 10px 12px; }
.text-sm { font-size: 12px; }
.text-center { text-align: center; }
.sort-order-cell { width: 50px; font-weight: 600; color: #1890ff; }
.text-muted { color: #999; }
.text-red { color: #ff4d4f; }
.text-green { color: #52c41a; }
.text-blue { color: #1890ff; }
.text-orange { color: #fa8c16; }
.text-purple { color: #722ed1; }
.link-bold { font-weight: 600; color: #1890ff; }
.link-bold:hover { color: #096dd9; }

/* ---- Status Tags ---- */
.status-tag, .priority-tag, .level-tag, .phase-tag, .role-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
    transition: transform 0.2s;
}
.status-tag:hover, .priority-tag:hover, .level-tag:hover { transform: scale(1.05); }

.status-pending { background: #f0f0f0; color: #666; border: 1px solid #d9d9d9; }
.status-progress { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.status-completed { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.status-delayed { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.status-blocked { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.status-cancelled { background: #f5f5f5; color: #999; border: 1px solid #d9d9d9; }
.status-approved { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.status-rejected { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.status-implemented { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.status-suspended { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.status-open { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.status-mitigating { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.status-closed { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

.priority-high { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.priority-medium { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.priority-low { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

.level-high { background: #fff1f0; color: #ff4d4f; font-weight: 600; border: 1px solid #ffa39e; }
.level-medium { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.level-low { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }

.phase-tag {
    background: #f0f5ff;
    color: #2f54eb;
    border: 1px solid #adc6ff;
}

.role-admin { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; font-weight: 600; }
.role-data_admin { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; font-weight: 600; }
.role-chief { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.role-dept_head { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }
.role-dept_manager { background: #e6fffb; color: #08979c; border: 1px solid #87e8de; }
.role-staff { background: #f0f0f0; color: #666; border: 1px solid #d9d9d9; }
.role-manager { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.role-member { background: #f0f0f0; color: #666; border: 1px solid #d9d9d9; }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    background: #f0f0f0;
    color: #666;
    font-weight: 500;
}
.badge-red { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.badge-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.badge-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.badge-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-purple { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }

/* ---- Progress Bar ---- */
.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.progress-lg { height: 24px; border-radius: 12px; }
.progress-lg .progress-fill { border-radius: 12px; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff 0%, #40a9ff 100%);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: progressBar 0.8s ease-out;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}
.progress-complete {
    background: linear-gradient(90deg, #52c41a 0%, #73d13d 100%);
}
.progress-text { font-size: 13px; color: #666; min-width: 40px; text-align: right; font-weight: 500; }
.progress-text-lg { font-size: 14px; font-weight: 700; }
.progress-lg .progress-text-lg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    animation: fadeInUp 0.5s ease-out;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-title i { color: #1890ff; }
.page-actions { display: flex; gap: 10px; }

/* ---- Filter ---- */
.filter-bar {
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    animation: fadeInUp 0.4s ease-out;
}
.filter-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-form .form-control { width: auto; min-width: 180px; }

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.03);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease-out;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 12px 12px 0 0;
}
.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
    opacity: 0.8;
}
.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #333;
    animation: countUp 0.6s ease-out;
    line-height: 1.2;
}
.stat-label { font-size: 13px; color: #999; margin-top: 6px; font-weight: 500; }

.stat-blue::before { background: linear-gradient(90deg, #1890ff, #40a9ff); }
.stat-blue .stat-value { color: #1890ff; }
.stat-blue .stat-icon { color: #1890ff; }

.stat-orange::before { background: linear-gradient(90deg, #fa8c16, #faad14); }
.stat-orange .stat-value { color: #fa8c16; }
.stat-orange .stat-icon { color: #fa8c16; }

.stat-green::before { background: linear-gradient(90deg, #52c41a, #73d13d); }
.stat-green .stat-value { color: #52c41a; }
.stat-green .stat-icon { color: #52c41a; }

.stat-red::before { background: linear-gradient(90deg, #ff4d4f, #ff7875); }
.stat-red .stat-value { color: #ff4d4f; }
.stat-red .stat-icon { color: #ff4d4f; }

.stat-purple::before { background: linear-gradient(90deg, #722ed1, #9254de); }
.stat-purple .stat-value { color: #722ed1; }
.stat-purple .stat-icon { color: #722ed1; }

.stat-yellow::before { background: linear-gradient(90deg, #fadb14, #ffe58f); }
.stat-yellow .stat-value { color: #d4b106; }
.stat-yellow .stat-icon { color: #d4b106; }

/* ---- Dashboard ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.dashboard-col { display: flex; flex-direction: column; gap: 20px; }
.link-more { font-size: 13px; color: #1890ff; }
.link-more:hover { color: #096dd9; }

/* ---- Project Items ---- */
.project-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}
.project-item:last-child { border-bottom: none; }
.project-item:hover { background: #fafafa; }
.project-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.project-name {
    font-weight: 600;
    color: #333;
    transition: color 0.2s;
}
.project-name:hover { color: #1890ff; }
.project-item-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

/* ---- Change Items ---- */
.change-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}
.change-item:last-child { border-bottom: none; }
.change-item:hover { background: #fafafa; }
.change-title { font-weight: 600; margin-bottom: 6px; color: #333; }
.change-meta { display: flex; gap: 20px; font-size: 12px; color: #999; margin-bottom: 10px; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #999;
    font-size: 14px;
}
.empty-state i { font-size: 48px; color: #d9d9d9; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 14px; color: #999; }

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 4px 8px 0;
}
.tab {
    padding: 12px 28px;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tab:hover { color: #1890ff; background: #e6f7ff; }
.tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 600;
    background: #e6f7ff;
}

/* ---- Project Overview ---- */
.project-overview { }
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.overview-item {
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.2s;
}
.overview-item:hover { background: #e6f7ff; }
.overview-label { font-size: 12px; color: #999; display: block; margin-bottom: 4px; }
.overview-value { font-size: 14px; font-weight: 500; color: #333; }
.overview-progress { margin-bottom: 24px; }
.overview-stats {
    display: flex;
    gap: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.mini-stat { text-align: center; padding: 8px; }
.mini-stat-num { font-size: 28px; font-weight: 800; display: block; animation: countUp 0.6s ease-out; }
.mini-stat-label { font-size: 12px; color: #999; margin-top: 4px; }

/* ---- Detail Section ---- */
.detail-section { margin-bottom: 24px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-title {
    font-size: 15px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 4px solid #1890ff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-content {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    padding-left: 16px;
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
}

/* ---- Milestone Timeline ---- */
.milestone-timeline {
    position: relative;
    padding-left: 30px;
}
.milestone-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #e8e8e8 0%, #d9d9d9 100%);
    border-radius: 3px;
}
.milestone-node {
    position: relative;
    margin-bottom: 28px;
    animation: fadeInUp 0.4s ease-out;
}
.milestone-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d9d9d9;
    border: 3px solid #fff;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.milestone-node:hover .milestone-dot { transform: scale(1.3); }
.milestone-node.node-completed .milestone-dot {
    background: #52c41a;
    box-shadow: 0 0 8px rgba(82,196,26,0.4);
}
.milestone-node.node-delayed .milestone-dot {
    background: #ff4d4f;
    box-shadow: 0 0 8px rgba(255,77,79,0.4);
}
.milestone-content {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.milestone-content:hover {
    border-color: #91d5ff;
    box-shadow: 0 4px 12px rgba(24,144,255,0.1);
}
.milestone-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.milestone-name { font-weight: 600; font-size: 15px; color: #333; }
.milestone-meta {
    display: flex;
    gap: 24px;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.milestone-criteria { font-size: 13px; color: #666; margin-bottom: 6px; }
.milestone-impact { font-size: 13px; color: #ff4d4f; margin-bottom: 6px; }
.milestone-actions { margin-top: 10px; }

/* ---- Delay Flag ---- */
.delay-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 4px;
    font-weight: 500;
    animation: pulse 2s infinite;
}

/* ---- Row Highlight ---- */
tr.row-delayed { background: #fffbe6 !important; }
tr.row-delayed:hover td { background: #fff1b8 !important; }

/* ---- Toast Notification ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: toastSlideIn 0.3s ease-out;
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
}
.toast.toast-success { border-left-color: #52c41a; }
.toast.toast-success .toast-icon { color: #52c41a; }
.toast.toast-error { border-left-color: #ff4d4f; }
.toast.toast-error .toast-icon { color: #ff4d4f; }
.toast.toast-warning { border-left-color: #fa8c16; }
.toast.toast-warning .toast-icon { color: #fa8c16; }
.toast.toast-info { border-left-color: #1890ff; }
.toast.toast-info .toast-icon { color: #1890ff; }
.toast-icon { font-size: 20px; }
.toast-msg { font-size: 14px; color: #333; flex: 1; }
.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 4px;
}
.toast.removing { animation: toastSlideOut 0.3s ease-in forwards; }

/* ---- Modal Dialog ---- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    animation: fadeInUp 0.3s ease-out;
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title { font-size: 16px; font-weight: 600; color: #333; }
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.modal-close:hover { background: #f5f5f5; color: #333; }
.modal-body { padding: 24px; font-size: 14px; color: #555; line-height: 1.8; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- Login Page ---- */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    top: -50px;
    right: -50px;
    animation: pulse 4s infinite;
}
.login-body::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    bottom: -30px;
    left: -30px;
    animation: pulse 3s infinite 1s;
}
.login-container { width: 100%; max-width: 440px; padding: 24px; }
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: fadeInUp 0.6s ease-out;
}
.login-header { text-align: center; margin-bottom: 36px; }
.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(24,144,255,0.4);
}
.login-header h1 { font-size: 22px; color: #333; margin-bottom: 10px; font-weight: 700; }
.login-header p { font-size: 13px; color: #999; }
.login-form .form-group { margin-bottom: 24px; }
.login-form label { display: block; font-size: 13px; color: #666; font-weight: 500; margin-bottom: 8px; }
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 3px rgba(24,144,255,0.15);
}
.login-form input[type="text"]::placeholder,
.login-form input[type="password"]::placeholder {
    color: #bfbfbf;
}
.login-msg {
    display: none;
    background: #fff2f0;
    color: #ff4d4f;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #ffa39e;
    animation: fadeIn 0.3s ease-out;
}
.login-tip {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: #bbb;
}

/* ---- 滑块验证码 ---- */
.slider-captcha { user-select: none; }
.slider-track {
    position: relative;
    width: 100%;
    height: 44px;
    background: #f0f2f5;
    border-radius: 22px;
    border: 1px solid #e4e7ed;
    overflow: hidden;
    transition: border-color 0.3s;
}
.slider-progress {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    border-radius: 22px 0 0 22px;
    transition: width 0.1s ease-out;
}
.slider-text {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #999;
    pointer-events: none;
    transition: opacity 0.3s;
}
.slider-track.success .slider-text {
    color: #fff;
    z-index: 2;
}
.slider-track.success .slider-progress {
    width: 100% !important;
    border-radius: 22px;
}
.slider-handle {
    position: absolute;
    left: 0; top: 0;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    font-size: 18px;
    color: #1890ff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 3;
    transition: transform 0.1s ease-out, border-color 0.3s, color 0.3s;
}
.slider-handle:hover { border-color: #1890ff; }
.slider-handle:active { cursor: grabbing; }
.slider-track.success .slider-handle {
    border-color: #52c41a;
    color: #52c41a;
}
.slider-track.success .slider-handle i.fa-angle-double-right {
    display: none;
}
.slider-track.success .slider-handle::after {
    content: '\f00c';
    font-family: FontAwesome;
    font-size: 16px;
}
.slider-track.error {
    animation: sliderShake 0.4s ease-out;
}
.slider-track.error .slider-progress {
    background: linear-gradient(135deg, #ff4d4f 0%, #cf1322 100%);
}
@keyframes sliderShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
#loginBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Loading Spinner ---- */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f0f0f0;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

/* ---- Tooltip ---- */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}
.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
    transition: opacity 0.2s, visibility 0.2s;
}
.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}
.tooltip-wrapper:hover .tooltip-text { visibility: visible; opacity: 1; }

/* ---- Scroll to Top ---- */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1890ff, #096dd9);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(24,144,255,0.5); }

/* ---- Inline Edit Modal（居中可拖拽 · 跨浏览器适配）---- */
.inline-edit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 520px;
    max-width: 90vw;
    max-height: 78vh;
    background: #fff;
    border-radius: 8px;
    -webkit-box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-animation: modalZoomIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: modalZoomIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 10000;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    /* 提示浏览器该元素将被独立绘制，拖拽时更流畅 */
    will-change: left, top;
}

@-webkit-keyframes modalZoomIn {
    from { opacity: 0; -webkit-transform: translate(-50%, -50%) scale(0.92); transform: translate(-50%, -50%) scale(0.92); }
    to   { opacity: 1; -webkit-transform: translate(-50%, -50%) scale(1);    transform: translate(-50%, -50%) scale(1); }
}
@keyframes modalZoomIn {
    from { opacity: 0; -webkit-transform: translate(-50%, -50%) scale(0.92); transform: translate(-50%, -50%) scale(0.92); }
    to   { opacity: 1; -webkit-transform: translate(-50%, -50%) scale(1);    transform: translate(-50%, -50%) scale(1); }
}
@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* 拖拽句柄 */
.drawer-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    cursor: move;
    cursor: -webkit-grab;
    cursor: grab;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
}
.drawer-header.dragging {
    cursor: -webkit-grabbing;
    cursor: -moz-grabbing;
    cursor: grabbing;
}
.drawer-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    pointer-events: none;
}
.drawer-title i {
    color: #1890ff;
    margin-right: 8px;
}
.drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    line-height: 1;
}
.drawer-close:focus {
    outline: 2px solid #1890ff;
    outline-offset: 2px;
}
.drawer-close:hover { background: #f5f5f5; color: #333; }
.drawer-body {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    max-height: calc(78vh - 130px);
    max-height: -webkit-calc(78vh - 130px);
}
.drawer-body .form-group { margin-bottom: 20px; }
.drawer-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}
.drawer-body .required { color: #ff4d4f; }
.field-hint {
    font-weight: 400;
    font-size: 12px;
    color: #888;
    margin-left: 6px;
}
.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    background: #fafafa;
    border-radius: 0 0 8px 8px;
}
.drawer-footer .btn + .btn { margin-left: 10px; }

/* ---- 多选下拉组件 (fk-user-multi) ---- */
.multi-select {
    position: relative;
    display: block;
}
.mu-trigger {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    min-height: 38px;
    padding: 4px 32px 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    -webkit-transition: border-color 0.2s;
    transition: border-color 0.2s;
}
.mu-trigger:hover { border-color: #1890ff; }
.mu-placeholder {
    color: #bbb;
    font-size: 14px;
    line-height: 28px;
}
.mu-selected {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 4px;
}
.mu-tag {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 2px 8px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 3px;
    font-size: 12px;
    color: #096dd9;
    line-height: 20px;
}
.mu-tag-close {
    margin-left: 6px;
    font-size: 14px;
    color: #69c0ff;
    cursor: pointer;
    line-height: 1;
}
.mu-tag-close:hover { color: #ff4d4f; }
.mu-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #bbb;
    font-size: 12px;
    pointer-events: none;
    -webkit-transition: -webkit-transform 0.2s;
    transition: -webkit-transform 0.2s;
    transition: transform 0.2s;
    transition: transform 0.2s, -webkit-transform 0.2s;
}
.mu-trigger:focus + .mu-dropdown.mu-open .mu-arrow,
.mu-trigger:active .mu-arrow {
    display: none; /* handled by parent state */
}

.mu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    -webkit-box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 10001;
    max-height: 260px;
    overflow: hidden;
}
.mu-dropdown.mu-open { display: block; }

.mu-actions {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.mu-actions a {
    font-size: 12px;
    color: #1890ff;
    text-decoration: none;
}
.mu-actions a:hover { color: #40a9ff; }

.mu-list {
    max-height: 210px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.mu-group { }
.mu-group-label {
    padding: 8px 12px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}
.mu-group-label i { margin-right: 4px; color: #bbb; }
.mu-item {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
    margin: 0;
    font-weight: normal;
}
.mu-item:hover { background: #e6f7ff; }
.mu-item input[type="checkbox"] {
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin: 0;
}
.mu-item span {
    font-size: 13px;
    color: #333;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 移动端：下拉面板占满宽度 */
@media (max-width: 540px) {
    .mu-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 12px 12px 0 0;
        max-height: 50vh;
    }
}

/* 移动端：小屏全宽 */
@media (max-width: 540px) {
    .inline-edit-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
        left: 0;
        top: auto;
        bottom: 0;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }
    .drawer-header { border-radius: 12px 12px 0 0; }
    .drawer-footer { border-radius: 0; }
    .drawer-body {
        max-height: calc(90vh - 130px);
        max-height: -webkit-calc(90vh - 130px);
    }
}

/* Row update flash */
@keyframes rowFlash {
    0% { background: #f6ffed; }
    100% { background: transparent; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { width: 64px; }
    .sidebar .logo-text,
    .sidebar .nav-item span:last-child { display: none; }
    .sidebar .nav-item { justify-content: center; padding: 12px 0; }
    .main-wrapper { margin-left: 64px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .content { padding: 12px; }
    .table { font-size: 12px; }
    .table th, .table td { padding: 10px 8px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card { padding: 16px; }
    .stat-value { font-size: 24px; }
    .page-title { font-size: 18px; }
}

/* ---- 部门多选复选框组 ---- */
.checkbox-group {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fafafa;
    min-height: 42px;
}

.checkbox-item {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: #1890ff;
    background: #e6f7ff;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: #1890ff;
    font-weight: 600;
}

.checkbox-item:has(input:checked) {
    border-color: #1890ff;
    background: #e6f7ff;
}

/* ---- 登录日志页面 ---- */
.page-header--column {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 20px;
}
.page-subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: #888;
}

/* 筛选栏 */
.filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.filter-form { }
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.filter-item label {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}
.filter-item .form-control {
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    min-width: 130px;
    font-size: 13px;
}
.filter-item .form-control:focus {
    border-color: #1890ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}
.filter-item select.form-control { min-width: 110px; }
.filter-actions {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}
.filter-actions .btn {
    height: 34px;
    padding: 0 16px;
}

/* 统计卡片行 */
.stats-row {
    display: flex;
    gap: 16px;
}
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    text-align: center;
    min-width: 120px;
}
.stat-num { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }

/* 通用数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.data-table thead { background: #fafafa; }
.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}
.data-table tbody tr:hover { background: #fafafa; }
.data-table code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: #333;
}
.data-table .ua-cell {
    font-size: 12px;
    color: #888;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.data-table .empty-cell {
    text-align: center;
    color: #999;
    padding: 40px 14px;
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}
.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-danger  { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.page-info {
    font-size: 13px;
    color: #888;
    margin-right: 8px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s;
}
.page-btn:hover { border-color: #1890ff; color: #1890ff; }
.page-btn.active {
    background: #1890ff;
    border-color: #1890ff;
    color: #fff;
    font-weight: 600;
}

/* 表格容器 */
.table-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ---- btn-info ---- */
.btn-info {
    background: linear-gradient(135deg, #13c2c2 0%, #08979c 100%);
    border-color: #13c2c2;
    color: #fff;
    box-shadow: 0 2px 6px rgba(19,194,194,0.3);
}
.btn-info:hover {
    background: linear-gradient(135deg, #36cfc9 0%, #13c2c2 100%);
    border-color: #36cfc9;
    color: #fff;
    box-shadow: 0 4px 12px rgba(19,194,194,0.4);
    transform: translateY(-2px);
}

/* ---- 导入弹窗 ---- */
#import-modal .modal-box { max-width: 520px; }

.import-dropzone {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}
.import-dropzone:hover {
    border-color: #1890ff;
    background: #f0f7ff;
}
.import-dropzone.dragover {
    border-color: #1890ff;
    background: #e6f7ff;
    transform: scale(1.01);
}
.import-dropzone-icon {
    font-size: 48px;
    color: #1890ff;
    margin-bottom: 12px;
    display: block;
}
.import-dropzone-text {
    font-size: 14px;
    color: #333;
    margin: 8px 0 4px;
}
.import-dropzone-hint {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.import-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    margin-top: 12px;
}
.import-file-info i {
    font-size: 20px;
    color: #52c41a;
}
.import-file-info .import-file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}
.import-file-info .import-file-clear {
    flex-shrink: 0;
}

.import-tips {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    font-size: 13px;
    color: #8c8c8c;
    line-height: 1.6;
}
.import-tips i {
    color: #faad14;
    margin-right: 4px;
}
.import-tips-link {
    color: #1890ff;
    text-decoration: underline;
}

/* ============================================================
   工作日报 - 日历样式
   ============================================================ */
.dr-calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.dr-month-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 120px;
    text-align: center;
}
.dr-legend {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: center;
}
.dr-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8c8c8c;
}
.dr-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dr-dot-today { background: #1890ff; }
.dr-dot-past { background: #d9d9d9; }
.dr-dot-active { background: #52c41a; }

.dr-calendar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}
.dr-weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #fafafa;
    border-bottom: 2px solid #e8e8e8;
}
.dr-weekday-cell {
    padding: 10px 0;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #595959;
}
.dr-day-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(100px, auto);
}
.dr-day-cell {
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 8px;
    position: relative;
    transition: background 0.2s;
    min-height: 100px;
    overflow: hidden;
}
.dr-day-cell.dr-empty {
    background: #fafafa;
}
.dr-day-cell.dr-today {
    background: #e6f7ff;
    border: 2px solid #1890ff;
    z-index: 1;
}
.dr-day-cell.dr-past {
    background: #f9f9f9;
}
.dr-day-cell.dr-past .dr-day-num {
    color: #bfbfbf;
}
.dr-day-cell.dr-past .dr-item {
    opacity: 0.6;
}
.dr-day-cell.dr-active:hover {
    background: #f0f9ff;
}
.dr-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.dr-day-num {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.dr-today-badge {
    font-size: 10px;
    color: #1890ff;
    background: #e6f7ff;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
}
.dr-add-btn {
    color: #1890ff;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    font-size: 14px;
}
.dr-day-cell.dr-active:hover .dr-add-btn {
    opacity: 1;
}
.dr-day-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dr-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 3px 6px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    transition: all 0.2s;
    position: relative;
}
.dr-item:hover {
    background: #e8f4ff;
}
.dr-item.dr-item-done {
    background: #f6ffed;
    text-decoration: line-through;
    color: #8c8c8c;
}
.dr-item-status {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1.5px solid #d9d9d9;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
    transition: all 0.2s;
}
.dr-item-status.dr-check-done {
    background: #52c41a;
    border-color: #52c41a;
}
.dr-item-status.dr-check-done::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    display: block;
    text-align: center;
    line-height: 12px;
}
.dr-item-text {
    flex: 1;
    word-break: break-all;
    cursor: default;
}
.dr-item-actions {
    display: none;
    gap: 4px;
    flex-shrink: 0;
}
.dr-item:hover .dr-item-actions {
    display: flex;
}
.dr-item-actions i {
    cursor: pointer;
    color: #8c8c8c;
    font-size: 12px;
    padding: 2px;
}
.dr-item-actions i:hover {
    color: #1890ff;
}
.dr-item-actions .dr-del-item:hover {
    color: #ff4d4f;
}

/* 日历用户选择标签 */
.user-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 6px;
    color: #1890ff;
    font-size: 14px;
    font-weight: 500;
}

/* 日历日期链接 */
.dr-day-link {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}
.dr-day-link:hover {
    color: #1890ff;
}
.dr-day-cell.dr-past .dr-day-link {
    color: #bfbfbf;
}
.dr-day-items-link {
    text-decoration: none;
    display: block;
}
.dr-day-items-link:hover .dr-item {
    background: #e8f4ff;
}
.dr-empty-hint {
    display: block;
    text-align: center;
    color: #d9d9d9;
    font-size: 11px;
    padding: 8px 0;
}
.dr-tip {
    margin-left: auto;
    color: #8c8c8c;
    font-size: 12px;
}

/* ============================================================
   工作项列表页样式（detail）
   ============================================================ */
.dr-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.dr-detail-date {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dr-detail-date i {
    color: #1890ff;
}
.dr-passed-tag {
    font-size: 13px;
    color: #fa8c16;
    font-weight: normal;
}
.dr-passed-tag i {
    margin-right: 2px;
}
/* 过去日期的锁定图标 */
.dr-lock-icon {
    color: #d9d9d9;
    font-size: 12px;
    cursor: default;
}
/* 过去日期的日期数字（不可点击） */
.dr-day-num-locked {
    cursor: default;
    color: #bfbfbf !important;
}
.dr-day-num-locked:hover {
    color: #bfbfbf !important;
}
/* 过去日期的工作项列表（纯展示） */
.dr-day-items-readonly {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: default;
}
.dr-day-cell.dr-past .dr-day-items-readonly .dr-item {
    opacity: 0.55;
}
.dr-empty-readonly {
    display: block;
    text-align: center;
    color: #e8e8e8;
    font-size: 11px;
    padding: 8px 0;
}
/* 禁用按钮样式 */
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.dr-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}
.dr-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dr-list-title i {
    color: #1890ff;
}
.dr-list-count {
    font-size: 13px;
    color: #8c8c8c;
}
.dr-list-table {
    margin-bottom: 24px;
}
.dr-list-table th {
    background: #fafafa;
    font-weight: 600;
    color: #595959;
}
.dr-list-row {
    transition: background 0.2s;
}
.dr-list-row:hover {
    background: #fafcff;
}
.dr-list-row.dr-editing {
    background: #fffbe6;
}
.dr-row-num {
    text-align: center;
    color: #8c8c8c;
    font-size: 13px;
}
.dr-row-content {
    vertical-align: middle;
}
.dr-content-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-all;
    white-space: pre-wrap;
}
.dr-content-done {
    color: #8c8c8c;
    text-decoration: line-through;
}
.dr-row-status {
    vertical-align: middle;
    text-align: center;
}
.dr-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.dr-status-pending {
    background: #fff7e6;
    color: #fa8c16;
    border: 1px solid #ffd591;
}
.dr-status-done {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}
.dr-row-actions {
    vertical-align: middle;
    white-space: nowrap;
}
.dr-readonly-tag {
    color: #bfbfbf;
    font-size: 13px;
}
.dr-readonly-tag i {
    margin-right: 4px;
}
.dr-edit-content {
    width: 100%;
    font-size: 14px;
}

/* 新增工作项表单 */
.dr-add-section {
    margin-top: 24px;
    padding: 20px;
    background: #fafcff;
    border: 1px dashed #91d5ff;
    border-radius: 8px;
}
.dr-add-title {
    font-size: 15px;
    font-weight: 600;
    color: #1890ff;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dr-add-form .form-group {
    margin-bottom: 12px;
}
.dr-add-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}
.dr-add-row label {
    margin-bottom: 0;
    white-space: nowrap;
}

/* 时间列 */
.dr-row-time {
    vertical-align: middle;
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.5;
}
.dr-time-created {
    color: #595959;
}
.dr-time-edited {
    color: #fa8c16;
    margin-top: 2px;
}
.dr-time-edited i {
    margin-right: 3px;
}

/* 确认信息列 */
.dr-row-confirm {
    vertical-align: middle;
}
.dr-confirm-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dr-confirm-icon {
    color: #52c41a;
    margin-right: 4px;
}
.dr-confirm-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.dr-confirm-time {
    font-size: 12px;
    color: #8c8c8c;
}
.dr-confirm-none {
    color: #d9d9d9;
    font-size: 14px;
}

/* 确认完成按钮 */
.dr-inline-confirm-btn {
    cursor: pointer;
}

/* 已确认标签 */
.dr-status-done-tag {
    color: #52c41a;
    font-size: 13px;
    font-weight: 500;
}
.dr-status-done-tag i {
    margin-right: 4px;
}

/* 状态提示（非管理员） */
.dr-status-tip {
    font-size: 12px;
    color: #8c8c8c;
}
.dr-status-tip i {
    margin-right: 3px;
}

/* 确认列编辑模式 */
.dr-confirm-editing {
    opacity: 0.5;
}

/* ============================================================
   周工作汇报样式
   ============================================================ */
.wr-week-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-wrap: wrap;
    gap: 8px;
}
.wr-week-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wr-passed-tag {
    font-size: 12px;
    color: #fa8c16;
    background: #fff7e6;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #ffd591;
}
.wr-active-tag {
    font-size: 12px;
    color: #52c41a;
    background: #f6ffed;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #b7eb8f;
}
.wr-role-tag {
    font-size: 13px;
    color: #595959;
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 6px;
}
.wr-table th {
    white-space: nowrap;
}
.wr-plan-cell, .wr-completion-cell {
    max-width: 300px;
    vertical-align: top;
}
.wr-text-content {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-break: break-all;
}
.wr-empty {
    color: #bfbfbf;
    font-size: 13px;
}
.wr-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.wr-readonly-tag {
    color: #8c8c8c;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* 周工作详情弹窗 */
.wr-detail-loading {
    text-align: center;
    padding: 40px;
    color: #8c8c8c;
    font-size: 16px;
}
.wr-detail-table {
    font-size: 12px;
    width: 100%;
}
.wr-detail-table th {
    text-align: center;
    padding: 8px 6px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    font-size: 13px;
}
.wr-detail-table th small {
    color: #8c8c8c;
    font-size: 11px;
}
.wr-detail-table td {
    vertical-align: top;
    padding: 6px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    min-width: 110px;
}
.wr-weekend-col {
    background: #fafafa;
}
.wr-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 3px;
    padding: 3px 4px;
    margin-bottom: 3px;
    background: #f5f5f5;
    border-radius: 3px;
    line-height: 1.4;
    font-size: 11px;
}
.wr-detail-item.wr-detail-done {
    background: #f6ffed;
    text-decoration: line-through;
    color: #8c8c8c;
}
.wr-detail-dot {
    flex-shrink: 0;
    font-weight: bold;
    color: #fa8c16;
}
.wr-detail-done .wr-detail-dot {
    color: #52c41a;
}
.wr-detail-empty {
    color: #d9d9d9;
    text-align: center;
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .dr-day-grid {
        grid-auto-rows: minmax(80px, auto);
    }
    .dr-day-cell {
        min-height: 80px;
        padding: 4px;
    }
    .dr-item {
        font-size: 11px;
    }
    .wr-plan-cell, .wr-completion-cell {
        max-width: 200px;
    }
    .dr-calendar-toolbar, .wr-week-info {
        flex-direction: column;
        align-items: stretch;
    }
    .dr-legend {
        margin-left: 0;
        justify-content: center;
    }
}

/* ============ 工作看板 ============ */
.wb-date-tag, .wb-week-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    background: #f5f7fa;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 500;
}
.wb-week-tag { background: #e6f7ff; color: #1890ff; }

/* 统计卡片 */
.wb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.wb-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    border-top: 3px solid transparent;
    transition: transform 0.25s, box-shadow 0.25s;
    animation: fadeInUp 0.4s ease-out;
    position: relative;
    overflow: hidden;
    cursor: default;
}
.wb-stat-card::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.04;
    transition: opacity 0.3s;
}
.wb-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.wb-stat-card:hover::before { opacity: 0.08; }

/* 各色卡片顶部强调色 + 图标 + 背景圆 */
.wb-stat-blue   { border-top-color: #1890ff; }
.wb-stat-blue::before   { background: #1890ff; }
.wb-stat-green  { border-top-color: #52c41a; }
.wb-stat-green::before  { background: #52c41a; }
.wb-stat-purple { border-top-color: #722ed1; }
.wb-stat-purple::before { background: #722ed1; }
.wb-stat-orange { border-top-color: #fa8c16; }
.wb-stat-orange::before { background: #fa8c16; }
.wb-stat-gray   { border-top-color: #8c8c8c; }
.wb-stat-gray::before   { background: #8c8c8c; }
.wb-stat-teal   { border-top-color: #13c2c2; }
.wb-stat-teal::before   { background: #13c2c2; }
.wb-stat-red    { border-top-color: #f5222d; }
.wb-stat-red::before    { background: #f5222d; }

.wb-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.wb-stat-blue .wb-stat-icon   { background: linear-gradient(135deg, #1890ff, #40a9ff); }
.wb-stat-green .wb-stat-icon  { background: linear-gradient(135deg, #52c41a, #73d13d); }
.wb-stat-purple .wb-stat-icon { background: linear-gradient(135deg, #722ed1, #9254de); }
.wb-stat-orange .wb-stat-icon { background: linear-gradient(135deg, #fa8c16, #ffa940); }
.wb-stat-gray .wb-stat-icon   { background: linear-gradient(135deg, #8c8c8c, #b0b0b0); }
.wb-stat-teal .wb-stat-icon   { background: linear-gradient(135deg, #13c2c2, #36cfc9); }
.wb-stat-red .wb-stat-icon    { background: linear-gradient(135deg, #f5222d, #ff7875); }

.wb-stat-body { flex: 1; min-width: 0; }
.wb-stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    color: #1a1a1a;
}
.wb-stat-blue .wb-stat-value   { color: #1890ff; }
.wb-stat-green .wb-stat-value  { color: #52c41a; }
.wb-stat-purple .wb-stat-value { color: #722ed1; }
.wb-stat-orange .wb-stat-value { color: #fa8c16; }
.wb-stat-gray .wb-stat-value   { color: #8c8c8c; }
.wb-stat-teal .wb-stat-value   { color: #13c2c2; }
.wb-stat-red .wb-stat-value    { color: #f5222d; }

.wb-stat-label {
    font-size: 12px;
    color: #999;
    margin-top: 1px;
    letter-spacing: 0.3px;
}
.wb-stat-sub {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wb-tag-green  { font-size: 11px; color: #52c41a; background: #f6ffed; padding: 2px 8px; border-radius: 10px; }
.wb-tag-orange { font-size: 11px; color: #fa8c16; background: #fff7e6; padding: 2px 8px; border-radius: 10px; }

.wb-rate-bar {
    flex: 1;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}
.wb-rate-fill {
    height: 100%;
    background: linear-gradient(90deg, #52c41a, #73d13d);
    border-radius: 3px;
    transition: width 0.6s ease-out;
}
.wb-rate-fill-orange { background: linear-gradient(90deg, #fa8c16, #ffa940); }
.wb-rate-fill-teal   { background: linear-gradient(90deg, #13c2c2, #36cfc9); }
.wb-rate-text { font-size: 11px; font-weight: 600; color: #888; }

/* 统计分类标题 */
.wb-stats-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    margin-top: 4px;
    padding: 6px 0 6px 14px;
    border-left: 4px solid #1890ff;
    letter-spacing: 0.3px;
}
.wb-stats-section-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #e6f7ff;
    color: #1890ff;
    font-size: 12px;
    margin-right: 8px;
    vertical-align: -3px;
}

/* 看板区块 */
.wb-section {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    animation: fadeInUp 0.5s ease-out;
}
.wb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.wb-section-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wb-section-date {
    font-size: 12px;
    color: #aaa;
    font-weight: 400;
    margin-left: 6px;
}
.wb-sub-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.wb-sub-title i { color: #1890ff; }

/* 看板表格 */
.wb-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}
.wb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wb-table thead th {
    background: linear-gradient(180deg, #fafbfc, #f5f6f8);
    color: #555;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
    text-transform: none;
}
.wb-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
}
.wb-table tbody tr { transition: background 0.15s; }
.wb-table tbody tr:hover { background: #f8faff; }
.wb-table tbody tr:last-child td { border-bottom: none; }
.wb-num { text-align: center; font-variant-numeric: tabular-nums; color: #999; font-size: 12px; }
.wb-text-green  { color: #52c41a; font-weight: 600; }
.wb-text-orange { color: #fa8c16; font-weight: 600; }
.wb-text-muted  { color: #bbb; font-size: 12px; }

/* 迷你进度条 */
.wb-mini-bar {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 6px;
}
.wb-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}
.wb-mini-text { font-size: 12px; font-weight: 600; color: #666; }

/* 状态标签 */
.wb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.wb-badge-green  { background: #f6ffed; color: #52c41a; border: 1px solid #d9f7be; }
.wb-badge-blue   { background: #e6f7ff; color: #1890ff; border: 1px solid #bae7ff; }
.wb-badge-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.wb-badge-gray   { background: #fafafa; color: #999;    border: 1px solid #d9d9d9; }
.wb-badge-red    { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }

/* 红色标签 */
.wb-tag-red { font-size: 11px; color: #f5222d; background: #fff1f0; padding: 2px 8px; border-radius: 10px; }

/* 红色文字 */
.wb-text-red { color: #f5222d; font-weight: 600; }

/* 优先级标签 */
.wb-pri {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.wb-pri-high   { background: #fff1f0; color: #f5222d; border: 1px solid #ffa39e; }
.wb-pri-medium { background: #e6f7ff; color: #1890ff; border: 1px solid #bae7ff; }
.wb-pri-low    { background: #f6ffed; color: #52c41a; border: 1px solid #d9f7be; }

/* 趋势柱状图 */
.wb-trend-chart {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding: 20px 8px 12px;
    overflow-x: auto;
}
.wb-trend-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    flex: 1;
}
.wb-trend-label { font-size: 13px; font-weight: 600; color: #555; }
.wb-trend-date { font-size: 11px; color: #bbb; margin-bottom: 8px; }
.wb-trend-bar-area {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    height: 140px;
    justify-content: flex-end;
    position: relative;
    width: 100%;
}
.wb-trend-bar {
    width: 28px;
    border-radius: 4px 4px 0 0;
    transition: height 0.6s ease-out;
}
.wb-trend-bar-completed { background: linear-gradient(180deg, #73d13d, #52c41a); }
.wb-trend-bar-pending { background: linear-gradient(180deg, #ffd666, #faad14); }
.wb-trend-bar-empty { width: 28px; background: #f0f0f0; border-radius: 4px 4px 0 0; }
.wb-trend-today .wb-trend-label { color: #1890ff; }
.wb-trend-today .wb-trend-date { color: #1890ff; font-weight: 600; }
.wb-trend-today::after {
    content: '今天';
    position: absolute;
    top: -20px;
    font-size: 10px;
    color: #1890ff;
    display: none;
}
.wb-trend-today {
    position: relative;
    background: #e6f7ff;
    border-radius: 8px;
    padding-top: 4px;
}
.wb-trend-num { font-size: 16px; font-weight: 700; color: #333; margin-top: 6px; }
.wb-trend-sub { font-size: 11px; color: #999; }

/* 图例 */
.wb-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 12px;
    padding-left: 8px;
}
.wb-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #888;
}
.wb-legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.wb-legend-today {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 3px;
}

/* 提交进度条 */
.wb-submit-progress { margin-bottom: 20px; }
.wb-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.wb-progress-text { font-size: 14px; font-weight: 600; color: #555; }
.wb-progress-rate { font-size: 14px; font-weight: 700; color: #1890ff; }
.wb-progress-bar {
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}
.wb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #40a9ff);
    border-radius: 5px;
    transition: width 0.6s ease-out;
}

/* 告警提示 */
.wb-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.wb-alert i { font-size: 16px; flex-shrink: 0; }
.wb-alert-warning {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #ad6800;
}
.wb-alert-warning i { color: #faad14; }
.wb-alert-danger {
    background: #fff1f0;
    border: 1px solid #ffa39e;
    color: #cf1322;
}
.wb-alert-danger i { color: #f5222d; }

/* 空状态 */
.wb-empty {
    text-align: center;
    padding: 32px 20px;
    color: #bbb;
    font-size: 13px;
}
.wb-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* 内容单元格（截断） */
.wb-content-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #555;
    line-height: 1.5;
}

/* 内容单元格（完整显示，不截断） */
.wb-content-full {
    color: #444;
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 2px 0;
}

/* ---- 关键路径 & 延期标识 ---- */

/* 关键路径标识 */
.wb-critical {
    color: #fa8c16;
    font-weight: 600;
}
.wb-critical i { color: #faad14; }
.wb-critical-inline {
    color: #faad14;
    margin-left: 4px;
    font-size: 11px;
}
.wb-critical-inline i { color: #faad14; }

/* 延期行 */
.wb-row-delayed {
    background: #fffbe6;
    border-left: 3px solid #faad14;
}
.wb-row-delayed td:first-child {
    padding-left: 9px;
}
.wb-row-delayed:hover {
    background: #fff8d4 !important;
}

/* 延期标识 */
.wb-delay-flag {
    color: #f5222d;
    margin-left: 4px;
    font-size: 11px;
}
.wb-delay-days {
    display: inline-block;
    background: #fff1f0;
    color: #f5222d;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* 部门分组 */
.wb-dept-group {
    margin-bottom: 14px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.wb-dept-group:last-child { margin-bottom: 0; }
.wb-dept-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: linear-gradient(180deg, #fafbfc, #f5f6f8);
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.wb-dept-header i { color: #1890ff; font-size: 14px; }
.wb-dept-name { font-weight: 700; color: #333; }
.wb-dept-count {
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 500;
}

/* =====================================================
   全屏模式 - 字体放大一号 + 加粗
   ===================================================== */
/* 全屏按钮 */
.wb-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 8px;
    line-height: 1.5;
}
.wb-fullscreen-btn:hover {
    color: #1890ff;
    background: #e6f7ff;
    border-color: #91d5ff;
}
.wb-fullscreen-btn i { font-size: 14px; }

/* 全屏容器背景 */
.wb-fullscreen-area:fullscreen {
    background: #f0f2f5;
    padding: 28px 32px;
    overflow-y: auto;
}

/* 统计卡片 */
.wb-fullscreen-area:fullscreen .wb-stat-value {
    font-size: 32px !important;
    font-weight: 900 !important;
}
.wb-fullscreen-area:fullscreen .wb-stat-label {
    font-size: 14px !important;
    font-weight: 700 !important;
}
.wb-fullscreen-area:fullscreen .wb-stat-sub,
.wb-fullscreen-area:fullscreen .wb-tag-green,
.wb-fullscreen-area:fullscreen .wb-tag-orange,
.wb-fullscreen-area:fullscreen .wb-tag-red {
    font-size: 13px !important;
    font-weight: 600 !important;
}
.wb-fullscreen-area:fullscreen .wb-rate-text {
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* 统计分类标题 */
.wb-fullscreen-area:fullscreen .wb-stats-section-title {
    font-size: 16px !important;
    font-weight: 800 !important;
}

/* 区块标题 */
.wb-fullscreen-area:fullscreen .wb-section-header h3 {
    font-size: 17px !important;
    font-weight: 800 !important;
}
.wb-fullscreen-area:fullscreen .wb-section-date {
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* 表格 */
.wb-fullscreen-area:fullscreen .wb-table {
    font-size: 15px !important;
    font-weight: 600 !important;
}
.wb-fullscreen-area:fullscreen .wb-table thead th {
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 12px 14px !important;
}
.wb-fullscreen-area:fullscreen .wb-table tbody td {
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 12px 14px !important;
}
.wb-fullscreen-area:fullscreen .wb-num {
    font-size: 14px !important;
}

/* 内容单元格 */
.wb-fullscreen-area:fullscreen .wb-content-full {
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* 标签 */
.wb-fullscreen-area:fullscreen .wb-badge {
    font-size: 13px !important;
    font-weight: 700 !important;
}
.wb-fullscreen-area:fullscreen .wb-pri {
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* 告警 */
.wb-fullscreen-area:fullscreen .wb-alert {
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* 空状态 */
.wb-fullscreen-area:fullscreen .wb-empty {
    font-size: 15px !important;
}

/* 部门分组 */
.wb-fullscreen-area:fullscreen .wb-dept-header {
    font-size: 15px !important;
}
.wb-fullscreen-area:fullscreen .wb-dept-name {
    font-size: 15px !important;
    font-weight: 800 !important;
}
.wb-fullscreen-area:fullscreen .wb-dept-count {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* 日期标签 */
.wb-fullscreen-area:fullscreen .wb-date-tag {
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* 页面标题 */
.wb-fullscreen-area:fullscreen .page-title {
    font-size: 20px !important;
    font-weight: 800 !important;
}

/* 全屏时按钮文字 */
.wb-fullscreen-area:fullscreen .btn-sm {
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .wb-stats-grid {
        grid-template-columns: 1fr;
    }
    .wb-stat-card {
        padding: 16px;
    }
    .wb-stat-value { font-size: 24px; }
    .wb-section {
        padding: 16px;
    }
    .wb-content-cell {
        max-width: 150px;
    }
    .wb-trend-col { min-width: 48px; }
    .wb-trend-bar { width: 20px; }
    .wb-trend-bar-empty { width: 20px; }
}
