/* ============================================================
   公共：状态卡 / 锁定提示 / 跳转链接（首页 + 我的 复用）
   ============================================================ */
.status-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: linear-gradient(180deg, #fff8e0 0%, #ffeebd 100%);
    border: 0.1rem solid #f3d8a5;
    border-radius: 0.8rem;
}
.status-card__icon {
    flex: 0 0 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(180deg, #ea1c25 0%, #ad0810 100%);
    color: #fff;
    font-size: 2.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.3rem 0.7rem rgba(180, 10, 16, 0.32);
}
.status-card__body {
    flex: 1;
    min-width: 0;
}
.status-card__head {
    color: #b14406;
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.status-card__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 1.15rem;
    color: #6b3a0d;
    line-height: 1.6;
    padding: 0.2rem 0;
}
.status-card__row b {
    color: #2a1308;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
}
.status-card__row b.mono {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.02rem;
}
.status-card__row b.amount {
    color: #d8131c;
    font-weight: 800;
    font-size: 1.4rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
}
.badge--ok   { background: #e2f5d8; color: #2b8a16; }
.badge--warn { background: #fbe1cc; color: #b14406; }

.locked-tip {
    padding: 1.4rem 1rem;
    background: #fff7e6;
    border: 0.1rem dashed #f3b58a;
    border-radius: 0.6rem;
    color: #b14406;
    font-size: 1.3rem;
    text-align: center;
    line-height: 1.6;
}

.link-view {
    display: inline-block;
    margin-top: 1rem;
    color: #d8131c;
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
}

.notice--ok {
    color: #2b8a16;
    background: #ecfae3;
    border-color: #c4ea9c;
}
.notice--ok::before { background: #2b8a16; }
.notice--ok::after  { content: '✓'; left: 1.3rem; top: 0.7rem; font-style: normal; }
.notice__link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 0.3rem;
}

.field__static {
    padding: 0.8rem 1.2rem;
    background: #fffaee;
    border: 0.1rem dashed #f3d8a5;
    border-radius: 0.5rem;
    color: #6b3a0d;
    font-size: 1.2rem;
    line-height: 1.5;
}

.fund-item__btn--done {
    background: #e8d8b8 !important;
    color: #8b6a3a !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* ============================================================
   App 模态（公共骨架）
   ============================================================ */
.app-modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 5, 5, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.app-modal.is-open { display: flex; }
.app-modal[aria-hidden="false"] { display: flex; }

.app-modal__panel {
    width: 100%;
    max-width: 34rem;
    background: linear-gradient(180deg, #fff8e6 0%, #ffe9b3 100%);
    border: 0.1rem solid #e8b86a;
    border-radius: 1rem;
    padding: 2rem 1.6rem 1.6rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 1rem 3rem rgba(80, 10, 0, 0.4);
}
.app-modal__panel--narrow { max-width: 28rem; text-align: center; }
.app-modal__panel--receipt {
    width: min(96vw, 62rem);
    max-width: 62rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.app-modal__close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    width: 3rem;
    height: 3rem;
    border: 0;
    background: transparent;
    color: #b14406;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

.app-modal__title {
    margin: 0 0 0.4rem;
    color: #d8131c;
    font-size: 1.7rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.1rem;
}
.app-modal__sub {
    margin: 0 0 1.2rem;
    color: #6b3a0d;
    font-size: 1.15rem;
    text-align: center;
    line-height: 1.5;
}

.app-modal__actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.2rem;
    justify-content: center;
}

.btn-ghost {
    flex: 1;
    height: 4rem;
    border: 0.1rem solid #d8a85a;
    border-radius: 0.6rem;
    background: #fffaee;
    color: #8b5a16;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary--sm {
    flex: 1;
    width: auto;
    height: 4rem;
    font-size: 1.4rem;
    letter-spacing: 0.15rem;
    margin: 0;
}

/* ============================================================
   营业执照预览（嵌在签名模态里的迷你版）
   ============================================================ */
.lic-preview {
    background: #fff;
    border: 0.2rem solid #a30810;
    border-radius: 0.4rem;
    padding: 1rem 1rem 0.6rem;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    font-size: 1.1rem;
    line-height: 1.5;
}
.lic-preview__head {
    text-align: center;
    border-bottom: 0.1rem solid #d8131c;
    padding-bottom: 0.5rem;
    margin-bottom: 0.6rem;
}
.lic-preview__title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #a30810;
    letter-spacing: 0.2rem;
}
.lic-preview__org {
    color: #6b3a0d;
    font-size: 1rem;
    margin-top: 0.2rem;
}
.lic-preview__grid {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 0.4rem 0.8rem;
    margin: 0;
}
.lic-preview__grid dt {
    color: #6b3a0d;
    font-weight: 600;
}
.lic-preview__grid dd {
    margin: 0;
    color: #1a1a1a;
    word-break: break-all;
}
.lic-preview__grid dd.mono {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 1rem;
}
.lic-preview__scope {
    line-height: 1.5;
}
.lic-preview__sign-row {
    margin-top: 0.6rem;
    padding-top: 0.4rem;
    border-top: 0.05rem dashed #c4a060;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #6b3a0d;
    font-size: 1.05rem;
}
.lic-preview__sign-slot {
    flex: 1;
    height: 3rem;
    border-bottom: 0.1rem solid #888;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lic-preview__sign-slot img {
    max-height: 2.6rem;
    max-width: 100%;
    display: block;
}

/* ============================================================
   签名画板
   ============================================================ */
.signpad {
    border: 0.1rem dashed #d8a85a;
    border-radius: 0.6rem;
    background: #fffaee;
    overflow: hidden;
}
.signpad__canvas {
    display: block;
    width: 100%;
    height: 14rem;
    background:
        linear-gradient(180deg, transparent calc(100% - 0.05rem), #d8a85a calc(100% - 0.05rem));
    touch-action: none;
    cursor: crosshair;
}
.signpad__hint {
    text-align: center;
    color: #c9a96a;
    font-size: 1.1rem;
    padding: 0.4rem 0;
}

/* ============================================================
   圆梦金倒计时模态
   ============================================================ */
.fund-view {
    padding: 0.8rem 0 0.4rem;
}
.fund-spin {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.2rem;
    border: 0.4rem solid rgba(216, 19, 28, 0.18);
    border-top-color: #d8131c;
    border-radius: 50%;
    animation: fundSpin 0.9s linear infinite;
}
@keyframes fundSpin { to { transform: rotate(360deg); } }

.fund-loading__title {
    color: #d8131c;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
}
.fund-loading__amount,
.fund-result__amount {
    color: #b14406;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.4rem 0;
}
.fund-loading__count {
    color: #6b3a0d;
    font-size: 1.2rem;
    margin: 0.4rem 0 0.6rem;
}
.fund-loading__count b {
    color: #d8131c;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0.3rem;
}
.fund-loading__bar {
    height: 0.6rem;
    background: rgba(216, 19, 28, 0.15);
    border-radius: 0.3rem;
    overflow: hidden;
    margin: 0.6rem 1.4rem;
}
.fund-loading__bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #ea1c25, #ffb84d);
    transition: width 0.95s linear;
}
.fund-loading__sub {
    color: #8b5a16;
    font-size: 1.1rem;
    margin: 0.8rem 0 0;
}

.fund-icon {
    width: 6.4rem;
    height: 6.4rem;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3.6rem;
    font-weight: 900;
}
.fund-icon--ok   { background: linear-gradient(180deg, #2bbf3e, #128528); box-shadow: 0 0.4rem 1rem rgba(20, 130, 40, 0.4); }
.fund-icon--fail {
    width: 5.8rem;
    height: 5.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ef233c, #c1121f);
    box-shadow: 0 0.6rem 1.4rem rgba(190, 18, 31, 0.28);
    font-size: 3.2rem;
}

.fund-result__title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
}
.fund-view--success .fund-result__title { color: #128528; }
.fund-view--fail    .fund-result__title { color: #d8131c; }
.fund-view--fail {
    text-align: center;
    padding: 0.4rem 0 0.2rem;
}
.fund-view--fail .fund-result__amount {
    margin-top: 0.5rem;
    color: #b45309;
    font-size: 1.35rem;
}
.fund-view--fail .app-modal__actions {
    margin-top: 1.4rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}
.fund-view--fail .btn-ghost,
.fund-view--fail .btn-primary--sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: none;
    height: 4rem;
    line-height: 1;
    padding: 0 1.8rem;
    border-radius: 999rem;
    white-space: nowrap;
    text-align: center;
    letter-spacing: 0.02rem;
}
.fund-view--fail .btn-primary--sm {
    background: linear-gradient(180deg, #e01b2b, #b90f1b);
    color: #fff;
    box-shadow: 0 0.35rem 0.9rem rgba(190, 18, 31, 0.25);
}

.fund-result__sub,
.fund-result__msg {
    color: #6f4b1b;
    font-size: 1.22rem;
    line-height: 1.6;
    margin: 0.7rem 0.4rem 1rem;
}

/* ============================================================
   全局轻量 Toast（与 profile.css 同款，便于 home.php 复用）
   ============================================================ */
.pf-toast {
    position: fixed;
    left: 50%;
    bottom: 9rem;
    transform: translate(-50%, 0.6rem);
    max-width: 28rem;
    padding: 0.9rem 1.6rem;
    border-radius: 1.6rem;
    background: rgba(20, 20, 20, 0.86);
    color: #fff;
    font-size: 1.3rem;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 200;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.pf-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}
