/* ==================== Inquiry Module Styles ==================== */

/* Panel */
.inquiry-panel { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    background: #f5f7fa; 
    min-height: 0; 
}

/* Tabs */
.inquiry-tabs { 
    display: flex; 
    background: white; 
    border-bottom: 1px solid #e0e0e0; 
    padding: 0 16px; 
    flex-shrink: 0; 
}

.inquiry-tab { 
    padding: 12px 16px; 
    cursor: pointer; 
    color: #666; 
    font-size: 13px; 
    border-bottom: 2px solid transparent; 
    transition: all 0.2s; 
    white-space: nowrap; 
}

.inquiry-tab:hover { color: #1890ff; }
.inquiry-tab.inq-active { color: #1890ff; border-bottom-color: #1890ff; font-weight: 500; }

/* Overview */
.inquiry-overview { 
    flex: 1; 
    overflow-y: auto; 
    padding: 16px; 
    min-height: 0; 
}

/* Section */
.inquiry-section { 
    background: white; 
    border-radius: 8px; 
    border: 1px solid #e8e8e8; 
    margin-bottom: 16px; 
    overflow: hidden; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.03); 
}

.inquiry-section-header { 
    padding: 12px 16px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #f0f0f0; 
    background: #fafafa; 
}

.inquiry-section-header span:first-child { 
    font-weight: 500; 
    color: #333; 
    font-size: 14px; 
}

/* Badge */
.inq-badge { 
    background: #ff4d4f; 
    color: white; 
    padding: 2px 8px; 
    border-radius: 10px; 
    font-size: 12px; 
    font-weight: 500; 
}

/* Deadlines */
.inquiry-deadlines { 
    padding: 8px; 
    max-height: 400px; 
    overflow-y: auto; 
}

.inq-deadline-item { 
    display: flex; 
    align-items: center; 
    padding: 10px 12px; 
    margin: 4px 0; 
    border-radius: 6px; 
    background: #fff1f0; 
    border-left: 3px solid #ff4d4f; 
    transition: background 0.2s; 
}

.inq-deadline-item:hover { background: #ffe7e6; }

.inq-deadline-item.inq-urgent { background: #fff7e6; border-left-color: #faad14; }
.inq-deadline-item.inq-warning { background: #e6f7ff; border-left-color: #1890ff; }
.inq-deadline-item.inq-normal { background: #f6ffed; border-left-color: #52c41a; }

.inq-deadline-icon { 
    font-size: 16px; 
    margin-right: 10px; 
    flex-shrink: 0; 
}

.inq-deadline-info { 
    flex: 1; 
    min-width: 0; 
}

.inq-deadline-title { 
    font-size: 13px; 
    color: #333; 
    margin-bottom: 4px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.inq-deadline-meta { 
    font-size: 12px; 
    color: #888; 
}

.inq-deadline-actions { 
    display: flex; 
    gap: 6px; 
    flex-shrink: 0; 
}

.inq-deadline-actions button { 
    padding: 4px 10px; 
    border: 1px solid #d9d9d9; 
    border-radius: 4px; 
    background: white; 
    color: #666; 
    font-size: 12px; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.inq-deadline-actions button:hover { 
    border-color: #1890ff; 
    color: #1890ff; 
}

/* Suspected */
.inquiry-suspected { 
    padding: 8px; 
    max-height: 400px; 
    overflow-y: auto; 
}

.suspected-item { 
    display: flex; 
    align-items: center; 
    padding: 10px 12px; 
    margin: 4px 0; 
    border-radius: 6px; 
    background: #fffbe6; 
    border-left: 3px solid #faad14; 
    transition: background 0.2s; 
}

.suspected-item:hover { background: #fff7cc; }

.suspected-icon { 
    font-size: 16px; 
    margin-right: 10px; 
    flex-shrink: 0; 
}

.suspected-info { 
    flex: 1; 
    min-width: 0; 
}

.suspected-title { 
    font-size: 13px; 
    color: #333; 
    margin-bottom: 4px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.suspected-meta { 
    font-size: 12px; 
    color: #888; 
}

.suspected-actions { 
    display: flex; 
    gap: 6px; 
    flex-shrink: 0; 
}

.suspected-actions button { 
    padding: 4px 10px; 
    border: 1px solid #d9d9d9; 
    border-radius: 4px; 
    background: white; 
    color: #666; 
    font-size: 12px; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.suspected-actions button:hover { 
    border-color: #1890ff; 
    color: #1890ff; 
}

/* Stats */
.inquiry-stats { 
    padding: 12px; 
}

.stat-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px 0; 
    border-bottom: 1px solid #f0f0f0; 
}

.stat-item:last-child { border-bottom: none; }
.inq-stat-label { color: #666; font-size: 13px; }
.inq-stat-value { color: #333; font-weight: 500; font-size: 13px; }

/* Content */
.inquiry-content { 
    flex: 1; 
    overflow-y: auto; 
    padding: 16px; 
    min-height: 0; 
}

/* Project List */
.project-group { 
    margin-bottom: 16px; 
}

.project-group-header { 
    padding: 8px 12px; 
    background: #f0f2f5; 
    border-radius: 6px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

.project-group-header:hover { background: #e6e9ed; }

.project-group-items { 
    display: none; 
    padding-left: 12px; 
}

.project-group-items.inq-expanded { display: block; }

.project-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 8px 12px; 
    margin: 4px 0; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background 0.2s; 
}

.project-item:hover { background: #e6f7ff; }

.project-item-id { 
    font-size: 12px; 
    color: #888; 
    margin-right: 8px; 
}

.project-item-name { 
    flex: 1; 
    font-size: 13px; 
    color: #333; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.project-item-status { 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 11px; 
    margin-left: 8px; 
}

.project-item-count { 
    font-size: 12px; 
    color: #888; 
    margin-left: 8px; 
}

/* Detail */
.inquiry-detail { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    background: #f5f7fa; 
    min-height: 0; 
}

.inquiry-detail-header { 
    padding: 12px 16px; 
    background: white; 
    border-bottom: 1px solid #e0e0e0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.inquiry-detail-content { 
    flex: 1; 
    overflow-y: auto; 
    padding: 16px; 
    min-height: 0; 
}

/* Loading & Empty States */
.inq-loading-small { 
    padding: 20px; 
    text-align: center; 
    color: #888; 
    font-size: 13px; 
}

.inq-empty-state { 
    padding: 40px 20px; 
    text-align: center; 
}

.inq-empty-state-icon { 
    font-size: 40px; 
    margin-bottom: 12px; 
}

.inq-empty-state-text { 
    color: #888; 
    font-size: 14px; 
}

/* 完整项目列表 */
.inquiry-project-list-full {
    padding: 8px;
    max-height: 600px;
    overflow-y: auto;
}

.inq-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 12px;
}

.inq-stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.inq-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #1a73e8;
}

.inq-stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}


/* 从main.css提取的inquiry相关样式 */
        .inquiry-content { flex: 1; overflow-y: auto; padding: 16px; }
        .inquiry-card { background: white; border-radius: 10px; margin-bottom: 12px; border: 1px solid #e0e0e0; padding: 16px; cursor: pointer; transition: box-shadow 0.15s; }
        .inquiry-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
        .inquiry-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
        .inquiry-card-title { font-size: 14px; font-weight: 600; color: #333; }
        .inquiry-card-date { font-size: 12px; color: #888; }
        .inquiry-card-body { font-size: 13px; color: #666; line-height: 1.6; }
        .inquiry-card-footer { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
        .inquiry-match { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; }
        .inquiry-match.high { background: #dcfce7; color: #16a34a; }
        .inquiry-match.medium { background: #fef3c7; color: #d97706; }
        .inquiry-match.low { background: #f3f4f6; color: #6b7280; }
        .inquiry-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; }
        .inquiry-status.new { background: #dbeafe; color: #1d4ed8; }
        .inquiry-status.replied { background: #dcfce7; color: #16a34a; }
        .inquiry-status.pending { background: #fef3c7; color: #d97706; }
        .inquiry-status.closed { background: #f3f4f6; color: #6b7280; }
        .inquiry-detail { background: white; border-radius: 10px; border: 1px solid #e0e0e0; overflow: hidden; }
        .inquiry-detail-header { padding: 14px 18px; border-bottom: 1px solid #e0e0e0; }
        .inquiry-detail-header h3 { font-size: 15px; color: #333; }
        .inquiry-detail-body { padding: 16px 18px; }
        .matched-inquiry { padding: 10px 14px; background: #f8f9fa; border-radius: 8px; margin-bottom: 8px; border-left: 3px solid #1a73e8; }
        .matched-inquiry .mi-title { font-size: 13px; font-weight: 500; color: #333; }
        .matched-inquiry .mi-meta { font-size: 11px; color: #888; margin-top: 2px; }
        .matched-inquiry .mi-similarity { font-size: 12px; color: #1a73e8; font-weight: 500; }

        /* Shared AI Q&A box at bottom of panels */
        .panel-ai-box { padding: 12px 16px; background: white; border-top: 1px solid #e0e0e0; }
        .panel-ai-box .ai-box-header { font-size: 12px; color: #888; margin-bottom: 6px; }
        .panel-ai-input-row { display: flex; gap: 8px; }
        .panel-ai-input-row input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; outline: none; }
        .panel-ai-input-row input:focus { border-color: #1a73e8; }
        .panel-ai-input-row button { padding: 10px 18px; background: #1a73e8; color: white; border: none; border-radius: 20px; cursor: pointer; font-size: 13px; }
        .panel-ai-input-row button:hover { background: #1557b0; }
        .panel-ai-input-row button:disabled { background: #ccc; }
        .panel-ai-messages { max-height: 300px; overflow-y: auto; margin-bottom: 8px; }
        .panel-ai-messages:empty { display: none; }
        .panel-ai-messages .msg { max-width: 95%; }
/* 新询价解析模块样式 */
.inquiry-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    white-space: nowrap;
}

.inquiry-tab {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}

.inquiry-tab:hover {
    color: #1a73e8;
    background: #f8f9fa;
}

.inquiry-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.inquiry-overview {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.inquiry-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 16px;
    overflow: hidden;
}

.inquiry-section-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
}

.inquiry-section-header .badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

.inquiry-deadlines,
.inquiry-suspected,
.inquiry-stats {
    padding: 12px;
}

.suspected-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
}

.suspected-icon {
    font-size: 20px;
    margin-right: 12px;
}

.suspected-info {
    flex: 1;
}

.suspected-title {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.suspected-meta {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.suspected-actions {
    display: flex;
    gap: 8px;
}

.suspected-actions button {
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.suspected-actions button:hover {
    background: #f0f0f0;
}

.inquiry-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.inquiry-project-list {
    /* 项目列表容器 */
}

.inquiry-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inquiry-detail-header {
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.inquiry-detail-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.inquiry-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.inquiry-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

/* 顶部Tab导航 */
.inquiry-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 8px;
    flex-shrink: 0;
}

.inquiry-tab {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    flex-shrink: 0;
}

.inquiry-tab:hover {
    color: #1a73e8;
    background: #f8f9fa;
}

.inquiry-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

/* 总览页面 */
.inquiry-overview {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 区块 */
.inquiry-section {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 16px;
    overflow: hidden;
}

.inquiry-section-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
}

.inquiry-section-header .badge {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    min-width: 20px;
    text-align: center;
}

/* 内容区域 */
.inquiry-deadlines,
.inquiry-suspected,
.inquiry-stats {
    padding: 12px;
}

/* 截止提醒项 */
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-left: 3px solid #ff9800;
}

.suspected-icon {
    font-size: 18px;
    margin-right: 12px;
}

.suspected-info {
    flex: 1;
    min-width: 0;
}

.suspected-title {
    font-weight: 500;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suspected-meta {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.suspected-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.suspected-actions button {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.suspected-actions button:hover {
    background: #f0f0f0;
}

/* 统计卡片 */
.inquiry-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.inquiry-project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}

.project-item:hover {
    background: #f8f9fa;
}

.project-item-id {
    font-size: 12px;
    color: #666;
    min-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-item-status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #e0e0e0;
}

.project-item-status.new {
    background: #e8f5e9;
    color: #2e7d32;
}

.project-item-status.quoted {
    background: #e3f2fd;
    color: #1565c0;
}

.project-item-status.pending {
    background: #fff3e0;
    color: #ef6c00;
}

.project-item-emails {
    font-size: 12px;
    color: #666;
    min-width: 60px;
    text-align: right;
}

/* 项目详情 */
.inquiry-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

.inquiry-detail-header {
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.inquiry-detail-header h3 {
    font-size: 15px;
    color: #333;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 详情区块 */
.inquiry-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f5f5f5; min-height: 0; }
.inquiry-overview { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.inquiry-content { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.inquiry-detail { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f5f5f5; min-height: 0; }
.inquiry-detail-content { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
