/* 基础重置和变量 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fb;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #111827;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    transition: all .3s ease;
    border-right: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
    z-index: 100;
}

.logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo i {
    font-size: 28px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.nav {
    flex: 1;
}
.nav ul {
    list-style: none;
}

.nav li {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    margin: 4px 10px;
    border-radius: 14px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-weight: 500;
    transition: all .2s ease;
    border-left: none;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}

.nav-link.active {
    background: rgba(59,130,246,0.18);
    color: #ffffff;
    position: relative;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.user-info i {
    font-size: 32px;
}

.btn-secondary {
    width: 100%;
    padding: 10px 18px;
    margin-top: 8px;
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.btn-secondary i {
    width: 20px;
    text-align: center;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.header-left h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-left p {
    color: var(--gray-color);
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 50px;
    padding: 10px 16px;
    gap: 10px;
    width: 300px;
}

.search-box i {
    color: var(--gray-color);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.notification {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--gray-color);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.page-header {
    margin-bottom: 30px;
}

.page-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray-color);
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.card-content h3 {
    font-size: 14px;
    color: var(--gray-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.card-content p {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

/* 图表 */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
}

.chart-container h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.chart-container canvas {
    width: 100% !important;
    height: 300px !important;
}

/* 表格 */
.recent-activity, .table-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
    overflow: auto;
}

.recent-activity h3, .table-container h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--light-gray);
}

table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--light-gray);
}

table td {
    padding: 16px;
    border-bottom: 1px solid var(--light-gray);
}

table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 表单 */
.form-container {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.required {
    color: var(--danger-color);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-small {
    padding: 6px 12px;
    background-color: var(--light-gray);
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-small:hover {
    background-color: #dde0e4;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a56d4;
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--dark-color);
    border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
    background-color: #dde0e4;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

/* 两栏布局 */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.column {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 24px;
}

.asset-select-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 16px;
}

.asset-item {
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.asset-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
    border-color: var(--primary-color);
}

.asset-item.selected {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary-color);
}

.asset-item .code {
    font-weight: 600;
    color: var(--primary-color);
}

.asset-item .name {
    font-size: 14px;
    color: var(--gray-color);
}

/* 结果容器 */
.result-container {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
}

#generated-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.code-badge {
    background-color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: monospace;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 表格控制 */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: 500;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    background-color: white;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    width: 200px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background-color: var(--light-gray);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background-color: var(--light-gray);
    border-bottom: 1px solid #ddd;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
}

.close-modal:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: var(--light-gray);
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 响应式设计 */

/* ===== 平板 (<=1024px) ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }

    .logo h1, .nav-link span, .user-info span, .btn-secondary span {
        display: none;
    }

    .logo {
        justify-content: center;
        padding: 20px 0;
    }

    .nav-link {
        justify-content: center;
        padding: 16px 0;
    }

    .sidebar-footer {
        padding: 20px 10px;
    }

    .header-right .search-box {
        width: 200px;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* ===== 手机 (<=768px) ===== */
@media (max-width: 768px) {

    /* 汉堡菜单按钮 */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--light-gray);
        border-radius: 8px;
        font-size: 18px;
        color: var(--dark-color);
        cursor: pointer;
        flex-shrink: 0;
        margin-right: 12px;
    }

    .menu-toggle:active {
        background: var(--light-gray);
        opacity: 0.7;
    }

    /* 侧边栏改为抽屉式 */
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 270px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        background: rgba(255,255,255,0.15);
        border-radius: 6px;
        color: white;
        font-size: 16px;
        cursor: pointer;
        margin-left: auto;
    }

    /* 遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.45);
        z-index: 999;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* 恢复侧边栏内容 */
    .logo h1, .nav-link span, .user-info span, .btn-secondary span {
        display: inline;
    }

    .logo {
        justify-content: flex-start;
        padding: 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav {
        padding: 10px 0;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 14px 20px;
        border-left: 4px solid transparent;
        border-bottom: none;
        font-size: 14px;
    }

    .nav-link.active {
        border-left-color: white;
        border-bottom-color: transparent;
    }

    .sidebar-footer {
        display: block;
        padding: 16px 20px;
    }

    /* 头部 */
    .header {
        padding: 12px 16px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0;
    }

    .header-left h2 {
        font-size: 18px;
        margin-bottom: 0;
    }

    .header-left p {
        font-size: 12px;
        margin-bottom: 0;
    }

    .header-right {
        margin-top: 10px;
        width: 100%;
    }

    .search-box {
        width: 100%;
        padding: 8px 14px;
    }

    .notification {
        display: none;
    }

    /* 内容区 */
    .content-area {
        padding: 16px;
        padding-bottom: 80px; /* 给底部导航留空间 */
    }

    /* 统计卡片 - 2列 */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .card {
        padding: 14px;
        gap: 12px;
        border-radius: 12px;
    }

    .card-icon {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 18px;
        flex-shrink: 0;
    }

    .card-content h3 {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .card-content p {
        font-size: 22px;
    }

    /* 图表 */
    .charts-row {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    .chart-container {
        padding: 16px;
    }

    .chart-container h3 {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .chart-container canvas {
        height: 220px !important;
    }

    /* 两栏布局变单栏 */
    .two-column {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .column {
        padding: 16px;
    }

    .asset-select-list {
        max-height: 300px;
    }

    /* 表格 - 卡片化 */
    .table-container {
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .table-container h3, .recent-activity h3 {
        padding: 0 4px;
        margin-bottom: 12px;
    }

    table {
        display: block;
    }

    table thead {
        display: none; /* 隐藏表头 */
    }

    table tbody {
        display: block;
    }

    table tr {
        display: block;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        margin-bottom: 12px;
        padding: 14px;
        border-bottom: none;
    }

    table tbody tr:hover {
        background: white;
    }

    table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid var(--light-gray);
        font-size: 14px;
    }

    table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
        margin-top: 6px;
    }

    table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-color);
        font-size: 12px;
        flex-shrink: 0;
        margin-right: 12px;
    }

    table td:last-child::before {
        display: none;
    }

    /* 最近活动表格 */
    .recent-activity {
        padding: 16px;
    }

    /* 筛选和搜索 */
    .table-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
        min-width: 0;
    }

    /* 表单 */
    .form-container {
        padding: 20px;
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 防止 iOS 缩放 */
        padding: 12px 14px;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .btn-danger {
        width: 100%;
        justify-content: center;
    }

    /* 分页 */
    .pagination {
        gap: 12px;
        margin-top: 20px;
    }

    .pagination button {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* 模态框 */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 0 auto;
        border-radius: 16px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 12px 20px;
        flex-direction: column;
    }

    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* 底部导航栏 */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        border-top: 1px solid var(--light-gray);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        z-index: 100;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--gray-color);
        font-size: 10px;
        gap: 3px;
        padding: 6px 0;
        min-width: 0;
        flex: 1;
        transition: color 0.2s;
    }

    .mobile-nav-item i {
        font-size: 20px;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:active {
        color: var(--primary-color);
    }

    .mobile-nav-item:active {
        opacity: 0.7;
    }

    /* 页面标题区 */
    .page-header {
        margin-bottom: 20px;
    }

    .page-header h3 {
        font-size: 18px;
    }

    /* 登录页优化 */
    .login-box {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-header i {
        font-size: 40px;
    }

    /* 按钮触摸优化 */
    .btn-primary, .btn-secondary, .btn-danger, .btn-small {
        min-height: 44px; /* Apple 推荐的最小触摸目标 */
    }

    /* 隐藏桌面端通知铃铛（手机端不需要） */
    .header-right .search-box i {
        display: block;
    }

    /* 操作按钮组 */
    table td .btn-small {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* 资产选择项 */
    .asset-item {
        padding: 14px;
    }

    .asset-item .name {
        font-size: 13px;
    }

    /* 代码生成结果 */
    .code-badge {
        font-size: 13px;
        padding: 6px 12px;
    }

    #generated-codes {
        gap: 8px;
    }

    .result-container {
        padding: 16px;
    }

    /* 用户管理按钮 */
    .table-controls .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 超小屏幕 (<=380px) ===== */
@media (max-width: 380px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .stats-cards .card {
        padding: 12px;
    }

    .card-content p {
        font-size: 20px;
    }

    .content-area {
        padding: 12px;
        padding-bottom: 72px;
    }

    .header-left h2 {
        font-size: 16px;
    }
}

/* ===== 桌面端隐藏移动端专属元素 ===== */
@media (min-width: 769px) {
    .menu-toggle {
        display: none !important;
    }

    .sidebar-close {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }

    .content-area {
        padding-bottom: 30px !important;
    }
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
}

.login-box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

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

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.login-header p {
    color: var(--gray-color);
    font-size: 14px;
}

#login-form .form-group {
    margin-bottom: 20px;
}

#login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

#login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
}

#login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox input {
    width: auto;
}

#forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}

#forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    font-size: 14px;
    color: var(--gray-color);
}

#register-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

#register-link:hover {
    text-decoration: underline;
}

/* 用户信息样式 */
.user-details {
    display: flex;
    flex-direction: column;
}

.user-details small {
    font-size: 12px;
    opacity: 0.8;
}

/* 用户管理页面样式 */
#add-user-btn {
    margin-bottom: 20px;
}

/* 角色徽章样式 */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.role-super_admin { background-color: #f5c6cb; color: #721c24; }
.role-admin { background-color: #d4edda; color: #155724; }
.role-manager { background-color: #cce5ff; color: #004085; }
.role-user { background-color: #fff3cd; color: #856404; }

/* 状态徽章样式 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active { background-color: #d4edda; color: #155724; }
.status-inactive { background-color: #f8d7da; color: #721c24; }
.status-suspended { background-color: #fff3cd; color: #856404; }

/* ==================== 会员管理样式 ==================== */

/* 侧边栏分区标题 - 与 nav-link 风格统一 */
.nav-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    margin: 4px 10px;
    border-radius: 14px;
    color: rgba(255,255,255,0.72);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: normal;
    text-transform: none;
    user-select: none;
    cursor: pointer;
    transition: all .2s ease;
}
.nav-section-title:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}
.nav-section-title i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}
.nav-section-title .fa-chevron-down {
    margin-left: auto;
    font-size: 11px;
    transition: transform .2s ease;
}
.nav-section-title.expanded .fa-chevron-down {
    transform: rotate(180deg);
}

/* 会员头像 */
.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
    flex-shrink: 0;
}

.member-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--light-gray);
    flex-shrink: 0;
}

/* 会员统计卡片 */
.member-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* 上机管理 - 标签页 */
.gaming-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.gaming-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.gaming-tab:hover {
    color: var(--dark-color);
    background-color: rgba(67, 97, 238, 0.04);
}

.gaming-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.06);
}

.gaming-tab-content {
    display: none;
}

.gaming-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 上机活跃会话列表 */
.active-sessions-list {
    display: grid;
    gap: 16px;
}

.active-session-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    gap: 16px;
    transition: var(--transition);
}

.active-session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.active-session-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.active-session-info {
    min-width: 0;
}

.active-session-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-session-start {
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 2px;
}

.active-session-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.session-active-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: inline-block;
    animation: pulse-green 2s infinite;
    margin-right: 6px;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
}

.timer-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 80px;
    text-align: center;
}

.session-amount-preview {
    font-size: 13px;
    color: var(--gray-color);
    text-align: center;
}

/* 充值会员卡片 */
.recharge-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
    gap: 20px;
}

.recharge-member-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.recharge-member-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--dark-color);
}

.recharge-member-phone {
    font-size: 13px;
    color: var(--gray-color);
    margin-top: 2px;
}

.recharge-member-balance {
    text-align: right;
    flex-shrink: 0;
}

.recharge-balance-label {
    font-size: 12px;
    color: var(--gray-color);
}

.recharge-balance-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* 搜索结果列表 */
.search-results-list {
    margin-top: 12px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.search-result-item:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.04);
}

.search-result-item .result-name {
    font-weight: 500;
    color: var(--dark-color);
}

.search-result-item .result-phone {
    font-size: 12px;
    color: var(--gray-color);
}

/* 结账摘要 */
.checkout-summary {
    text-align: center;
}

.checkout-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: 14px;
}

.checkout-summary .summary-row:last-child {
    border-bottom: none;
}

.checkout-summary .summary-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--danger-color);
    padding-top: 12px;
    text-align: center;
}

.checkout-summary .summary-member {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

/* 会员详情弹窗 */
.modal-large {
    max-width: 700px;
}

.member-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.member-detail-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.member-detail-info p {
    font-size: 13px;
    color: var(--gray-color);
}

.member-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.member-stat-item {
    text-align: center;
    padding: 16px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.member-stat-item .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
}

.member-stat-item .stat-label {
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 4px;
}

.member-detail-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--light-gray);
}

.member-detail-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.member-detail-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-color);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* 上机历史表格状态标签 */
.session-status-active {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.session-status-completed {
    background-color: #cce5ff;
    color: #004085;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ==================== 会员管理 - 移动端适配 ==================== */
@media (max-width: 768px) {
    .member-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .active-session-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .active-session-right {
        justify-content: space-between;
    }

    .timer-display {
        font-size: 18px;
    }

    .recharge-member-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .recharge-member-balance {
        text-align: center;
    }

    .member-detail-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .modal-large {
        max-width: none;
    }

    .gaming-tabs {
        border-radius: 12px;
    }

    .gaming-tab {
        padding: 12px 10px;
        font-size: 13px;
    }

    .checkout-summary .summary-row {
        font-size: 13px;
    }
}

/* ==================== 折叠菜单样式 ==================== */
.toggle-menu {
    cursor: pointer;
    user-select: none;
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    transition: var(--transition);
}
.toggle-menu i {
    font-size: 12px;
    transition: transform 0.3s ease;
}
.toggle-menu.expanded i {
    transform: rotate(180deg);
}
.nav-submenu {
    display: none;
    padding-left: 0;
    margin: 0;
    list-style: none;
}
.nav-submenu.open {
    display: block;
}
.nav-submenu li {
    margin: 0;
}
.nav-submenu .nav-link {
    padding-left: 50px;
    font-size: 13px;
}

/* ==================== 页面Header按钮 ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h3 {
    margin-bottom: 4px;
}
.page-header p {
    color: var(--gray-color);
    font-size: 14px;
    margin: 0;
}
.header-action-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==================== 表单分区 ==================== */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--light-gray);
}
.form-section h4 {
    margin-bottom: 12px;
    color: var(--dark-color);
    font-size: 16px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.btn-outline {
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}
.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ==================== 已选资产标签 ==================== */
.selected-asset-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #f0f4ff;
    border: 1px solid #d0d8f0;
    border-radius: var(--border-radius);
    gap: 12px;
}
.selected-asset-tag .tag-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.selected-asset-tag .tag-info small {
    color: var(--gray-color);
    font-size: 12px;
}
.tag-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    flex-shrink: 0;
}

/* ==================== 资产搜索弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-container {
    width: 90%;
    max-width: 540px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.asset-search-modal-container {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--light-gray);
}
.modal-header h3 {
    font-size: 16px;
    margin: 0;
}
.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-color);
    padding: 4px;
}
.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-body .search-box {
    margin-bottom: 12px;
}
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.asset-search-list {
    max-height: 350px;
    overflow-y: auto;
}
.asset-search-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    cursor: pointer;
    gap: 10px;
    transition: var(--transition);
}
.asset-search-item:hover {
    background: #f8f9ff;
    border-color: var(--primary-color);
}
.asset-search-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== 会员选择弹窗 ==================== */
.member-select-modal-container {
    max-width: 480px;
}
.member-select-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    gap: 12px;
    transition: all 0.2s ease;
    background: #fff;
}
.member-select-item:hover {
    background: #f0f4ff;
    border-color: #4361ee;
}
.member-select-avatar, .member-select-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}
.member-select-avatar {
    object-fit: cover;
}
.member-select-avatar-placeholder {
    background: #4361ee;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}
.member-select-info {
    flex: 1;
    min-width: 0;
}
.member-select-name {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 2px;
}
.member-select-phone {
    font-size: 13px;
    color: #6c757d;
}
.member-select-balance {
    font-size: 16px;
    font-weight: 700;
    color: #4361ee;
    white-space: nowrap;
}
.asset-search-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.asset-search-item .item-info {
    flex: 1;
    min-width: 0;
}
.asset-search-item .item-info strong {
    display: block;
    font-size: 14px;
}
.asset-search-item .item-info small {
    color: var(--gray-color);
    font-size: 12px;
    display: block;
    margin-top: 2px;
}
.asset-search-item .status-badge {
    flex-shrink: 0;
    margin-left: auto;
}

/* ==================== 出借单表格 ==================== */
#lend-orders-table {
    width: 100%;
}
#lend-orders-table th:last-child,
#lend-orders-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* ==================== 房台网格（上机管理监控视图）==================== */
.room-monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 4px 0 16px;
}

/* ==================== 房台管理页面网格 ==================== */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    padding: 4px 0 16px;
}

/* 基础房台卡片 */
.room-card {
    border-radius: 12px;
    padding: 20px 16px;
    position: relative;
    border: 2px solid transparent;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    overflow: hidden;
}

/* 空闲 - 绿色主题 */
.room-card.status-available {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4CAF50;
    cursor: pointer;
}
.room-card.status-available:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(76,175,80,0.25);
}

/* 使用中 - 橙色主题 */
.room-card.status-in-use {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe0b2 100%);
    border-color: #FF9800;
    cursor: default;
}

/* 停用 - 灰色主题 */
.room-card.status-disabled {
    background: #f5f5f5;
    border-color: #ccc;
    opacity: 0.55;
    cursor: not-allowed;
}

/* 房台头部 */
.room-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.room-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.room-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 8px;
}
.room-status-dot.available { background: #4CAF50; animation: pulse-green 2s infinite; }
.room-status-dot.in-use    { background: #FF9800; animation: pulse-orange 2s infinite; }
.room-status-dot.disabled  { background: #aaa; }

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(76,175,80,0); }
}
@keyframes pulse-orange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,152,0,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(255,152,0,0); }
}

/* 房台价格标签 */
.room-card-rate {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}
.room-card-rate strong {
    color: #FF9800;
    font-size: 14px;
}

/* 空闲状态提示 */
.room-card-idle-hint {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4CAF50;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 0;
    gap: 6px;
}
.room-card-idle-hint i { font-size: 22px; opacity: 0.8; }

/* 停用提示 */
.room-card-disabled-hint {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
    gap: 6px;
}

/* 使用中：会员信息区 */
.room-card-member {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.room-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.room-card-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffe0b2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #FF9800;
    flex-shrink: 0;
}
.room-card-member-info {
    flex: 1;
    min-width: 0;
}
.room-card-nickname {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.room-card-start-time {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* 使用中：计时和费用 */
.room-card-timer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.room-card-timer {
    font-size: 20px;
    font-weight: 700;
    font-family: monospace;
    color: #FF9800;
    letter-spacing: 1px;
}
.room-card-amount {
    font-size: 13px;
    color: #666;
    text-align: right;
}
.room-card-amount strong {
    display: block;
    font-size: 16px;
    color: #f44336;
}

/* 结账按钮（使用中房台底部） */
.room-card-checkout-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #FF9800;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: auto;
    transition: background 0.2s;
}
.room-card-checkout-btn:hover { background: #e65100; }

/* 房台管理页：操作按钮 */
.room-manage-card {
    border-radius: 12px;
    padding: 18px 16px 14px;
    border: 2px solid #e0e0e0;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s;
}
.room-manage-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.room-manage-card.status-disabled { opacity: 0.6; }

.room-manage-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.room-manage-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    flex: 1;
}
.room-manage-rate {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}
.room-manage-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.room-manage-actions button {
    flex: 1;
    min-width: 60px;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
}
.btn-edit-room   { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }
.btn-edit-room:hover { background: #bbdefb; }
.btn-toggle-room.enable  { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.btn-toggle-room.enable:hover  { background: #c8e6c9; }
.btn-toggle-room.disable { background: #fff8e1; color: #e65100; border-color: #ffcc80; }
.btn-toggle-room.disable:hover { background: #ffe0b2; }
.btn-delete-room { background: #fce4ec; color: #c62828; border-color: #f48fb1; }
.btn-delete-room:hover { background: #f8bbd9; }

/* 选会员弹窗 */
.member-select-modal-container {
    max-width: 440px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.member-select-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.member-select-item:last-child { border-bottom: none; }
.member-select-item:hover { background: #f0f7ff; }
.member-select-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.member-select-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4361ee20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #4361ee;
    flex-shrink: 0;
}
.member-select-info { flex: 1; min-width: 0; }
.member-select-name { font-size: 14px; font-weight: 600; color: #333; }
.member-select-phone { font-size: 12px; color: #888; margin-top: 2px; }
.member-select-balance { font-size: 13px; font-weight: 600; color: #4CAF50; flex-shrink: 0; }

/* 上机管理 gaming-timer 无 page-header（tabs直接在顶部） */
#gaming-timer .gaming-tabs { margin-top: 4px; }

/* 响应式 */
@media (max-width: 600px) {
    .room-monitor-grid,
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .room-card { padding: 14px 12px; min-height: 140px; }
    .room-card-timer { font-size: 16px; }
}

