:root {
    --primary: #006EFF;
    --secondary: #00C4FF;
    --dark: #001529;
    --light: #F5F7FA;
    --accent: #14C9C9;
    --warning: #FFAA00;
    --danger: #FF3B30;
    --text-primary: #1F2329;
    --text-secondary: #646A73;
    --border: #E1E6EB;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 侧边栏样式 - 默认隐藏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -260px;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.show {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    width: 36px;
    height: 36px;
    margin-right: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.logo-text .project-name {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

.toggle-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px;
    border-radius: 4px;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
}

.menu-icon {
    font-size: 20px;
    width: 24px;
    margin-right: 16px;
    text-align: center;
}

.menu-text {
    font-size: 16px;
    font-weight: 500;
}

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

.sidebar.show ~ .main-content {
    margin-left: var(--sidebar-width);
}

/* 顶部导航栏 */
.td-header {
    background: var(--dark);
    color: white;
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-right: 20px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.header-title:hover {
    transform: scale(1.05);
}

.td-search {
    width: 320px;
    margin-left: auto;
    position: relative;
}

.search-input {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0 36px 0 12px;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
}

.user-actions {
    display: flex;
    align-items: center;
    margin-left: 24px;
}

.action-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 8px;
}

.action-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 用户下拉菜单样式 */
#user-profile {
    position: relative;
    cursor: pointer;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 160px;
    display: none;
    z-index: 1000;
}

#user-profile:hover .user-dropdown {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(0, 110, 255, 0.05);
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

/* 用户名显示 */
.username-display {
    font-size: 14px;
    color: white;
    margin-right: 10px;
    display: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .td-search {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .td-header {
        padding: 0 16px;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .td-search {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .td-header {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }
    
    .menu-toggle {
        margin-right: 10px;
    }
    
    .header-title {
        font-size: 14px;
        margin-right: 10px;
    }
    
    .td-search {
        width: 100%;
        order: 3;
        margin-top: 10px;
    }
    
    .user-actions {
        margin-left: auto;
    }
    
    .main-content {
        padding-top: calc(var(--header-height) + 10px);
    }
}