:root {
    --bg-dark: #0a0e17;
    --cyan: #00e5ff;
    --purple: #7c4dff;
    --pink: #ff6ec7;
    --orange: #ffb347;
}
body {
    background: var(--bg-dark);
    color: #e0e6ed;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}
.text-cyan { color: var(--cyan) !important; }
.text-purple { color: var(--purple) !important; }
.text-pink { color: var(--pink) !important; }
.text-orange { color: var(--orange) !important; }
.text-light-50 { color: rgba(255,255,255,0.7); }

.btn-glow {
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,229,255,0.3);
}
.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,229,255,0.5);
    color: #fff;
}
.btn-glow.btn-sm { padding: 0.4rem 1.2rem; font-size: 0.9rem; }
.btn-glow.btn-lg { padding: 0.8rem 2.5rem; font-size: 1.2rem; }

.btn-filter {
    background: rgba(255,255,255,0.05);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
    border-radius: 30px;
    padding: 0.4rem 1.2rem;
    margin: 0 0.2rem;
}
.btn-filter:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-filter.active {
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0,229,255,0.3);
}

.card {
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.navbar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    transition: 0.2s;
    font-weight: 500;
}
.navbar .nav-link:hover { color: #00e5ff !important; }

.table-dark { --bs-table-bg: #121a2a; }

footer { background: #0a0e17; }

/* ===== 前台左侧导航（登录后） ===== */
.front-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #0d1b2a;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 1.2rem 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease;
    overflow-y: auto;        /* 内容过多可滚动 */
    box-sizing: border-box;  /* 确保内边距不撑大宽度 */
}

.front-sidebar .sidebar-brand {
    text-align: center;
    padding: 0.5rem 0 1rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}
.front-sidebar .sidebar-brand i {
    background: linear-gradient(135deg, #00e5ff, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
}
.front-sidebar .sidebar-brand span {
    display: block;
    margin-top: 0.2rem;
}
.front-sidebar hr {
    margin: 0.5rem 1rem;
    border-color: rgba(255,255,255,0.08);
}
.front-sidebar .nav {
    flex: 1;
    padding: 0 0.8rem;
}
.front-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.2rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.front-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}
.front-sidebar .nav-link.active {
    background: rgba(0,229,255,0.15);
    color: #00e5ff;
    border-left: 3px solid #00e5ff;
}
.front-sidebar .nav-link i {
    font-size: 1.2rem;
    width: 1.8rem;
    text-align: center;
}
.front-sidebar .sidebar-footer {
    text-align: center;
    padding: 1rem 0;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---- 主内容区 ---- */
.front-main {
    margin-left: 240px;        /* 必须等于侧边栏宽度 */
    min-height: 100vh;
    background: #0a0e17;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.front-topbar {
    background: rgba(10,14,23,0.9);
    backdrop-filter: blur(8px);
    padding: 0.8rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 1040;
    width: 100%;               /* 确保占满 */
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;           /* 小屏换行 */
    gap: 0.5rem;
}

.front-topbar .text-cyan { color: #00e5ff; }
.front-topbar .text-light { color: rgba(255,255,255,0.7) !important; text-decoration: none; }
.front-topbar .text-light:hover { color: #fff !important; }

.front-content {
    padding: 1.5rem 2rem 2rem;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .front-sidebar {
        transform: translateX(-100%);
        width: 280px;          /* 稍宽，方便触控 */
    }
    .front-sidebar.show {
        transform: translateX(0);
    }
    .front-main {
        margin-left: 0;
    }
    .front-topbar {
        padding: 0.6rem 1rem;
    }
    .front-content {
        padding: 1rem 1rem 2rem;
    }
}