/* 活码管理系统 - 全局样式 */
:root {
    --hm-primary: #2b6cff;
    --hm-primary-dark: #1a55d8;
    --hm-success: #12b76a;
    --hm-warning: #f79009;
    --hm-danger: #f04438;
    --hm-body-bg: #f4f6fb;
    --hm-radius: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: var(--hm-body-bg);
    color: #1f2937;
}

a {
    text-decoration: none;
}

.navbar-hm {
    background: #fff;
    box-shadow: 0 1px 10px rgba(16, 24, 40, .06);
}

.navbar-hm .navbar-brand {
    font-weight: 700;
    color: #111827;
}

.navbar-hm .nav-link {
    color: #475467;
    font-weight: 500;
}

.navbar-hm .nav-link.active,
.navbar-hm .nav-link:hover {
    color: var(--hm-primary);
}

.hm-hero {
    background: linear-gradient(135deg, #2b6cff 0%, #6a5cff 55%, #9333ea 100%);
    color: #fff;
    padding: 56px 0 72px;
}

.hm-hero h1 {
    font-weight: 800;
    letter-spacing: -.5px;
}

.hm-hero .lead {
    color: rgba(255, 255, 255, .88);
}

.hm-hero-card {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--hm-radius);
    padding: 18px 20px;
    color: #fff;
}

.hm-section {
    padding: 56px 0;
}

.hm-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--hm-radius);
    box-shadow: 0 4px 18px rgba(16, 24, 40, .05);
}

.hm-card .card-header {
    background: #fff;
    border-bottom: 1px solid #f0f2f6;
    font-weight: 600;
    padding: 14px 18px;
}

.hm-stat {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--hm-radius);
    padding: 16px 18px;
    height: 100%;
}

.hm-stat .hm-stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.hm-stat .hm-stat-label {
    color: #667085;
    font-size: 13px;
}

.hm-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.hm-scan-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 14px;
    background: #f4f6fb;
}

.hm-scan-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(16, 24, 40, .10);
    padding: 26px 20px 30px;
    text-align: center;
}

.hm-scan-img {
    width: 100%;
    max-width: 330px;
    border-radius: 12px;
    border: 1px solid #eef0f4;
}

.hm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2ff;
}

.member-side {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: var(--hm-radius);
    overflow: hidden;
}

.member-side .nav-link {
    color: #475467;
    padding: 12px 18px;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.member-side .nav-link.active {
    color: var(--hm-primary);
    background: #f5f8ff;
    border-left-color: var(--hm-primary);
}

.manage-body {
    background: #f4f6fb;
}

.manage-side {
    background: #111827;
    min-height: 100vh;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.manage-side .brand {
    color: #fff;
    font-weight: 700;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: block;
}

.manage-side .nav-link {
    color: #9ca3af;
    padding: 11px 20px;
    font-size: 14px;
}

.manage-side .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.manage-side .nav-link.active {
    color: #fff;
    background: var(--hm-primary);
}

.manage-side .nav-group {
    color: #6b7280;
    font-size: 12px;
    padding: 14px 20px 6px;
    letter-spacing: 1px;
}

.manage-main {
    margin-left: 220px;
    min-height: 100vh;
}

.manage-top {
    background: #fff;
    border-bottom: 1px solid #eef0f4;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.manage-content {
    padding: 20px;
}

.table-hm thead th {
    background: #fafbfc;
    color: #667085;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.table-hm td {
    vertical-align: middle;
    font-size: 14px;
}

.hm-qr-preview {
    background: #fff;
    border: 1px dashed #d0d5dd;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.text-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hm-code-keyword {
    background: #f2f4f7;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    color: #344054;
}

.hm-footer {
    color: #98a2b3;
    font-size: 13px;
    text-align: center;
    padding: 26px 12px 34px;
}

.hm-empty {
    text-align: center;
    color: #98a2b3;
    padding: 50px 10px;
}

.hm-empty i {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.progress {
    background: #eef2f7;
    height: 8px;
}

@media (max-width: 991.98px) {
    .manage-side {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .manage-main {
        margin-left: 0;
    }

    .hm-hero {
        padding: 36px 0 46px;
    }
}

/* ---------------- 后台统计卡片 ---------------- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 12px;
    padding: 16px;
    height: 100%;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: 0 0 auto;
}

.stat-card .stat-body {
    flex: 1 1 auto;
    min-width: 0;
}

.stat-card .stat-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #98a2b3;
}

.stat-card .stat-extra {
    font-size: 12px;
    color: #98a2b3;
    text-align: right;
    white-space: nowrap;
}

/* ---------------- 后台开关 / 标签页 ---------------- */
.hm-switch-box {
    background: #fafbfc;
    border: 1px solid #eef0f4;
    border-radius: 10px;
    padding: 14px 14px 6px;
    height: 100%;
}

.hm-switch-box .form-check {
    padding-left: 3.2em;
}

.hm-tabs {
    border-bottom: 0;
}

.hm-tabs .nav-link {
    color: #667085;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 13px 10px;
    font-size: 14px;
}

.hm-tabs .nav-link:hover {
    color: var(--hm-primary);
    border-bottom-color: #dbe4f5;
}

.hm-tabs .nav-link.active {
    color: var(--hm-primary);
    background: transparent;
    border-bottom-color: var(--hm-primary);
    font-weight: 600;
}

.manage-content .hm-card .card-footer {
    background: #fff;
    border-top: 1px solid #eef0f4;
}

/* ---------------- 移动端：后台侧栏横向滚动 ---------------- */
@media (max-width: 991.98px) {
    .manage-side {
        position: static;
        width: 100%;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .manage-side .brand {
        padding: 14px 16px;
        font-size: 15px;
    }

    .manage-side nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 6px 8px 10px;
    }

    .manage-side .nav-group {
        display: none;
    }

    .manage-side .nav-link {
        white-space: nowrap;
        border-radius: 8px;
        padding: 8px 12px;
        flex: 0 0 auto;
    }

    .manage-main {
        margin-left: 0;
    }

    .manage-content {
        padding: 14px;
    }

    .stat-card {
        padding: 12px;
        gap: 10px;
    }

    .stat-card .stat-num {
        font-size: 20px;
    }

    .stat-card .stat-extra {
        display: none;
    }

    .hm-tabs .nav-link {
        padding: 10px 6px;
        font-size: 13px;
    }
}
