/* PAPI 插件管理后台 - 样式表 */

/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #303133;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: #adb5bd;
    padding: .75rem 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
}

.sidebar .nav-link.active {
    color: #fff;
    border-left: 3px solid #409EFF;
    background-color: rgba(255, 255, 255, .1);
}

/* 主内容区域样式 */
main {
    padding-top: 1.5rem;
}

/* 卡片样式 */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ebeef5;
    padding: 15px 20px;
}

/* 表格样式 */
.table th {
    border-top: none;
    font-weight: 600;
    color: #606266;
}

.table-hover tbody tr:hover {
    background-color: #f2f6fc;
}

/* 按钮样式 */
.btn-primary {
    background-color: #409EFF;
    border-color: #409EFF;
}

.btn-primary:hover {
    background-color: #66b1ff;
    border-color: #66b1ff;
}

.btn-outline-light:hover {
    color: #409EFF;
    background-color: #fff;
    border-color: #409EFF;
}

/* 表单样式 */
.form-control:focus {
    border-color: #409EFF;
    box-shadow: 0 0 0 0.2rem rgba(64, 158, 255, .25);
}

/* 模态框样式 */
.modal-header {
    border-bottom: 1px solid #ebeef5;
    padding: 15px 20px;
}

.modal-footer {
    border-top: 1px solid #ebeef5;
    padding: 15px 20px;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 0;
    }
    
    main {
        padding-top: 1rem;
    }
}

/* 统计卡片样式 */
.card .fa-2x {
    opacity: 0.8;
}

/* 登录页面样式 */
#login-container {
    margin-top: 100px;
}

#login-container .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 内容页面切换动画 */
.content-page {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 状态标签样式 */
.badge-active {
    background-color: #67C23A;
    color: white;
}

.badge-inactive {
    background-color: #909399;
    color: white;
}

/* 操作按钮组样式 */
.action-buttons .btn {
    padding: .25rem .5rem;
    font-size: .875rem;
    margin-right: 5px;
}

/* 提示信息样式 */
.alert {
    border-radius: 4px;
    padding: 8px 16px;
    margin-bottom: 16px;
}

.alert-success {
    color: #67C23A;
    background-color: #f0f9eb;
    border-color: #e1f3d8;
}

.alert-danger {
    color: #F56C6C;
    background-color: #fef0f0;
    border-color: #fde2e2;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #409EFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner.large {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    margin-bottom: 15px;
}

.loading-message {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
}

.toast-success {
    background-color: #28a745;
}

.toast-error {
    background-color: #dc3545;
}

.toast-hide {
    animation: fadeOut 0.3s ease-in-out;
}

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

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