* {
    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;
}

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

header {
    background: white;
    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;
}

.username-display {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.user-avatar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: #ddd;
}

.notification-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    animation: pulse 2s infinite;
    z-index: 1000;
    transition: all 0.3s ease;
}

.notification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.6);
}

.notification-badge .badge-label {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.toolbar {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

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

a.btn-secondary {
    text-decoration: none;
}

a.btn-secondary:hover {
    text-decoration: none;
}

.btn-search {
    background: #4CAF50;
    color: white;
    padding: 10px 15px;
}

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    width: 250px;
}

select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #495057 !important;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select option {
    color: #495057 !important;
    background: white;
}

/* 确保分类筛选器和分页选择器的样式 */
#categoryFilter,
#pageSizeSelect {
    color: #495057 !important;
    background-color: white !important;
}

#categoryFilter option,
#pageSizeSelect option {
    color: #495057 !important;
    background-color: white !important;
}

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

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

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

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

.stat-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.clickable:active {
    transform: translateY(-2px);
}

.stat-card.active {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.5), 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.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-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.todo-list {
    display: grid;
    gap: 15px;
}

.todo-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.todo-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.todo-item.priority-high {
    border-left-color: #ff4757;
    background: #fff5f5;
}

.todo-item.priority-medium {
    border-left-color: #ffa502;
    background: #fffbf5;
}

.todo-item.priority-low {
    border-left-color: #2ed573;
    background: #f5fff5;
}

.todo-item.completed {
    opacity: 0.7;
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.todo-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: #999;
}

.todo-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-priority {
    background: #667eea;
    color: white;
}

.badge-priority.high {
    background: #ff4757;
}

.badge-priority.medium {
    background: #ffa502;
}

.badge-priority.low {
    background: #2ed573;
}

.badge-status {
    background: #6c757d;
    color: white;
}

.badge-status.pending {
    background: #e74c3c;
}

.badge-status.in_progress {
    background: #3498db;
}

.badge-status.completed {
    background: #2ecc71;
}

.todo-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; /* 保留换行符和空格，并自动换行 */
}

.todo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* 待办事项图片列表，样式与工单图片保持一致 */
.ticket-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ticket-image {
    max-width: 120px;
    max-height: 150px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #dee2e6;
    transition: transform 0.2s ease;
}

.ticket-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.todo-date {
    font-size: 13px;
    color: #868e96;
    display: flex;
    align-items: center;
    gap: 5px;
}

.todo-date.overdue {
    color: #ff4757;
    font-weight: 600;
}

.todo-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.edit {
    background: #3498db;
    color: white;
}

.action-btn.delete {
    background: #e74c3c;
    color: white;
}

.action-btn.complete {
    background: #2ecc71;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 30px auto;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    font-size: 22px;
}

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

.toggle-fields-btn {
    background: #667eea;
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.toggle-fields-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.toggle-fields-btn.active {
    background: #28a745;
}

.close {
    color: #adb5bd;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #495057;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #999;
}

.form-group select option {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.error-message {
    background-color: #fee;
    color: #c33;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid #fcc;
    display: block;
}

.required {
    color: #ff4757;
}

.hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #868e96;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

/* 右下角小通知窗口 */
.reminder-toast {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    animation: slideInRight 0.4s ease;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon {
    font-size: 24px;
    animation: ring 2s infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-15deg); }
    20%, 40% { transform: rotate(15deg); }
}

.toast-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.close-toast {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-toast:hover {
    opacity: 1;
}

.toast-body {
    padding: 20px;
    color: #333;
}

.toast-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.toast-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-toast-small {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-toast-small:hover {
    background: #e9ecef;
}

.btn-toast-primary {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-toast-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 分页样式（与客户管理保持一致） */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 40px;
    margin-right: 8px;
}

.pagination-btn:last-child {
    margin-right: 0;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #343a40;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.45);
}

.pagination-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.pagination-ellipsis {
    color: #adb5bd;
    font-size: 14px;
}

/* 图片查看模态框（与工单页面保持一致） */
.image-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.image-modal-info {
    text-align: center;
    color: white;
    margin-top: 15px;
    font-size: 16px;
}

.image-modal-close {
    position: absolute;
    right: 30px;
    top: 20px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.image-modal-close:hover {
    color: #ff6b81;
}

.image-modal-prev,
.image-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 60px;
    cursor: pointer;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.image-modal-prev {
    left: 20px;
}

.image-modal-next {
    right: 20px;
}

.image-modal-prev:hover,
.image-modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.image-modal-prev:active,
.image-modal-next:active {
    transform: translateY(-50%) scale(0.97);
}

/* 操作成功提醒窗口 */
.success-toast {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 30px;
    min-width: 200px;
    max-width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 3001;
    animation: slideInRight 0.4s ease;
    overflow: hidden;
}

.success-toast-content {
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-icon {
    font-size: 24px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.success-toast.success .success-icon {
    background: #28a745;
    color: white;
}

.success-toast.info .success-icon {
    background: #17a2b8;
    color: white;
}

.success-toast.warning .success-icon {
    background: #ffc107;
    color: #333;
}

.success-toast.error .success-icon {
    background: #dc3545;
    color: white;
}

.success-message {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.success-toast.hiding {
    animation: slideOutRight 0.3s ease;
}

/* 待办事项图片上传区域样式（复用工单样式） */
.image-upload-container {
    margin-top: 15px;
}

.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.image-upload-area.drag-over {
    border-color: #667eea;
    background: #e8f0fe;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-placeholder span {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.upload-placeholder p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.upload-hint {
    font-size: 12px !important;
    color: #999 !important;
}

.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 待办列表中小缩略图样式 */
.todo-images {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.todo-image-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e5e7eb;
}

.todo-image-more {
    font-size: 12px;
    color: #6b7280;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.remove-image-btn:hover {
    background: rgba(220, 53, 69, 1);
}

/* 备份列表样式 */
.backup-item {
    transition: background-color 0.2s;
}

.backup-item:hover {
    background-color: #f0f0f0;
}

.backup-item.selected {
    background-color: #e7f3ff;
}

.backup-item.selected .backup-checkbox {
    border-color: #667eea;
    background-color: #667eea;
}

.backup-item.selected .backup-checkbox span {
    color: white;
}

/* 提醒详情大窗口 */
.reminder-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.reminder-content {
    background: white;
    margin: 80px auto;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.reminder-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reminder-header h2 {
    font-size: 22px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.reminder-body {
    padding: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.reminder-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.reminder-item.priority-high {
    border-left-color: #ff4757;
    background: #fff5f5;
}

.reminder-item.overdue {
    border-left-width: 6px;
    background: #fff0f0;
    border-left-color: #ff4757 !important;
}

.reminder-item.today {
    border-left-width: 6px;
    background: #fff9e6;
    border-left-color: #ffa502 !important;
}

.reminder-item.upcoming {
    background: #f8f9fa;
}

.reminder-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    background: #667eea;
    color: white;
}

.reminder-item.overdue .reminder-status-badge {
    background: #ff4757;
    animation: pulse-badge 2s infinite;
}

.reminder-item.today .reminder-status-badge {
    background: #ffa502;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.reminder-item h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.reminder-item p {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.reminder-meta {
    font-size: 13px;
    color: #868e96;
}

.reminder-footer {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #868e96;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #868e96;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state-text {
    font-size: 18px;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body.with-sidebar {
        padding: 0 15px;
    }
    
    body.with-sidebar .container {
        padding: 0;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
        margin-top: 15px;
        margin-bottom: 20px;
    }

    header h1 {
        font-size: 20px;
        width: 100%;
    }

    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .username-display {
        grid-column: 1 / -1;
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 0;
        padding: 8px;
    }

    .header-actions .btn,
    .header-actions a.btn {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
        text-align: center;
        display: flex;
        align-items: center;
        white-space: nowrap;
    }

    .toolbar {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .toolbar-left {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .filter-group select,
    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .todo-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .reminder-toast {
        width: 320px;
        right: 10px;
        bottom: 10px;
    }

    .fixed-notification-badge {
        top: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    /* 模态框移动端优化 */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 10px;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px 15px;
        max-height: calc(90vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 14px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
        position: sticky;
        bottom: 0;
        background: white;
        padding-top: 15px;
        border-top: 1px solid #e9ecef;
    }

    .form-actions .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    .close {
        font-size: 28px;
        line-height: 1;
    }

    /* 确保模态框在移动端可以滚动 */
    .modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 自定义确认对话框 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.confirm-dialog-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.confirm-dialog-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e9ecef;
}

.confirm-dialog-icon {
    font-size: 32px;
    line-height: 1;
}

.confirm-dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.confirm-dialog-body {
    padding: 24px;
}

.confirm-dialog-message {
    margin: 0;
    font-size: 16px;
    color: #495057;
    line-height: 1.6;
    white-space: pre-line;
}

.confirm-dialog-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.confirm-dialog-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-dialog-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.confirm-dialog-confirm {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-dialog-confirm:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

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

/* 响应式 - 移动端对话框 */
@media (max-width: 768px) {
    .confirm-dialog-content {
        width: 95%;
        max-width: none;
    }

    .confirm-dialog-footer {
        flex-direction: column-reverse;
    }

    .confirm-dialog-cancel,
    .confirm-dialog-confirm {
        width: 100%;
    }
}

/* 修改密码模态框样式 */
.password-modal {
    max-width: 500px;
    margin-top: 120px;
}

.password-modal .form-group {
    margin-bottom: 25px;
}

.password-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.password-modal .label-icon {
    font-size: 1.1em;
}

.password-modal .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    transition: all 0.3s;
    background: #f9f9f9;
}

.password-modal .form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-modal .form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #999;
}

.password-modal .error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #e74c3c;
    font-size: 0.9em;
}

.password-modal .modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.password-modal .modal-footer button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1em;
}

.password-modal .modal-footer .btn-secondary {
    background: #95a5a6;
}

.password-modal .modal-footer .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

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

.password-modal .modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.password-modal .modal-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .password-modal .modal-footer {
        flex-direction: column;
    }

    .password-modal .modal-footer button {
        width: 100%;
    }
}

