/* 全局重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 登录页面专属样式 */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
}

.login-container {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px 40px;
    width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 2rem;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-header p {
    color: #64748b;
    margin-top: 8px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border 0.2s;
    background: #f8fafc;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #fff;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #0f172a;
}

.error-msg {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

/* 主框架布局 */
.sidebar {
    width: 270px;
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    z-index: 10;
    transition: width 0.2s;
}

.sidebar-header {
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-group {
    margin-bottom: 5px;
}

.nav-group-title {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #cbd5e1;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.nav-group-title:hover {
    background: rgba(255,255,255,0.05);
}

.nav-icon {
    margin-right: 12px;
    font-size: 1.1rem;
}

.arrow {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.nav-group.open .arrow {
    transform: rotate(180deg);
}

.nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.open .nav-sub {
    max-height: 500px;
}

.nav-sub-item {
    display: block;
    padding: 10px 25px 10px 60px;
    color: #94a3b8;
    font-size: 0.95rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.nav-sub-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-sub-item.active {
    color: #fff;
    background: rgba(59,130,246,0.2);
    border-left-color: #3b82f6;
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    margin-left: 270px;
    flex: 1;
    padding: 30px;
    background: #f8fafc;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.page-header h2 {
    font-size: 1.8rem;
    color: #0f172a;
    font-weight: 600;
}

.placeholder-content {
    background: #fff;
    border-radius: 16px;
    padding: 50px;
    text-align: center;
    color: #64748b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.placeholder-content .icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.placeholder-content p {
    font-size: 1.1rem;
}

/* 响应式处理：移动端隐藏侧边栏（可选） */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
        padding: 20px;
    }
}