/* style.css 优化版 */
:root {
    --primary: #165DFF;
    --primary-light: #36BFFA;
    --secondary: #0FC6C2;
    --dark: #1D2129;
    --gray: #4E5969;
    --light-gray: #C9CDD4;
    --bg-light: #F5F7FA;
    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.header {
    background: red;   /* 直接写 red */
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
}

.header-content {
    position: relative;
    z-index: 1;
}

.sidebar-container {
    position: fixed;
    left: 0;
    top: 70px;
    width: 260px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
}

.content {
    margin-left: 260px;
    padding: 1.5rem;
    min-height: 100vh;
}

.menu-title {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.menu-item,
.submenu-item {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.menu-item:hover,
.submenu-item:hover {
    background-color: rgba(22, 93, 255, 0.05);
    color: var(--primary);
}

.menu-item.active {
    background-color: rgba(22, 93, 255, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.content-section {
    padding: 1.5rem;
    margin-top: 1.2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.content-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.qrcode-container img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:hover td {
    background-color: rgba(22, 93, 255, 0.03);
}

/* 手机端优化 */
@media (max-width: 768px) {
    .sidebar-container {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 1rem;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .qrcode-container img {
        max-width: 100%;
        height: auto;
    }
}
