:root {
    --ink: #17233f;
    --muted: #69758f;
    --soft: #8d9bb3;
    --line: #dbe8ff;
    --paper: #f3f8ff;
    --panel: #ffffff;
    --blue: #1769f5;
    --blue-dark: #0f46b8;
    --cyan: #08a6d9;
    --green: #11a97d;
    --orange: #ff9f2f;
    --red: #e05252;
    --shadow: 0 14px 36px rgba(26, 79, 160, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    background: #dfeeff;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(23, 105, 245, 0.12), rgba(8, 166, 217, 0.05) 36%, rgba(255, 159, 47, 0.07)),
        #eaf4ff;
    font-family: "Alibaba PuHuiTi", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}

body,
button,
input,
textarea {
    font: 14px/1.55 "Alibaba PuHuiTi", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    border: 0;
    outline: 0;
}

button {
    cursor: pointer;
}

.h5-shell {
    position: relative;
    width: min(100%, 430px);
    min-height: 100vh;
    margin: 0 auto;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(225, 241, 255, 0.92) 0, rgba(246, 250, 255, 0.96) 360px, #f7fbff 100%),
        repeating-linear-gradient(135deg, rgba(23, 105, 245, 0.05) 0 1px, transparent 1px 14px);
    box-shadow: 0 0 0 1px rgba(23, 105, 245, 0.08), 0 28px 80px rgba(30, 74, 130, 0.22);
}

.h5-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 16px;
    background: rgba(246, 251, 255, 0.9);
    border-bottom: 1px solid rgba(197, 220, 255, 0.72);
    backdrop-filter: blur(16px);
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    flex: 0 0 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 8px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(23, 105, 245, 0.28);
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-size: 15px;
    font-weight: 900;
}

.brand-lockup small {
    margin-top: -2px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 700;
}

.topbar-action {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--blue);
    background: #e8f2ff;
    border: 1px solid rgba(23, 105, 245, 0.14);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.page-content {
    padding: 12px 14px 92px;
}

.hero {
    position: relative;
    overflow: hidden;
    margin: 0 -14px;
    padding: 26px 16px 20px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
        linear-gradient(135deg, #1166f3 0%, #039ed4 56%, #16b98e 100%);
}

.hero::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -54px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    transform: rotate(18deg);
}

.hero-content,
.hero-visual {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    margin: 0 0 12px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: 31px;
    line-height: 1.16;
    font-weight: 950;
}

.hero p,
.page-hero p {
    margin: 12px 0 0;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.hero-actions,
.cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.primary-action,
.secondary-action,
.ghost-action,
.line-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
}

.primary-action {
    color: #fff;
    background: linear-gradient(135deg, #ffae3a, #ff7c30);
    box-shadow: 0 12px 28px rgba(255, 132, 40, 0.28);
}

.secondary-action {
    color: var(--blue);
    background: #fff;
}

.ghost-action {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.line-action {
    color: var(--blue);
    background: #edf5ff;
    border: 1px solid rgba(23, 105, 245, 0.18);
}

.hero-visual {
    margin-top: 20px;
}

.product-card {
    overflow: hidden;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(20, 60, 120, 0.22);
}

.product-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border-bottom: 1px solid #e8f0ff;
}

.window-dots {
    display: inline-flex;
    gap: 5px;
}

.window-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d6e4ff;
}

.window-dots span:nth-child(1) {
    background: var(--orange);
}

.window-dots span:nth-child(2) {
    background: var(--green);
}

.window-dots span:nth-child(3) {
    background: var(--blue);
}

.product-card-head strong {
    color: var(--blue);
    font-size: 12px;
}

.mini-dashboard {
    padding: 14px;
}

.mini-metric {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    background: #f4f8ff;
    border: 1px solid #e3eeff;
    border-radius: 8px;
}

.mini-metric + .mini-metric {
    margin-top: 9px;
}

.mini-metric span {
    color: var(--muted);
    font-size: 12px;
}

.mini-metric strong {
    font-size: 19px;
    font-weight: 950;
}

.mini-metric b {
    color: var(--green);
    font-size: 12px;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    background: #dce9ff;
    border-radius: 999px;
}

.progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: inherit;
}

.hero-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.hero-strip div {
    min-height: 62px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
}

.hero-strip strong,
.hero-strip span {
    display: block;
}

.hero-strip strong {
    font-size: 17px;
    font-weight: 950;
}

.hero-strip span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
}

.section-block {
    margin-top: 18px;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 950;
}

.section-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.text-link {
    flex: 0 0 auto;
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
}

.info-grid,
.feature-grid,
.upgrade-grid,
.stats-grid {
    display: grid;
    gap: 10px;
}

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

.info-card,
.feature-card,
.upgrade-card,
.project-card,
.record-row,
.report-card,
.quote-card,
.flow-board,
.role-card,
.level-card,
.empty-state {
    background: var(--panel);
    border: 1px solid rgba(214, 228, 255, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-card,
.feature-card,
.upgrade-card {
    min-height: 132px;
    padding: 13px;
}

.info-card b,
.feature-card b,
.upgrade-card b {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 950;
}

.info-card p,
.feature-card p,
.upgrade-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.card-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    margin-bottom: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 8px;
    font-weight: 950;
}

.card-icon.green {
    background: linear-gradient(135deg, #0bbf87, #0aa5c8);
}

.card-icon.orange {
    background: linear-gradient(135deg, #ffb23f, #ff7a35);
}

.card-icon.dark {
    background: linear-gradient(135deg, #193b82, #1769f5);
}

.role-list,
.level-list,
.record-list,
.report-list {
    display: grid;
    gap: 10px;
}

.role-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 13px;
    align-items: start;
}

.role-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-radius: 8px;
    font-size: 21px;
    font-weight: 950;
}

.role-card:nth-child(2) .role-avatar,
.level-card:nth-child(2) .role-avatar {
    background: linear-gradient(135deg, #0fb985, #0aa6d8);
}

.role-card:nth-child(3) .role-avatar,
.level-card:nth-child(3) .role-avatar {
    background: linear-gradient(135deg, #ffac35, #ff7a2d);
}

.role-card:nth-child(4) .role-avatar,
.level-card:nth-child(4) .role-avatar {
    background: linear-gradient(135deg, #123f9e, #08265f);
}

.role-card:nth-child(5) .role-avatar {
    background: linear-gradient(135deg, #7d61ff, #0aa6d8);
}

.role-card h3,
.level-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 950;
}

.role-card p,
.level-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.mini-tag {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    padding: 0 8px;
    color: var(--blue-dark);
    background: #edf5ff;
    border: 1px solid #d6e8ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.flow-board {
    padding: 14px;
}

.flow-step {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #e6efff;
}

.flow-step:last-child {
    border-bottom: 0;
}

.flow-no {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: var(--blue);
    border-radius: 8px;
    font-weight: 950;
}

.flow-step strong,
.flow-step span {
    display: block;
}

.flow-step strong {
    font-size: 14px;
    font-weight: 950;
}

.flow-step span {
    color: var(--muted);
    font-size: 12px;
}

.flow-arrow {
    color: var(--cyan);
    font-size: 20px;
    font-weight: 950;
}

.project-list {
    display: grid;
    gap: 10px;
}

.project-card {
    padding: 14px;
}

.project-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.project-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 950;
}

.project-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    color: var(--blue);
    background: #edf5ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.status-badge.open,
.status-badge.confirmed,
.status-badge.paid,
.status-badge.published {
    color: var(--green);
    background: #e9fbf5;
}

.status-badge.pending,
.status-badge.draft {
    color: #b1660f;
    background: #fff5e5;
}

.status-badge.rejected,
.status-badge.cancelled {
    color: var(--red);
    background: #fff0f0;
}

.project-metrics,
.report-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.project-metrics div,
.report-metrics div,
.stat-tile {
    padding: 10px;
    background: #f5f9ff;
    border: 1px solid #e4efff;
    border-radius: 8px;
}

.project-metrics span,
.report-metrics span,
.stat-tile span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.project-metrics strong,
.report-metrics strong,
.stat-tile strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    font-weight: 950;
}

.project-card .progress-track {
    margin-top: 12px;
}

.project-action {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.project-action a {
    flex: 1;
}

.quote-card {
    position: relative;
    overflow: hidden;
    padding: 16px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 16px),
        linear-gradient(135deg, #125fe6, #08a6d9 62%, #0db27f);
}

.quote-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
}

.quote-card p {
    margin: 8px 0 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
}

.quote-form {
    display: grid;
    gap: 9px;
}

.quote-form input,
.search-card input {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    font-weight: 800;
}

.quote-form button,
.search-card button {
    width: 100%;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 0 -14px 18px;
    padding: 24px 16px 22px;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
        linear-gradient(135deg, #123f9e, #1769f5 58%, #08a6d9);
}

.page-hero.compact {
    padding-bottom: 18px;
}

.breadcrumb {
    display: inline-flex;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
}

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

.stat-tile {
    min-height: 82px;
    background: #fff;
}

.stat-tile strong {
    color: var(--blue);
    font-size: 22px;
}

.level-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 13px;
}

.tier-list {
    display: grid;
    gap: 10px;
}

.tier-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    background: #fff;
    border: 1px solid #dbe8ff;
    border-radius: 8px;
}

.tier-card h3,
.tier-card p {
    margin: 0;
}

.tier-card h3 {
    font-size: 15px;
    font-weight: 950;
}

.tier-card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.tier-amount {
    color: var(--blue);
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
}

.search-card {
    padding: 14px;
    background: #fff;
    border: 1px solid #dbe8ff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.search-card form {
    display: grid;
    grid-template-columns: 1fr 94px;
    gap: 9px;
}

.tab-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.tab-button {
    min-height: 38px;
    color: var(--muted);
    background: #edf5ff;
    border: 1px solid #dceaff;
    border-radius: 8px;
    font-weight: 900;
}

.tab-button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-color: transparent;
}

[hidden] {
    display: none !important;
}

.record-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
}

.record-row h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 950;
}

.record-row p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.record-amount {
    text-align: right;
}

.record-amount strong {
    display: block;
    color: var(--green);
    font-size: 17px;
    font-weight: 950;
}

.record-amount span {
    display: inline-flex;
    margin-top: 5px;
}

.report-card {
    padding: 14px;
}

.report-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 950;
}

.report-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.settlement-total {
    margin-top: 12px;
    padding: 14px;
    color: #fff;
    background: linear-gradient(135deg, #1769f5, #08a6d9);
    border-radius: 8px;
}

.settlement-total span,
.settlement-total strong {
    display: block;
}

.settlement-total span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.settlement-total strong {
    margin-top: 4px;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
}

.formula-card {
    padding: 14px;
    color: #173264;
    background: #eaf4ff;
    border: 1px dashed #9cc4ff;
    border-radius: 8px;
}

.formula-card strong {
    display: block;
    font-size: 15px;
    font-weight: 950;
}

.formula-card p {
    margin: 6px 0 0;
    font-size: 12px;
}

.audit-list {
    display: grid;
    gap: 9px;
}

.audit-item {
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #dbe8ff;
    border-radius: 8px;
}

.audit-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    background: var(--green);
    border-radius: 50%;
}

.audit-item strong,
.audit-item span {
    display: block;
}

.audit-item strong {
    font-size: 13px;
    font-weight: 950;
}

.audit-item span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.empty-state {
    padding: 18px 14px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 15px;
}

.h5-tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    width: min(100%, 430px);
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin: 0 auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid #dce8ff;
    box-shadow: 0 -12px 28px rgba(29, 82, 140, 0.12);
    backdrop-filter: blur(16px);
}

.tabbar-item {
    display: grid;
    min-height: 50px;
    place-items: center;
    color: var(--muted);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
}

.tabbar-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    margin-bottom: 2px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 950;
}

.tabbar-item.active {
    color: var(--blue);
    background: #edf5ff;
}

.tabbar-item.active .tabbar-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.h5-toast {
    position: fixed;
    right: 18px;
    bottom: 86px;
    left: 18px;
    z-index: 40;
    max-width: 390px;
    margin: 0 auto;
    padding: 11px 13px;
    color: #fff;
    background: rgba(18, 35, 73, 0.92);
    border-radius: 8px;
    text-align: center;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

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

@media (min-width: 820px) {
    .h5-shell {
        min-height: calc(100vh - 40px);
        margin: 20px auto;
        border-radius: 18px;
    }

    .h5-topbar {
        border-radius: 18px 18px 0 0;
    }
}
