/* 公共页面底座：reset / body / container / 按钮 / 统计卡基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: #fff;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-secondary {
    background: #f1f3f5;
    color: #495057;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
}

a.btn {
    text-decoration: none;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 22px 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.stat-card.pending {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.progress {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.completed {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    margin-top: 6px;
    opacity: 0.95;
}

/* 右侧边缘通知竖条（工单/待办提醒） */
.notification-badge,
.oa-side-tab {
    position: fixed;
    right: 0;
    top: 36%;
    transform: translateY(-50%);
    z-index: 3015;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 38px;
    min-height: 96px;
    padding: 12px 4px 14px;
    margin: 0;
    border: 1px solid #fecaca;
    border-right: none;
    border-radius: 12px 0 0 12px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    box-shadow: -4px 2px 14px rgba(15, 23, 42, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 600;
    font-size: 13px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.notification-badge.is-visible,
.oa-side-tab.is-visible {
    display: flex;
}

.notification-badge:hover,
.oa-side-tab:hover {
    transform: translateY(-50%) translateX(-2px);
    box-shadow: -6px 4px 18px rgba(15, 23, 42, 0.12);
}

.notification-badge > span:first-child,
.oa-side-tab__count,
.notification-badge #badgeCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 11px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

.notification-badge .badge-label,
.oa-side-tab__label {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.15;
    color: #dc2626;
    margin-top: 0;
    opacity: 1;
    user-select: none;
}

@media (max-width: 480px) {
    .notification-badge,
    .oa-side-tab {
        top: auto;
        bottom: 200px;
        transform: none;
    }

    .notification-badge:hover,
    .oa-side-tab:hover {
        transform: translateX(-2px);
    }
}

.oa-import-hint {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.8;
}

.oa-backup-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.oa-backup-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.oa-backup-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.oa-modal-hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.required {
    color: #dc3545;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #adb5bd;
}

.todo-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px 30px;
}
