/* 全局样式 - 所有页面共用 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', sans-serif; background: #f5f7fa; }

/* 顶部导航栏 */
.top-nav {
    background: #2d3748;
    color: white;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.top-nav .logo {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav .nav-menu {
    display: flex;
    gap: 5px;
}

.top-nav .nav-item {
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
    font-size: 14px;
}

.top-nav .nav-item:hover {
    background: #4a5568;
}

.top-nav .nav-item.active {
    background: #667eea;
    font-weight: bold;
}

/* 内容区域 */
.page-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.stat-card .icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-card .info { flex: 1; }

.stat-card h4 {
    color: #718096;
    font-size: 14px;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.stat-card .value {
    font-size: 36px;
    font-weight: bold;
    color: #2d3748;
    line-height: 1;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 18px;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; }
.btn-success { background: #48bb78; color: white; }
.btn-success:hover { background: #38a169; }
.btn-warning { background: #ed8936; color: white; }
.btn-warning:hover { background: #dd6b20; }
.btn-info { background: #4299e1; color: white; }
.btn-info:hover { background: #3182ce; }
.btn-danger { background: #f56565; color: white; }
.btn-danger:hover { background: #e53e3e; }

/* 操作栏 */
.actions-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar input, .filter-bar select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.filter-bar input { min-width: 200px; }

/* 表格 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

tr:hover {
    background: #f7fafc;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag-success { background: #c6f6d5; color: #22543d; }
.tag-warning { background: #feebc8; color: #7c2d12; }
.tag-danger { background: #fed7d7; color: #742a2a; }
.tag-info { background: #bee3f8; color: #2c5282; }

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
}

.modal-close:hover {
    color: #2d3748;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(0);
}

.toast-success { background: #48bb78; }
.toast-error { background: #f56565; }
.toast-info { background: #ed8936; }

/* 二维码展示 */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
}

.qr-item img {
    width: 180px;
    height: 180px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 操作按钮组 */
.action-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btns .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* SVG 图标通用样式 */
.icon {
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-right: 4px;
}

.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-sm { width: 14px; height: 14px; }

/* 纯图标无文字间距 */
.icon-only { margin-right: 0; }

/* 页面标题 */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    color: #2d3748;
    font-size: 28px;
    margin-bottom: 10px;
}

.page-header p {
    color: #718096;
    font-size: 14px;
}
