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

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

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

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--primary-color) 150%);
}

.login-box {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

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

.login-box h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Checkbox标签样式 */
label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

label.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

label.checkbox-label span {
    cursor: pointer;
}

input,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: monospace;
    resize: vertical;
    transition: all 0.3s ease;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.5rem 1rem;
}

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

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

/* 头部导航 */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 内容区域 */
.content {
    display: none;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    flex-shrink: 0;
}

.stat-card .stat-icon svg {
    width: 30px;
    height: 30px;
}

.stat-card .stat-info h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.stat-card .stat-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 图表网格 */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
}

.chart-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.chart-container {
    height: 180px;
    position: relative;
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.chart-value {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 备份区域 */
.backup-section {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.backup-section h3 {
    margin-bottom: 1rem;
}

/* 账号管理区域 */
.account-section {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
}

.account-section h3 {
    margin-bottom: 1.5rem;
}

.account-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.account-card {
    background: var(--bg-dark);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.account-card h4 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.account-card .form-group {
    margin-bottom: 1rem;
}

.account-card .form-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.account-card input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.account-card input:focus {
    border-color: var(--primary-color);
}

.account-card button {
    width: 100%;
}
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon svg {
    width: 32px;
    height: 32px;
}

.student-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.class-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.database-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.server-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 快捷操作 */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.action-icon svg {
    width: 24px;
    height: 24px;
}

.action-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 最近学生 */
.recent-students {
    margin-bottom: 2rem;
}

.recent-students h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.students-list {
    display: grid;
    gap: 0.75rem;
}

.student-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.student-item:hover {
    background: var(--bg-hover);
}

.student-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.student-details h4 {
    margin-bottom: 0.25rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-details p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-actions {
    display: flex;
    gap: 0.5rem;
}

.student-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.search-bar input,
.search-bar select {
    flex: 1;
    background: var(--bg-dark);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--bg-dark);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td:not(:last-child),
.data-table th:not(:last-child) {
    max-width: 200px;
}

/* 操作列不省略 */
.data-table td:last-child,
.data-table th:last-child {
    max-width: none;
    white-space: normal;
    text-overflow: inherit;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

#page-info {
    color: var(--text-secondary);
}

/* 系统状态 */
.system-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.status-card.large {
    grid-column: span 2;
}

.status-card h3 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.status-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.status-indicator.warning {
    background: var(--warning-color);
}

.status-indicator.danger {
    background: var(--danger-color);
}

.progress-bar {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-dark);
    border-radius: 0.5rem;
}

.info-item label {
    margin: 0;
    color: var(--text-secondary);
}

.info-item span {
    font-weight: 500;
}

.backup-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.backups-list {
    max-height: 400px;
    overflow-y: auto;
}

.backup-item {
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.backup-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.backup-name {
    font-weight: 600;
    color: var(--text-primary);
}

.backup-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.backup-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.backup-item .backup-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-sm svg {
    display: block;
}

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

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

#student-form {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.3s ease;
    z-index: 2000;
    border-left: 4px solid var(--primary-color);
}

.toast.active {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

/* 加载状态 */
.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* 错误消息 */
.error-message {
    color: var(--danger-color);
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .content {
        padding: 1rem;
    }

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

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

    .system-status-grid {
        grid-template-columns: 1fr;
    }

    .status-card.large {
        grid-column: span 1;
    }

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

    .search-bar {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        transform: translateY(-100px);
    }

    .toast.active {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 学生详情模态框 */
.detail-content {
    padding: 1.5rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-item span {
    font-size: 1rem;
    color: var(--text-primary);
}

/* 标签列表 */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: var(--bg-hover);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* 数据管理页面样式 */
.schema-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.schema-sidebar {
    background: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.schema-sidebar h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.tables-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-item {
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.table-item:hover {
    background: var(--bg-hover);
    transform: translateX(0.25rem);
}

.table-item.active {
    background: var(--primary-color);
    border-color: var(--primary-hover);
}

.table-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.table-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.schema-main {
    background: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.table-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table-detail-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.table-columns-section {
    margin-bottom: 2rem;
}

.table-columns-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.table-create-section {
    margin-top: 2rem;
}

.table-create-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.sql-code {
    background: var(--bg-darker);
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 选项卡样式 */
.table-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.tab-content {
    display: none;
}

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

/* 数据操作样式 */
.header-actions {
    display: flex;
    gap: 0.75rem;
}

.data-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-darker);
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}

.data-filters {
    display: flex;
    gap: 0.5rem;
}

.data-filters input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.data-filters input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.data-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-darker);
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.data-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.null-value {
    color: var(--text-secondary);
    font-style: italic;
}

/* 通用的文本省略类 */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-ellipsis-sm {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-ellipsis-md {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-ellipsis-lg {
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格行省略 */
.table-row-ellipsis td {
    white-space: nowrap;
}

/* 表格单元格强制省略 */
.table-cell-ellipsis {
    max-width: 300px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
