/* ============================================
   长兴亿企盈事项进度管理系统 - 商务风格UI
   ============================================ */

:root {
    --primary: #1a3a5c;
    --primary-light: #2d5a87;
    --primary-dark: #0f2540;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #2563eb;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #6366f1;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --sidebar-width: 240px;
    --header-height: 56px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* === 布局 === */
#app {
    display: flex;
    min-height: 100vh;
}

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.menu-toggle:hover { background: rgba(255,255,255,0.15); }

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

.logo-icon {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.user-info:hover { background: rgba(255,255,255,0.1); }

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-detail {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; opacity: 0.8; }
.user-role.admin { color: #fbbf24; }

/* === 侧边栏 === */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
}
.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}
.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(26,58,92,0.3);
}
.nav-item svg { flex-shrink: 0; }

.nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 16px;
}

.sidebar-footer {
    padding: 12px 20px;
    font-size: 12px;
    color: var(--gray-400);
    border-top: 1px solid var(--gray-100);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
}

/* === 主内容区 === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 20px;
    min-height: calc(100vh - var(--header-height));
}

/* === 卡片 === */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

/* === 统计卡片 === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.stat-card.blue::before { background: var(--accent); }
.stat-card.green::before { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.red::before { background: var(--danger); }
.stat-card.gray::before { background: var(--gray-400); }

.stat-icon {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0.2;
}
.stat-card.blue .stat-icon { background: var(--accent); color: white; }
.stat-card.green .stat-icon { background: var(--success); color: white; }
.stat-card.orange .stat-icon { background: var(--warning); color: white; }
.stat-card.red .stat-icon { background: var(--danger); color: white; }
.stat-card.gray .stat-icon { background: var(--gray-400); color: white; }

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.stat-trend {
    font-size: 12px;
    margin-top: 6px;
    color: var(--gray-400);
}

/* === 表单 === */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

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

/* === 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(26,58,92,0.2);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: 0 4px 12px rgba(26,58,92,0.3);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { background: #059669; }

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover { background: #d97706; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--gray-50);
}

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

.btn-lg {
    padding: 12px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* === 项目类型选择器 === */
.project-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.type-card {
    position: relative;
    padding: 16px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: var(--white);
}

.type-card:hover {
    border-color: var(--accent-light);
    background: var(--gray-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.type-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(26,58,92,0.03) 0%, rgba(45,90,135,0.05) 100%);
    box-shadow: 0 4px 12px rgba(26,58,92,0.15);
}

.type-card.selected::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.type-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.type-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.type-card.selected .type-name {
    color: var(--primary);
}

/* === 子选项按钮组 === */
.option-group {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.option-group-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.opt-btn {
    padding: 8px 18px;
    border: 1.5px solid var(--gray-300);
    border-radius: 20px;
    background: var(--white);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
}

.opt-btn:hover {
    border-color: var(--accent-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.opt-btn.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(26,58,92,0.25);
}

.opt-btn.selected[data-value="pending"] {
    background: var(--gray-400);
    border-color: var(--gray-400);
}

/* === 时效选择 === */
.duration-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.duration-card {
    flex: 1;
    min-width: 100px;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
}

.duration-card:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.duration-card.selected {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
}

.duration-days {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.duration-label {
    font-size: 12px;
    margin-top: 4px;
    color: var(--gray-500);
}

.duration-card.selected .duration-label {
    color: var(--success);
}

/* === 进度条 === */
.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-track {
    flex: 1;
    height: 10px;
    background: var(--gray-200);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
    background: var(--accent);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* === 状态标签 === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.pending { background: var(--gray-100); color: var(--gray-500); }
.status-badge.handling { background: #dbeafe; color: var(--accent); }
.status-badge.reviewing { background: var(--warning-light); color: var(--warning); }
.status-badge.completed { background: var(--success-light); color: var(--success); }
.status-badge.terminated { background: var(--danger-light); color: var(--danger); }
.status-badge.overdue { background: #fce7e7; color: #dc2626; }

/* === 表格 === */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* === 项目卡片列表 === */
.project-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
    border-left: 4px solid var(--gray-300);
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.project-card.status-handling { border-left-color: var(--accent); }
.project-card.status-reviewing { border-left-color: var(--warning); }
.project-card.status-completed { border-left-color: var(--success); }
.project-card.status-terminated { border-left-color: var(--danger); }
.project-card.status-overdue { border-left-color: #dc2626; }

.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.project-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.project-serial {
    font-size: 12px;
    color: var(--gray-400);
    font-family: monospace;
}

.project-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--gray-500);
}

.project-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-info-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

/* === 任务清单 === */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
    background: var(--white);
}

.task-item:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.task-item.completed {
    background: var(--success-light);
    border-color: var(--success);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.task-checkbox.checked::after {
    content: '';
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.task-content {
    flex: 1;
}

.task-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-800);
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: var(--gray-500);
}

.task-desc {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-400);
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.task-status.done {
    background: var(--success-light);
    color: var(--success);
}

.task-status.undone {
    background: var(--gray-100);
    color: var(--gray-500);
}

.task-status.cannot {
    background: var(--danger-light);
    color: var(--danger);
}

.task-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* === 步骤指示器 === */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 20px 0;
}

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

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    background: var(--gray-200);
    color: var(--gray-500);
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(26,58,92,0.3);
}

.step.completed .step-circle {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
}

.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.completed .step-label { color: var(--success); }

.step-line {
    width: 60px;
    height: 2px;
    background: var(--gray-200);
    margin: 0 12px;
}

.step-line.completed {
    background: var(--success);
}

/* === 登录页 === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
}

.login-box {
    width: 400px;
    max-width: 90%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .logo-icon {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 18px;
    color: var(--gray-800);
    font-weight: 600;
}

.login-logo p {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 6px;
}

/* === Toast通知 === */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 350px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--accent); }

/* === 模态框 === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 480px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-600); }

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === 空状态 === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state .empty-text {
    font-size: 14px;
}

/* === 分页 === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    transition: var(--transition);
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === 图片上传区 === */
.image-paste-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.image-paste-area:hover {
    border-color: var(--accent);
    background: var(--gray-50);
}

.image-paste-area.dragover {
    border-color: var(--accent);
    background: rgba(59,130,246,0.05);
}

.paste-hint {
    font-size: 13px;
    color: var(--gray-400);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}

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

.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(239,68,68,0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === 微信群链接 === */
.wechat-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #07c160;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}
.wechat-link:hover { background: #06ad56; color: white; }

/* === 响应式 - 移动端/微信 === */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.open + .sidebar-overlay {
        display: block;
    }

    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 12px;
    }

    .logo-text {
        font-size: 14px;
    }

    .user-detail {
        display: none;
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 24px;
    }

    .project-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .duration-selector {
        flex-direction: column;
    }

    .duration-card {
        min-width: 100%;
    }

    .steps {
        flex-wrap: wrap;
        gap: 8px;
    }

    .step-line {
        width: 30px;
    }

    .project-info {
        flex-direction: column;
        gap: 6px;
    }

    .table-wrapper {
        font-size: 12px;
    }

    th, td {
        padding: 8px 10px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .card {
        padding: 14px;
    }

    .modal {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .project-type-selector {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   通知组件样式
   ============================================ */

/* 通知铃铛 */
.notif-bell {
    position: relative;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-bell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--primary);
}

/* 通知面板 */
.notif-panel {
    position: absolute;
    top: 60px;
    right: 16px;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.notif-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

.notif-panel-body {
    max-height: 400px;
    overflow-y: auto;
}

.notif-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--gray-100);
    text-align: center;
}

/* 通知项 */
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-50);
    transition: background 0.15s;
    cursor: default;
}

.notif-item:hover {
    background: var(--gray-50);
}

.notif-item.unread {
    background: #eff6ff;
}

.notif-item.todo {
    background: #fefbf3;
}

.notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.notif-item.todo .notif-icon {
    background: var(--warning-light);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.notif-desc {
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
}

.notif-link:hover {
    text-decoration: underline;
}

/* 状态徽章 - 终止审核中 */
.status-badge.terminate_pending {
    background: #f3e8ff;
    color: #7c3aed;
}

/* 通知面板响应式 */
@media (max-width: 480px) {
    .notif-panel {
        right: 8px;
        left: 8px;
        width: auto;
    }
}
