* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --secondary-color: #FF9800;
    --danger-color: #f44336;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --info-color: #2196F3;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #f5f7fa;
    --card-bg: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #fff;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu a.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
    font-size: 1rem;
    white-space: nowrap;
}

.navbar-menu a.nav-link:hover,
.navbar-menu a.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.user-name {
    font-weight: 500;
    font-size: 1rem;
    color: #fff;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border-radius: var(--radius);
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-light);
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.card-header h2,
.card-header h3 {
    font-size: 18px;
    color: var(--text-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
}

.alert-error {
    background: #ffebee;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid var(--secondary-color);
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid var(--info-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.required {
    color: var(--danger-color);
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 50%, #a5d6a7 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 30px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--primary-light);
}

.qrcode-wrapper {
    padding: 20px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.qrcode {
    width: 240px;
    height: 240px;
    border-radius: var(--radius-sm);
}

.qrcode-tip {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 14px;
}

.status-wrapper {
    margin: 20px 0;
}

.status-text {
    color: var(--text-light);
    font-size: 14px;
}

.status-text.success {
    color: var(--success-color);
}

.status-text.error {
    color: var(--danger-color);
}

.status-text.warning {
    color: var(--warning-color);
}

.loading-dot {
    animation: loading 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.role-form {
    text-align: left;
}

.role-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-option {
    cursor: pointer;
}

.role-option input {
    display: none;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

.role-option input:checked + .role-card {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.role-icon {
    font-size: 32px;
}

.role-title {
    font-weight: 600;
    color: var(--text-color);
}

.role-desc {
    font-size: 12px;
    color: var(--text-light);
}

.role-card-content {
    flex: 1;
}

.gratitude-list {
    list-style: none;
}

.gratitude-item {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.gratitude-item:last-child {
    border-bottom: none;
}

.gratitude-item:hover {
    background: #fafafa;
}

.gratitude-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.gratitude-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.gratitude-author {
    font-weight: 600;
    color: var(--text-color);
}

.gratitude-target {
    color: var(--primary-color);
    font-weight: 500;
}

.gratitude-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.gratitude-content {
    color: var(--text-color);
    line-height: 1.8;
    padding-left: 52px;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.member-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.member-card:hover {
    transform: translateY(-5px);
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid var(--primary-light);
}

.member-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.member-role {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.member-role.student {
    background: #e3f2fd;
    color: #1565c0;
}

.member-role.parent {
    background: #fce4ec;
    color: #c2185b;
}

.member-role.teacher {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.rank-list {
    list-style: none;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.rank-number.gold {
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #fff;
}

.rank-number.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #fff;
}

.rank-number.bronze {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #fff;
}

.rank-count {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-left: auto;
}

.rank-count span {
    font-size: 14px;
    font-weight: normal;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.tabs {
    display: flex;
    gap: 5px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px 20px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.tab.active {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    color: var(--primary-color);
}

.invite-code {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 4px;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: 'Courier New', monospace;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    background: var(--card-bg);
}

@media (max-width: 768px) {
    .navbar-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 5px;
        padding: 10px 0;
    }
    
    .navbar-menu.show {
        display: flex;
    }
    
    .navbar-menu a.nav-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 1.125rem;;
    }
    /* 可以添加 user-name 调整 */
    .user-name {
        font-size: 1rem;
    }
    .btn-logout {
        font-size: 1.25rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        padding: 10px 0;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        margin-top: 5px;
    }
    
    .container {
        padding: 15px;
    }
    
    .page-header {
        padding: 30px 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .role-selector {
        gap: 8px;
    }
    
    .role-card {
        padding: 12px;
    }
    
    .role-icon {
        font-size: 24px;
    }
    
    .member-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .gratitude-content {
        padding-left: 0;
        margin-top: 10px;
    }
    
    .gratitude-time {
        margin-left: 0;
        display: block;
        margin-top: 5px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-color);
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

.admin-table a {
    color: var(--primary-color);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.status-inactive {
    background: #ffebee;
    color: var(--danger-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.detail-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h4 {
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-size: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detail-item {
    margin-top: 15px;
}

.detail-item p {
    margin-top: 8px;
    color: var(--text-light);
    line-height: 1.6;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.avatar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.arrow-icon {
    font-size: 16px;
    color: var(--primary-color);
}

.card-meta {
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
}

.post-time {
    font-size: 12px;
    color: var(--text-muted);
}

.view-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.card-content {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.gratitude-content {
    text-align: center;
}

.gratitude-from,
.gratitude-to {
    font-weight: 600;
    color: var(--text-color);
}

.gratitude-arrow {
    margin: 0 10px;
    font-size: 20px;
}

.gratitude-reason {
    margin-top: 15px;
    padding: 15px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    font-style: italic;
}

.card-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.attachment-item {
    flex-shrink: 0;
}

.attachment-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.3s;
}

.attachment-thumb:hover {
    transform: scale(1.1);
}

.attachment-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.attachment-label {
    font-size: 12px;
    color: var(--text-muted);
}

.audio-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.audio-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    min-width: 200px;
}

.audio-icon {
    font-size: 18px;
}

.audio-player {
    flex: 1;
    min-width: 0;
}
    max-width: 200px;
    border-radius: var(--radius-sm);
    background: #f8f9fa;
    padding: 8px;
}

.audio-container {
    width: 100%;
    max-width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-sm);
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-container audio {
    width: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.card-actions {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.voice-recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #4b6cb7, #3a56a4);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    touch-action: manipulation;
}

.voice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 108, 183, 0.4);
}

.voice-btn.recording {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
    0% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(255, 65, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0); }
}

.voice-status {
    font-size: 14px;
    color: var(--text-light);
}

.voice-status.recording {
    color: #ff416c;
    font-weight: 500;
}

.uploaded-files {
    margin-top: 15px;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.uploaded-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.uploaded-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.uploaded-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.family-card {
    background: #fafafa;
    border-radius: var(--radius-sm);
    padding: 15px;
    border: 1px solid var(--border-color);
}

.family-card h4 {
    margin-bottom: 10px;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image {
        height: 150px;
    }
    
    .voice-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .qrcode {
        width: 200px;
        height: 200px;
    }
    
    .invite-code {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

.card-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .card-grid-3 {
        grid-template-columns: 1fr;
    }
}

.search-container {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 12px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-light);
}

.pagination-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-link {
    padding: 8px 16px;
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.filter-item select,
.filter-item input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-item select:focus,
.filter-item input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.card-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.action-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.action-badge.action-toggle_circle_status {
    background: #fff3e0;
    color: #e65100;
}

.action-badge.action-create_circle {
    background: #e8f5e9;
    color: #2e7d32;
}

.action-badge.action-delete_circle,
.action-badge.action-delete_user {
    background: #ffebee;
    color: #c62828;
}

.action-badge.action-update_user {
    background: #e3f2fd;
    color: #1565c0;
}

.action-badge.action-unbind_wechat,
.action-badge.action-bind_wechat {
    background: #e1f5fe;
    color: #0277bd;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
}

.pagination .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.page-info {
    font-size: 14px;
    color: var(--text-light);
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: var(--radius-sm);
}

.wechat-bind-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 30px;
    color: #fff;
}

.wechat-bind-section h3 {
    color: #fff;
    margin-bottom: 15px;
}

.wechat-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.wechat-status-icon {
    font-size: 48px;
}

.wechat-status-info {
    flex: 1;
}

.wechat-status-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
}

.wechat-status-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.wechat-unbind-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.wechat-unbind-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.wechat-bind-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #fff;
    color: #764ba2;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.wechat-bind-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wechat-qrcode-container {
    text-align: center;
    margin-top: 20px;
}

.wechat-qrcode-container img {
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .wechat-status {
        flex-direction: column;
        text-align: center;
    }
}

/* 末尾新增 */
@media (max-width: 480px) {
    .navbar-menu a.nav-link {
        font-size: 1.25rem;
        padding: 14px 16px;
    }
    .user-name {
        font-size: 1.125rem;
    }
}
