/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 移动端容器100%宽度 */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    /* 确保所有内容元素100%宽度 */
    .main-content,
    .content-wrapper,
    .page-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    /* 卡片和表单容器100%宽度 */
    .card,
    .form-container,
    .auth-container {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    /* 移动端100%宽度类 */
    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        box-sizing: border-box !important;
    }
}

/* 移动端汉堡菜单按钮 */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(74, 144, 226, 0.1);
}

.mobile-menu-toggle:hover span {
    background: #4a90e2;
}

/* 移动端遮罩层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 顶部导航栏样式 */
.top-navbar,
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 999; /* 确保它在侧边栏和遮罩层之下 */
    transition: all 0.3s ease;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

/* 桌面端导航样式 */
.desktop-nav {
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.nav-item {
    position: relative;
    margin-left: 20px;
}

.nav-link {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #6366f1;
}

.nav-link.active {
    background-color: #e0e7ff;
    color: #6366f1;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #6366f1;
}

/* 移动端侧边导航样式 - 从顶部滑出的菜单 (未使用) */
.mobile-sidebar {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-sidebar.open {
    top: 60px;
}

/* 侧边栏基础样式 - 实际使用的菜单 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: block;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close {
    display: none; /* 在PC端默认隐藏 */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.menu-link:hover {
    background-color: #f5f5f5;
    color: #6366f1;
}

.menu-link.active {
    background-color: #e0e7ff;
    color: #6366f1;
    border-left: 4px solid #6366f1;
}

.menu-link .arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-link.with-submenu.active .arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f9f9f9;
    display: none;
}

.submenu.open {
    display: block;
}

.submenu-link {
    display: block;
    padding: 12px 20px 12px 50px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background-color: #f0f0f0;
    color: #6366f1;
}

/* 主内容区域样式 */
.main-content {
    padding: 20px;
    min-height: 100vh;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

/* 登录页面特殊处理 */
.main-content.login-page {
    padding: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: auto !important;
    background: transparent !important;
}

/* 按钮样式 */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

.btn-outline {
    background: transparent;
    color: #4a90e2;
    border: 2px solid #4a90e2;
}

.btn-outline:hover {
    background: #4a90e2;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-col {
    flex: 1;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    position: relative;
    z-index: 1;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 1;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table a, .table button {
    position: relative;
    z-index: 2;
}

/* 操作按钮容器样式 - 强制flexbox布局 */
table tbody tr td:last-child,
table.table tbody tr td:last-child {
    white-space: nowrap !important;
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

table tbody tr td:last-child button.btn,
    table tbody tr td:last-child .btn,
    table.table tbody tr td:last-child button.btn,
    table.table tbody tr td:last-child .btn {
        flex: 0 0 auto !important;
        padding: 2px 3.36px !important;
        font-size: 15.68px !important;
        min-width: 16.8px !important;
        height: 17.6px !important;
        line-height: 1 !important;
        border-radius: 3px !important;
        border-width: 0.24px !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        float: none !important;
    }

/* 状态标签 */
.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.status-open {
    background: #d4edda;
    color: #155724;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

/* 警告框 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Alert动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 监控页面基础样式 */
.monitor-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.monitor-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,255,255,0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
    z-index: 1;
}

.monitor-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,0,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,255,255,0.1) 0%, transparent 50%);
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.monitor-header h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #ffffff;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    letter-spacing: -0.01em;
    text-shadow: 0 0 20px rgba(0,255,255,0.3);
}

.monitor-header h1::before {
    content: '⚡';
    font-size: 2.5rem;
    color: #00ffff;
    font-weight: 400;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px #00ffff);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 10px #00ffff); }
    to { filter: drop-shadow(0 0 20px #00ffff) drop-shadow(0 0 30px #00ffff); }
}

.monitor-header:hover h1::before {
    color: #ff00ff;
    filter: drop-shadow(0 0 15px #ff00ff);
    transform: scale(1.1) rotate(10deg);
}

.monitor-header p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.monitor-header .btn {
    background: linear-gradient(45deg, #00ffff, #ff00ff);
    border: 2px solid transparent;
    color: #000000;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,255,255,0.3), inset 0 0 20px rgba(255,255,255,0.1);
}

.monitor-header .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.monitor-header .btn:hover::before {
    left: 100%;
}

.monitor-header .btn:hover {
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(255,0,255,0.5), 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.3);
}

.monitor-header .btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 20px rgba(255,0,255,0.3), 0 5px 10px rgba(0,0,0,0.2);
}

.monitor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4a90e2;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.monitor-list {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-header h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-controls select,
.filter-controls input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-controls select:focus,
.filter-controls input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.monitor-table {
    overflow-x: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.monitor-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
}

.monitor-table th,
.monitor-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.monitor-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.monitor-table tr:hover {
    background: #f8f9fa;
}

.monitor-table .url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}



/* 筛选和搜索控件样式 */
.filter-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.filter-controls select:focus,
.filter-controls input:focus {
    outline: none;
    border-color: #4a90e2;
}

.filter-controls input[type="text"] {
    min-width: 200px;
    flex: 1;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.status-unknown {
    background: #fff3cd;
    color: #856404;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* 用户信息区域样式 */
.user-info-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.user-name {
    cursor: pointer;
    margin-right: 15px;
    font-weight: 500;
    color: #333;
}

.logout-btn {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 2px 6px !important; /* 减小高度，增加水平padding */
    font-size: 0.75rem !important; /* 增大字体大小 */
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    width: 54px !important; /* 增加20%宽度 */
    text-align: center !important;
    min-width: 54px !important;
}

.logout-btn:hover {
    background-color: #c82333 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .monitor-header {
        padding: 2rem 1rem;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
    
    .monitor-header h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 1rem;
        letter-spacing: 0;
    }
    
    .monitor-header h1::before {
        font-size: 2rem;
    }
    
    .monitor-header p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }
    
    .monitor-header .btn {
        padding: 0.9rem 2rem;
        font-size: 0.9rem;
        letter-spacing: 0.8px;
    }
    
    .monitor-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-controls select,
    .filter-controls input {
        width: 100%;
    }
    
    .monitor-table {
        font-size: 0.9rem;
    }
    
    .monitor-table th,
    .monitor-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.page-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* PC端大屏幕表格优化 */
@media (min-width: 1200px) {
    .main-content.with-sidebar {
        margin-left: 260px;
        margin-right: 20px;
        width: calc(100% - 290px);
        max-width: none;
        overflow-x: auto;
    }
    
    .table-container {
        overflow-x: visible;
        font-size: 1rem;
        width: 100%;
    }
    
    .table {
        table-layout: auto;
        word-wrap: normal;
        width: 100%;
        min-width: auto;
    }
    
    .table th,
    .table td {
        padding: 1rem;
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
    }
    
    /* 操作列在PC端可以更宽 */
    .table th:last-child,
    .table td:last-child {
        width: auto;
        min-width: 120px;
        max-width: none;
    }
}

/* 中等屏幕优化 */
@media (min-width: 769px) and (max-width: 1199px) {
    .main-content.with-sidebar {
        margin-left: 260px;
        margin-right: 15px;
        width: calc(100% - 285px);
        overflow-x: auto;
    }
    
    .table-container {
        overflow-x: auto;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .table {
        table-layout: auto;
        min-width: 800px;
        width: 100%;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        background: #ffffff !important;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .container {
        padding: 0;
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding-top: 70px; /* 为汉堡菜单按钮留出空间，移除了顶部栏后调整高度 */
        overflow-x: hidden;
    }
    
    /* 确保页面内容不会超出屏幕宽度 */
    .page-content,
    .content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 显示移动端汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 1001;
    }
    
    /* 显示移动端遮罩层 */
    .mobile-overlay {
        display: block !important;
    }
    
    /* 移动端导航栏默认隐藏 */
    .sidebar {
        transform: translateX(-100%) !important;
        width: 280px !important;
        z-index: 1000 !important;
    }
    
    /* 移动端导航栏展开状态 */
    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    
    /* 显示关闭按钮 */
    .sidebar-close {
        display: block !important;
        position: absolute !important;
        right: 15px !important;
        top: 20px !important;
        transform: translateY(0) !important;
        background: none !important;
        border: none !important;
        font-size: 24px !important;
        cursor: pointer !important;
        color: #333 !important;
        z-index: 1001 !important;
    }
    
    /* 防止页面滚动 */
    body.menu-open {
        overflow: hidden !important;
    }
    
    /* 移动端主内容区域样式重置 */
    .main-content,
    .main-content.with-sidebar {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        padding: 1rem !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* 移动端操作按钮优化 - 强制flexbox布局 */
    table tbody tr td:last-child,
    table.table tbody tr td:last-child {
        display: flex !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    table tbody tr td:last-child button.btn,
    table tbody tr td:last-child .btn,
    table.table tbody tr td:last-child button.btn,
    table.table tbody tr td:last-child .btn {
        flex: 0 0 auto !important;
        padding: 1px 2.24px !important;
        font-size: 0.84rem !important;
        min-width: 14.56px !important;
        height: 16px !important;
        line-height: 1 !important;
        border-radius: 2px !important;
        border-width: 0.24px !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        float: none !important;
    }
    
    /* 监控卡片自适应布局 */
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }
    
    .stat-item {
        min-width: 0;
        padding: 10px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
             font-size: 0.8rem;
         }
    }

    /* 移动端导航菜单垂直排列 */
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* 更小屏幕的额外优化 */
    @media (max-width: 480px) {
     .container, .content {
         padding: 15px;
         padding-top: 75px;
     }
     
     .mobile-menu-toggle {
         top: 10px;
         left: 10px;
         width: 40px;
         height: 40px;
     }
     
     .mobile-menu-toggle span {
         width: 18px;
     }
     
     .card-stats {
         grid-template-columns: repeat(3, 1fr) !important;
         gap: 8px;
     }
     
     .stat-item {
         padding: 8px;
     }
     
     .stat-number {
         font-size: 1.2rem;
     }
     
     .stat-label {
         font-size: 0.75rem;
     }
     
     .overview-card {
         padding: 15px;
     }
 }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card {
        padding: 1rem 0.75rem;
        margin: 0.5rem 0;
        border-radius: 8px;
    }
    
    .table-container {
        font-size: 0.875rem;
        overflow-x: auto;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* 移动端表格优化 */
    .table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed;
        word-wrap: break-word;
    }
    
    .table th,
    .table td {
        padding: 8px 4px !important;
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 0;
    }
    
    /* 操作列宽度固定 */
    .table th:last-child,
    .table td:last-child {
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }
    
    /* 登录页面移动端优化 */
    .login-container {
        display: flex;
        justify-content: center;
        padding: 0;
        background: #ffffff !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        align-items: center;
        min-height: 100vh;
    }
    
    .login-card {
        max-width: 360px;
        width: 95%;
        padding: 1rem 1.5rem 2rem 1.5rem;
        margin: 0 auto;
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-sizing: border-box;
    }
    
    .login-header {
        margin-top: 0;
        margin-bottom: 0.25rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    /* 表单元素移动端优化 */
    .form-control {
        padding: 1rem 1.25rem;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: 8px;
        min-height: 50px; /* 触摸友好的最小高度 */
        width: 100%;
        max-width: none;
        box-sizing: border-box;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 验证码区域移动端优化 */
    .input-group {
        flex-direction: row;
        gap: 8px;
        max-width: 100% !important;
        align-items: center;
    }
    
    .input-group .form-control {
        width: 160px !important;
        flex: none !important;
    }
    
    .captcha-image {
        width: 100px;
        height: 40px;
        flex-shrink: 0;
    }
    
    /* 滑块验证移动端优化 */
    .slider-container {
        margin: 15px 0;
    }
    
    .slider-track {
        height: 45px;
    }
    
    .slider-thumb {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .slider-text {
        font-size: 13px;
    }
    
    /* 二维码区域移动端优化 */
    .qr-code {
        width: 180px;
        height: 180px;
        margin: 1rem auto;
    }
    
    .wechat-login {
        padding: 1rem 0;
    }
    
    /* 表单组间距优化 */
    .form-group {
        margin-bottom: 0.5rem;
    }
    
    /* 进一步优化表单布局 */
    .input-group {
        margin-bottom: 1rem;
    }
    
    .login-subtitle {
        margin-bottom: 0.75rem;
    }
}

/* 小屏幕设备进一步优化 */
@media (max-width: 480px) {
    body {
        background: #ffffff !important;
    }
    
    .login-card {
        padding: 0.8rem 1rem 2rem 1rem;
        border-radius: 12px;
        background: transparent;
        box-shadow: none;
        width: 90%;
        max-width: 320px;
        margin: 0 auto;
        margin-top: 0;
    }
    
    .login-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .login-subtitle {
        margin-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 0.25rem;
    }
    
    .form-control {
        padding: 1rem 1.25rem;
        width: 100%;
        max-width: none;
        min-height: 52px;
        box-sizing: border-box;
    }
    
    .btn {
        padding: 1rem 1.25rem;
        width: 100%;
        min-height: 52px;
        box-sizing: border-box;
    }
    
    .qr-code {
        width: 160px;
        height: 160px;
    }
    
    .slider-track {
        height: 40px;
    }
    
    .slider-thumb {
        width: 40px;
        height: 40px;
    }
}

/* 移动端触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备特定样式 */
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .form-control:focus {
        transform: none;
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    }
    
    /* 增强触摸目标 */
    .captcha-image {
        min-width: 44px;
        min-height: 44px;
        cursor: pointer;
    }
    
    /* 改善滑块在触摸设备上的体验 */
    .slider-thumb {
        cursor: pointer;
    }
    
    .slider-thumb:active {
        transform: translateY(-50%) scale(1.1);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .slider-thumb {
        transition: none;
    }
    
    .slider-fill {
        transition: none;
    }
}

/* 登录页面特殊样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-top: 0;
    background: transparent;
    min-height: 100vh;
}

.login-card {
    width: 80% !important;
    max-width: 500px;
    background: transparent;
    backdrop-filter: none;
    border-radius: 20px;
    padding: 1.5rem 3rem 3rem 3rem;
    margin-top: 0;
    box-shadow: none;
}

/* 桌面端专用样式，确保不被移动端覆盖 */
@media (min-width: 769px) {
    .login-card {
        width: 80% !important;
        max-width: 500px !important;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #666;
    margin-top: 0.5rem;
}

.wechat-login {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 1rem auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.qr-code img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* 仪表板样式 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* 仪表板专用统计卡片样式 */
.dashboard-grid .stat-card {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 统计链接样式 */
.stat-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding: 12px 8px;
}

.stat-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    opacity: 0.9;
}

.stat-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.stat-link .stat-number,
.stat-link .stat-label {
    color: inherit;
}

.stat-link i {
    display: block;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.stat-link:hover i {
    transform: scale(1.1);
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

.search-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Loading覆盖层样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}