/* 启明白企业详情页 2026 改版样式
 * 仅被 templates/company.html 与 templates_mobile/company.html 引用，
 * 不修改 layui.css / min.css / adapt.css，可整体回滚。
 */

/* ---------- 基础排版 ---------- */
.co-wrap {
    /* 顶部固定品牌栏高度 65px，预留间距避免企业名贴顶 */
    padding-top: 80px;
    /* min.css 的 .con-container 为 overflow:auto，会破坏左侧导航 sticky，这里放开 */
    overflow: visible;
}

.co-hero {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, .05);
    padding: 22px 24px 18px;
    margin-top: 10px;
}

.co-hero-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.co-avatar {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-sizing: border-box;
    word-break: break-all;
}

.co-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

.co-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    word-break: break-all;
}

.co-title .co-status {
    margin-left: 8px;
    vertical-align: 2px;
}

.co-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.co-badges .co-tag {
    max-width: 100%;
}

/* 状态标签 */
.co-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    white-space: nowrap;
}

.co-status--open {
    color: #0f8b62;
    background: #e9f7f1;
    border: 1px solid #c6ebda;
}

.co-status--danger {
    color: #d93025;
    background: #fdeceb;
    border: 1px solid #f7c9c5;
}

.co-status--warn {
    color: #b26a00;
    background: #fff6e6;
    border: 1px solid #ffe1b3;
}

/* 通用小标签 */
.co-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 18px;
    color: #0f8b62;
    background: #eef8f3;
    border: 1px solid #d6eee2;
    word-break: break-all;
}

.co-tag--gray {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.co-tag--warn {
    color: #b26a00;
    background: #fff6e6;
    border-color: #ffe1b3;
}

/* 头部关键信息 */
.co-kv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 28px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed #edf0f3;
}

.co-kv-item {
    display: flex;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
}

.co-kv-k {
    flex: 0 0 112px;
    color: #8a94a6;
}

.co-kv-v {
    flex: 1 1 auto;
    min-width: 0;
    color: #1f2937;
    word-break: break-all;
}

.co-kv-item--full {
    grid-column: 1 / -1;
}

/* 未登录脱敏 */
.co-lock {
    color: #9aa3af;
    letter-spacing: 1px;
}

.co-lock a {
    color: #ff952c;
    font-weight: 600;
    text-decoration: none;
}

.co-lock em {
    font-style: normal;
    margin-left: 6px;
    color: #0f8b62;
    font-size: 12px;
    letter-spacing: 0;
}

/* ---------- 布局：左侧导航 + 右侧内容 ---------- */
.co-body {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 16px;
}

.co-aside {
    flex: 0 0 176px;
    width: 176px;
    position: sticky;
    top: 80px;
}

.co-main {
    flex: 1 1 auto;
    min-width: 0;
}

.co-nav {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, .04);
    padding: 8px;
}

.co-nav a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.co-nav a:hover {
    background: #f2f9f5;
    color: #0f8b62;
}

/* ---------- 内容卡片 ---------- */
.co-card {
    background: #fff;
    border: 1px solid #eef1f4;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, .04);
    padding: 4px 22px 20px;
    margin-bottom: 16px;
    scroll-margin-top: 82px;
}

.co-card-h {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 14px 0 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid #f1f3f5;
}

.co-card-h h2 {
    position: relative;
    margin: 0;
    padding-left: 12px;
    font-size: 17px;
    font-weight: 600;
    color: #111827;
}

.co-card-h h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: #0f8b62;
}

.co-count {
    font-size: 13px;
    color: #8a94a6;
}

.co-count b {
    color: #0f8b62;
    font-weight: 600;
}

/* 公司简介 */
.co-intro {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.9;
    color: #4b5563;
    word-break: break-all;
}

.co-intro:last-child {
    margin-bottom: 0;
}

.co-intro a {
    color: #0f8b62;
    text-decoration: none;
}

/* ---------- 工商信息表格式布局 ---------- */
.co-dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #f1f3f5;
    border-left: 1px solid #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
}

.co-dl-item {
    display: flex;
    min-width: 0;
    border-right: 1px solid #f1f3f5;
    border-bottom: 1px solid #f1f3f5;
}

.co-dl-k {
    flex: 0 0 104px;
    padding: 9px 10px;
    background: #f8fafb;
    color: #6b7280;
    font-size: 13px;
    box-sizing: border-box;
}

.co-dl-v {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 12px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #1f2937;
    word-break: break-all;
}

.co-dl-v a {
    color: #0f8b62;
    text-decoration: none;
}

.co-dl-item--full {
    grid-column: 1 / -1;
}

/* ---------- 数据表格 ---------- */
.co-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #f1f3f5;
    border-radius: 8px;
}

.co-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13.5px;
}

.co-table--wide {
    min-width: 780px;
}

.co-table th,
.co-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f1f3f5;
    word-break: break-all;
}

.co-table th {
    background: #f8fafb;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
}

.co-table tbody tr:last-child td {
    border-bottom: 0;
}

.co-table tbody tr:hover td {
    background: #fbfdfc;
}

.co-table td {
    color: #374151;
}

.co-table a {
    color: #0f8b62;
    text-decoration: none;
}

.co-table a:hover {
    text-decoration: underline;
}

/* ---------- 知识产权概览 ---------- */
.co-ip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.co-ip-item {
    padding: 14px;
    border: 1px solid #eef1f4;
    border-radius: 8px;
    background: #f8fafb;
    text-align: center;
}

.co-ip-num {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: #0f8b62;
}

.co-ip-label {
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.co-ip-note {
    margin-top: 2px;
    font-size: 12px;
    color: #9aa3af;
}

/* 空状态 */
.co-empty {
    padding: 22px 0;
    border-radius: 8px;
    background: #f8fafb;
    text-align: center;
    font-size: 14px;
    color: #9aa3af;
}

.co-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.8;
    color: #9aa3af;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 1100px) {
    .co-kv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .co-dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 900px) {
    .co-body {
        display: block;
    }

    .co-aside {
        display: none;
    }

    .co-hero {
        padding: 16px 14px 14px;
        border-radius: 10px;
    }

    .co-title {
        font-size: 20px;
    }

    .co-kv {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 14px;
        padding-top: 12px;
    }

    .co-dl {
        grid-template-columns: 1fr;
    }

    .co-card {
        padding: 2px 14px 16px;
        border-radius: 10px;
    }

    .co-card-h h2 {
        font-size: 16px;
    }

    .co-ip {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (max-width: 560px) {
    .co-avatar {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 13px;
        border-radius: 10px;
    }

    .co-title {
        font-size: 18px;
    }

    .co-ip {
        grid-template-columns: 1fr;
    }

    .co-dl-k {
        flex-basis: 88px;
    }

    .co-table {
        font-size: 13px;
    }
}

/* ---------- 移动端独立模板（templates_mobile/company.html） ---------- */
.co-m-wrap {
    width: auto !important;
    max-width: 100% !important;
    margin-top: 12px;
    padding: 0 12px;
    box-sizing: border-box;
}

.co-m-wrap .co-hero {
    margin-top: 0;
}

.co-m-wrap .co-card {
    padding: 2px 14px 16px;
}

.co-m-wrap .co-kv {
    grid-template-columns: 1fr;
    gap: 8px;
}

.co-m-wrap .co-dl {
    grid-template-columns: 1fr;
}

.co-m-wrap .co-ip {
    grid-template-columns: 1fr 1fr;
}

.co-m-wrap .co-title {
    font-size: 18px;
}

.co-m-wrap .co-avatar {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    font-size: 13px;
}

.co-m-footer-gap {
    height: 10px;
}

/* ---------- PC 企业详情：面包屑与头部关键信息优化 ---------- */
.co-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #8a94a6;
}

.co-crumb a {
    color: #5b6573;
    text-decoration: none;
    transition: color .15s;
}

.co-crumb a:hover {
    color: #0f8b62;
}

.co-crumb i {
    font-style: normal;
    color: #c6cdd6;
}

.co-crumb .is-now {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
    font-weight: 600;
}

.co-hero--pc .qb-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 18px 0 0;
    padding: 18px 6px;
    background: #f7faf9;
    border: 1px solid #e7efec;
    border-radius: 12px;
}

.co-hero--pc .qb-metric {
    min-width: 0;
    padding: 2px 20px;
    background: transparent;
    border: 0;
    border-right: 1px solid #e4ece9;
    border-radius: 0;
}

.co-hero--pc .qb-metric:last-child {
    border-right: 0;
}

.co-hero--pc .qb-metric-k {
    margin-bottom: 7px;
    color: #8a94a6;
    font-size: 12px;
    letter-spacing: .2px;
}

.co-hero--pc .qb-metric-v {
    color: #12312a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.co-hero--pc .co-metric--open {
    color: #0f8b62;
}

.co-hero--pc .co-metric--danger {
    color: #d93025;
}

.co-hero--pc .co-metric--warn {
    color: #b26a00;
}

.co-hero--pc .co-kv {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eef2f1;
}

.co-hero--pc .co-kv-k {
    flex: 0 0 88px;
    color: #8a94a6;
}

.co-hero--pc .co-kv-v {
    color: #1f2937;
    font-weight: 500;
}
