:root {
    --primary-color: #4285F4;
    --primary-hover: #3367d6;
    --secondary-color: #f8f9fa;
    --text-color: #202124;
    --muted-color: #70757a;
    --border-color: #dadce0;
    --sidebar-width: 240px;
    --header-height: 64px;
    --transition-speed: 0.3s;
}

/* 全局样式 */
body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--secondary-color);
    transition: all var(--transition-speed) ease;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 30px;
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    /* transform: translateY(-4px); */
    /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); */
}

/* 导航侧边栏 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-collapsed {
    width: 70px;
}

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

.sidebar-brand {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.sidebar-toggle {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: var(--muted-color);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-item {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-item:hover, .sidebar-item.active {
    background-color: rgba(66, 133, 244, 0.1);
    color: var(--primary-color);
}

.sidebar-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-collapsed .sidebar-text {
    display: none;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all var(--transition-speed) ease;
    min-height: 100vh;
}

.sidebar-collapsed + .main-content {
    margin-left: 70px;
}

.main-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.data-table tr:hover td {
    background-color: rgba(66, 133, 244, 0.05);
}

/* 登录页面 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-width: 80px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* 页面切换动画 */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fade-exit {
    opacity: 1;
}

.fade-exit-active {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 响应式布局 */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        width: 240px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar-collapsed + .main-content {
        margin-left: 0;
    }
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 2rem auto;
    border: 4px solid rgba(66, 133, 244, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 通知提示 */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    min-width: 250px;
    padding: 1rem;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 4px solid #4CAF50;
}

.toast-error {
    border-left: 4px solid #F44336;
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

.toast-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

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