:root {
    --bg-color: #f5f5f7; 
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --card-bg: rgba(255, 255, 255, 0.75); 
    
    /* 1panel 科技蓝体系 */
    --theme-color: #0071e3; 
    --theme-color-light: rgba(0, 113, 227, 0.1);
    --theme-color-hover: #0077ed;
    --theme-yellow: #FFC72C;

    --sidebar-bg: #ffffff;
    --sidebar-width: 240px;
    --sidebar-grad-1: #ffffff;
    --sidebar-grad-2: #f5f8fe;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color); color: var(--text-primary);
    margin: 0; padding: 0; display: flex; height: 100vh; overflow: hidden;
    -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
* { box-sizing: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #86868b; }

/* ======= 弹窗 (Modal) ======= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 9999; opacity: 0; transition: opacity 0.2s ease; }
.modal-overlay.active { display: flex; opacity: 1; }
.custom-modal { background: rgba(255, 255, 255, 0.95); border-radius: 18px; width: 360px; padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); transform: scale(0.95); transition: transform 0.2s ease; }
.modal-overlay.active .custom-modal { transform: scale(1); }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; text-align: center;}
.modal-body { margin-bottom: 24px; }
.modal-input { width: 100%; border: 1px solid #d2d2d7; border-radius: 10px; padding: 10px; font-size: 15px; margin-bottom: 10px; outline: none; transition: 0.2s;}
.modal-input:focus { border-color: var(--theme-color); box-shadow: 0 0 0 3px var(--theme-color-light); }
.modal-footer { display: flex; gap: 12px; }
.modal-footer button { flex: 1; padding: 10px; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: 0.2s; }
.btn-cancel { background: #e5e5ea; color: var(--text-primary); }
.btn-cancel:hover { background: #d2d2d7; }
.btn-confirm { background: var(--theme-color); color: white; }
.btn-confirm:hover { background: var(--theme-color-hover); }

/* ======= 左侧侧边栏 ======= */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-grad-1), var(--sidebar-grad-2));
    border-right: 1px solid rgba(200, 211, 234, 0.55);
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: inset -1px 0 0 rgba(255,255,255,0.9), 8px 0 22px rgba(15,40,90,0.04);
    position: relative;
    overflow: hidden;
}
.sidebar::before { content: none; }
.sidebar-top-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 86%;
    height: 4px;
    border-radius: 0 0 6px 0;
    background: linear-gradient(90deg, #2c94ff, #2a7cf0);
}
.brand {
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 24px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 12px;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #1f2b45;
}
.brand-dot { width: 12px; height: 12px; background: linear-gradient(180deg, #3aa6ff, #1e76ee); border-radius: 50%; box-shadow: 0 0 0 3px rgba(46,130,244,0.12); }
.nav-menu { display: flex; flex-direction: column; gap: 4px; }
.sidebar-auth-actions {
    margin-top: 12px;
    padding: 10px 8px 4px;
    border-top: 1px dashed rgba(144, 174, 224, 0.7);
}
.sidebar-logout-btn {
    width: 100%;
    border: 1px solid rgba(229, 92, 115, 0.42);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,245,247,0.96), rgba(255,236,241,0.94));
    color: #be3f58;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
    cursor: pointer;
    transition: 0.2s;
}
.sidebar-logout-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(208, 67, 96, 0.55);
    box-shadow: 0 8px 14px rgba(207, 78, 105, 0.16);
}
.nav-group-title {
    font-size: 13px;
    font-weight: 800;
    color: #2479e7;
    letter-spacing: 0.2px;
    margin-top: 10px;
    margin-bottom: 6px;
    padding: 0 10px;
}
.nav-item {
    padding: 12px 12px;
    border-radius: 12px;
    color: #2f3c55;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(0,0,0,0);
    position: relative;
}
.nav-item::before { content: none; }
.nav-item:hover {
    background: rgba(242,247,255,0.92);
    color: #20456f;
    border-color: rgba(203,222,249,0.78);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(216,234,255,0.95), rgba(235,245,255,0.92));
    color: #1f72d8;
    border-color: rgba(168,203,247,0.8);
    box-shadow: inset 4px 0 0 #2c8df8;
}
.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
    opacity: 0.95;
}
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-icon-blue { color: #2a8ff4; }
.nav-icon-indigo { color: #5d6de1; }
.nav-icon-cyan { color: #1fa6b7; }
.nav-icon-purple { color: #8a58cf; }
.nav-icon-orange { color: #dc8a2f; }
.nav-icon-green { color: #35a66d; }
.nav-icon-pink { color: #d05c96; }

.sidebar-month-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(207,220,247,0.8);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    box-shadow: 0 8px 16px rgba(17,48,102,0.08);
}
.sidebar-month-title { font-size: 12px; font-weight: 800; color: #1f2b45; margin-bottom: 6px; }
.sidebar-month-row { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: #5b657e; }
.sidebar-month-mini { margin-top: 6px; color: #6c7486; }
.sidebar-month-bar { width: 100%; height: 6px; background: rgba(221,231,249,0.9); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.sidebar-month-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2c94ff, #10b0ff, #7c3aed);
    border-radius: 999px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(44,148,255,0.45), 0 0 18px rgba(124,58,237,0.35);
}
.sidebar-salary-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(240,214,255,0.8);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 14px;
    box-shadow: 0 8px 16px rgba(46,16,92,0.08);
}
.sidebar-salary-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #f97316);
    border-radius: 999px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(236,72,153,0.35), 0 0 18px rgba(139,92,246,0.3);
}
.sidebar-salary-bar-fill::after {
    content: '';
    position: absolute;
    top: -80%;
    left: -50%;
    width: 70%;
    height: 260%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.9), rgba(255,255,255,0));
    transform: skewX(-20deg);
    animation: sidebarBarSweep 1.6s linear infinite;
}
.sidebar-pay-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,250,255,0.94));
    border: 1px solid rgba(176,207,255,0.55);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 18px;
    box-shadow: 0 12px 24px rgba(19,62,132,0.1), inset 0 1px 0 rgba(255,255,255,0.85);
}
.sidebar-pay-head { margin-bottom: 8px; }
.sidebar-pay-sub {
    font-size: 11px;
    color: #6b7897;
    line-height: 1.3;
}
.sidebar-pay-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sidebar-pay-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    align-items: center;
    row-gap: 4px;
    font-size: 12px;
    color: #1f2b45;
    padding: 6px 8px;
    border: 1px solid rgba(219,230,251,0.85);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(246,250,255,0.95), rgba(255,255,255,0.98));
    position: relative;
    overflow: visible;
}
.sidebar-pay-name { color: #435274; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sidebar-pay-value {
    font-weight: 800;
    color: #12284f;
    font-variant-numeric: tabular-nums;
    justify-self: end;
}
.sidebar-pay-help {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: #2f63b9;
    background: rgba(47,99,185,0.12);
    border: 1px solid rgba(47,99,185,0.25);
}
.sidebar-pay-tip { display: none; }
.sidebar-pay-next {
    grid-column: 1 / -1;
    margin-left: auto;
    font-size: 11px;
    color: #6b7897;
    white-space: nowrap;
}
.sidebar-pay-total-row {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 11px;
    border: 1px solid rgba(120,164,255,0.45);
    background: linear-gradient(120deg, rgba(52,148,255,0.15), rgba(122,100,255,0.12), rgba(255,255,255,0.88));
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 14px rgba(47,96,185,0.12);
    position: relative;
    overflow: visible;
}
.global-pay-tooltip {
    position: fixed;
    max-width: 360px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(22,36,62,0.96);
    border: 1px solid rgba(101,133,188,0.45);
    color: #eaf2ff;
    font-size: 11px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    box-shadow: 0 12px 24px rgba(8,18,38,0.32);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
    z-index: 9999;
}
.global-pay-tooltip.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sidebar-pay-total-row span:first-child {
    font-size: 12px;
    font-weight: 700;
    color: #1d3f78;
}
.sidebar-pay-total-row span:last-child {
    font-size: 16px;
    font-weight: 900;
    color: #133a7a;
    font-variant-numeric: tabular-nums;
}
.sidebar-month-bar-fill::after {
    content: '';
    position: absolute;
    top: -80%;
    left: -50%;
    width: 70%;
    height: 260%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.9), rgba(255,255,255,0));
    transform: skewX(-20deg);
    animation: sidebarBarSweep 1.4s linear infinite;
}
@keyframes sidebarBarSweep {
    0% { left: -60%; opacity: 0.2; }
    20% { opacity: 1; }
    50% { left: 40%; opacity: 1; }
    100% { left: 160%; opacity: 0; }
}

/* ======= 主内容区通用 ======= */
.main-content { flex: 1; padding: 40px; overflow-y: auto; position: relative; display: flex; flex-direction: column;}
.page-section { display: none; animation: fadeIn 0.3s ease; flex: 1; flex-direction: column; }
.page-section.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.section-header { margin-bottom: 24px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center;}
.section-title { font-size: 28px; font-weight: 700; }

input, select, textarea { border: 1px solid #d2d2d7; border-radius: 10px; padding: 10px; font-size: 14px; outline: none; transition: 0.2s; background: rgba(255,255,255,0.9); font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--theme-color); box-shadow: 0 0 0 3px var(--theme-color-light); }
.btn-primary { background: var(--theme-color); color: white; border: none; border-radius: 12px; padding: 8px 16px; font-weight: 600; cursor: pointer; transition: 0.2s;}
.btn-primary:hover { background: var(--theme-color-hover); }
.btn-outline { background: white; border: 1px solid #d2d2d7; color: var(--text-primary); border-radius: 12px; padding: 8px 16px; cursor: pointer; font-weight: 600;}
.btn-outline:hover { background: #f5f5f7; }

/* ======= 任务清单 ======= */
.task-layout { display: flex; gap: 30px; flex: 1; min-height: 0; }
.task-left { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.task-right { width: 400px; flex-shrink: 0; display: flex; flex-direction: column; }
.task-mini-calendar-card { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.92)); border-radius: 26px; border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 16px 30px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9); padding: 18px; margin-bottom: 16px; }
.task-mini-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-weight: 700; color: #4a4a4f; }
.task-mini-nav { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d9d9de; background: linear-gradient(180deg, #ffffff, #f1f4fb); color: #4a4a4f; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.task-mini-nav:hover { background: #fff; border-color: #bfc6d4; transform: translateY(-1px); }
.task-mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.task-mini-week { font-size: 11px; color: #8a8a90; padding-bottom: 4px; }
.task-mini-day { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; border-radius: 14px; color: #5c5c62; background: linear-gradient(180deg, #ffffff, #f4f7ff); border: 1px solid rgba(220,220,226,0.7); box-shadow: 0 6px 12px rgba(0,0,0,0.06); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.task-mini-day:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(0,0,0,0.1); border-color: rgba(0,113,227,0.3); }
.task-mini-day.is-today { border-color: rgba(0,113,227,0.45); color: #0071e3; font-weight: 700; }
.task-mini-day.is-selected { border-color: #0071e3; color: #0b5bd3; font-weight: 800; box-shadow: 0 10px 18px rgba(0,113,227,0.2); }
.task-mini-day.has-event::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #0071e3; bottom: 4px; }
.task-mini-day.has-task::before { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #34c759; top: 4px; right: 4px; }
.task-mini-empty { border: none; background: transparent; }
.task-input-wrapper { background: var(--card-bg); border-radius: 16px; padding: 12px; display: flex; gap: 12px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.5); flex-shrink: 0;}
.task-input-wrapper input { flex: 1; border: none; background: transparent; padding: 8px 12px; font-size: 16px; box-shadow: none;}
.task-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; padding-right: 5px;}
.task-item { background: var(--card-bg); border-radius: 12px; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #f0f0f0; transition: 0.2s; cursor: pointer; flex-shrink: 0;}
.task-item:hover { border-color: var(--theme-color-light); transform: translateX(4px); }
.task-item.selected { border-color: var(--theme-color); box-shadow: 0 4px 15px var(--theme-color-light); }
.task-content { display: flex; align-items: center; gap: 16px; font-size: 16px; font-weight: 500; flex:1; }
.task-checkbox { width: 22px; height: 22px; border: 2px solid #d2d2d7; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: 0.2s; flex-shrink: 0;}
.task-item.completed .task-checkbox { background: var(--theme-color); border-color: var(--theme-color); }
.task-item.completed .task-checkbox::after { content: '✓'; color: white; font-size: 14px; font-weight: bold;}
.task-item.completed .task-text { text-decoration: line-through; color: var(--text-secondary); }
.task-del { color: #ff3b30; background: none; border: none; cursor: pointer; font-size: 13px; opacity: 0; transition: 0.2s;}
.task-item:hover .task-del { opacity: 1; }
.task-detail-pane { background: var(--card-bg); border-radius: 20px; padding: 24px; border: 1px solid rgba(255,255,255,0.5); flex-direction: column; flex: 1; display: none; }
.task-detail-pane.active { display: flex; }
.detail-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; color: var(--text-primary); word-break: break-all;}
.detail-note { flex: 1; border: none; background: rgba(255,255,255,0.5); border-radius: 12px; padding: 16px; font-size: 15px; resize: none; line-height: 1.6; outline: none;}
.detail-note:focus { background: white; box-shadow: inset 0 0 0 2px var(--theme-color-light);}
.empty-pane { background: var(--card-bg); border-radius: 20px; border: 1px dashed #d2d2d7; flex: 1; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 15px; }

.task-day-card { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.92)); border-radius: 22px; border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 16px 30px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9); padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.task-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.task-day-title { font-size: 14px; font-weight: 800; color: #1d1d1f; }
.task-day-sub { font-size: 12px; color: #7a7a80; }
.task-day-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.task-day-item { background: rgba(255,255,255,0.85); border: 1px solid #edf0f6; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 12px rgba(0,0,0,0.04); }
.task-day-dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; }
.task-day-text { font-size: 13px; font-weight: 600; color: #2d2d31; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-day-empty { font-size: 13px; color: #8a8a90; text-align: center; padding: 10px 0; }

/* ======= 数据看板特有 UI ======= */
.dashboard-scroll-area { flex: 1; overflow-y: auto; padding-right: 10px; }
.data-entry-panel { background: var(--card-bg); border-radius: 20px; padding: 20px 24px; border: 1px solid rgba(255,255,255,0.5); margin-bottom: 30px; box-shadow: 0 4px 24px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 16px;}
.entry-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5e5ea; padding-bottom: 12px;}
.entry-title { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 8px;}
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; align-items: end;}
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 12px; color: var(--text-secondary); font-weight: 600;}
.sync-status-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e7eaf4;
    background: linear-gradient(180deg, rgba(247,250,255,0.95), rgba(255,255,255,0.95));
}
.sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9aa4b7;
    box-shadow: 0 0 0 6px rgba(154,164,183,0.15);
}
.sync-dot.is-on {
    background: #34c759;
    box-shadow: 0 0 0 6px rgba(52,199,89,0.15);
}
.sync-status-text {
    font-size: 13px;
    font-weight: 700;
    color: #2e3750;
}
.sync-status-meta {
    font-size: 12px;
    color: #6a748a;
}

.kpi-section-title { font-size: 20px; font-weight: 600; margin: 0 0 20px 0; color: var(--text-primary); display: flex; align-items: center; justify-content: space-between;}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; margin-bottom: 40px; }
.kpi-card { background: var(--card-bg); border-radius: 20px; padding: 24px 24px 16px 24px; border: 1px solid rgba(255,255,255,0.5); display: flex; flex-direction: column; position: relative; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.02);}
.kpi-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; z-index: 2;}
.kpi-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 8px;}
.kpi-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.kpi-numbers { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; z-index: 2;}
.kpi-percent { margin-left: auto; font-size: 13px; font-weight: 700; letter-spacing: 0.2px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.kpi-current { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-target { font-size: 14px; color: var(--text-secondary); }
.progress-bar-bg { width: 100%; height: 6px; background: #e5e5ea; border-radius: 3px; overflow: hidden; margin-bottom: 16px; z-index: 2; position: relative; }
.progress-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.kpi-actions { display: flex; gap: 8px; z-index: 2;}
.kpi-btn { flex: 1; padding: 6px; border-radius: 8px; border: 1px solid #d2d2d7; background: rgba(255,255,255,0.8); cursor: pointer; font-weight: 600; transition: 0.2s; font-size: 13px;}
.kpi-btn:hover { background: #f5f5f7; border-color: var(--theme-color); color: var(--theme-color);}
.mini-chart { width: 100%; height: 70px; margin-top: 10px; z-index: 1;}

.main-chart-card { background: var(--card-bg); border-radius: 20px; padding: 24px; border: 1px solid rgba(255,255,255,0.5); margin-bottom: 40px; box-shadow: 0 4px 24px rgba(0,0,0,0.02); min-width: 0; width: 100%; display: block;}
.main-chart-container { width: 100%; height: 350px; min-width: 0; display: block; }

/* ======= 排期与日历共用样式 ======= */
.month-overview-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
.month-overview-panel { background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(243,248,255,0.9)); border-radius: 22px; padding: 20px; border: 1px solid rgba(255,255,255,0.8); box-shadow: 0 14px 28px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.88); }
.month-overview-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.month-overview-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.month-kpi-card { border: 1px solid rgba(220,229,244,0.96); border-radius: 16px; padding: 12px 14px; box-shadow: 0 8px 18px rgba(20,45,90,0.06); transition: transform 0.15s ease, box-shadow 0.2s ease; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(246,250,255,0.92)); }
.month-kpi-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(44,148,255,0.95), rgba(113,169,255,0.65));
}
.month-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(20,45,90,0.09); }
.month-kpi-label { font-size: 12px; color: #6c7590; margin-bottom: 6px; font-weight: 700; }
.month-kpi-value { font-size: 24px; font-weight: 900; color: #1f2b45; font-variant-numeric: tabular-nums; }
.month-upcoming-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; max-height: 280px; overflow-y: auto; }
.month-upcoming-item { background: linear-gradient(180deg, rgba(250,252,255,0.94), rgba(244,248,255,0.9)); border: 1px solid #dfe8f9; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 82px; }
.month-upcoming-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-upcoming-time { color: #0b65de; font-weight: 700; font-size: 12px; font-variant-numeric: tabular-nums; }
.month-upcoming-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.month-upcoming-status-scheduled { background: rgba(0,113,227,0.1); color: #0b65de; border-color: rgba(0,113,227,0.2); }
.month-upcoming-status-pending { background: rgba(142,142,147,0.12); color: #62626a; border-color: rgba(142,142,147,0.2); }
.month-upcoming-status-completed { background: rgba(52,199,89,0.12); color: #268b45; border-color: rgba(52,199,89,0.26); }
.month-upcoming-status-cancelled { background: rgba(255,59,48,0.12); color: #b12e25; border-color: rgba(255,59,48,0.24); }
.month-upcoming-theme { font-size: 13px; color: #1f2b45; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-upcoming-loc { font-size: 12px; color: #65708b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.month-heatmap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.month-heat-week-head {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #7a8499;
    padding: 4px 0 2px 0;
}
.month-heat-empty {
    min-height: 72px;
    border-radius: 12px;
    border: 1px dashed rgba(220,226,240,0.7);
    background: rgba(247,250,255,0.35);
}
.month-heat-cell { border-radius: 12px; padding: 10px 6px; text-align: center; border: 1px solid #e5e5ea; background: rgba(255,255,255,0.6); min-height: 72px; display: flex; flex-direction: column; justify-content: center; gap: 3px; transition: transform 0.15s ease, box-shadow 0.2s ease; position: relative; overflow: visible; }
.month-heat-cell:hover { transform: translateY(-1px); box-shadow: 0 8px 14px rgba(13,53,111,0.1); }
.month-heat-date { font-size: 12px; color: var(--text-secondary); }
.month-heat-count { font-size: 16px; font-weight: 800; color: #1d1d1f; font-variant-numeric: tabular-nums; }
.month-heat-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 8px);
    width: min(360px, 74vw);
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(175,196,232,0.8);
    border-radius: 12px;
    box-shadow: 0 16px 30px rgba(20,49,101,0.18);
    padding: 10px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.16s ease;
    z-index: 40;
}
.month-heat-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.98);
    border-right: 1px solid rgba(175,196,232,0.8);
    border-bottom: 1px solid rgba(175,196,232,0.8);
    transform: translate(-50%, -5px) rotate(45deg);
}
.month-heat-cell:hover .month-heat-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.month-heat-tooltip-title {
    font-size: 12px;
    font-weight: 800;
    color: #1b335c;
    margin-bottom: 8px;
}
.month-heat-tooltip-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 12px;
    color: #35425c;
    padding: 3px 0;
}
.month-heat-tooltip-time {
    color: #0d61d8;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.month-heat-tooltip-text {
    color: #44506b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.month-heat-lv0 { background: linear-gradient(135deg, rgba(241,245,252,0.85), rgba(233,240,250,0.75)); }
.month-heat-lv1 { background: linear-gradient(135deg, rgba(138,209,255,0.35), rgba(138,209,255,0.12)); }
.month-heat-lv2 { background: linear-gradient(135deg, rgba(71,167,255,0.42), rgba(71,167,255,0.18)); }
.month-heat-lv3 { background: linear-gradient(135deg, rgba(26,118,236,0.46), rgba(26,118,236,0.2)); }
.month-heat-lv4 { background: linear-gradient(135deg, rgba(19,86,190,0.52), rgba(19,86,190,0.22)); }
.month-overview-empty { color: #8b8b92; font-size: 13px; padding: 16px 4px; text-align: center; }

.dashboard-schedule { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: start; }
.calendar-wrapper { background: var(--card-bg); border-radius: 24px; padding: 24px; border: 1px solid rgba(255,255,255,0.5); position: sticky; top: 0;}
.calendar-header { display: flex; justify-content: space-between; margin-bottom: 20px; font-weight: 600; }
.calendar-header button { background: none; border: none; cursor: pointer; color: var(--text-secondary); }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.day-label { font-size: 12px; color: var(--text-secondary); padding-bottom: 8px;}
.day-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 14px; border-radius: 50%; position: relative; transition: 0.3s; }
.day-cell.is-selected { background: rgba(0,113,227,0.12); border: 1px solid rgba(0,113,227,0.4); }
.day-cell.has-event::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; background: var(--theme-color); border-radius: 50%; }
.day-cell.has-mcd::after { background: var(--theme-yellow); }
.day-cell.has-both::after { background: linear-gradient(90deg, var(--theme-color) 50%, var(--theme-yellow) 50%); }
.day-cell.highlight-blue { background: var(--theme-color); color: white; transform: scale(1.1); }
.day-cell.highlight-blue::after { background: white; }
.day-cell.highlight-yellow { background: var(--theme-yellow); color: #000; transform: scale(1.1); }
.day-cell.highlight-yellow::after { background: #000; }

.schedule-task-panel { margin-top: 16px; background: rgba(255,255,255,0.85); border: 1px solid rgba(226,234,248,0.9); border-radius: 16px; padding: 12px; box-shadow: 0 10px 18px rgba(16,43,92,0.08); }
.schedule-task-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.schedule-task-title { font-size: 13px; font-weight: 800; color: #1f2b45; }
.schedule-task-sub { font-size: 12px; color: #7b8393; }
.schedule-task-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.schedule-task-item { display: flex; align-items: center; gap: 8px; background: #f7f9ff; border: 1px solid #edf0f6; border-radius: 12px; padding: 8px 10px; font-size: 12px; color: #2d2d31; }
.schedule-task-dot { width: 6px; height: 6px; border-radius: 50%; background: #34c759; }
.schedule-task-empty { font-size: 12px; color: #8a8a90; text-align: center; padding: 10px 0; }

.add-form { background: var(--card-bg); border-radius: 18px; padding: 20px; margin-bottom: 24px; display: grid; grid-template-columns: 130px 85px 105px minmax(150px, 1fr) minmax(150px, 1fr) 120px 100px auto auto; gap: 10px; border: 1px solid rgba(255,255,255,0.5); }
.add-form input[type="number"] { min-width: 0; }
.toggle-wrapper { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap;}
.toggle-switch { width: 34px; height: 20px; background: #e9e9eb; border-radius: 20px; position: relative; transition: 0.3s; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: 0.3s; }
.toggle-wrapper input { display: none; }
.toggle-wrapper input:checked + .toggle-switch { background: var(--theme-yellow); }
.toggle-wrapper input:checked + .toggle-switch::after { transform: translateX(14px); }

.event-card { background: var(--card-bg); border-radius: 16px; padding: 16px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,0.5); transition: 0.2s; position: relative; display: flex; align-items: center;}
.event-card:hover { transform: translateX(4px); border-color: var(--theme-color); }
.event-card.type-mcd { background: rgba(255, 199, 44, 0.05); border-color: rgba(255, 199, 44, 0.3); }
.event-card.type-mcd:hover { border-color: var(--theme-yellow); }
.event-card.status-cancelled { opacity: 0.6; text-decoration: line-through; }
.event-main { display: grid; grid-template-columns: 190px 80px 1fr 1.2fr 170px 70px; gap: 12px; align-items: center; width: 100%;}
.event-time { font-weight: 700; color: var(--theme-color); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: 15px;}
.event-weekday { color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.event-loc { font-weight: 600; font-size: 14px; }
.event-theme { font-weight: 500; font-size: 14px; color: var(--text-secondary); }
.event-metrics { display: flex; flex-direction: column; gap: 4px; }
.event-metric { font-size: 12px; color: #445066; font-weight: 600; white-space: nowrap; }
.mcd-badge { background: var(--theme-yellow); color: #000; font-size: 11px; padding: 2px 6px; border-radius: 4px; font-weight: 600;}
.status-badge-select { appearance: none; border: none; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; outline: none; text-align: center; width: 75px; }
.status-val-scheduled { background: #e5f0fa; color: #0071e3; }
.status-val-pending { background: #f5f5f7; color: #86868b; }
.status-val-completed { background: #e5f5ea; color: #34c759; }
.status-val-cancelled { background: #f5f5f7; color: #86868b; }
.actions { position: absolute; right: 16px; opacity: 0; transition: 0.2s; background: var(--card-bg); padding-left: 10px;}
.event-card:hover .actions { opacity: 1; }
.actions button { background: none; border: none; cursor: pointer; font-size: 12px; color: var(--text-secondary); font-weight: 600;}
.actions button:hover { color: var(--theme-color); }

.bookmarks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.bookmark-card { background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 16px; padding: 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: 0.2s; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.bookmark-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.06); border-color: var(--theme-color-light); }
.bm-icon { width: 44px; height: 44px; border-radius: 12px; background: #e5e5ea; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bm-title { font-weight: 600; font-size: 16px; }
.bm-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.bm-actions { display: flex; justify-content: flex-end; }
.bm-delete { margin-left: 0; border: none; background: rgba(255,59,48,0.1); color: #ff3b30; padding: 4px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.bm-delete:hover { background: rgba(255,59,48,0.18); }
.manage-hidden .bm-actions { display: none; }
.manage-hidden .pt-delete-btn { display: none; }

/* ======= 激励语录页 ======= */
.inspire-layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 24px; align-items: start; }
.inspire-panel { background: var(--card-bg); border-radius: 16px; padding: 18px; border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 6px 24px rgba(0,0,0,0.04); }
.inspire-panel h3 { margin: 0 0 12px 0; font-size: 18px; }
.inspire-panel textarea { width: 100%; min-height: 120px; border-radius: 12px; border: 1px solid #d2d2d7; padding: 12px; resize: vertical; }
.inspire-panel .btn-row { display:flex; gap:10px; margin-top:10px; }
.inspire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.inspire-card { position: relative; padding: 16px 14px 18px 14px; border-radius: 14px; color: #1d1d1f; box-shadow: 0 12px 28px rgba(0,0,0,0.06); background: linear-gradient(135deg, #fff, #f8f9ff); border: 1px solid rgba(0,0,0,0.03); transform: rotate(-1deg); transition: transform 0.15s ease, box-shadow 0.2s ease; }
.inspire-card:nth-child(2n) { transform: rotate(1deg); }
.inspire-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 16px 32px rgba(0,0,0,0.08); }
.inspire-tag { font-size: 12px; color: #5c5c60; letter-spacing: 0.3px; text-transform: uppercase; }
.inspire-text { margin: 10px 0 14px 0; line-height: 1.6; font-size: 15px; }
.inspire-actions { display:flex; gap:10px; align-items:center; justify-content:flex-end; font-size: 12px; color: #5c5c60; }
.inspire-chip { padding: 2px 8px; border-radius: 999px; background: rgba(0,113,227,0.08); color: #0071e3; font-weight: 700; font-size: 11px; letter-spacing: 0.3px; }
.inspire-btn { border:none; background: rgba(0,0,0,0.04); border-radius: 10px; padding: 6px 10px; cursor: pointer; transition: 0.2s; }
.inspire-btn:hover { background: rgba(0,0,0,0.08); }
.inspire-empty { color: #86868b; font-size: 14px; text-align: center; padding: 30px 0; }
.inspire-hero-wrap { display:flex; gap:18px; align-items:center; margin-bottom: 16px; }
.inspire-hero-card {
    flex:1;
    background: radial-gradient(120% 120% at 0% 0%, rgba(104,171,255,0.25), rgba(255,255,255,0.95) 40%, rgba(238,246,255,0.9) 100%);
    border: 1px solid rgba(120,170,255,0.25);
    border-radius: 24px;
    padding: 24px 26px;
    box-shadow: 0 18px 36px rgba(20,48,98,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    text-align: center;
    min-height: 186px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:10px;
    position: relative;
    overflow: hidden;
}
.inspire-hero-card::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(74,140,255,0.28), rgba(74,140,255,0));
    top: -120px;
    right: -80px;
    pointer-events: none;
}
.inspire-hero-card::after {
    content: '';
    position: absolute;
    left: -20%;
    bottom: -30%;
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, rgba(76,195,255,0.2), rgba(76,195,255,0));
    filter: blur(2px);
    transform: rotate(-8deg);
    pointer-events: none;
}
.inspire-hero-quote {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 6px 2px;
    font-size: clamp(46px, 3.9vw, 66px);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: 0.6px;
    background: linear-gradient(120deg, #ff2d55 0%, #ff8a00 22%, #ffd400 38%, #00d4ff 58%, #7c3aed 78%, #ff2d55 100%);
    background-size: 420% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: quoteFlow 10s ease-in-out infinite;
    text-shadow: 0 2px 0 rgba(255,255,255,0.35), 0 12px 28px rgba(255,45,85,0.25);
    position: relative;
    z-index: 1;
    transition: transform 0.35s ease, filter 0.35s ease, text-shadow 0.35s ease, background-position 0.45s ease;
}
.inspire-hero-quote:hover {
    transform: translateY(-1px) scale(1.015);
    filter: saturate(1.28) hue-rotate(-18deg) brightness(1.08);
    text-shadow: 0 2px 0 rgba(255,255,255,0.45), 0 14px 32px rgba(0,113,227,0.3);
    background-position: 85% 50%;
}
.inspire-hero-meta { font-size: 12px; color: #6b7280; letter-spacing: 0.4px; text-transform: uppercase; }
@keyframes quoteFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 120% 50%; }
}

.floating-ai { position: fixed; right: 24px; bottom: 24px; width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 16px 38px rgba(0,0,0,0.12); border: 1px solid #e5e5ea; z-index: 999; overflow: hidden; }
.floating-ai-header { padding: 12px 14px; font-weight: 700; font-size: 14px; display:flex; justify-content:space-between; align-items:center; background: #f8f9fb; }
.floating-ai-body { padding: 12px 14px; display:flex; flex-direction:column; gap:10px; }
.floating-ai textarea { width: 100%; min-height: 70px; border-radius: 10px; border: 1px solid #d2d2d7; padding: 10px; resize: vertical; }
.floating-ai input[type="password"] { width: 100%; border-radius: 10px; border: 1px solid #d2d2d7; padding: 8px 10px; }
.floating-ai .ai-actions { display:flex; gap:8px; }
.floating-ai .ai-actions button { flex:1; }
.floating-ai-status { font-size: 12px; color: #5c5c60; min-height: 18px; }

/* AI 灵感 Fab */
.ai-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 116px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(145deg, #7bc0ff 0%, #3b82f6 45%, #1d4ed8 100%);
    box-shadow:
        0 14px 28px rgba(29,78,216,0.4),
        inset 0 1px 0 rgba(255,255,255,0.6),
        inset 0 -8px 18px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: grab;
    z-index: 999;
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
    animation: aiPulse 2.8s ease-in-out infinite;
    user-select: none;
}
.ai-fab::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 10px;
    right: 10px;
    height: 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255,255,255,0.45), rgba(255,255,255,0.08));
    pointer-events: none;
}
.ai-fab:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 18px 34px rgba(29,78,216,0.5), inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -8px 18px rgba(0,0,0,0.2); filter: saturate(1.08); }
.ai-fab:active { transform: scale(0.98); cursor: grabbing; }
@keyframes aiPulse {
    0%, 100% { box-shadow: 0 14px 28px rgba(29,78,216,0.38), inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -8px 18px rgba(0,0,0,0.18); }
    50% { box-shadow: 0 20px 36px rgba(29,78,216,0.52), inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -8px 18px rgba(0,0,0,0.2); }
}
.ai-panel { position: fixed; right: 24px; bottom: 90px; width: 320px; background: #fff; border-radius: 14px; box-shadow: 0 16px 38px rgba(0,0,0,0.12); border: 1px solid #e5e5ea; z-index: 998; padding: 12px 14px; display:none; }
.ai-panel h4 { margin: 0 0 10px 0; font-size: 14px; }
.ai-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ai-mini-btn { border: 1px solid #d2d2d7; border-radius: 999px; background: #fff; color: #4d4d53; font-size: 12px; font-weight: 700; padding: 4px 10px; cursor: pointer; }
.ai-mini-btn:hover { background: #f4f7ff; color: #1d4ed8; border-color: #bcd1ff; }
.ai-suggestion { background: #f8f9fb; border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.5; display:flex; justify-content:space-between; gap:10px; }
.ai-suggestion button { border:none; background: #e0e7ff; color: #1d4ed8; border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* ======= OCR 页面 ======= */
.ocr-layout { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 20px; min-height: 0; }
.ocr-panel { background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(245,249,255,0.9)); border: 1px solid rgba(255,255,255,0.8); border-radius: 20px; padding: 18px; box-shadow: 0 12px 26px rgba(16,43,92,0.07); display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ocr-field-label { font-size: 13px; color: var(--text-secondary); font-weight: 700; margin-bottom: -2px; }
.ocr-upload-zone {
    border: 1px dashed #a7c7f6;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(231,244,255,0.8), rgba(246,251,255,0.95));
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    outline: none;
    transition: 0.2s;
}
.ocr-upload-zone:focus { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,0.16); }
.ocr-upload-zone.is-dragging { border-color: #0ea5e9; box-shadow: 0 0 0 4px rgba(14,165,233,0.16); transform: translateY(-1px); }
.ocr-upload-zone.is-ready { border-style: solid; border-color: #74b8ff; }
.ocr-upload-title { font-size: 14px; font-weight: 800; color: #1e3a8a; }
.ocr-upload-sub { font-size: 12px; color: #5d6680; }
.ocr-upload-actions { display: flex; gap: 8px; }
.ocr-upload-actions .btn-primary, .ocr-upload-actions .btn-outline { flex: 1; }
.ocr-preview-wrap { height: 220px; border-radius: 14px; border: 1px dashed #d2d2d7; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.45); position: relative; overflow: hidden; }
#ocrPreviewImage { max-width: 100%; max-height: 100%; display: none; object-fit: contain; }
.ocr-preview-empty { color: #909098; font-size: 13px; }
.ocr-prompt-input { min-height: 98px; resize: vertical; }
.ocr-action-row { display: flex; gap: 8px; }
.ocr-action-row .btn-outline { flex: 1; }
.ocr-result-head { display: flex; justify-content: space-between; align-items: center; }
.ocr-result-table-wrap { flex: 1; min-height: 260px; border-radius: 14px; border: 1px solid #e5e5ea; background: rgba(255,255,255,0.72); overflow: auto; }
.ocr-empty-tip { color: #8b8b92; font-size: 14px; text-align: center; padding: 80px 20px; }
.ocr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ocr-table th, .ocr-table td { border-bottom: 1px solid #f0f0f2; padding: 10px 8px; text-align: left; white-space: nowrap; }
.ocr-table th { position: sticky; top: 0; background: #f7f9ff; color: #445; font-weight: 700; z-index: 1; }

@media (max-width: 1200px) {
    .ocr-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1400px) {
    .add-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .event-main { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}

@media (max-width: 1024px) {
    .month-upcoming-list { grid-template-columns: 1fr; }
    .dashboard-schedule { grid-template-columns: 1fr; gap: 16px; }
    .calendar-wrapper { position: static; }
    .add-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-card { flex-direction: column; align-items: stretch; }
    .event-main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .actions { position: static; opacity: 1; padding-left: 0; margin-top: 10px; }
}

/* ======= 侧边栏结构优化 ======= */
.sidebar {
    overflow: hidden;
}
.floating-sidepanel {
    position: fixed;
    right: 18px;
    top: 72px;
    width: 278px;
    max-height: calc(100vh - 96px);
    z-index: 620;
    border-radius: 16px;
    border: 1px solid rgba(183, 206, 242, 0.72);
    background: linear-gradient(180deg, rgba(251,253,255,0.95), rgba(242,248,255,0.94));
    box-shadow: 0 14px 28px rgba(16,43,92,0.16);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.floating-sidepanel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(214,228,248,0.9);
    cursor: move;
    user-select: none;
    touch-action: none;
    background: linear-gradient(180deg, rgba(242,248,255,0.95), rgba(252,254,255,0.92));
    border-radius: 16px 16px 0 0;
}
.floating-sidepanel-title {
    font-size: 13px;
    font-weight: 800;
    color: #1f2b45;
}
.floating-sidepanel-hint {
    font-size: 11px;
    color: #6f7f9f;
    font-weight: 700;
}
.floating-sidepanel-content {
    padding: 10px;
    overflow: auto;
}
.sidebar-fold-btn {
    border: 1px solid rgba(177, 197, 228, 0.85);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.96));
    color: #295c9d;
    border-radius: 10px;
    height: 30px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin: 0 0 10px;
    width: 100%;
}
.nav-menu {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}
.floating-sidepanel.is-panels-collapsed {
    width: 180px;
}
.floating-sidepanel.is-panels-collapsed #sidebarMonthCard,
.floating-sidepanel.is-panels-collapsed #sidebarSalaryCard,
.floating-sidepanel.is-panels-collapsed #sidebarPayCard {
    display: none;
}
.floating-sidepanel.is-panels-collapsed .floating-sidepanel-content {
    padding-top: 8px;
}

@media (max-width: 1024px) {
    .floating-sidepanel {
        right: 10px;
        top: 66px;
        width: min(86vw, 300px);
        max-height: calc(100vh - 84px);
    }
}

/* ======= 记账中心 ======= */
.finance-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.finance-summary-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(244,249,255,0.92));
    border: 1px solid rgba(196,216,247,0.75);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 18px rgba(12,46,96,0.08);
}
.finance-summary-label {
    color: #5a6781;
    font-size: 12px;
    font-weight: 700;
}
.finance-summary-value {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 800;
    color: #15386e;
    font-variant-numeric: tabular-nums;
}
.finance-summary-sub {
    margin-top: 2px;
    font-size: 11px;
    color: #7a88a6;
}
.finance-main-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.finance-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.finance-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(246,250,255,0.93));
    border-radius: 18px;
    border: 1px solid rgba(199,220,249,0.72);
    padding: 14px;
    box-shadow: 0 12px 24px rgba(15,43,92,0.08);
    min-height: 100px;
}
.finance-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #1b335e;
    margin-bottom: 10px;
}
.finance-inline-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.finance-inline-row input,
.finance-inline-row select,
.finance-inline-row button {
    min-width: 0;
}
.finance-inline-row input,
.finance-inline-row select {
    flex: 1;
}
.finance-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.finance-note {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    margin-bottom: 10px;
}
.finance-account-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.finance-account-item {
    border: 1px solid #e2ebfa;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}
.finance-account-name {
    font-size: 12px;
    color: #4d5f80;
    font-weight: 700;
}
.finance-account-balance {
    margin-top: 2px;
    font-size: 18px;
    color: #13468f;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.finance-transfer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.finance-insight {
    margin-top: 6px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #dbe8ff;
    background: linear-gradient(180deg, rgba(241,247,255,0.9), rgba(255,255,255,0.96));
    color: #375379;
    font-size: 12px;
    line-height: 1.55;
    min-height: 62px;
}
.finance-chart {
    width: 100%;
    height: 260px;
}
.finance-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
}
.finance-calendar-week {
    text-align: center;
    font-size: 11px;
    color: #76839f;
    font-weight: 700;
}
.finance-calendar-cell {
    border-radius: 12px;
    border: 1px solid #e2ecfc;
    background: #fff;
    padding: 8px 6px;
    min-height: 74px;
}
.finance-calendar-date {
    font-size: 12px;
    color: #3c4f71;
    font-weight: 700;
}
.finance-calendar-income,
.finance-calendar-expense {
    margin-top: 2px;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.finance-calendar-income { color: #0b8e57; }
.finance-calendar-expense { color: #d5334a; }
.finance-table-wrap {
    max-height: 340px;
    overflow: auto;
    border: 1px solid #e4ebf8;
    border-radius: 12px;
    background: #fff;
}
.finance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.finance-table th,
.finance-table td {
    border-bottom: 1px solid #eef2fa;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}
.finance-table th {
    background: #f6f9ff;
    color: #40567d;
    font-weight: 800;
    position: sticky;
    top: 0;
    z-index: 1;
}
.finance-badge-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.finance-badge {
    border-radius: 999px;
    border: 1px solid rgba(43,117,222,0.2);
    background: rgba(43,117,222,0.08);
    color: #25579e;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ======= 右侧记账抽屉 ======= */
.finance-dock-trigger {
    position: fixed;
    right: 24px;
    bottom: 162px;
    z-index: 997;
    border: 1px solid rgba(120,161,222,0.68);
    background: linear-gradient(145deg, #e9f4ff 0%, #d5e9ff 55%, #f4f9ff 100%);
    color: #1e4d92;
    border-radius: 14px;
    height: 44px;
    min-width: 104px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(24,84,166,0.16);
}
.finance-dock-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13,28,50,0.3);
    backdrop-filter: blur(2px);
    z-index: 995;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.finance-dock {
    position: fixed;
    top: 0;
    right: 0;
    width: min(430px, 92vw);
    height: 100vh;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-left: 1px solid rgba(171,200,241,0.75);
    box-shadow: -14px 0 32px rgba(15,43,90,0.2);
    z-index: 996;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.finance-dock.is-open {
    transform: translateX(0);
}
.finance-dock-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.finance-dock-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(174,201,241,0.65);
}
.finance-dock-title {
    font-size: 18px;
    font-weight: 900;
    color: #153a73;
}
.finance-dock-sub {
    margin-top: 2px;
    color: #6780a4;
    font-size: 12px;
}
.finance-dock-close {
    width: 34px;
    height: 34px;
    border: 1px solid #bfd7ff;
    border-radius: 50%;
    background: #fff;
    color: #275ca6;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.finance-dock-body {
    padding: 12px 14px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.finance-dock-summary {
    border: 1px solid #d3e4ff;
    border-radius: 12px;
    padding: 8px 10px;
    background: #fff;
    color: #3b5682;
    font-size: 12px;
    line-height: 1.6;
}
.finance-dock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.finance-dock-recent {
    border: 1px solid #d8e6ff;
    border-radius: 12px;
    background: #fff;
    max-height: 260px;
    overflow-y: auto;
}
.finance-dock-item {
    border-bottom: 1px solid #edf2fc;
    padding: 8px 10px;
}
.finance-dock-item:last-child {
    border-bottom: none;
}
.finance-dock-item-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}
.finance-dock-item-amount {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.finance-dock-item-amount.is-income { color: #0c8a56; }
.finance-dock-item-amount.is-expense { color: #d33a50; }

@media (max-width: 1400px) {
    .finance-main-grid {
        grid-template-columns: 1fr;
    }
    .finance-chart-grid {
        grid-template-columns: 1fr;
    }
}
