/* 星球软件商用模块系统 - 主样式文件 */
/* 使用指定的颜色主题和移动端优先设计 */

:root {
    --primary-color: #006699;
    --background-color: #f9f5e9;
    --card-background: #E1F0F0;
    --text-color: #5a4a3a;
    --accent-color-1: #006699;
    --accent-color-2: #d4b483;
    --accent-color-3: #bf9b7a;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 102, 153, 0.15);
    --transition: all 0.3s ease;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    box-shadow: 0 2px 15px rgba(0, 102, 153, 0.3);
    padding: 1rem 0;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 按钮样式 */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 102, 153, 0.4);
    color: white;
}

.btn-outline-primary-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-primary-custom:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 卡片样式 */
.card-custom {
    background-color: var(--card-background);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 102, 153, 0.2);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

.card-body-custom {
    padding: 2rem;
}

.card-footer-custom {
    background-color: rgba(0, 102, 153, 0.05);
    border-top: 1px solid rgba(0, 102, 153, 0.1);
    padding: 1.5rem;
}

/* 表单样式 */
.form-control-custom {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background-color: white;
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 153, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* 表格样式 */
.table-custom {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table-custom thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.table-custom tbody td {
    padding: 1rem;
    border-color: rgba(0, 102, 153, 0.1);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background-color: rgba(0, 102, 153, 0.05);
}

/* 页脚样式 */
.footer-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    color: white;
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-custom h5,
.footer-custom h6 {
    color: white;
    font-weight: 700;
}

.footer-custom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-custom a:hover {
    color: white;
    text-decoration: underline;
}

.footer-custom .list-unstyled li {
    margin-bottom: 0.5rem;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--accent-color-1);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}

/* 警告框样式 */
.alert-custom {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
}

.alert-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

/* 徽章样式 */
.badge-custom {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.badge-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    color: white;
}

.badge-success-custom {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
}

.badge-warning-custom {
    background: linear-gradient(135deg, var(--warning-color), #fd7e14);
    color: white;
}

.badge-danger-custom {
    background: linear-gradient(135deg, var(--danger-color), #e83e8c);
    color: white;
}

/* 加载动画 */
.spinner-custom {
    color: var(--primary-color);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 102, 153, 0.3);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn-primary-custom,
    .btn-outline-primary-custom {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card-body-custom {
        padding: 1.5rem;
    }
    
    .table-custom thead th,
    .table-custom tbody td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .footer-custom {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-custom .row > div {
        margin-bottom: 2rem;
    }
    
    #backToTop {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .card-body-custom {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
}

/* 特殊效果 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-1)) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* 工具类 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 打印样式 */
@media print {
    .navbar-custom,
    .footer-custom,
    #backToTop {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}