/* ========== 全局 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; background: #f0f2f5; }

/* ========== 登录页 ========== */
.login-wrapper {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    width: 420px; background: #fff; border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
}
.login-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 36px 40px 28px; text-align: center;
}
.login-header h2 { color: #fff; font-size: 24px; font-weight: 600; letter-spacing: 2px; }
.login-header p { color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 8px; }
.login-body { padding: 36px 40px 40px; }
.login-body .layui-form-item { margin-bottom: 24px; }
.login-body .layui-input {
    height: 46px; border-radius: 8px; padding-left: 16px; font-size: 14px;
    border: 1px solid #dcdfe6; transition: border-color 0.3s;
}
.login-body .layui-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.15); }
.login-btn {
    width: 100%; height: 46px; border-radius: 8px; font-size: 16px; font-weight: 600;
    letter-spacing: 4px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none; color: #fff; cursor: pointer; transition: opacity 0.3s;
}
.login-btn:hover { opacity: 0.9; }

/* ========== 后台布局 - 侧边栏 ========== */
.admin-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 220px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff; z-index: 1000; overflow-y: auto;
}
.sidebar-logo {
    padding: 28px 20px 24px; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo h3 { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 3px; }
.sidebar-logo span { font-size: 11px; color: rgba(255,255,255,0.35); display: block; margin-top: 6px; }
.sidebar-menu { padding: 12px 0; }
.sidebar-menu a {
    display: flex; align-items: center; padding: 15px 28px;
    color: rgba(255,255,255,0.6); text-decoration: none; font-size: 14px;
    transition: all 0.25s; border-left: 3px solid transparent;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.07); color: #fff; border-left-color: #667eea;
}
.sidebar-menu a i { margin-right: 14px; font-size: 18px; width: 20px; text-align: center; }

/* 侧边栏子菜单 */
.sidebar-group-title {
    position: relative;
}
.sidebar-group-title .sub-arrow {
    position: absolute; right: 20px; font-size: 12px;
    transition: transform 0.3s; margin-right: 0; width: auto;
}
.sidebar-group.open .sidebar-group-title .sub-arrow { transform: rotate(180deg); }
.sidebar-sub {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
}
.sidebar-group.open .sidebar-sub { max-height: 200px; }
.sidebar-sub a {
    padding: 12px 28px 12px 62px; font-size: 13px;
    border-left: 3px solid transparent;
}
.sidebar-sub a::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,0.3); display: inline-block;
    margin-right: 10px; vertical-align: middle;
}
.sidebar-sub a.active::before { background: #667eea; }
.sidebar-sub a.active { color: #fff; background: rgba(255,255,255,0.05); border-left-color: #667eea; }

/* ========== 后台布局 - 主内容区 ========== */
.admin-main { margin-left: 220px; min-height: 100vh; background: #f0f2f5; }
.admin-header {
    height: 60px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; position: sticky; top: 0; z-index: 100;
}
.admin-header .welcome { font-size: 14px; color: #666; }
.admin-header .welcome strong { color: #1a1a2e; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
.logout-btn {
    padding: 7px 18px; background: linear-gradient(135deg, #ff5722, #ff9800);
    color: #fff; border: none; border-radius: 6px; cursor: pointer;
    font-size: 13px; font-weight: 500; transition: opacity 0.3s;
}
.logout-btn:hover { opacity: 0.85; }
.admin-content { padding: 28px; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .login-box { width: 90%; margin: 0 16px; }
}
