/* 全局样式 */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* 页面内容居中与轻微右移 */
.page-centered {
    width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 1400px) {
    .page-centered {
        padding-left: 64px;
        padding-right: 64px;
    }
}

@media (max-width: 768px) {
    .page-centered {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-icon {
    font-size: 4rem;
    color: var(--primary-color);
}

/* 额度卡片样式 */
.quota-card {
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quota-item h3 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* 统计卡片样式 */
.stat-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* 密钥值样式 */
.key-value {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #d63384;
}

/* 信息文本样式 */
.info-text {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.9rem;
    margin: 0;
    background: none;
    border: none;
    padding: 0;
}

/* 表格样式 */
.table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

.table th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
}

/* 按钮样式 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 卡片动画 */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 标签页样式 */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* 加载动画 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* 模态框样式 */
.modal-content {
    border-radius: 10px;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* 进度条样式 */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* 加载蒙版 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-box {
    text-align: center;
    background: #fff;
    padding: 24px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Alert样式 */
.alert {
    border-radius: 8px;
    border: none;
}

/* 徽章样式 */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* 表单控件样式 */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 页脚样式 */
footer {
    margin-top: auto;
}
