* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: #102033;
    background: #eef7ff;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.wrap {
    width: min(1220px, calc(100% - 36px));
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #cfe4f7;
    box-shadow: 0 8px 28px rgba(20, 82, 140, 0.06);
}

.site-header.compact {
    position: sticky;
    top: 0;
    z-index: 20;
}

.top-strip {
    color: #31617f;
    background: #e3f3ff;
    border-bottom: 1px solid #cbe4f6;
    font-size: 13px;
}

.strip-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.nav {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand strong {
    display: block;
    color: #0b5790;
    font-size: 24px;
    line-height: 1;
}

.brand em {
    display: block;
    margin-top: 5px;
    color: #587187;
    font-size: 13px;
    font-style: normal;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #35566f;
    font-size: 14px;
}

.nav-links a {
    white-space: nowrap;
}

.nav-links .solid,
.search-box button,
.table-action {
    color: #ffffff;
    background: #1479bd;
    border: 1px solid #1479bd;
    border-radius: 6px;
    font-weight: 700;
}

.nav-links .solid {
    padding: 9px 15px;
}

.hero {
    background:
        radial-gradient(circle at 76% 12%, rgba(93, 190, 255, 0.28), transparent 30%),
        linear-gradient(180deg, #f4fbff 0%, #e8f5ff 100%);
    border-bottom: 1px solid #cfe4f7;
}

.hero-grid {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 0;
}

.product-card,
.detail-block,
.empty-state,
.alert {
    border: 1px solid #cfe4f7;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(20, 82, 140, 0.08);
}

.search-stage {
    width: min(100%, 900px);
    padding: 28px 10px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #1680c6;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
}

h1 {
    margin: 0;
    color: #0d2b45;
    font-size: 46px;
    line-height: 1.16;
    font-weight: 800;
}

h2 {
    margin: 0;
    color: #12314c;
    font-size: 26px;
}

h3 {
    margin: 0;
    color: #143650;
    font-size: 18px;
}

.search-box {
    display: flex;
    width: 100%;
    background: #ffffff;
    border: 2px solid #1c8ed4;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(28, 142, 212, 0.12);
    overflow: hidden;
}

.hero-search {
    max-width: 780px;
    margin-top: 26px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 18px 20px;
    color: #102033;
    outline: none;
}

.search-box button {
    width: 132px;
    border-radius: 0;
    cursor: pointer;
}

.hotline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    color: #5d7487;
    font-size: 13px;
}

.tag {
    border: 1px solid #b9d9f1;
    border-radius: 999px;
    padding: 7px 12px;
    color: #24628f;
    background: #f7fcff;
}

.structure-launch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    min-height: 42px;
    padding: 0 17px;
    color: #0f6fa9;
    background: #ffffff;
    border: 1px solid #8fc8eb;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.structure-launch:hover {
    border-color: #1479bd;
    background: #f7fcff;
}

.structure-icon {
    font-size: 22px;
    line-height: 1;
}

.structure-dialog {
    width: min(1180px, calc(100% - 36px));
    max-width: none;
    max-height: calc(100vh - 36px);
    padding: 0;
    color: #102033;
    background: #f7fbff;
    border: 1px solid #b9d9f1;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(13, 57, 91, 0.24);
    overflow: hidden;
}

.structure-dialog::backdrop {
    background: rgba(13, 43, 69, 0.46);
}

.structure-dialog-head {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #cfe4f7;
}

.structure-dialog-head h2 {
    font-size: 24px;
}

.dialog-close {
    width: 38px;
    height: 38px;
    padding: 0;
    color: #46657b;
    background: transparent;
    border: 0;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.structure-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    min-height: 570px;
}

.structure-editor-shell {
    position: relative;
    min-width: 0;
    min-height: 570px;
    background: #ffffff;
    border-right: 1px solid #cfe4f7;
}

.structure-editor-shell iframe {
    width: 100%;
    height: 570px;
    display: block;
    border: 0;
}

.structure-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #587187;
    background: #ffffff;
    z-index: 1;
}

.structure-loading[hidden] {
    display: none;
}

.structure-actions {
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    background: #f3f9fe;
}

.structure-mode {
    display: grid;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid #cfe4f7;
}

.structure-mode span {
    color: #587187;
    font-size: 13px;
}

.structure-mode strong {
    color: #0b5790;
    font-size: 17px;
}

.structure-status {
    min-height: 48px;
    margin-top: 18px;
    color: #31617f;
    font-size: 14px;
    line-height: 1.6;
}

.structure-status.error {
    color: #b33a32;
}

.structure-buttons {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    margin-top: auto;
}

.structure-buttons button {
    min-height: 42px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.structure-clear {
    color: #24628f;
    background: #ffffff;
    border: 1px solid #9bc9e7;
}

.structure-submit {
    color: #ffffff;
    background: #1479bd;
    border: 1px solid #1479bd;
}

.structure-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.section {
    padding: 34px 0;
}

.section-head,
.toolbar,
.footer-inner,
.result-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border: 1px solid #1c8ed4;
    color: #116fa9;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.empty-state p {
    color: #60798e;
    line-height: 1.75;
}

.result-hero {
    padding: 30px 0 22px;
    background: linear-gradient(180deg, #f2faff 0%, #e9f6ff 100%);
    border-bottom: 1px solid #d5e8f7;
}

.result-search {
    max-width: 760px;
}

.result-summary {
    margin-top: 22px;
}

.result-summary h1 {
    font-size: 32px;
}

.result-summary span {
    color: #60798e;
}

.result-main {
    width: 100%;
    min-width: 0;
}

.result-filters {
    margin-bottom: 18px;
    border: 1px solid #cfe4f7;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.selected-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #dcecf8;
}

.selected-filters[hidden] {
    display: none;
}

.selected-label {
    color: #60798e;
    font-size: 13px;
    font-weight: 700;
}

#selectedFilterItems {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: #28aa9a;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.selected-filters .clear-filters {
    margin-left: auto;
    padding: 4px 0;
    border: 0;
    color: #477087;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
}

.filter-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e5f0f8;
}

.filter-row:last-child {
    border-bottom: 0;
}

.filter-row strong {
    color: #36566d;
    font-size: 14px;
}

.filter-row div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-row button {
    padding: 3px 8px;
    border: 0;
    border-radius: 3px;
    color: #263f50;
    background: transparent;
    font-size: 13px;
    cursor: pointer;
}

.filter-row button:hover,
.filter-row button.active {
    color: #1479bd;
    background: #edf8ff;
}

.filter-row button.active {
    font-weight: 800;
}

.product-card {
    margin-bottom: 16px;
    overflow: hidden;
}

.product-head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    align-items: start;
}

.product-image,
.chem-mark {
    width: 104px;
    height: 82px;
    border-radius: 7px;
    background: #e9f6ff;
    border: 1px solid #cfe4f7;
    object-fit: contain;
}

.chem-mark {
    display: grid;
    place-items: center;
    color: #1479bd;
    font-weight: 800;
}

.product-title {
    margin: 0 0 9px;
    color: #12314c;
    font-size: 20px;
}

.result-data-grid {
    display: grid;
    grid-template-columns: auto minmax(110px, 1fr) auto minmax(110px, 1fr) auto minmax(110px, 1fr);
    gap: 7px 10px;
    margin: 0;
    color: #60798e;
    font-size: 13px;
}

.result-data-grid dt {
    color: #315b78;
    font-weight: 700;
}

.result-data-grid dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.product-description {
    margin: 12px 0 0;
    color: #60798e;
    font-size: 13px;
    line-height: 1.7;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;
    color: #60798e;
    font-size: 13px;
}

.table-scroll {
    overflow-x: auto;
}

.sku-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

.sku-table th,
.sku-table td {
    padding: 13px 14px;
    border-top: 1px solid #dcecf8;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.sku-table th:nth-child(1) { width: 8%; }
.sku-table th:nth-child(2) { width: 14%; }
.sku-table th:nth-child(3) { width: 9%; }
.sku-table th:nth-child(4) { width: 27%; }
.sku-table th:nth-child(5) { width: 10%; }
.sku-table th:nth-child(6) { width: 11%; }
.sku-table th:nth-child(7) { width: 8%; }
.sku-table th:nth-child(8) { width: 8%; }

.sku-table th:nth-child(4),
.sku-table td:nth-child(4) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.sku-table th {
    color: #4d6b82;
    background: #f1f9ff;
    font-weight: 800;
}

.price {
    color: #c45d10;
    font-weight: 800;
}

.member {
    color: #1479bd;
    font-size: 13px;
}

.table-action {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 20px;
}

.detail-block {
    padding: 22px;
}

.primary-detail h1 {
    font-size: 36px;
}

.data-grid {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px 18px;
    margin-top: 20px;
    font-size: 14px;
}

.data-grid dt {
    color: #6b8294;
}

.data-grid dd {
    margin: 0;
    min-width: 0;
    color: #1f3e55;
    word-break: break-word;
}

.detail-image {
    width: 100%;
    height: 230px;
    object-fit: contain;
}

.detail-note {
    margin-top: 18px;
    padding: 14px;
    border-radius: 7px;
    background: #f1f9ff;
}

.detail-note strong,
.detail-note span {
    display: block;
}

.detail-note strong {
    color: #0b5790;
}

.detail-note span {
    margin-top: 6px;
    color: #60798e;
    line-height: 1.65;
}

.detail-sku {
    margin-top: 20px;
}

.empty-state,
.alert {
    padding: 24px;
}

.empty-state {
    color: #4f6e84;
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: #143650;
}

.alert {
    margin-bottom: 16px;
    color: #9f1239;
    border-color: #fecdd3;
    background: #fff1f2;
}

.pager {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0 8px;
}

.pager a,
.pager span {
    padding: 9px 13px;
    border: 1px solid #bfdcf2;
    border-radius: 6px;
    background: #ffffff;
    color: #426278;
}

.footer {
    color: #4f6f86;
    background: #f4faff;
    border-top: 1px solid #d7e9f7;
    font-size: 13px;
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 48px;
    padding-top: 38px;
    padding-bottom: 34px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.8;
}

.footer-section h2 {
    margin: 0 0 2px;
    color: #123f62;
    font-size: 16px;
}

.footer-section p {
    margin: 0;
}

.footer-section a {
    color: #087dc1;
}

.footer-section a:hover {
    color: #005f99;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #d7e9f7;
    background: #ffffff;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 58px;
}

.footer-bottom strong {
    color: #0b5790;
    font-size: 16px;
}

.footer-bottom a {
    color: #4f6f86;
}

.footer-bottom span:last-child {
    margin-left: auto;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 22%, rgba(94, 190, 245, 0.22), transparent 28%),
        linear-gradient(145deg, #f4fbff 0%, #e8f5ff 58%, #f8fcff 100%);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 48px 0;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 70px;
    align-items: center;
}

.auth-intro {
    max-width: 650px;
}

.auth-intro h1 {
    font-size: 42px;
}

.login-protein,
.register-artemisinin {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #12314c;
    font-weight: 600;
}

.copy-code-button {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 3px;
    color: #1680c6;
    background: transparent;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.16s ease, background-color 0.16s ease;
}

.copy-code-button span {
    font-size: 18px;
    line-height: 1;
}

.product-code:hover .copy-code-button,
.copy-code-button:focus-visible {
    opacity: 1;
}

.copy-code-button:hover {
    background: #edf8ff;
}

.client-filter-empty[hidden] {
    display: none;
}

.copy-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    padding: 10px 16px;
    border-radius: 4px;
    color: #ffffff;
    background: rgba(18, 49, 76, 0.94);
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.protein-art,
.artemisinin-art {
    margin: 0;
    color: #1479bd;
    font-family: "Courier New", Consolas, monospace;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0;
    text-shadow: 0 12px 30px rgba(20, 121, 189, 0.14);
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.auth-benefits div {
    min-height: 116px;
    padding: 18px;
    border: 1px solid #c9e2f5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.auth-benefits strong,
.auth-benefits span {
    display: block;
}

.auth-benefits strong {
    color: #155b89;
}

.auth-benefits span {
    margin-top: 8px;
    color: #668095;
    font-size: 13px;
    line-height: 1.65;
}

.auth-card {
    padding: 30px;
    border: 1px solid #c9e2f5;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(18, 88, 140, 0.14);
}

.register-card {
    padding-top: 26px;
    padding-bottom: 26px;
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-card-head h2 {
    font-size: 26px;
}

.auth-card-head > span {
    display: block;
    margin-top: 8px;
    color: #6b8294;
    font-size: 14px;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;
    border: 1px solid #d3e7f5;
    border-radius: 7px;
    background: #f1f9ff;
}

.auth-tabs button {
    height: 38px;
    border: 0;
    border-radius: 5px;
    color: #58758a;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.auth-tabs button.active {
    color: #116fa9;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(31, 107, 157, 0.11);
}

.auth-form label > span {
    display: block;
    margin-bottom: 8px;
    color: #2a4d67;
    font-size: 14px;
    font-weight: 700;
}

.auth-form input {
    width: 100%;
    height: 48px;
    border: 1px solid #bfd9ec;
    border-radius: 7px;
    padding: 0 14px;
    color: #102033;
    background: #fbfdff;
    outline: none;
}

.auth-form input:focus {
    border-color: #258dcb;
    box-shadow: 0 0 0 3px rgba(37, 141, 203, 0.11);
}

.password-field,
.code-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.password-toggle,
.code-button {
    min-width: 72px;
    border: 1px solid #b8d8ee;
    border-radius: 7px;
    color: #176b9f;
    background: #edf8ff;
    cursor: pointer;
}

.code-button {
    min-width: 112px;
    padding: 0 12px;
}

.password-toggle:disabled,
.code-button:disabled,
.auth-submit:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-submit {
    height: 48px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: #1479bd;
    box-shadow: 0 12px 24px rgba(20, 121, 189, 0.18);
    font-weight: 800;
    cursor: pointer;
}

.form-message {
    min-height: 20px;
    color: #60798e;
    font-size: 13px;
    line-height: 1.5;
}

.form-message.error {
    color: #b4233b;
}

.form-message.success {
    color: #087a61;
}

.auth-card-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #deedf8;
    color: #6b8294;
    font-size: 14px;
}

.auth-card-foot a {
    color: #1479bd;
    font-weight: 800;
}

@media (max-width: 980px) {
    .detail-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .structure-layout {
        grid-template-columns: 1fr;
    }

    .structure-editor-shell {
        border-right: 0;
        border-bottom: 1px solid #cfe4f7;
    }

    .structure-actions {
        min-height: 150px;
    }

    .structure-buttons {
        width: min(100%, 320px);
        margin-top: 18px;
    }

    .auth-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-layout {
        gap: 30px;
    }

    .auth-card {
        width: min(100%, 520px);
    }

    .protein-art {
        font-size: 15px;
    }

    .artemisinin-art {
        font-size: 15px;
    }
}

@media (max-width: 680px) {
    .wrap {
        width: min(100% - 24px, 1220px);
    }

    .strip-inner,
    .nav,
    .section-head,
    .result-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 30px;
        padding-bottom: 28px;
    }

    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .footer-bottom span:last-child {
        margin-left: 0;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
        gap: 12px;
    }

    h1 {
        font-size: 34px;
    }

    .product-head {
        grid-template-columns: 1fr;
    }

    .search-box button {
        width: 96px;
    }

    .structure-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }

    .structure-dialog-head {
        padding: 14px 16px;
    }

    .structure-editor-shell,
    .structure-editor-shell iframe {
        min-height: 460px;
        height: 460px;
    }

    .auth-benefits {
        grid-template-columns: 1fr;
    }

    .auth-main {
        padding: 30px 0;
    }

    .auth-intro h1 {
        font-size: 34px;
    }

    .login-protein,
    .register-artemisinin {
        overflow: hidden;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filter-row div {
        gap: 8px 18px;
    }

    .selected-filters .clear-filters {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
    }

    .protein-art,
    .artemisinin-art {
        font-size: 11px;
    }

    .auth-card {
        padding: 22px;
    }
}
