.temu-y2-profit-page {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(102, 126, 234, 0.08), transparent 22%),
        #f5f7fb;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
    overscroll-behavior-x: none;
}

.temu-y2-profit-page *,
.temu-y2-profit-page *::before,
.temu-y2-profit-page *::after {
    box-sizing: border-box;
    max-width: 100%;
}

.temu-y2-profit-page__header,
.temu-y2-profit-page__layout,
.temu-y2-profit-page__advice {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.temu-y2-profit-page__header,
.temu-y2-profit-panel {
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.temu-y2-profit-page__header {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.temu-y2-profit-page__header-main {
    flex: 1;
    min-width: 0;
}

.temu-y2-profit-page__title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.temu-y2-profit-page__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.3;
    color: #1f2937;
}

.temu-y2-profit-page__subtitle {
    margin: 6px 0 0;
    color: #606266;
    font-size: 13px;
    line-height: 1.6;
    max-width: 720px;
}

.temu-y2-profit-page__header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.temu-y2-profit-page__auth-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid #e6ebf5;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6f9ff 100%);
}

.temu-y2-profit-page__auth-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.temu-y2-profit-page__auth-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.temu-y2-profit-page__auth-label {
    font-size: 11px;
    color: #909399;
}

.temu-y2-profit-page__auth-user strong {
    color: #1f2937;
    font-size: 13px;
    line-height: 1.4;
    max-width: 180px;
    word-break: break-word;
}

.temu-y2-profit-page__upgrade-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #f5cf74;
    background: linear-gradient(180deg, #fff7d6 0%, #ffefb3 100%);
    color: #b7791f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

.temu-y2-profit-page__upgrade-badge .fa-star {
    color: #d89a11;
    font-size: 11px;
}

.temu-y2-profit-page__auth-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.temu-y2-profit-page__warning {
    margin: 0;
}

.temu-y2-profit-mode-switch {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(241, 246, 255, 0.98) 100%);
    border: 1px solid rgba(195, 219, 255, 0.92);
    border-radius: 16px;
    padding: 14px 16px;
}

.temu-y2-profit-mode-switch__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.temu-y2-profit-mode-switch__header h3 {
    margin: 0;
    color: #17335c;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.temu-y2-profit-mode-switch__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
    padding: 5px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(224, 236, 255, 0.98) 0%, rgba(211, 227, 255, 0.98) 55%, rgba(201, 221, 255, 0.98) 100%);
    border: 1px solid rgba(168, 203, 255, 0.96);
}

.temu-y2-profit-mode-switch__option {
    width: 100%;
    position: relative;
    border: 1px solid transparent;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    padding: 11px 16px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #24456f;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.temu-y2-profit-mode-switch__option:hover {
    color: #0f2d57;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(255, 255, 255, 0.16) 100%);
}

.temu-y2-profit-mode-switch__option.is-active {
    color: #ffffff;
    border-color: rgba(87, 159, 255, 0.98);
    background: linear-gradient(135deg, #5aa7ff 0%, #409eff 45%, #2d7ff9 100%);
    transform: translateY(-1px);
}

.temu-y2-profit-mode-switch__option-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 1px rgba(8, 31, 73, 0.12);
}

.temu-y2-profit-page__layout {
    display: grid;
    grid-template-columns: minmax(460px, 1.28fr) minmax(360px, 0.96fr) minmax(380px, 1fr);
    gap: 14px;
    align-items: start;
}

.temu-y2-profit-panel {
    padding: 16px;
}

.temu-y2-profit-panel--result {
    position: sticky;
    top: 12px;
    align-self: start;
}

.temu-y2-profit-panel--advice {
    padding-top: 14px;
    align-self: start;
}

.temu-y2-profit-panel--placeholder {
    padding: 26px;
}

.temu-y2-profit-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.temu-y2-profit-panel__header h3,
.temu-y2-profit-price-box__header h3,
.temu-y2-profit-section__header h4,
.temu-y2-profit-summary h4,
.temu-y2-profit-formula h4 {
    margin: 0;
    color: #1f2937;
}

.temu-y2-profit-panel__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
    justify-content: flex-end;
}

.temu-y2-profit-section {
    padding: 12px;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    background: linear-gradient(180deg, #fcfdff 0%, #f7f9fc 100%);
}

.temu-y2-profit-section-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    align-items: start;
}

.temu-y2-profit-section + .temu-y2-profit-section {
    margin-top: 10px;
}

.temu-y2-profit-section--half {
    margin-top: 0 !important;
    min-height: auto;
    align-self: start;
}

.temu-y2-profit-section__header,
.temu-y2-profit-price-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.temu-y2-profit-section__title-row {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.temu-y2-profit-title-hover {
    margin: 0;
    cursor: help;
    display: inline-flex;
    align-items: center;
}

.temu-y2-profit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.temu-y2-profit-form-grid--single {
    grid-template-columns: 1fr;
}

.temu-y2-profit-form-grid--base {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.temu-y2-profit-form-grid--managed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.temu-y2-profit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.temu-y2-profit-field--full {
    grid-column: 1 / -1;
}

.temu-y2-profit-field label {
    font-size: 12px;
    color: #606266;
    font-weight: 600;
}

.temu-y2-profit-field-label-tip {
    cursor: help;
}

.temu-y2-profit-switch-row {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 2px;
}

.temu-y2-profit-switch-text,
.temu-y2-profit-field-hint {
    font-size: 11px;
    color: #909399;
    line-height: 1.6;
}

.temu-y2-profit-field-hint {
    display: block;
    margin-top: 2px;
}

.temu-y2-profit-disabled-display {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #dbe3f0;
    border-radius: 10px;
    background: #f6f8fc;
    color: #909399;
    font-size: 12px;
}

.temu-y2-profit-field .el-input,
.temu-y2-profit-field .el-select,
.temu-y2-profit-field .el-input-number,
.temu-y2-profit-field .el-input-number .el-input__wrapper {
    width: 100%;
}

.temu-y2-profit-field .el-input__wrapper,
.temu-y2-profit-field .el-select .el-select__wrapper,
.temu-y2-profit-field .el-input-number .el-input__wrapper {
    min-height: 34px;
    border-radius: 8px;
    box-shadow: 0 0 0 1px #dfe5ef inset;
}

.temu-y2-profit-field .el-input__wrapper:hover,
.temu-y2-profit-field .el-input-number .el-input__wrapper:hover {
    box-shadow: 0 0 0 1px #c8d4ea inset;
}

.temu-y2-profit-field--product-code .el-input__inner::placeholder {
    font-size: 12px;
}

.temu-y2-profit-field.is-input-highlighted .el-input-number .el-input__wrapper,
.temu-y2-profit-field.is-input-highlighted .el-input__wrapper {
    background: #f3fff2;
    box-shadow: 0 0 0 1px #b7e3b3 inset;
}

.temu-y2-profit-field.is-input-highlighted .el-input-number .el-input__inner,
.temu-y2-profit-field.is-input-highlighted .el-input__inner {
    color: #2f5f2d;
}

.temu-y2-profit-price-box {
    margin-top: 12px;
}

.temu-y2-profit-field--pricing .el-input-number .el-input__inner,
.temu-y2-profit-field--pricing .el-input__inner {
    font-size: 18px;
    font-weight: 600;
}

.temu-y2-profit-ad-dialog .el-dialog__body {
    padding-top: 10px;
}

.temu-y2-profit-ad-dialog__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.temu-y2-profit-ad-dialog__images {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.temu-y2-profit-ad-dialog__images.is-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 340px;
    margin: 0 auto;
}

.temu-y2-profit-ad-dialog__card {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #ebeef5;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.temu-y2-profit-ad-dialog__image {
    width: 100%;
    max-width: 280px;
    height: 280px;
    border-radius: 10px;
    border: 1px solid #edf2f8;
    background: #fff;
}

.temu-y2-profit-ad-dialog__caption {
    color: #606266;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    word-break: break-word;
}

.temu-y2-profit-ad-dialog__description {
    color: #7a8499;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    word-break: break-word;
}

.temu-y2-profit-ad-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.temu-y2-profit-login-dialog__body,
.temu-y2-profit-save-dialog__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.temu-y2-profit-login-dialog__switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: #f3f6fb;
    border: 1px solid #e1e8f2;
    align-self: flex-start;
}

.temu-y2-profit-login-dialog__switch-btn {
    min-width: 74px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.temu-y2-profit-login-dialog__switch-btn.is-active {
    background: #409eff;
    color: #fff;
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.22);
}

.temu-y2-profit-login-dialog__hint {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.65;
}

.temu-y2-profit-login-dialog__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.temu-y2-profit-login-dialog__field label {
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.temu-y2-profit-login-dialog__code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.temu-y2-profit-login-dialog__code-btn {
    min-width: 118px;
}

.temu-y2-profit-login-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.temu-y2-profit-save-dialog__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #e7edf7;
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.temu-y2-profit-save-dialog__meta div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.temu-y2-profit-save-dialog__meta span {
    color: #8a94a6;
    font-size: 12px;
}

.temu-y2-profit-save-dialog__meta strong {
    color: #1f2937;
    font-size: 13px;
    line-height: 1.5;
}

.temu-y2-profit-save-drawer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.temu-y2-profit-save-drawer__content {
    min-height: 160px;
}

.temu-y2-profit-save-drawer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.temu-y2-profit-save-card {
    padding: 12px;
    border: 1px solid #e6ebf5;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.temu-y2-profit-save-card.is-active {
    border-color: #9fc5ff;
    box-shadow: 0 8px 22px rgba(64, 158, 255, 0.1);
}

.temu-y2-profit-save-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.temu-y2-profit-save-card__header strong {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}

.temu-y2-profit-save-card__meta {
    color: #7b8798;
    font-size: 12px;
    line-height: 1.5;
}

.temu-y2-profit-save-card__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #4b5563;
    font-size: 12px;
}

.temu-y2-profit-save-card__summary .is-profit {
    color: #16a34a;
}

.temu-y2-profit-save-card__summary .is-loss {
    color: #dc2626;
}

.temu-y2-profit-save-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.temu-y2-profit-save-drawer__more {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.temu-y2-profit-advice-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

.temu-y2-profit-advice-toolbar__text {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e8edf5;
    background: linear-gradient(180deg, #fcfdff 0%, #f7f9fc 100%);
    align-self: start;
}

.temu-y2-profit-advice-toolbar__text strong {
    color: #1f2937;
    font-size: 13px;
}

.temu-y2-profit-advice-toolbar__text span {
    color: #606266;
    font-size: 12px;
    line-height: 1.65;
}

.temu-y2-profit-advice__alert {
    margin-bottom: 0;
}

.temu-y2-profit-advice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.temu-y2-profit-advice-card {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e6ebf2;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: start;
}

.temu-y2-profit-advice-card.is-feasible {
    border-color: #c6e5b1;
    box-shadow: 0 8px 24px rgba(56, 158, 13, 0.06);
}

.temu-y2-profit-advice-card.is-blocked {
    border-color: #ffd4cf;
    background: linear-gradient(180deg, #fff8f7 0%, #ffffff 100%);
}

.temu-y2-profit-advice-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.temu-y2-profit-advice-card__header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
}

.temu-y2-profit-advice-card__header p {
    margin: 4px 0 0;
    color: #7b8798;
    font-size: 12px;
    line-height: 1.55;
}

.temu-y2-profit-advice-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.temu-y2-profit-advice-metric {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f9fc;
    border: 1px solid #edf2f8;
}

.temu-y2-profit-advice-metric span {
    display: block;
    color: #7b8798;
    font-size: 11px;
}

.temu-y2-profit-advice-metric strong {
    display: block;
    margin-top: 4px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.35;
}

.temu-y2-profit-advice-card__message {
    margin: 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.65;
}

.temu-y2-profit-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.temu-y2-profit-overview__item {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e8edf5;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.temu-y2-profit-overview__item span {
    display: block;
    color: #7b8798;
    font-size: 11px;
}

.temu-y2-profit-overview__item strong {
    display: block;
    margin-top: 4px;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.4;
}

.temu-y2-profit-overview__item--scenario strong {
    color: #d97706;
}

.temu-y2-profit-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.temu-y2-profit-card {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #ebeef5;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.temu-y2-profit-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.temu-y2-profit-card strong {
    font-size: 18px;
    color: #303133;
    line-height: 1.2;
}

.temu-y2-profit-card__label {
    font-size: 12px;
    color: #606266;
}

.temu-y2-profit-card--highlight {
    border-width: 2px;
}

.temu-y2-profit-card.is-profit {
    border-color: #b7eb8f;
    background: linear-gradient(180deg, #f6ffed 0%, #ffffff 100%);
}

.temu-y2-profit-card.is-profit strong {
    color: #389e0d;
}

.temu-y2-profit-card.is-loss {
    border-color: #ffccc7;
    background: linear-gradient(180deg, #fff2f0 0%, #ffffff 100%);
}

.temu-y2-profit-card.is-loss strong {
    color: #cf1322;
}

.temu-y2-profit-summary,
.temu-y2-profit-formula {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
}

.temu-y2-profit-summary {
    background: #f8fafc;
    border: 1px solid #ebeef5;
}

.temu-y2-profit-summary.is-profit {
    background: #f6ffed;
    border-color: #b7eb8f;
}

.temu-y2-profit-summary.is-loss {
    background: #fff2f0;
    border-color: #ffccc7;
}

.temu-y2-profit-summary h4 {
    font-size: 15px;
    line-height: 1.4;
}

.temu-y2-profit-summary p {
    margin: 6px 0 0;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.55;
}

.temu-y2-profit-formula {
    background: #f9fafb;
    border: 1px dashed #d0d7e2;
}

.temu-y2-profit-formula ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: #4b5563;
    line-height: 1.55;
    font-size: 12px;
}

.temu-y2-profit-formula--compact li + li {
    margin-top: 2px;
}

.temu-y2-profit-placeholder {
    min-height: 320px;
    border: 1px dashed #d6dcea;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 20px;
    text-align: center;
}

.temu-y2-profit-placeholder__icon {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(64, 158, 255, 0.1);
    color: #409eff;
    font-size: 28px;
}

.temu-y2-profit-placeholder h4 {
    margin: 0;
    color: #1f2937;
    font-size: 20px;
}

.temu-y2-profit-placeholder p {
    margin: 0;
    max-width: 640px;
    color: #606266;
    font-size: 14px;
    line-height: 1.7;
}
