:root {
    --sidebar-width: 280px;
    --primary-color: #6366f1; /* Indigo 500 */
    --primary-hover: #4f46e5;
    --sidebar-bg: #0f172a; /* Slate 900 */
    --sidebar-hover: #1e293b; /* Slate 800 */
    --bg-color: #f1f5f9; /* Slate 100 */
    --text-main: #334155;
    --text-muted: #64748b;
    --card-radius: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* 登录页样式优化 */
.login-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    top: -50%;
    left: -50%;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 3rem;
    position: relative;
    z-index: 10;
}

/* 侧边栏布局 */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand i {
    color: #818cf8;
}

.sidebar-nav {
    padding: 1.5rem 0.75rem;
    flex: 1;
}

.nav-item {
    padding: 0.8rem 1.25rem;
    margin-bottom: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #94a3b8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
    color: #f1f5f9;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    border: none; /* remove legacy border-right */
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1em;
}

.user-panel {
    padding: 1.5rem;
    margin: 0 1rem 1rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* 主内容区域 */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2.5rem;
    max-width: 1600px;
}

/* 卡片样式优化 */
.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.card-header {
    background: white;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 1.75rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 1.05rem;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

.card-body {
    padding: 1.75rem;
}

/* 表格优化 */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 0.05em;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 1rem 1rem;
    border-top: none;
}

.table td {
    vertical-align: middle;
    color: #334155;
    padding: 1rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

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

/* 按钮优化 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.4);
}

/* 输入框优化 */
.form-control, .form-select, .input-group-text {
    border-radius: 8px;
    border-color: #e2e8f0;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-group-text {
    border-right: none;
    background-color: #f8fafc;
    color: #64748b;
}

.input-group .form-control:not(:first-child) {
    border-left: 1px solid #e2e8f0;
}

/* 状态标签 */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

.bg-success { background-color: #10b981 !important; }
.bg-info { background-color: #0ea5e9 !important; }
.bg-warning { background-color: #f59e0b !important; }
.bg-danger { background-color: #ef4444 !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.text-primary { color: var(--primary-color) !important; }

[v-cloak] { display: none; }

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

