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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

/* 容器 | Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 | Header */
header {
    background: white;
    padding: 24px 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info span {
    font-weight: 500;
    color: var(--gray-700);
}

/* 用户名链接样式 | User name link style */
.user-name-link {
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-name-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-dark);
}

.user-name-link:active {
    transform: scale(0.98);
}

/* 标签页 | Tabs */
.tabs {
    background: white;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    box-shadow: var(--shadow);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--gray-700);
}

.tab-btn:hover {
    background: var(--gray-100);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

/* 主内容区 | Main Content */
main {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* 区块头部 | Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
}

/* 按钮 | Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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


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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-600);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-700);
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

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

.btn-warning:hover:not(:disabled) {
    background: #d97706;
}

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

.btn-info:hover:not(:disabled) {
    background: #2563eb;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* 数据表格 | Data Table */
.data-table {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    text-align: left;
    padding: 14px 16px;
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
}

tr:hover {
    background: var(--gray-50);
}

tr:last-child td {
    border-bottom: none;
}

/* 模态框 | Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 模态框头部区域 | Modal Header Area */
.modal-content > .close {
    padding: 16px 16px 0 0;
    align-self: flex-end;
    flex-shrink: 0;
}

.modal-content > h2,
.modal-content > h3 {
    padding: 0 32px 16px 32px;
    margin: 0;
    flex-shrink: 0;
}

/* 模态框表单容器 | Modal Form Container */
.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 0 0 0;
}

/* 表单内容区域 | Form Content Area */
.modal-content > form > .form-group,
.modal-content > form > div:not(.form-actions) {
    padding: 0 32px;
    margin-bottom: 20px;
}

.modal-content > form > .form-group:last-of-type {
    margin-bottom: 0;
}

/* 模态框底部操作区域（固定在底部）| Modal Footer Actions (Sticky at Bottom) */
.modal-content > form > .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 20px 32px 24px 32px;
    margin: 0;
    flex-shrink: 0;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
}

.close {
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: var(--gray-400);
    transition: color 0.2s ease;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
}

.close:hover {
    color: var(--gray-700);
}

/* 关闭按钮样式 | Close Button Styles */
.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.close-btn:active {
    background: var(--gray-300);
    transform: scale(0.95);
}

/* 模态框主体和底部 | Modal Body and Footer */
.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 确认对话框样式 | Confirm Dialog Styles */
.confirm-dialog-content {
    max-width: 480px;
    padding: 0;
}

.confirm-dialog-content .modal-header {
    padding: 24px 32px 16px 32px;
    margin-bottom: 0;
}

.confirm-dialog-content .modal-body {
    padding: 16px 32px 24px 32px;
    margin-bottom: 0;
}

.confirm-dialog-content .modal-body p {
    color: var(--gray-700);
    font-size: 15px;
    line-height: 1.6;
}

.confirm-dialog-content .modal-footer {
    padding: 20px 32px 24px 32px;
    margin-top: 0;
}

/* 表单 | Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group label .required {
    color: var(--danger-color);
    margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.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(102, 126, 234, 0.1);
}

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

.form-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-group .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-help {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
}

.form-error {
    font-size: 13px;
    color: var(--danger-color);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    justify-content: flex-end;
}

/* 通知 | Notifications */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 2000;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.show {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.success {
    background: var(--success-color);
    color: white;
}

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

.notification.warning {
    background: var(--warning-color);
    color: white;
}

.notification.info {
    background: var(--info-color);
    color: white;
}


/* 统计卡片 | Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 24px;
    border-radius: 12px;
    color: white;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    opacity: 0.9;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* 登录页面 | Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.login-box h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.login-box h2 {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 36px;
    font-weight: 400;
}

.login-box .form-group {
    text-align: left;
}

/* 搜索框 | Search Box */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 徽章 | Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* 操作按钮组 | Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

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

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-500);
}

/* 加载动画 | Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

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

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* 代码块 | Code Block */
.code-block {
    background: var(--gray-900);
    color: #10b981;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
    margin: 12px 0;
}

.code-inline {
    background: var(--gray-100);
    color: var(--danger-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

/* 分页 | Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

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

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

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 响应式设计 | Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .tabs {
        flex-wrap: wrap;
    }

    main {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 24px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 10px 8px;
    }
}

/* 工具类 | Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.p-1 {
    padding: 8px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* 卡片 | Card */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.card .description {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.card .description code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--danger-color);
}

/* 表单行 | Form Row */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-control {
    flex: 1;
}

.form-row .btn {
    flex-shrink: 0;
}

/* 黑名单列表 | Blacklist List */
.blacklist-list {
    margin-top: 16px;
}

.blacklist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blacklist-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    margin-bottom: 8px;
}

.blacklist-items li:last-child {
    margin-bottom: 0;
}

.blacklist-items code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--gray-800);
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    flex: 1;
    margin-right: 12px;
}

/* 徽章 | Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

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

.badge-secondary {
    background: var(--gray-500);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

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

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

/* 状态指示器 | Status Indicator */
.status-active {
    color: var(--success-color);
    font-weight: 500;
}

.status-inactive {
    color: var(--danger-color);
    font-weight: 500;
}

/* 代码块 | Code Block */
.code-block {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: var(--gray-100);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--gray-800);
    display: inline-block;
}

/* 空消息 | Empty Message */
.empty-message {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 20px;
    font-size: 15px;
}

/* 操作列 | Actions Column */
td.actions {
    white-space: nowrap;
}

td.actions .btn {
    margin-right: 4px;
}

td.actions .btn:last-child {
    margin-right: 0;
}

/* 用户搜索结果样式 | User Search Results Styles */
#user-search-results {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    margin-top: 8px;
    box-shadow: var(--shadow-md);
}

#user-search-results .user-item {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background-color 0.2s;
}

#user-search-results .user-item:last-child {
    border-bottom: none;
}

#user-search-results .user-item:hover {
    background-color: var(--gray-50);
}

#user-search-results .user-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

#user-search-results .user-email {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 2px;
}

#user-search-results .user-id {
    font-size: 12px;
    color: var(--gray-500);
}

#user-search-results .status-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

#user-search-results .status-badge.active {
    background-color: var(--success-color);
}

#user-search-results .status-badge.inactive {
    background-color: var(--danger-color);
}

#user-search-results .role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

#user-search-results .role-badge.admin {
    background-color: var(--warning-color);
    color: white;
}

#user-search-results .role-badge.user {
    background-color: var(--info-color);
    color: white;
}

/* 分页样式 | Pagination Styles */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.pagination-info {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination-buttons .btn {
    min-width: 40px;
    padding: 8px 12px;
    font-size: 14px;
}

.pagination-buttons .btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

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

.pagination-ellipsis {
    color: var(--gray-400);
    padding: 0 8px;
    font-weight: 600;
}

/* 详情弹窗样式 | Details Modal Styles */
.details-modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 详情弹窗头部固定 | Details Modal Header Fixed */
.details-modal-content .modal-header {
    flex-shrink: 0;
    padding: 24px 32px 16px 32px;
}

/* 详情弹窗内容区域可滚动 | Details Modal Body Scrollable */
.details-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px;
    min-height: 0;
}

/* 详情弹窗底部固定 | Details Modal Footer Fixed */
.details-modal-content .modal-footer {
    flex-shrink: 0;
    padding: 20px 32px 24px 32px;
}

.details-grid {
    display: grid;
    gap: 16px;
}

.detail-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.detail-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.detail-value {
    color: var(--gray-900);
    font-size: 14px;
    word-break: break-word;
}

/* 搜索框样式 | Search Box Styles */
.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    min-width: 300px;
    padding: 10px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input[type="text"]::placeholder {
    color: var(--gray-400);
}

/* 响应式设计 | Responsive Design */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 12px;
    }

    .pagination-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .detail-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box input[type="text"] {
        min-width: 100%;
    }
}

/* 应用创建成功对话框样式 | App Created Dialog Styles */
.app-created-dialog-content {
    max-width: 650px;
    padding: 0;
}

.app-created-dialog-content .modal-header {
    padding: 24px 32px 16px 32px;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.app-created-dialog-content .modal-header h3 {
    color: white;
    font-size: 22px;
}

.app-created-dialog-content .modal-body {
    padding: 24px 32px;
    margin-bottom: 0;
}

.app-created-dialog-content .modal-footer {
    padding: 20px 32px 24px 32px;
    margin-top: 0;
    background-color: var(--gray-50);
}

.app-created-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-value {
    padding: 12px 16px;
    background-color: var(--gray-100);
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: var(--gray-900);
    word-break: break-all;
}

.sec-key-section {
    background-color: #fef3c7;
    border: 2px solid var(--warning-color);
    border-radius: 12px;
    padding: 16px;
}

.sec-key-section .info-label {
    color: #92400e;
}

.warning-text,
.warning-text-en {
    font-size: 13px;
    font-weight: 500;
    color: #b45309;
}

.warning-text-en {
    font-size: 12px;
}

.sec-key-container {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.sec-key-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    background-color: white;
    color: var(--gray-900);
    font-weight: 600;
}

.sec-key-input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.copy-icon {
    font-size: 16px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.domains-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-200);
}

.info-tip {
    padding: 12px 16px;
    background-color: #dbeafe;
    border-left: 4px solid var(--info-color);
    border-radius: 6px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
}

/* 响应式调整 | Responsive Adjustments */
@media (max-width: 768px) {
    .app-created-dialog-content {
        max-width: 95%;
    }

    .app-created-dialog-content .modal-header,
    .app-created-dialog-content .modal-body,
    .app-created-dialog-content .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sec-key-container {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
    }
}

/* 应用密钥查看对话框样式 | App Secret Key View Dialog Styles */
.view-sec-key-dialog-content {
    max-width: 600px;
    padding: 0;
}

.view-sec-key-dialog-content .modal-header {
    padding: 24px 32px 16px 32px;
    margin-bottom: 0;
}

.view-sec-key-dialog-content .modal-body {
    padding: 24px 32px;
    margin-bottom: 0;
}

.view-sec-key-dialog-content .modal-footer {
    padding: 20px 32px 24px 32px;
    margin-top: 0;
    background-color: var(--gray-50);
}

.sec-key-view-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 响应式调整 | Responsive Adjustments */
@media (max-width: 768px) {
    .view-sec-key-dialog-content {
        max-width: 95%;
    }

    .view-sec-key-dialog-content .modal-header,
    .view-sec-key-dialog-content .modal-body,
    .view-sec-key-dialog-content .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}
