/* ========================================
   宇图瑞视前台应用 - 统一样式表
   版本: 1.0.0
   更新时间: 2025-10-21
   ======================================== */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f7fafc;
}

/* ==================== 头部导航样式 ==================== */
.xc_header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    height: 60px;
}

.xc_nav_container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.xc_logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
}

.xc_logo_icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.xc_nav_menu {
    display: flex;
    gap: 24px;
    list-style: none;
}

.xc_nav_item {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    cursor: pointer;
}

.xc_nav_item:hover {
    color: #667eea;
}

.xc_nav_item.xc_active {
    color: #667eea;
    font-weight: 600;
}

.xc_login_btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 18px;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.xc_login_btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}

/* 新增顶部动作区样式 */
.xc_nav_actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xc_action_link {
    font-size: 12px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    color: #334155;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    transition: color 0.2s, box-shadow 0.2s;
}
.xc_action_link:hover { color: #667eea; box-shadow: 0 2px 8px rgba(102,126,234,0.15); }

.xc_lang_tag { font-size: 12px; color: #475569; padding: 0 6px; }

/* ==================== 主内容区域 ==================== */
/* 页面内容顶部占位避免与固定头部重叠 */
.xc_main_spacer { height: 60px; }

.xc_main_content {
    margin-top: 60px;
    min-height: calc(100vh - 200px);
}

/* ==================== 侧边栏菜单 ==================== */
.xc_sidebar {
    background: #fff;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
    overflow: hidden;
}

.xc_sidebar_header {
    background: #f7fafc;
    padding: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.xc_sidebar_header.xc_gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    text-align: center;
}

.xc_sidebar_body {
    padding: 20px 0;
}

.xc_menu_item {
    padding: 15px 30px;
    margin: 0;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    color: #64748b;
    border-left: 3px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

.xc_menu_item:hover {
    background: #f8fafc;
    color: #334155;
}

.xc_menu_item.xc_active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    border-left-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ==================== 内容区域 ==================== */
.xc_content_area {
    background: #fff;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.xc_page_title {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 20px;
}

.xc_section_title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    margin-top: 40px;
}

.xc_section_title:first-of-type {
    margin-top: 0;
}

.xc_section_subtitle {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid #667eea;
}

/* ==================== 表单组件 ==================== */
.xc_form_group {
    margin-bottom: 25px;
}

.xc_form_label {
    display: block;
    font-size: 15px;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 500;
}

.xc_form_input,
.xc_form_textarea,
.xc_form_select,
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #f7fafc;
}

.xc_form_input:focus,
.xc_form_textarea:focus,
.xc_form_select:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.xc_form_textarea,
textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* ==================== 按钮组件 ==================== */
.xc_btn,
.btn {
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-weight: 500;
}

.xc_btn_primary,
.btn-submit,
.btn-reply,
.btn-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.xc_btn_primary:hover,
.btn-submit:hover,
.btn-reply:hover,
.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.xc_btn_secondary {
    background: #2d3748;
    color: #fff;
}

.xc_btn_secondary:hover {
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.xc_btn:disabled,
.btn-submit:disabled,
.btn-reply:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ==================== 表格组件 ==================== */
.xc_table_wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.xc_points_table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.xc_points_table thead {
    background: #fafbfc !important;
    color: #374151 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.xc_points_table thead th {
    padding: 10px 8px !important;
    text-align: center !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    border: none !important;
}

.xc_points_table tbody tr {
    border-bottom: 1px solid #f7fafc;
    transition: all 0.3s;
}

.xc_points_table tbody tr:hover {
    background: #f7fafc;
}

.xc_points_table tbody tr:last-child {
    border-bottom: none;
}

.xc_points_table tbody td {
    padding: 16px 15px;
    text-align: center;
    color: #4a5568;
    font-size: 14px;
}

/* ==================== 弹窗组件 ==================== */
.xc_modal_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: xc_fadeIn 0.3s ease;
}

.xc_modal_overlay.xc_show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes xc_fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.xc_modal {
    background: #fff;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: xc_slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes xc_slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.xc_modal_header {
    padding: 25px 30px;
    border-bottom: 2px solid #f7fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xc_modal_title {
    font-size: 24px;
    font-weight: bold;
    color: #2d3748;
}

.xc_modal_close {
    width: 35px;
    height: 35px;
    border: none;
    background: #f7fafc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #718096;
    transition: all 0.3s;
}

.xc_modal_close:hover {
    background: #667eea;
    color: #fff;
    transform: rotate(90deg);
}

.xc_modal_body {
    padding: 30px;
}

.xc_modal_footer {
    padding: 20px 30px;
    border-top: 2px solid #f7fafc;
    display: flex;
    justify-content: flex-end;
}

/* ==================== 分页组件 ==================== */
.xc_pagination {
    margin-top: 30px;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.xc_pagination_info {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.xc_pagination_numbers {
    display: flex;
    flex-direction: row;  /* 水平排列 */
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;  /* 自动换行 */
}

.xc_pagination_link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.xc_pagination_link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.xc_page_number {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;  /* 改为inline-flex */
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    position: relative;
    overflow: hidden;
    white-space: nowrap;  /* 防止文字换行 */
    text-decoration: none;  /* 作为链接时去掉下划线 */
}

.xc_page_number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.xc_page_number:hover::before {
    left: 100%;
}

.xc_page_number:hover {
    border-color: #667eea;
    color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.xc_page_number.xc_active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    pointer-events: none;  /* 当前页禁用点击 */
}

.xc_page_number.xc_active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* 响应式分页 */
@media (max-width: 768px) {
    .xc_pagination {
        flex-direction: column;
        align-items: stretch;
    }
    
    .xc_pagination_info {
        text-align: center;
    }
    
    .xc_pagination_numbers {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ==================== 徽章组件 ==================== */
.xc_badge,
.ticket-status,
.urgency-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-1 {
    background: #fff3cd;
    color: #856404;
}

.status-2 {
    background: #cfe2ff;
    color: #084298;
}

.status-3 {
    background: #d1e7dd;
    color: #0f5132;
}

.status-4 {
    background: #e2e3e5;
    color: #6c757d;
}

/* ==================== 底部信息 ==================== */
.xc_footer {
    background: #1a202c;
    color: #a0aec0;
    padding: 40px;
    text-align: center;
}

.xc_footer_info {
    max-width: 1400px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 2;
}

.xc_footer_link {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.xc_footer_link:hover {
    color: #667eea;
}

.xc_footer_social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.xc_social_icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.xc_social_icon:hover {
    background: #667eea;
    transform: translateY(-3px);
}

/* ==================== 空状态 ==================== */
.xc_empty_state,
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #a0aec0;
}

.xc_empty_icon,
.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
}

.xc_empty_text {
    font-size: 16px;
}

/* ==================== 提示信息 ==================== */
.xc_notice {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 15px 20px;
    margin-bottom: 40px;
    border-radius: 4px;
    color: #c53030;
    font-size: 14px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .xc_sidebar {
        position: static;
    }

    .xc_sidebar_body {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .xc_content_area {
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .xc_nav_menu {
        display: none;
    }

    .xc_content_area {
        padding: 30px 20px;
    }

    .xc_page_title {
        font-size: 24px;
    }

    .xc_sidebar_body {
        grid-template-columns: 1fr;
    }

    .xc_pagination {
        flex-direction: column;
        gap: 10px;
    }

    .xc_pagination_info {
        margin-right: 0;
    }
}
