/* 前台模板 3 的通用样式，主题变量由 footer.jsp 输出。 */

/* 兼容旧页面的主操作按钮，保留原有尺寸、事件和表单行为。 */
body .button.bg-yellow,
body .button.bg-blue,
body .button.bg-main,
body .button.bg-yellow:hover,
body .button.bg-blue:hover,
body .button.bg-main:hover,
body .button.bg-yellow:focus,
body .button.bg-blue:focus,
body .button.bg-main:focus {
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-on-primary);
}

body .blue,
body .text-blue,
body .text-main {
    color: var(--theme-primary);
}

body .border-blue,
body .border-main {
    border-color: var(--theme-primary);
}

/* 已有外框的记录卡片与结构图节点只替换边框颜色。 */
body .finance-record,
body .orders-card,
body .messages-card,
body .business-content .message,
body .business-address,
body .business-tree .tree,
body.business-wangluotu .business-diagram table.tablefilter,
body .new-category-li,
body .store-cart .product-box,
body .w-community a {
    border-color: var(--theme-primary);
}

/* 数据表格用内描边保留原有列宽和内部网格线，跳过用来布局的空表格。 */
body :is(.table-container > table, table.table-bordered, table:has(> thead)) {
    outline: 1px solid var(--theme-primary);
    outline-offset: -1px;
}

/* 模板 5：自然绿色商城。这里只定义表现，原开关、金额、订单状态和提交方式均保留。 */
html[data-template="5"] {
    --t5-page: #f2f7f0;
    --t5-card: #ffffff;
    --t5-ink: #183b22;
    --t5-muted: #7a897a;
    --t5-line: #e4eee0;
    --t5-shadow: 0 5px 18px rgba(26, 83, 28, .045);
    --t5-radius: 17px;
    background: #e9f1e7;
    color-scheme: light;
    scroll-padding-top: 76px;
}
html[data-template="5"] body {
    box-sizing: border-box;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--t5-page) !important;
    color: var(--t5-ink);
    font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}
html[data-template="5"] body *,
html[data-template="5"] body *::before,
html[data-template="5"] body *::after { box-sizing: border-box; }
html[data-template="5"] body { --finance-blue: var(--theme-primary); --finance-text: var(--t5-ink); --finance-muted: var(--t5-muted); --finance-soft: #f4f7f2; --finance-line: var(--t5-line); --w-blue: var(--theme-primary); --w-text: var(--t5-ink); --w-muted: var(--t5-muted); --w-soft: #f3f8f0; --w-line: var(--t5-line); }
html[data-template="5"] body a { text-decoration: none; }
html[data-template="5"] .finance-shell,
html[data-template="5"] .w-shell { width: 100%; max-width: 520px; padding: 0 12px 14px; margin: 0 auto; }
html[data-template="5"] .finance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 62px;
    padding: 12px 14px;
    margin: 0 -12px 14px;
    border: 0;
    background: url("leaves.svg") right center / cover no-repeat, linear-gradient(120deg, #259842, #137324);
    color: #fff;
    box-shadow: none;
    z-index: 20;
}
html[data-template="5"] .finance-header h1 { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.4; }
html[data-template="5"] .finance-header .finance-icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; color: #fff; }
html[data-template="5"] .finance-header .finance-icon { width: 23px; height: 23px; }
html[data-template="5"] h2 { color: var(--t5-ink); }
html[data-template="5"] .finance-section-title,
html[data-template="5"] .registration-section-title { margin: 17px 0 12px; padding-top: 0; border: 0; font-size: 17px; }

/* 轻描边、白色圆角卡片；账户结构图使用原有等级/激活状态颜色。 */
html[data-template="5"] .finance-record,
html[data-template="5"] .orders-card,
html[data-template="5"] .messages-card,
html[data-template="5"] .business-address,
html[data-template="5"] .profile-intro,
html[data-template="5"] .password-intro,
html[data-template="5"] .registration-intro,
html[data-template="5"] .finance-info-card,
html[data-template="5"] .finance-empty,
html[data-template="5"] .app-download-card,
html[data-template="5"] .app-install-guide,
html[data-template="5"] .qr-card,
html[data-template="5"] .promotion-link-card,
html[data-template="5"] .product-summary,
html[data-template="5"] .store-cart .product-box,
html[data-template="5"] .new-category-li,
html[data-template="5"] .business-content .message {
    margin-bottom: 12px;
    border: 1px solid var(--t5-line);
    border-radius: var(--t5-radius);
    background: #fff;
    box-shadow: var(--t5-shadow);
}
html[data-template="5"] .finance-record,
html[data-template="5"] .orders-card,
html[data-template="5"] .business-address { padding: 15px; }
html[data-template="5"] .finance-record .row { gap: 10px; padding: 5px 0; }
html[data-template="5"] .finance-empty { padding: 24px 16px; color: var(--t5-muted); }
html[data-template="5"] .finance-account-card { background: #fff; border-radius: var(--t5-radius); }
html[data-template="5"] .finance-balance-card {
    padding: 19px;
    border: 1px solid #d7ebc7;
    border-radius: var(--t5-radius);
    background: url("leaves.svg") right bottom / 310px auto no-repeat, linear-gradient(120deg, #eefbd9, #d3f0be);
}
html[data-template="5"] .finance-balance-name { color: var(--theme-primary); font-size: 18px; }
html[data-template="5"] .finance-balance-label { color: #51704c; font-size: 12px; }
html[data-template="5"] .finance-balance-card strong { color: #153a20; font-size: clamp(25px, 7vw, 34px); }
html[data-template="5"] .withdrawal-balance-row { justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
html[data-template="5"] .finance-form { margin-bottom: 12px; }
html[data-template="5"] .finance-field { margin-bottom: 14px; }
html[data-template="5"] .finance-field > label,
html[data-template="5"] .finance-field > .finance-label { margin-bottom: 7px; color: var(--t5-ink); font-size: 14px; }
html[data-template="5"] input:not([type]),
html[data-template="5"] input[type="text"],
html[data-template="5"] input[type="password"],
html[data-template="5"] input[type="number"],
html[data-template="5"] input[type="search"],
html[data-template="5"] input[type="email"],
html[data-template="5"] input[type="tel"],
html[data-template="5"] input[type="url"],
html[data-template="5"] input[type="date"],
html[data-template="5"] select,
html[data-template="5"] textarea {
    max-width: 100%;
    border: 1px solid #e4eade;
    border-radius: 12px;
    background-color: #f6f8f4;
    color: var(--t5-ink);
    box-shadow: none;
}
html[data-template="5"] .finance-field input:not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]),
html[data-template="5"] .finance-field select { min-height: 46px; padding-top: 10px; padding-bottom: 10px; font-size: 16px; }
html[data-template="5"] input::placeholder,
html[data-template="5"] textarea::placeholder { color: #929c8f; opacity: 1; }
html[data-template="5"] input[type="checkbox"],
html[data-template="5"] input[type="radio"] { accent-color: var(--theme-primary); }
html[data-template="5"] input:focus,
html[data-template="5"] textarea:focus,
html[data-template="5"] select:focus { border-color: var(--theme-primary); outline-color: var(--theme-primary); }

/* 主操作使用绿色胶囊按钮，危险操作仍保留原来的危险色。 */
html[data-template="5"] .finance-submit,
html[data-template="5"] .business-content .submit-btn,
html[data-template="5"] .business-content .open-btn,
html[data-template="5"] .product-primary,
html[data-template="5"] .registration-agree,
html[data-template="5"] .app-primary-link,
html[data-template="5"] .promotion-copy-submit,
html[data-template="5"] .store-search button[type="submit"],
html[data-template="5"] .store-checkout,
html[data-template="5"] .button.bg-yellow,
html[data-template="5"] .button.bg-blue,
html[data-template="5"] .button.bg-main,
html[data-template="5"] .btnzbz,
html[data-template="5"] .w-logout a {
    min-height: 44px;
    border: 1px solid var(--theme-primary);
    border-radius: 999px;
    background: linear-gradient(115deg, #319c39, #137526);
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(30, 125, 40, .08);
    text-align: center;
}
html[data-template="5"] .finance-submit-bar,
html[data-template="5"] .product-action-bar {
    max-width: 520px;
    padding: 12px;
    border-color: var(--t5-line);
    background: rgba(255, 255, 255, .98);
}
html[data-template="5"] .finance-link-button,
html[data-template="5"] .finance-code-button,
html[data-template="5"] .front-pagination-button,
html[data-template="5"] .orders-action,
html[data-template="5"] .app-secondary-link { border-color: #d6e5d0; border-radius: 999px; background: #fff; color: var(--theme-primary); }
html[data-template="5"] .finance-pagination,
html[data-template="5"] .orders-pagination { justify-content: center; gap: 7px; }
html[data-template="5"] .finance-pagination-summary { color: var(--t5-muted); text-align: center; font-size: 12px; }
html[data-template="5"] .finance-icon-button,
html[data-template="5"] .business-add { color: var(--theme-primary); }
html[data-template="5"] .finance-header .finance-icon-button { color: #fff; }

/* 首页：绿叶页头、紧凑搜索、圆角广告与商品卡片。配置的广告和商品图片原样使用。 */
html[data-template="5"] .store-shouye .finance-shell { padding-top: 0; }
html[data-template="5"] .t5-home-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -12px;
    padding: 16px 13px 10px;
    background: linear-gradient(115deg, #239743, #147728);
    color: white;
}
html[data-template="5"] .t5-store-brand { display: flex; flex: 0 1 145px; align-items: center; gap: 7px; min-width: 0; font-size: 17px; font-weight: 700; line-height: 1.35; }
html[data-template="5"] .t5-store-brand svg { flex: 0 0 25px; width: 25px; height: 28px; }
html[data-template="5"] .t5-home-header .store-search { flex: 1; min-width: 0; margin: 0; }
html[data-template="5"] .t5-home-header .store-search form { gap: 4px; padding: 3px 5px; border-radius: 999px; background: #fff; }
html[data-template="5"] .t5-home-header .store-search input[type="text"] { width: 0; min-height: 34px; padding: 6px 4px; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
html[data-template="5"] .t5-home-header .store-search .store-language { flex: 0 0 27px; min-height: 34px; }
html[data-template="5"] .t5-home-header .store-search button[type="submit"] { min-height: 32px; padding: 5px 9px; font-size: 12px; }
html[data-template="5"] .store-tabs { gap: 15px; margin: 0 -12px 12px; padding: 7px 15px 13px; background: #16802d; }
html[data-template="5"] .store-tabs a { color: #fff !important; font-size: 13px; }
html[data-template="5"] .store-banner { overflow: hidden; margin: 0 0 12px; border-radius: 17px; box-shadow: var(--t5-shadow); }
html[data-template="5"] .store-slides img { width: 100%; height: auto; aspect-ratio: 2.38; object-fit: cover; }
html[data-template="5"] .store-shortcuts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 13px 8px 10px; margin: 0 0 12px; border: 1px solid var(--t5-line); border-radius: 17px; background: #fff; box-shadow: var(--t5-shadow); }
html[data-template="5"] .store-shortcuts .item { min-width: 0; }
html[data-template="5"] .store-shortcuts .picicon > div { width: 41px !important; height: 41px !important; margin: auto; border-radius: 13px !important; background: linear-gradient(145deg, #e7f7d6, #c5edb4); }
html[data-template="5"] .store-shortcuts .store-shortcut-icon { color: #14882e; }
html[data-template="5"] .store-shortcuts .item:nth-child(3) .picicon > div { background: #fff0d0; }
html[data-template="5"] .store-shortcuts .item:nth-child(3) .store-shortcut-icon { color: #e6a019; }
html[data-template="5"] .store-shortcuts h3 { padding: 0 2px; color: var(--t5-ink); font-size: 12px; line-height: 1.45; }
html[data-template="5"] .store-news { padding: 10px 12px; border: 1px solid var(--t5-line); border-radius: 13px; background: #fff; color: #72866b; }
html[data-template="5"] .store-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; }
html[data-template="5"] .store-products > .item { padding: 9px; border: 1px solid var(--t5-line); border-radius: 15px; background: #fff; }
html[data-template="5"] .store-products .text-cut-2 { margin: 8px 0; font-size: 13px; }
html[data-template="5"] .store-products .text-lg { color: #ef4b20; font-size: 17px; font-weight: 650; }
html[data-template="5"] .store-products .cu-tag { border-radius: 5px; background: #edf7e7; color: var(--theme-primary); }
html[data-template="5"] .store-product-add { background: var(--theme-primary-soft); color: var(--theme-primary); }
html[data-template="5"] .store-category-list .is-current { background: #e2f2d8; color: #177b2b; }

/* 我的：绿色身份区，真实账户数据构成的白色摘要卡，四列功能图标。 */
html[data-template="5"] .w-profile {
    min-height: 138px;
    margin: 0 -12px;
    padding: 27px 17px 30px;
    background: url("leaves.svg") right bottom / cover no-repeat, linear-gradient(115deg, #279b43, #117326);
    color: #fff;
}
html[data-template="5"] .w-avatar { width: 57px; height: 57px; border: 2px solid rgba(255, 255, 255, .7); background: #d9efdb; }
html[data-template="5"] .w-name { font-size: 18px; }
html[data-template="5"] .w-profile-meta { color: #f0f8eb; }
html[data-template="5"] .w-profile-meta > span:first-of-type { padding: 1px 7px; border-radius: 6px; background: #f0e6a8; color: #355b1c; }
html[data-template="5"] .w-language { color: #fff; font-size: 12px; }
html[data-template="5"] .w-tabs { position: relative; top: auto; gap: 0; justify-content: space-around; margin: -14px 0 12px; padding: 8px; border: 1px solid var(--t5-line); border-radius: 15px; background: #fff; box-shadow: var(--t5-shadow); }
html[data-template="5"] .w-tab { min-height: 35px; padding: 5px 14px; border-radius: 999px; color: #85917f; font-size: 15px; }
html[data-template="5"] .w-tab.is-active { background: #e4f4d9; color: #176f26; }
html[data-template="5"] .w-tab::after { display: none; }
html[data-template="5"] .w-overview { padding: 0; margin-bottom: 12px; }
html[data-template="5"] .w-overview-balance-row { display: flex; align-items: stretch; gap: 0; margin: 0 0 12px; padding: 19px 6px; border: 1px solid var(--t5-line); border-radius: 16px; background: #fff; box-shadow: var(--t5-shadow); }
html[data-template="5"] .t5-summary-main,
html[data-template="5"] .t5-summary-stat { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; text-align: center; }
html[data-template="5"] .t5-summary-main { flex-direction: column-reverse; }
html[data-template="5"] .t5-summary-stat { border-left: 1px solid var(--t5-line); }
html[data-template="5"] .w-overview-balance-row .w-balance-label { max-width: none; justify-content: center; gap: 3px; font-size: 12px; }
html[data-template="5"] .w-overview-balance-row .w-balance-value,
html[data-template="5"] .t5-summary-stat strong { margin: 0; color: #173c1f; font-size: clamp(17px, 4.5vw, 23px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; overflow-wrap: anywhere; }
html[data-template="5"] .t5-summary-stat span { font-size: 12px; }
html[data-template="5"] .w-eye { width: 22px; height: 24px; }
html[data-template="5"] .w-eye svg { width: 18px; height: 18px; }
html[data-template="5"] .w-balance-caption { margin: 4px 0 10px; color: #819277; font-size: 12px; }
html[data-template="5"] .w-quick-actions { gap: 8px; margin: 0 0 12px; padding: 13px 7px; border: 1px solid var(--t5-line); border-radius: 16px; background: white; }
html[data-template="5"] .w-quick-icon { width: 42px; height: 42px; border-radius: 13px; background: #e4f4da; color: #168a34; }
html[data-template="5"] .w-quick-icon svg { width: 25px; height: 25px; }
html[data-template="5"] .w-quick-action { font-size: 12px; }
html[data-template="5"] .w-section-heading { margin: 16px 0 10px; }
html[data-template="5"] .w-section-heading h2 { font-size: 17px; }
html[data-template="5"] .w-account-list,
html[data-template="5"] .w-service-grid { border: 1px solid var(--t5-line); border-radius: 16px; background: #fff; box-shadow: var(--t5-shadow); }
html[data-template="5"] .w-account { min-height: 76px; padding: 13px; border-color: var(--t5-line); }
html[data-template="5"] .w-account-icon { background: #e8f5e0; color: #258c34; }
html[data-template="5"] .w-account-value { color: #264a2a; font-size: 20px; }
html[data-template="5"] .w-services { margin-top: 15px; }
html[data-template="5"] .w-services-kicker { color: var(--t5-muted); font-size: 11px; }
html[data-template="5"] .w-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 5px; padding: 16px 5px; }
html[data-template="5"] .w-service { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 2px; border: 0; text-align: center; }
html[data-template="5"] .w-service-icon { width: 39px; height: 39px; border-radius: 13px; background: linear-gradient(145deg, #e6f6dd, #c8edbd); color: #188637; }
html[data-template="5"] .w-service-icon svg { width: 24px; height: 24px; }
html[data-template="5"] .w-service-text h2 { color: #23462a; font-size: 12px; line-height: 1.45; font-weight: 550; }
html[data-template="5"] .w-service::after { display: none; }
html[data-template="5"] .w-community { gap: 10px; }
html[data-template="5"] .w-community a { border: 1px solid var(--t5-line); border-radius: 14px; background: #fff; }
html[data-template="5"] .w-logout { margin: 17px 0 0; padding: 0; border: 0; }
html[data-template="5"] .w-logout a { display: flex; align-items: center; justify-content: center; min-height: 45px; }

/* 订单保留原有四种状态及各操作，视觉使用绿色选中标签。 */
html[data-template="5"] .orders-tabs { gap: 4px; padding: 7px; border: 0; border-radius: 14px; background: #fff; }
html[data-template="5"] .orders-tab { min-height: 38px; padding: 7px 3px; border-radius: 999px; font-size: 12px; }
html[data-template="5"] .orders-tab.is-active { background: #daf1cb; color: #176f26 !important; }
html[data-template="5"] .orders-tab.is-active::after { bottom: 0; background: var(--theme-primary); }
html[data-template="5"] .orders-card-header { padding-bottom: 10px; border-color: var(--t5-line); }
html[data-template="5"] .orders-state { color: var(--theme-primary); }
html[data-template="5"] .orders-product { gap: 12px; padding: 12px 0; }
html[data-template="5"] .orders-product img { border-radius: 12px; background: #f2f9ec; }
html[data-template="5"] .orders-product-name { font-size: 14px; }
html[data-template="5"] .orders-card-actions { gap: 8px; padding-top: 10px; border-color: var(--t5-line); }
html[data-template="5"] .bonus-filter { gap: 8px; padding: 12px; border: 1px solid var(--t5-line); background: #fff; }
html[data-template="5"] .bonus-filter input.Wdate { flex: 1; width: 90px; min-width: 65px; }
html[data-template="5"] .t5-bonus-overview { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 13px; padding: 18px 17px; border: 1px solid #dceecb; border-radius: 16px; background: url("leaves.svg") right bottom / auto 180px no-repeat, linear-gradient(115deg, #edfad7, #d3efb9); }
html[data-template="5"] .t5-bonus-overview > div { flex: 1; min-width: 110px; }
html[data-template="5"] .t5-bonus-overview span { display: block; font-size: 12px; }
html[data-template="5"] .t5-bonus-overview strong { display: block; margin-top: 5px; font-size: 23px; font-variant-numeric: tabular-nums; }

/* 老列表仍按表格展示；在小屏横向浏览，不挤压列、不改业务结构图。 */
html[data-template="5"] .t5-table-scroll,
html[data-template="5"] .table-container { width: 100%; max-width: 100%; overflow-x: auto; margin: 12px 0; border: 1px solid var(--t5-line); border-radius: 14px; background: #fff; }
html[data-template="5"] .t5-data-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 13px; background: #fff; }
html[data-template="5"] .t5-data-table th,
html[data-template="5"] .t5-data-table td { padding: 11px 12px; border: 1px solid var(--t5-line); text-align: center; vertical-align: middle; }
html[data-template="5"] .t5-data-table th { background: #eaf5e3; color: #365a2c; }
html[data-template="5"] .t5-data-table tbody tr:nth-child(even) { background: #f8fbf6; }
html[data-template="5"] .container,
html[data-template="5"] .container2 { max-width: 100%; }
html[data-template="5"] .profile-intro-icon,
html[data-template="5"] .registration-intro-icon,
html[data-template="5"] .password-intro-icon,
html[data-template="5"] .finance-account-row-icon { background: #e5f4d9; color: var(--theme-primary); }
html[data-template="5"] .finance-account-row { gap: 12px; padding: 16px; }
html[data-template="5"] .front-language-choice { padding: 16px; border-color: var(--t5-line); border-radius: 14px; background: #fff; }
html[data-template="5"] .front-language-choice[aria-pressed="true"] { border-color: var(--theme-primary); background: #e6f5dc; color: #18732b; }
html[data-template="5"] .finance-account-name { font-size: 18px; }
html[data-template="5"] .product-action-bar a { border-radius: 999px; }
html[data-template="5"] .product-price { color: #ec4b20; }

/* 底部固定导航沿用原功能入口和自动选中逻辑。安全区由原脚本统一测量。 */
html[data-template="5"] #site-footer.site-footer { max-width: 520px; min-height: calc(64px + env(safe-area-inset-bottom)); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-color: #e0ebdc; background: rgba(255,255,255,.98) !important; }
html[data-template="5"] #site-footer .site-footer-item { gap: 3px; color: #8e9689 !important; font-size: 11px !important; }
html[data-template="5"] #site-footer .site-footer-item.is-current { color: #16772a !important; font-weight: 650; }
html[data-template="5"] #site-footer .w-icon { width: 23px !important; height: 23px !important; }
html[data-template="5"] body.has-site-footer { --site-footer-offset: var(--site-footer-height, calc(64px + env(safe-area-inset-bottom))); }
@media (max-width: 359px) {
    html[data-template="5"] .t5-home-header { gap: 6px; }
    html[data-template="5"] .t5-store-brand { flex-basis: 86px; font-size: 14px; }
    html[data-template="5"] .w-profile { padding: 23px 12px 28px; gap: 9px; }
    html[data-template="5"] .w-avatar { width: 46px; height: 46px; }
    html[data-template="5"] .w-name { font-size: 16px; }
    html[data-template="5"] .w-service-grid { gap: 14px 3px; }
}
@media (prefers-reduced-motion: reduce) {
    html[data-template="5"] *, html[data-template="5"] *::before, html[data-template="5"] *::after { scroll-behavior: auto !important; }
}

/* 输入区域与页面底色拉开层次，密码显隐控件右侧留白仍由原样式控制。 */
html[data-template="5"] .finance-page:not(.store-page) .finance-form {
    padding: 15px;
    border: 1px solid var(--t5-line);
    border-radius: 17px;
    background: #fff;
}
html[data-template="5"] .finance-field input:not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]),
html[data-template="5"] .finance-field select,
html[data-template="5"] .finance-field textarea {
    border: 1px solid #e1e9dc;
    background-color: #f5f8f2;
}
html[data-template="5"] #wode-account-list {
    overflow: hidden;
    border: 1px solid var(--t5-line);
    border-radius: 16px;
    background: #fff;
}
html[data-template="5"] .w-account-row { padding: 14px 12px; }
html[data-template="5"] .w-overview-balance-row .w-balance-value { letter-spacing: normal; }
html[data-template="5"] .bonus-page .finance-record .row:not(:first-child) { color: #e94b24; font-weight: 600; }
html[data-template="5"] .bonus-page .finance-record .row .label { font-weight: 400; }
html[data-template="5"] #site-footer .site-footer-item { font-size: 12px !important; }

/* 旧版功能页同样采用绿色页头，原定位和标题内容继续沿用。 */
html[data-template="5"] .header.header-color,
html[data-template="5"] .header-background,
html[data-template="5"] body > .header {
    max-width: 520px;
    background: url("leaves.svg") right center / cover no-repeat, linear-gradient(115deg, #239743, #147728);
    color: #fff;
}
html[data-template="5"] .header-title,
html[data-template="5"] .header.header-color a { color: #fff !important; }
html[data-template="5"] .t5-fixed-header { left: 50% !important; width: 100%; max-width: 520px; transform: translateX(-50%); }
html[data-template="5"] #wode-page .w-balance-panel {
    border: 1px solid #d2e6c4;
    background: url("leaves.svg") right bottom / cover no-repeat, linear-gradient(115deg, #258f3e, #176f28);
    color: #fff;
}
html[data-template="5"] #wode-page .w-balance-panel .w-balance-value,
html[data-template="5"] #wode-page .w-balance-panel .w-balance-label,
html[data-template="5"] #wode-page .w-balance-panel .w-balance-available-value { color: #fff; }
html[data-template="5"] #wode-page .w-balance-panel .w-balance-action { background: #fff; color: var(--theme-primary); }

/* 旧页残留的 360px 最小宽度和 vw 余额卡不能超出模板画布。 */
html[data-template="5"] .container,
html[data-template="5"] .container2 { width: 100%; min-width: 0 !important; }
html[data-template="5"] .red_bg { width: 100% !important; max-width: 100%; }
html[data-template="5"] .recharge_wrap { width: 100%; max-width: 100%; padding: 12px; }
html[data-template="5"] .recharge_wrap .red_top_bg {
    min-height: 62px;
    padding: 16px;
    border-radius: 15px;
    background: url("leaves.svg") right center / cover no-repeat, linear-gradient(115deg, #239743, #147728);
    color: #fff;
}
html[data-template="5"] .recharge_wrap .big_tit { color: #fff; }
html[data-template="5"] .recharge_wrap .balance {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 12px 0;
    padding: 16px;
    border: 1px solid var(--t5-line);
    border-radius: 15px;
    background: #fff;
    color: var(--t5-ink);
}

/* 旧商城轮播曾写死 331px，窄屏仍沿用其内容并让容器缩到当前画布。 */
html[data-template="5"] .red_bg > uni-view,
html[data-template="5"] .red_bg uni-swiper,
html[data-template="5"] .red_bg .swiper-container {
    width: 100% !important;
    max-width: 100%;
}
/* 兼容旧版商城与个人页中的独立红色页头、购买按钮。 */
html[data-template="5"] .header,
html[data-template="5"] .index_header,
html[data-template="5"] .icon_header,
html[data-template="5"] .red_bg {
    background: url("leaves.svg") right center / cover no-repeat, linear-gradient(115deg, #239743, #147728);
    color: #fff;
}
html[data-template="5"] .com-button,
html[data-template="5"] .coupon-buy,
html[data-template="5"] .buy-btn-copy,
html[data-template="5"] .getTbk {
    border-color: var(--theme-primary);
    border-radius: 999px;
    background: var(--theme-primary) !important;
    color: #fff;
}
