/* NorthLake 知识卡片系统 - 主样式文件 */

/* 导入Inter字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 全局样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 6px;
    --transition-speed: 0.2s;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    font-weight: 400;
    background-color: #d3e1f033;
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

/* 确保页面占满视口高度 */
html, body {
    height: 100%;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    transition: transform var(--transition-speed) ease-in-out;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* 自定义导航栏样式 */
.custom-navbar {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(60, 169, 246, 0.7)) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    transition: all 0.3s ease;
}

/* 品牌标识样式 */
.custom-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-brand:hover {
    color: #007bff !important;
    transform: scale(1.02);
}

.navbar-logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 导航链接样式 */
.custom-nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: #495057 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.custom-nav-link:hover {
    color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.custom-nav-link.active {
    color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.15);
    font-weight: 600;
}

.custom-nav-link i {
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* 通知图标容器样式 */
.navbar-nav li.nav-item.dropdown {
    display: flex !important;
    align-items: center !important;
}

/* 通知图标特殊样式 */
.navbar-nav .nav-link.notification-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    text-decoration: none !important;
    margin: auto !important;
}

.navbar-nav .nav-link.notification-icon i {
    margin-right: 0 !important;
    margin-left: 0 !important;
    font-size: 1.1rem !important;
}

/* 搜索框样式 */
.custom-search-input {
    border: 2px solid rgba(0, 123, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.8);
    color: #495057;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px 0 0 8px;
}

.custom-search-input::placeholder {
    color: rgba(73, 80, 87, 0.7);
}

.custom-search-input:focus {
    background-color: white;
    border-color: #007bff;
    color: #495057;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-search-btn {
    border: 2px solid rgba(0, 123, 255, 0.0);
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    border-left: none;
    transition: all 0.3s ease;
}

.custom-search-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: scale(1.05);
}

/* 按钮样式 */
.custom-btn {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #ffffff;
    background-color: rgba(0, 123, 255, 0.1);
    color: #ffffff;
    transition: all 0.3s ease;
}

.custom-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* 下拉菜单样式 */
.custom-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 0.5rem;
}

.custom-dropdown .dropdown-header {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.custom-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.custom-dropdown .dropdown-item:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.custom-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .custom-navbar {
        padding: 0.75rem 0;
    }
    
    body {
        padding-top: 70px; /* 移动端导航栏高度调整 */
    }
    
    .navbar-logo {
        height: 50px;
    }
    
    .custom-brand {
        font-size: 1.6rem;
    }
    
    .brand-text {
        display: none;
    }
    
    .custom-nav-link {
        font-size: 1rem;
        padding: 0.5rem 1rem !important;
    }
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 45px;
    }
    
    .custom-search-input,
    .custom-search-btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .custom-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .custom-navbar {
        padding: 0.5rem 0;
    }
    
    body {
        padding-top: 64px; /* 小屏幕导航栏高度调整 */
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .custom-brand {
        font-size: 1.4rem;
    }
}

/* 用户头像样式增强 */
.navbar-nav .avatar-sm,
.avatar-sm.rounded-circle {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* 清除用户头像内图标的默认margin */
.navbar-nav .avatar-sm i,
.avatar-sm.rounded-circle i,
.navbar-nav .avatar-md i,
.avatar-md.rounded-circle i,
.navbar-nav .avatar-lg i,
.avatar-lg.rounded-circle i {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
}

.navbar-nav .avatar-md,
.avatar-md.rounded-circle {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.navbar-nav .avatar-lg,
.avatar-lg.rounded-circle {
    width: 64px !important;
    height: 64px !important;
    font-size: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

/* 导航链接激活状态 */
.navbar-nav .nav-link.active {
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* 卡片样式 */
.card {
    transition: transform var(--transition-speed) ease-in-out, 
                box-shadow var(--transition-speed) ease-in-out;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(144, 203, 245, 0.3);
}

.card-header {
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
    font-weight: 500;
}

.card-footer {
    border-top: 1px solid #e9ecef;
    background-color: transparent;
}

/* 表单样式 */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: border-color 0.15s ease-in-out, 
                box-shadow 0.15s ease-in-out;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* 表单标签 */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* 输入组样式 */
.input-group .form-control {
    border-right: 0;
}

.input-group .btn {
    border-left: 0;
}

/* 警告消息样式 */
.alert {
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    font-size: 0.95rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    font-size: 0.75em;
    border-radius: calc(var(--border-radius) * 0.5);
}

/* 分页样式 */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
    border-radius: var(--border-radius);
    margin: 0 2px;
    transition: all var(--transition-speed) ease-in-out;
}

.page-link:hover {
    color: #0056b3;
    background-color: var(--light-color);
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 统计卡片样式 */
.stats-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    color: white;
    transition: transform var(--transition-speed) ease-in-out;
}

.stats-card:hover {
    transform: translateY(-3px);
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* 搜索框增强 */
.navbar .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Toast 样式 */
.toast {
    border-radius: var(--border-radius);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
}

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

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

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 工具提示 */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

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

::-webkit-scrollbar-track {
    background: var(--light-color);
}

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

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

/* 深色模式准备 (预留) */
@media (prefers-color-scheme: dark) {
    /* 未来实现深色模式 */
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
        font-weight: 600;
    }
}

/* 减少动画的用户偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* 自定义工具类 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-soft {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.border-soft {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #17b6b8 0%, #007bff 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #17a2b8 0%, #1e7e34 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #dc3545 0%, #6f42c1 100%);
} 