/**
 * VIP授权管理系统 - 自定义样式
 * VIP Management System - Custom Styles
 */

/* 全局样式 */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --info-color: #0284c7;
    --light-color: #f8fafc;
    --dark-color: #1f2937;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    border-radius: 0.375rem;
    margin: 0 0.25rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* 按钮样式 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #047857);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #b45309);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #0369a1);
}

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

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

/* 表格样式 */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border-color);
    vertical-align: middle;
}

/* 状态样式 */
.status-normal {
    color: var(--success-color);
    background-color: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-warning {
    color: var(--warning-color);
    background-color: rgba(217, 119, 6, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-critical {
    color: var(--danger-color);
    background-color: rgba(220, 38, 38, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-expired {
    color: #6b7280;
    background-color: rgba(107, 114, 128, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
}

/* 表单样式 */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background-color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    background-color: white;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* 告警样式 */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-left-color: var(--success-color);
    color: #047857;
}

.alert-danger {
    background-color: rgba(220, 38, 38, 0.1);
    border-left-color: var(--danger-color);
    color: #b91c1c;
}

.alert-warning {
    background-color: rgba(217, 119, 6, 0.1);
    border-left-color: var(--warning-color);
    color: #b45309;
}

.alert-info {
    background-color: rgba(2, 132, 199, 0.1);
    border-left-color: var(--info-color);
    color: #0369a1;
}

/* 面包屑导航 */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--dark-color);
    font-weight: 600;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* 页脚样式 */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-top: auto;
}

/* 加载动画 */
.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 1s ease-in-out infinite;
}

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

/* 统计卡片样式 */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stats-card .stats-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* 搜索框样式 */
.search-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .stats-card {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .stats-card .stats-number {
        font-size: 1.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* 打印样式 */
@media print {
    .navbar, .breadcrumb, .btn, .modal, footer {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table {
        box-shadow: none !important;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
}

/* 进度条样式 */
.progress {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 9999px;
}

/* 成功/错误消息样式 */
.message-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1055;
    max-width: 350px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.empty-state .empty-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
