/* main.css —— 由原单页样式迁移，未改动视觉表现 */
:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-lighter: #EFF6FF;
    --accent-orange: #F57C00;
    --accent-orange-light: #FFF3E0;
    --accent-blue: #1565C0;
    --accent-blue-light: #E3F2FD;
    --accent-purple: #6A1B9A;
    --accent-purple-light: #F3E5F5;
    --bg-warm: #FAFAF8;
    --bg-white: #FFFFFF;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-sm: 6px;
    --sidebar-width: 220px;
    --topbar-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-warm);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
}

.app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 10px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary-lighter);
    color: var(--primary);
    font-weight: 600;
}

.nav-item i {
    width: 22px;
    font-size: 16px;
    margin-right: 12px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.current-date {
    color: var(--text-secondary);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.search-box {
    position: relative;
}

.search-box input {
    width: 240px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0 16px 0 36px;
    background: var(--bg-warm);
    font-size: 13px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-light);
    background: var(--bg-white);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.2s;
}

.topbar-icon:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--accent-orange);
    border-radius: 50%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.user-info:hover {
    background: var(--border-light);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-danger {
    background: #DC2626;
    color: white;
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
}

/* ---------------- 用户管理 ---------------- */
.user-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.user-table .user-actions-cell {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.user-table .user-actions-cell .text-muted {
    white-space: nowrap;
}

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

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.user-username {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 行内状态/标签徽章 */
.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: var(--border-light);
    color: var(--text-secondary);
    white-space: nowrap;
}

.badge-pill--primary {
    background: var(--primary-lighter);
    color: var(--primary);
}

.badge-pill--success {
    background: rgba(22, 163, 74, .12);
    color: #16A34A;
}

.badge-pill--muted {
    background: var(--border-light);
    color: var(--text-secondary);
}

.badge-pill--warn {
    background: rgba(245, 124, 0, .14);
    color: #F57C00;
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted, #9aa3af);
    font-size: 12px;
}

.form-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.table-wrap {
    overflow-x: auto;
}

/* 深色下徽章颜色微调 */
[data-theme="dark"] .badge-pill--success {
    background: rgba(34, 197, 94, .18);
    color: #4ADE80;
}

[data-theme="dark"] .badge-pill--warn {
    background: rgba(251, 146, 60, .18);
    color: #FB923C;
}

[data-theme="dark"] .badge-pill--primary {
    background: rgba(96, 165, 250, .18);
    color: #93C5FD;
}

/* Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 24px 24px;
}

.content > .page > *:last-child {
    margin-bottom: 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Cards */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary);
}

/* KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Quick entries */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.quick-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.quick-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
    background: var(--primary-lighter);
    color: var(--primary);
}

.quick-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-left, .dashboard-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 首页左右两栏卡片等高对齐 */
.dashboard-left > .card,
.dashboard-right > .card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.dashboard-left > .card > .task-list,
.dashboard-right > .card > .project-grid {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

/* Task list */
.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.task-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.task-tags {
    display: flex;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-priority-紧急 { background: #FEE2E2; color: #991B1B; }
.tag-priority-高 { background: #FFEDD5; color: #9A3412; }
.tag-priority-中 { background: #FEF3C7; color: #92400E; }
.tag-priority-低 { background: #E5E7EB; color: #374151; }

.tag-status-待开始 { background: #F3F4F6; color: #374151; }
.tag-status-进行中 { background: #DBEAFE; color: #1E40AF; }
.tag-status-待确认 { background: #FEF3C7; color: #92400E; }
.tag-status-已完成 { background: var(--primary-lighter); color: var(--primary); }
.tag-status-已延期 { background: #FEE2E2; color: #991B1B; }
.tag-status-已取消 { background: #E5E7EB; color: #6B7280; }

.tag-type-分析报告 { background: var(--accent-blue-light); color: var(--accent-blue); }
.tag-type-项目推进 { background: var(--primary-lighter); color: var(--primary); }
.tag-type-流程优化 { background: var(--accent-orange-light); color: var(--accent-orange); }
.tag-type-团队协作 { background: var(--accent-purple-light); color: var(--accent-purple); }
.tag-type-问题解决 { background: #FFEBEE; color: #C62828; }
.tag-type-成本优化 { background: var(--primary-lighter); color: var(--primary); }
.tag-type-效率提升 { background: #FFF8E1; color: #F9A825; }
.tag-type-培训分享 { background: #F3E5F5; color: #6A1B9A; }
.tag-type-学习成长 { background: #E0F2F1; color: #00796B; }

.task-actions {
    display: flex;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.2s;
}

@media (hover: hover) {
    .task-actions {
        opacity: 0;
    }

    .task-item:hover .task-actions {
        opacity: 1;
    }
}

.icon-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--border-light);
    color: var(--primary);
}

.icon-btn.delete:hover {
    background: #FEE2E2;
    color: #DC2626;
}

/* Progress */
.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Project cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.project-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    min-width: 0;
}

.project-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-owner {
    font-size: 12px;
    color: var(--text-secondary);
}

.project-progress {
    margin-bottom: 12px;
}

.project-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
}

.project-meta-item {
    color: var(--text-secondary);
}

.project-meta-item span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg-warm);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
}

.data-table tbody tr:hover {
    background: var(--bg-warm);
}

.data-table td {
    font-size: 13px;
}

/* Filters */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    background: var(--bg-white);
    font-size: 13px;
    outline: none;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--primary-light);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
}

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

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--border-light);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

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

.form-grid > .form-group {
    margin-bottom: 0;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary-light);
}

textarea.form-control {
    height: auto;
    padding: 10px 12px;
    min-height: 80px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.form-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

/* Achievement flow */
.achievement-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.flow-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.flow-step-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.flow-arrow {
    color: var(--primary);
    font-size: 16px;
}

/* Report */
.report-section {
    margin-bottom: 20px;
}

.report-section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.report-list {
    list-style: none;
}

.report-list li {
    padding: 6px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 16px;
}

.report-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.report-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
}

/* Chart containers */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.chart-container {
    width: 100%;
    height: 300px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Stats summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stats-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.stats-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stats-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Settings */
.settings-section {
    margin-bottom: 24px;
}

.settings-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.settings-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.settings-card i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}

.settings-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.settings-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Risk badge */
.risk-high { background: #FEE2E2; color: #991B1B; }
.risk-medium { background: #FEF3C7; color: #92400E; }
.risk-low { background: var(--primary-lighter); color: var(--primary); }

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.tab {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 2000;
}

.toast.show {
    display: flex;
}

/* Print */
@media print {
    body { overflow: visible !important; }
    .app { height: auto !important; display: block !important; }
    .content { overflow: visible !important; height: auto !important; padding: 0; }
    .sidebar, .topbar, .page:not(.active), .modal-overlay, .toast, .app-loading { display: none !important; }
    .main { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .report-textarea { border: none; height: auto; }
}

/* Responsive */
@media (max-width: 1440px) {
    .stats-summary { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
    .stats-summary { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .search-box input { width: 180px; }
}

@media (max-width: 1024px) {
    .sidebar { width: 64px; }
    .sidebar-title, .nav-item span, .sidebar-footer { display: none; }
    .nav-item { justify-content: center; padding: 12px; margin: 0 8px 4px; }
    .nav-item i { margin-right: 0; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
