/* Business-user presentation only. Pear/Layui retain layout, events and accessibility. */
body.rc-user-view {
    background: #f4f7fa;
    color: #243b53;
    --rc-shadow: 0 4px 20px rgba(28, 54, 78, .035);
    --rc-line: #e4ebf2;
}
.rc-user-view .rc-page { padding: 28px 32px; min-width: 0; }
.rc-user-view .rc-page-head {
    padding: 8px 0 24px;
    margin-bottom: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.rc-user-view .rc-page-head::after { display: none; }
.rc-user-view .rc-page-head > div:first-child { padding-left: 72px; min-width: 0; }
.rc-user-view .rc-page-head h2 { color: #18364c; font-size: 26px; line-height: 1.4; letter-spacing: .3px; }
.rc-user-view .rc-page-head p { font-size: 14px; max-width: 840px; line-height: 1.8; }
.rc-user-view .rc-page-icon {
    width: 54px;
    height: 54px;
    border: 1px solid #dbe7ed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 14px #203f5c06;
    color: #227787;
}
.rc-user-view .rc-page-icon .layui-icon { font-size: 27px; }
.rc-user-view .rc-page-head > .layui-btn-primary {
    color: #455f78 !important;
    background: #fff;
    border-color: #dce5ee;
    box-shadow: none;
    flex-shrink: 0;
}
.rc-user-view .layui-btn { border-radius: 8px; }
.rc-user-view .layui-btn:focus-visible, .rc-user-view a:focus-visible,
.rc-user-view summary:focus-visible { outline: 3px solid #84b4ed; outline-offset: 3px; }
.rc-user-view .layui-card { border-color: #e2eaf1; box-shadow: var(--rc-shadow); }
.rc-user-view .layui-card-header { height: auto; min-height: 54px; padding: 16px 24px; line-height: 28px; }
.rc-user-view .layui-card-header > .layui-icon { margin-right: 9px; color: #287b8a; font-size: 20px; vertical-align: middle; }
.rc-user-view .rc-metric { padding: 24px; border: 1px solid #e2eaf1; }
.rc-user-view .rc-metric::after { display: none; }
.rc-user-view .rc-metric > span { display: block; padding-right: 46px; }
.rc-user-view .rc-metric strong { margin: 14px 0 7px; font-variant-numeric: tabular-nums; }
.rc-user-view .rc-metric-icon { width: 40px; height: 40px; top: 22px; right: 22px; background: #eef5fb; color: #3474a5; }
.rc-user-view .rc-metric.positive .rc-metric-icon { color: #168375; background: #edf8f4; }
.rc-user-view .rc-metric small { display: block; font-size: 13px !important; line-height: 1.65; }
.rc-user-view a.rc-metric { transition: border-color .18s, box-shadow .18s; }
.rc-user-view a.rc-metric:hover { border-color: #a8c4db; box-shadow: 0 6px 22px #173f6710; }
.rc-user-view .rc-workflow { padding: 12px; gap: 10px; margin-bottom: 24px; border-color: #e2eaf1; }
.rc-user-view .rc-workflow a { flex: 1 1 160px; gap: 12px; padding: 10px 14px; }
.rc-user-view .rc-workflow-number { width: 36px; height: 36px; border-radius: 10px; background: #f1f5f9; color: #62809a; }
.rc-user-view .rc-workflow small { display: block; margin-top: 2px; color: #71859a; font-size: 12px; }
.rc-user-view .rc-workflow a[aria-current="step"] { border-color: #cfe0ed; background: #f0f7fb; color: #21607c; }
.rc-user-view .rc-workflow a[aria-current="step"] .rc-workflow-number { background: #1f6688; color: #fff; }
.rc-user-view .rc-workspace-welcome {
    position: relative;
    padding: 34px 38px;
    border: 0;
    background: linear-gradient(115deg, #183b56, #20516b);
    color: #fff;
    overflow: hidden;
    margin-bottom: 24px;
}
.rc-user-view .rc-workspace-welcome > :not(.rc-welcome-mark) { position: relative; z-index: 1; max-width: 82%; }
.rc-user-view .rc-workspace-eyebrow { color: #b1dce1; display: flex; align-items: center; gap: 9px; }
.rc-user-view .rc-workspace-welcome h3 { font-size: 28px; line-height: 1.5; }
.rc-user-view .rc-workspace-welcome p { color: #d2e2ec; line-height: 1.9; max-width: 720px; }
.rc-user-view .rc-workspace-welcome .layui-btn { background: #fff; color: #1b4f6a; border: 1px solid #fff; height: 42px; line-height: 40px; padding: 0 22px; }
.rc-user-view .rc-workspace-welcome .layui-btn-primary { background: transparent; color: #e3eef5; border-color: #7398ad; }
.rc-user-view .rc-welcome-mark { position: absolute; right: 38px; top: 50%; font-size: 150px; color: #c9eeee; opacity: .12; transform: translateY(-50%) rotate(-16deg); pointer-events: none; }
.rc-user-view .rc-workspace-outline { gap: 24px; padding: 8px 0; }
.rc-user-view .rc-workspace-outline li { position: relative; padding-left: 54px; }
.rc-user-view .rc-workspace-outline li > .layui-icon { position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #297b8b; background: #eef7f8; font-size: 22px; }
.rc-user-view .rc-workspace-outline b::before { content: none; }

/* Financial information: one focal card, restrained icon tiles, readable purchase options. */
.rc-user-view .commerce-page { max-width: none; }
.rc-user-view .commerce-grid { gap: 22px; }
.rc-user-view .commerce-grid > .layui-card { margin-bottom: 24px; background: #fff; border-color: #e2eaf1; }
.rc-user-view .commerce-grid > .layui-card:first-child { background: linear-gradient(115deg, #183b56, #245873); border: 0; }
.rc-user-view .commerce-stat-heading { display: flex; align-items: center; gap: 12px; color: #526b80; font-weight: 600; }
.rc-user-view .commerce-stat-icon { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; color: #28788c; background: #eef6f8; font-size: 23px; }
.rc-user-view .commerce-grid > .layui-card:first-child .commerce-stat-heading,
.rc-user-view .commerce-grid > .layui-card:first-child p { color: #c9e0ec; }
.rc-user-view .commerce-grid > .layui-card:first-child .commerce-stat-icon { background: #ffffff16; color: #d3eeee; }
.rc-user-view .commerce-grid > .layui-card:first-child .commerce-value { color: #fff; }
.rc-user-view .commerce-value { font-size: clamp(23px, 2.1vw, 32px); line-height: 1.5; margin: 18px 0 8px; font-variant-numeric: tabular-nums; }
.rc-user-view .commerce-value-date { font-size: 22px; }
.rc-user-view .commerce-value-note { color: #667e94; margin: 0; }
.rc-user-view .commerce-page .layui-card-body { padding: 24px; }
.rc-user-view .commerce-progress { margin-top: 18px; background: #e9f0f5; }
.rc-user-view .commerce-progress .layui-progress-bar { background: #399d9b; }
.rc-user-view .commerce-recharge-body { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rc-user-view .commerce-recharge-body .commerce-actions { margin: 0; flex-shrink: 0; }
.rc-user-view .commerce-recharge-body p { margin: 4px 0; }
.rc-user-view .commerce-recharge-body .layui-btn { height: 42px; line-height: 40px; padding: 0 22px; }
.rc-user-view .commerce-note { background: #f0f6fb; border-color: #dce9f2; color: #4b667c; border-radius: 12px; }
.rc-user-view .commerce-note > .layui-icon { font-size: 22px; color: #347a9b; }
.rc-user-view .commerce-plans { gap: 22px; }
.rc-user-view .commerce-plan { display: flex; flex-direction: column; padding: 26px; background: #fff; border: 1px solid #dde7ef; border-radius: 14px; }
.rc-user-view .commerce-plan-featured { background: #f6fafc; border-color: #8eb6cc; box-shadow: inset 0 3px #377d9f; }
.rc-user-view .commerce-plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rc-user-view .commerce-plan-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #edf5fa; color: #367a9b; font-size: 25px; }
.rc-user-view .commerce-plan-tag { color: #436e83; background: #ecf3f7; padding: 4px 12px; }
.rc-user-view .commerce-plan h3 { font-size: 42px; margin: 24px 0 4px; color: #1e425b; }
.rc-user-view .commerce-plan ul { padding: 12px 0 16px; }
.rc-user-view .commerce-plan li { display: flex; align-items: flex-start; gap: 9px; margin: 9px 0; }
.rc-user-view .commerce-plan li .layui-icon { color: #389487; }
.rc-user-view .commerce-plan-options { margin-top: auto; padding-top: 18px; }
.rc-user-view .commerce-plan-options .layui-btn { background: #276a8e; }
.rc-user-view .commerce-plan-options .layui-btn:not([aria-disabled]):last-child { border-color: #bbd0df; color: #276a8e; }
.rc-user-view .commerce-plan-free { background: #fbfcfe; }
.rc-user-view .commerce-plan-included { margin-top: auto; padding: 14px 0 8px; color: #547b72; }
.rc-user-view .commerce-subtitle { color: #6f8295; }
.rc-user-view .commerce-data-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid #edf1f5; }
.rc-user-view .commerce-data-row:last-child { border: 0; }
.rc-user-view .commerce-row-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: #f0f5f9; color: #66859f; font-size: 21px; }
.rc-user-view .commerce-row-copy { flex: 1; min-width: 0; }
.rc-user-view .commerce-row-copy b { display: block; overflow-wrap: anywhere; font-weight: 600; }
.rc-user-view .commerce-row-copy p { margin: 2px 0 0; }
.rc-user-view .commerce-row-value { font-weight: 600; white-space: nowrap; }
.rc-user-view .commerce-order-tabs { display: flex; gap: 8px; margin: 0 0 12px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid #e0e8ef; border-radius: 10px; background: #f6f9fb; }
.rc-user-view .commerce-order-tab { appearance: none; border: 0; border-radius: 7px; background: transparent; color: #60778c; padding: 8px 15px; cursor: pointer; font: inherit; line-height: 1.4; }
.rc-user-view .commerce-order-tab span { display: inline-block; min-width: 20px; margin-left: 5px; padding: 1px 6px; border-radius: 10px; background: #e7eef4; color: #6b8092; font-size: 12px; text-align: center; }
.rc-user-view .commerce-order-tab.is-active { background: #fff; color: #226f83; box-shadow: 0 1px 5px rgba(38, 73, 96, .09); font-weight: 600; }
.rc-user-view .commerce-order-tab.is-active span { background: #e5f3f3; color: #277b7a; }
.rc-user-view .commerce-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-user-view .commerce-row-actions .layui-btn { margin: 0; }
.rc-user-view .commerce-empty { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px; color: #6a8095; }
.rc-user-view .commerce-empty > .layui-icon { font-size: 32px; color: #8ca7ba; }
.rc-user-view .commerce-empty b { display: block; color: #445f77; font-weight: 500; }
.rc-user-view .commerce-empty p { margin: 3px 0 0; }
.rc-user-view .invoice-steps { display: flex; align-items: center; gap: 24px; margin: 0 0 24px; padding: 18px 24px; border: 1px solid #e2eaf1; border-radius: 12px; background: #fff; }
.rc-user-view .invoice-steps span { display: flex; align-items: center; gap: 10px; color: #566e82; }
.rc-user-view .invoice-steps span > i { color: #2e8394; font-size: 21px; }
.rc-user-view .invoice-steps > i { color: #adc0ce; font-size: 14px; }
.rc-user-view .invoice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.rc-user-view .invoice-toolbar .commerce-actions, .rc-user-view .invoice-toolbar .invoice-filter { margin: 0; }
.rc-user-view .rc-ai-service-card { border-left: 4px solid #378a96; }
.rc-user-view .rc-ai-service-card .rc-ai-section-head h3 { display: flex; align-items: center; gap: 10px; }
.rc-user-view .rc-ai-flow { gap: 20px; padding: 24px; }
.rc-user-view .rc-ai-flow > div > .layui-icon { background: #eef6f8; color: #337e93; }
.rc-user-view #commerce-status, .rc-user-view #invoice-status { font-size: 13px; color: #74879a; margin: 0 0 16px; }

/* Shell changes activate only after the authenticated USER identity is known. */
.rc-user-shell .layui-side, .rc-user-shell .layui-side .layui-nav { background: #19384f !important; }
.rc-user-shell .layui-side .layui-logo { background: #19384f; border-bottom: 1px solid #ffffff10; }
.rc-user-shell .layui-side .layui-nav-tree .layui-nav-item > a { color: #c6d9e5; }
.rc-user-shell .layui-side .layui-nav-child a { color: #b8cddd; }
.rc-user-shell .layui-side .layui-nav-item > a > .layui-icon:not(.layui-nav-more) { font-size: 19px; margin-right: 10px; }
/* 目录图标与展开箭头分开排版，状态仍由 Pear 管理。 / Separate menu icons from disclosure arrows; Pear owns expansion state. */
.rc-user-shell .layui-side .pear-nav-tree:not(.pear-nav-mini) a[menu-type="0"] { padding-right: 44px; }
.rc-user-shell .layui-side .pear-nav-tree.arrow .layui-nav-more {
    display: inline-block;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    overflow: visible;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    transition: transform .15s ease;
}
.rc-user-shell .layui-side .pear-nav-tree.arrow .layui-nav-more::before {
    content: '\e61a';
    display: block;
    vertical-align: baseline;
}
.rc-user-shell .layui-side .pear-nav-tree.arrow .layui-nav-itemed > a > .layui-nav-more {
    transform: translateY(-50%) rotate(0deg);
}
.rc-user-shell .layui-side .layui-nav-child { background: #142e43 !important; }
.rc-user-shell .layui-side .layui-this > a { background: #2b627f !important; color: #fff !important; }
.rc-user-shell .layui-header { box-shadow: none; border-bottom: 1px solid #e6edf3; }

@media (max-width: 1180px) {
    .rc-user-view .rc-page { padding: 22px; }
    .rc-user-view .commerce-recharge-body { align-items: flex-start; flex-direction: column; }
    .rc-user-view .commerce-plan { padding: 20px; }
    .rc-user-view .commerce-subtitle { display: block; margin-left: 0; margin-top: 4px; font-size: 13px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
    .rc-user-view .commerce-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rc-user-view .commerce-grid .layui-card-body { padding: 20px; }
    .rc-user-view .commerce-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .rc-user-view .commerce-stat-heading { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 760px) {
    .rc-user-view .rc-page { padding: 18px 14px; }
    .rc-user-view .rc-page-head { padding-bottom: 18px; flex-wrap: wrap; }
    .rc-user-view .rc-page-head h2 { font-size: 23px; }
    .rc-user-view .rc-page-head > div:first-child { padding-left: 64px; }
    .rc-user-view .commerce-grid, .rc-user-view .commerce-plans { grid-template-columns: 1fr; gap: 0; }
    .rc-user-view .commerce-plan { margin-bottom: 18px; padding: 24px; }
    .rc-user-view .commerce-grid .layui-card { margin-bottom: 16px; }
    .rc-user-view .commerce-page .layui-card-body { padding: 20px; }
    .rc-user-view .rc-workspace-welcome { padding: 26px; }
    .rc-user-view .rc-workspace-welcome > :not(.rc-welcome-mark) { max-width: 100%; }
    .rc-user-view .rc-welcome-mark { right: -20px; }
    .rc-user-view .rc-workspace-welcome h3 { font-size: 24px; }
    .rc-user-view .rc-workspace-outline { grid-template-columns: 1fr; }
    .rc-user-view .invoice-steps { gap: 14px; flex-wrap: wrap; font-size: 13px; }
    .rc-user-view .commerce-data-row { flex-wrap: wrap; }
    .rc-user-view .commerce-row-copy { flex-basis: calc(100% - 60px); }
    .rc-user-view .commerce-row-value { margin-left: 54px; }
}
/* Keep mobile navigation in the header so it cannot cover iframe dialog actions. */
@media (max-width: 768px) {
    .rc-user-shell .layui-header .collapse { display: inline-block !important; }
    .rc-user-shell .pear-collapsed-pe { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .rc-user-view a.rc-metric { transition: none; }
    .rc-user-shell .layui-side .pear-nav-tree.arrow .layui-nav-more { transition: none; }
}
