/* === 全局基础 === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

/* === 登录页面专用 === */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-top: 4px solid #0d6efd;
}

/* === 主工作台布局 === */
.layout-wrapper { display: flex; width: 100%; height: 100%; }

/* 侧边栏 */
#sidebar {
    width: 70px;
    background: #2c3e50;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    flex-shrink: 0;
    z-index: 100;
}
.nav-item {
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.2s ease;
}
.nav-item:hover, .nav-item.active {
    color: white;
    transform: translateY(-2px);
}
.nav-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
.nav-label { font-size: 0.7rem; display: block; opacity: 0.8; }

/* 主体区域 */
#main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

/* 顶部标签栏 */
#tab-bar {
    height: 42px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: flex-end;
    padding-left: 10px;
    overflow-x: auto;
    flex-shrink: 0;
}
.app-tab {
    padding: 6px 18px;
    background: #dcdcdc;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    user-select: none;
    transition: background 0.2s;
}
.app-tab.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    font-weight: 600;
    color: #2c3e50;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
}
.app-tab:hover:not(.active) { background: #e2e2e2; }
.tab-close {
    margin-left: 10px;
    font-size: 0.7rem;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.tab-close:hover { background: #ff6b6b; color: white; }

/* 内容视口 */
#viewport { flex-grow: 1; position: relative; background: #fff; overflow: hidden; }
.app-container { width: 100%; height: 100%; display: none; overflow-y: auto; }
.app-container.active { display: block; animation: fadeIn 0.2s ease-in-out; }

@keyframes fadeIn { from { opacity: 0.95; } to { opacity: 1; } }

/* 欢迎页 */
#welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #adb5bd;
}
