/* 确保所有企业表格都显示 */
.company-table-wrapper {
    display: block !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    clear: both !important;
}

.data-analysis-table {
    display: table !important;
    width: 100% !important;
    table-layout: auto !important;
}

/* 企业最新信息搜索结果样式 */
.search-result-item.detail-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 30px;
    margin: 20px 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-result-item.detail-result .company-name {
    color: white;
    font-size: 28px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.company-detail-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.detail-section h5 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0px !important;
    align-items: start !important;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0px !important;
    align-items: start !important;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0px !important;
    padding: 1px 2px !important;
    line-height: 1.8 !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px !important;
    line-height: 1.0 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
}

.detail-value {
    color: white;
    font-size: 9px !important;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 0px 2px !important;
    border-radius: 4px;
    word-break: break-all;
    min-height: auto !important;
    height: auto !important;
    line-height: 1.0 !important;
    margin: 0 !important;
    vertical-align: top !important;
}

.detail-value.phone-masked {
    background: rgba(255, 193, 7, 0.2);
    border-left: 3px solid #ffc107;
}

.search-time {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.search-time small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* AI历史清单样式 - 保持原有样式不变 */
.query-history-list {
    margin-top: 20px;
}

/* AI历史清单记录项 - 确保内容显示在下方 */
.query-history-list .history-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

/* 强制确保历史项目垂直布局 */
.history-item {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* 确保报告内容在企业信息下方显示 */
.history-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 12px !important;
    clear: both !important;
}

.query-history-list .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    width: 100%;
}

.query-history-list .history-content {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    margin: 0;
    clear: both !important;
}

/* 当内容被JavaScript显示时，强制覆盖隐藏样式 */
.query-history-list .history-content[data-visible="true"],
.query-history-list .history-content.history-content-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 企业搜索历史专用样式 - 与AI报告完全分离 */
.company-search-history-list .history-item {
    border: 1px solid #e5e7eb;
    margin: 4px 0;
    padding: 8px 12px;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.company-search-history-list .history-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
    border-color: #3b82f6;
}

.company-search-history-list .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
    flex-shrink: 0;
    gap: 8px;
}

.company-search-history-list .history-info {
    flex: 1;
    min-width: 0;
}

.company-search-history-list .history-info h4 {
    margin: 0 0 2px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.company-search-history-list .history-meta {
    margin: 0;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.1;
}

.company-search-history-list .history-meta span {
    margin-right: 8px;
    display: inline-block;
    padding: 1px 4px;
    background: #f3f4f6;
    border-radius: 2px;
    font-size: 15px;
    line-height: 1.1;
}

.company-search-history-list .history-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

.company-search-history-list .history-content {
    display: none;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-top: 6px;
    width: 100%;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 确保AI报告页面的历史内容可以正常显示 */
.history-content[data-visible="true"],
.history-content.history-content-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.report-preview {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.report-preview h5 {
    margin: 0 0 4px 0 !important;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    padding: 0px 0;
    border-bottom: 2px solid #007bff;
    position: relative;
}

.report-preview h5:before {
    content: '📈';
    margin-right: 8px;
}

.report-text {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #374151;
    font-size: 15px;
    margin-bottom: 20px;
    max-height: none;
    overflow: visible;
    background: #ffffff;
    padding: 0px !important;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-note {
    margin: 20px 0 0 0;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 4px;
    border-left: 4px solid #10b981;
}

/* 按钮样式 - AI报告使用原始样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:hover {
    opacity: 0.9;
}

/* 企业搜索历史专用按钮样式 */
.company-search-history-list .btn {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 4px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    line-height: 1.1;
}

.company-search-history-list .btn-small {
    padding: 5px 10px;
    font-size: 15px;
}

.no-history {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 16px;
}

.no-history small {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #d1d5db;
}

/* 企业搜索历史样式 - 现在使用与AI报告一致的.history-item样式 */
.company-search-history-section {
    margin-bottom: 40px;
}

.company-search-history-section h3 {
    margin-bottom: 12px;
    font-size: 20px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-search-history-section p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.4;
}

.company-search-history-list {
    margin-top: 16px;
}

/* 企业详情加载和错误状态 */
.company-detail-loading {
    text-align: center;
    padding: 4px 8px !important;
    color: #6b7280;
    font-style: italic;
}

.company-detail-error {
    text-align: center;
    padding: 4px 8px !important;
    color: #dc3545;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}



/* 响应式设计 */
@media (max-width: 768px) {
    /* AI历史清单响应式 - 保持原有样式 */
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .history-info {
        width: 100%;
    }
    
    .history-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .history-meta span {
        margin-right: 10px;
        font-size: 13px;
        background: #f3f4f6;
        padding: 4px 8px;
        border-radius: 4px;
        white-space: nowrap;
    }
    
    .history-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .history-content {
        padding: 15px;
        margin-top: 10px;
    }
    
    .report-preview h5 {
        font-size: 16px;
        margin-bottom: 4px !important;
    }
    
    .report-text {
        font-size: 14px;
        line-height: 1.6;
        padding: 15px;
    }
    
    .btn {
        margin-left: 0;
        margin-right: 5px;
        padding: 8px 12px;
        font-size: 14px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    /* 企业搜索历史移动端专用样式 */
    .company-search-history-list .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .company-search-history-list .history-info h4 {
        font-size: 17px;
    }
    
    .company-search-history-list .history-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .company-search-history-list .history-meta span {
        margin-right: 6px;
        font-size: 13px;
        padding: 1px 3px;
        background: #f3f4f6;
        border-radius: 2px;
        white-space: nowrap;
        line-height: 1.1;
    }
    
    .company-search-history-list .history-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .company-search-history-list .history-content {
        padding: 8px;
        margin-top: 4px;
    }
    
    .company-search-history-list .btn {
        margin-left: 0;
        margin-right: 3px;
        padding: 5px 10px;
        font-size: 15px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .search-result-item.detail-result {
        padding: 20px;
        margin: 15px 0;
    }
    
    .search-result-item.detail-result .company-name {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .detail-section {
        padding: 15px;
    }
}

/* 历史控制按钮样式 */
.history-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 0;
}

.history-controls .btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
}

.history-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* 股东信息样式 */
.shareholder-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.shareholder-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shareholder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.shareholder-header h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.shareholder-type {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.shareholder-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.shareholder-details .detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shareholder-details .detail-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
}

.shareholder-details .detail-value {
    color: white;
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* 响应式设计 - 股东信息 */
@media (max-width: 768px) {
    .shareholder-details {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .shareholder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .shareholder-item {
        padding: 12px;
    }
    
    .shareholder-header h4 {
        font-size: 15px;
    }
    
    .shareholder-details .detail-label {
        font-size: 11px;
    }
    
    .shareholder-details .detail-value {
        font-size: 13px;
        padding: 3px 6px;
    }
}