:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #dbeafe;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --success: #10b981;
    --success-hover: #059669;
    --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;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 侧边栏样式 */
.sidebar {
    width: 5rem;
    background-color: white;
    border-right: 1px solid var(--gray-200);
    transition: width 0.3s ease;
    z-index: 20;
}

.sidebar.expanded {
    width: 16rem;
}

.logo-container {
    position: relative;
}

.sidebar-divider {
    position: absolute;
    bottom: 0;
    width: 2rem;
    height: 1px;
    background-color: var(--gray-200);
    transition: width 0.3s ease;
}

.sidebar.expanded .sidebar-divider {
    width: 10rem;
}

.system-name {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.expanded .system-name {
    opacity: 1;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.5rem;
    background-color: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item-text {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar.expanded .nav-item {
    justify-content: flex-start;
    padding-left: 2rem;
}

.sidebar.expanded .nav-item-text {
    display: block;
    opacity: 1;
    margin-left: 1rem;
}

/* 主内容区域 */
.main-content {
    transition: margin-left 0.3s ease;
}

/* 表单元素 */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--gray-700);
    background-color: white;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

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

.form-checkbox {
    border-radius: 0.25rem;
    border: 1px solid var(--gray-300);
}

/* 按钮样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: var(--primary);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--gray-900);
    border-color: var(--gray-400);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: var(--danger);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
}

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

.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background-color: var(--warning);
    border: 1px solid transparent;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
}

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

/* 小按钮样式 */
.btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-sm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-blue {
    color: white;
    background-color: var(--primary);
    border: 1px solid transparent;
}

.btn-blue:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-yellow {
    color: white;
    background-color: var(--warning);
    border: 1px solid transparent;
}

.btn-yellow:hover:not(:disabled) {
    background-color: var(--warning-hover);
}

.btn-red {
    color: white;
    background-color: var(--danger);
    border: 1px solid transparent;
}

.btn-red:hover:not(:disabled) {
    background-color: var(--danger-hover);
}

/* 批量操作工具栏样式 */
#batchOperationsBar {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease;
}

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

/* 文本颜色类 */
.text-primary {
    color: var(--primary);
}

/* 任务操作下拉菜单 */
.task-actions {
    position: relative;
}

.task-actions:hover > div {
    display: block;
}

/* 标签页样式 */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}