/* 机构会员中心 — 与 app.css 变量、顶栏风格统一 */

.page-member {
    background: var(--paper);
}

.member-impersonate-bar {
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    color: #92400e;
    padding: 10px 16px;
    font-size: 13px;
    text-align: center;
}

.member-impersonate-bar a {
    color: #b45309;
    font-weight: 600;
    margin-left: 12px;
}

.page-member-login main {
    min-height: calc(100vh - 60px - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
}

.member-login-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border-radius: 12px;
    padding: 32px 36px 36px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.member-login-header {
    margin: 0 0 4px;
    padding-right: 84px;
}

.member-login-headline {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    line-height: 1.35;
}

.member-login-subline {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
    text-align: center;
}

.member-login-card .login-sub {
    margin: 0 0 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.member-login-card label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--muted);
}

.member-login-card input[type="email"],
.member-login-card input[type="password"],
.member-login-card input[type="tel"],
.member-login-card input[type="text"].member-login-input,
.member-login-card .member-login-input {
    width: 100%;
    margin: 0 0 16px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
    font-size: 15px;
    color: var(--ink);
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.member-login-card input:focus {
    outline: none;
    border-color: #ff6b5a;
    background: #fff;
}

.member-login-card .btn-primary {
    width: 100%;
    margin-top: 8px;
    padding: 12px 24px;
    font-size: 16px;
}

.member-login-card {
    position: relative;
}

.member-login-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    min-width: 82px;
    height: 28px;
    padding: 0 12px;
    border: 0;
    border-radius: 5px;
    background: #b6bcce;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.member-login-panel {
    padding-top: 0;
}

.member-login-qrcode-wrap {
    position: relative;
    width: 265px;
    height: 265px;
    margin: 0 auto;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #f5f6f8;
    overflow: hidden;
}

.member-login-qrcode-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}

.member-login-qrcode-wrap.is-ready .member-login-qrcode-loading {
    display: none;
}

.member-login-qrcode-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #ff6b5a;
    border-radius: 50%;
    animation: member-login-spin 0.75s linear infinite;
}

@keyframes member-login-spin {
    to {
        transform: rotate(360deg);
    }
}

.member-login-qrcode {
    display: block;
    width: 265px;
    height: 265px;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
}

.member-login-qrcode.is-loading {
    visibility: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.member-login-qrcode-wrap.is-ready .member-login-qrcode {
    visibility: visible;
    position: static;
    width: 265px;
    height: 265px;
    opacity: 1;
}

.member-login-phone-extra {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
}

.member-login-link {
    padding: 0;
    border: 0;
    background: none;
    color: #369;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.member-login-link:hover {
    text-decoration: underline;
}

.member-login-link-sep {
    margin: 0 10px;
    color: #ccc;
    user-select: none;
}

.member-login-wx-tip {
    margin: 10px 0 0;
    text-align: center;
    font-size: 14px;
    color: #e53935;
}

.member-login-wx-tip--strong {
    font-size: 15px;
}

.member-login-agree {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.member-login-agree a {
    color: #369;
    margin-left: 2px;
}

.member-login-error {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #c62828;
    text-align: center;
}

/* 登录方式由右上角 member-login-switch 切换，注册/找回在密码登录下方链接进入 */

.member-login-ok {
    margin: 12px 0 0;
    font-size: 13px;
    color: #2e7d32;
    text-align: center;
}

.member-sms-field {
    margin: 0 0 16px;
}

.member-sms-field > label {
    margin-bottom: 6px;
}

.member-sms-inline {
    position: relative;
    width: 100%;
}

.member-sms-inline .member-login-input {
    margin-bottom: 0;
    padding-right: 6.75rem;
}

.member-login-card .member-sms-code-btn {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    height: 34px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #ff6b5a;
    font-size: 13px;
    font-weight: 500;
    line-height: 34px;
    cursor: pointer;
    white-space: nowrap;
}

.member-login-card .member-sms-code-btn:hover:not(:disabled) {
    background: rgba(255, 107, 90, 0.08);
}

.member-login-card .member-sms-code-btn:disabled {
    color: var(--muted);
    cursor: not-allowed;
    background: transparent;
}

/* 会员购买：权益卡片 + 制作页同款付费浮层 */
.member-vip-shell {
    max-width: 920px;
}

.member-vip-lead {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.65;
    color: #555;
}

.member-vip-lead a {
    color: #ff6b5a;
}

.member-vip-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.member-vip-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 24px;
    border-radius: 16px;
    border: 2px solid #ececec;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.member-vip-card--personal {
    border-color: #ffd4cc;
    background: linear-gradient(180deg, #fff 0%, #fffaf8 100%);
}

.member-vip-card--personal:hover {
    border-color: #ff6b5a;
    box-shadow: 0 12px 36px rgba(255, 107, 90, 0.15);
}

.member-vip-card--org {
    border-color: #f0d9a8;
    background: linear-gradient(180deg, #fffdf8 0%, #fff9ee 100%);
}

.member-vip-card--org:hover {
    border-color: #d4a017;
    box-shadow: 0 12px 36px rgba(212, 160, 23, 0.18);
}

.member-vip-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff8a65 0%, #ff6b5a 100%);
}

.member-vip-card-badge--org {
    color: #4a3a10;
    background: linear-gradient(135deg, #f0c14b 0%, #d4a017 100%);
}

.member-vip-card-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.member-vip-card-price {
    margin: 0 0 6px;
    line-height: 1.1;
    color: #666;
}

.member-vip-card-price strong {
    font-size: 40px;
    font-weight: 700;
    color: #e53935;
    margin-right: 4px;
}

.member-vip-card-price--org strong {
    color: #c8860a;
}

.member-vip-card-price span {
    font-size: 15px;
}

.member-vip-card-desc {
    margin: 0 0 18px;
    font-size: 14px;
    color: #888;
}

.member-vip-card-list {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    flex: 1;
}

.member-vip-card-list li {
    position: relative;
    padding: 8px 0 8px 26px;
    font-size: 14px;
    line-height: 1.45;
    color: #444;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.member-vip-card-list li:last-child {
    border-bottom: 0;
}

.member-vip-card-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 50%;
    background: #eee center/10px no-repeat;
}

.member-vip-card-list li.is-yes::before {
    background-color: #e8f5e9;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%232e7d32' d='M10 3L5 8.5 2 5.5l1-1 2 2 4-4z'/%3E%3C/svg%3E");
}

.member-vip-card-list li.is-no {
    color: #aaa;
}

.member-vip-card-list li.is-no::before {
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath stroke='%23bbb' stroke-width='1.5' d='M3 6h6'/%3E%3C/svg%3E");
}

.member-vip-card .zm-pay-btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 16px;
}

.member-vip-open--org {
    background-image: linear-gradient(135deg, #f0c14b 0%, #d4a017 100%) !important;
    color: #3d3010 !important;
}

.member-vip-matrix {
    margin-bottom: 20px;
}

.member-vip-matrix-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.member-vip-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #ececec;
    border-radius: 12px;
    overflow: hidden;
    font-size: 14px;
    background: #fff;
}

.member-vip-matrix-table thead th {
    padding: 14px 16px;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
    border-bottom: 1px solid #e8e8e8;
}

.member-vip-matrix-table thead th:first-child {
    text-align: left;
}

.member-vip-matrix-table .col-personal {
    color: #e53935;
}

.member-vip-matrix-table .col-org {
    color: #c8860a;
}

.member-vip-matrix-table tbody th,
.member-vip-matrix-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.member-vip-matrix-table tbody th {
    text-align: left;
    font-weight: 500;
    color: #333;
}

.member-vip-matrix-table tbody tr:last-child th,
.member-vip-matrix-table tbody tr:last-child td {
    border-bottom: 0;
}

.member-vip-matrix-table td.muted {
    color: #ccc;
}

.member-vip-matrix-table td.highlight {
    color: #2e7d32;
    font-weight: 600;
}

.member-vip-account {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.member-vip-account a {
    color: #ff6b5a;
}

@media (max-width: 720px) {
    .member-vip-cards {
        grid-template-columns: 1fr;
    }
}

/* 左侧边栏 + 内容区 */
.member-main-shell {
    padding: 0;
}

.member-layout {
    display: flex;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    box-sizing: border-box;
}

.member-sidebar {
    flex: 0 0 220px;
    width: 220px;
    background: var(--panel);
    border-radius: 12px;
    margin-right: 20px;
    padding: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 84px;
}

.member-sidebar-user {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}

.member-sidebar-user strong {
    display: block;
    font-size: 16px;
    color: var(--ink);
    margin-bottom: 4px;
}

.member-sidebar-email {
    display: block;
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
    margin-bottom: 8px;
}

.member-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 200px;
    background: var(--chip);
    color: var(--muted);
}

.member-badge--on {
    background: linear-gradient(#ff4242, #ff7142);
    color: #fff;
}

.member-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
}

.member-sidebar-link {
    display: block;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.member-sidebar-link:hover {
    background: var(--field);
    color: var(--ink);
}

.member-sidebar-link.is-active {
    background-image: var(--gradient);
    color: #fff;
    font-weight: 500;
}

.member-sidebar-link--muted {
    color: var(--muted);
    font-size: 14px;
}

.member-content {
    flex: 1;
    min-width: 0;
}

.member-page-head {
    margin-bottom: 20px;
}

.member-page-head h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
}

.member-breadcrumb {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.member-breadcrumb a {
    color: var(--muted);
}

.member-breadcrumb a:hover {
    color: #ff4242;
}

.member-card {
    background: var(--panel);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.member-card p {
    margin: 8px 0;
    line-height: 1.6;
    color: var(--ink);
}

.member-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.member-stat {
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--field);
    border: 1px solid var(--line);
}

.member-stat dt {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 6px;
}

.member-stat dd {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-grid li a {
    display: block;
    text-decoration: none;
    color: var(--ink);
}

.template-grid .thumb {
    height: 169px;
    background: var(--field);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.template-grid a:hover .thumb {
    border-color: #ff6b5a;
    box-shadow: 0 4px 12px rgba(255, 66, 66, 0.12);
}

.template-grid .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-grid .name {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-grid .thumb-add {
    font-size: 48px;
    color: var(--muted);
    line-height: 1;
}

.pt-edit-form label {
    display: block;
    margin: 14px 0 6px;
    font-size: 14px;
    color: var(--muted);
}

.pt-edit-form input[type="text"],
.pt-edit-form input[type="number"],
.pt-edit-form textarea,
.pt-edit-form select {
    width: 100%;
    max-width: 520px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
    font-size: 14px;
}

.pt-edit-form input:focus,
.pt-edit-form textarea:focus,
.pt-edit-form select:focus {
    outline: none;
    border-color: #ff6b5a;
    background: #fff;
}

.pt-preview {
    margin-top: 24px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 16px;
    max-width: 560px;
    background: #fff;
}

.btn-primary {
    background-image: var(--gradient);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 200px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 200px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 8px;
}

.alert-error {
    color: #b42318;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.font-upload-row {
    margin: 16px 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* 页眉页脚 / 自定义字体：统一顶栏与空状态 */
.member-resource-card {
    padding: 24px 28px 28px;
}

.member-resource-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.member-resource-toolbar-text {
    min-width: 0;
}

.member-resource-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink, #333);
}

.member-resource-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted, #888);
}

.member-resource-create {
    flex-shrink: 0;
    white-space: nowrap;
}

.member-resource-empty {
    padding: 44px 28px 52px;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border: 1px dashed #dde2e8;
    border-radius: 14px;
}

.member-resource-empty-inner {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.member-resource-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ececec;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: #ff6b5a;
    font-family: "Kaiti SC", "STKaiti", serif;
}

.member-resource-empty-title {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.member-resource-empty-tips {
    margin: 0;
    padding: 16px 18px;
    list-style: none;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.member-resource-empty-tips li {
    position: relative;
    padding: 7px 0 7px 18px;
}

.member-resource-empty-tips li + li {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.member-resource-empty-tips li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff8a65;
}

.member-resource-empty-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted, #888);
}

.member-resource-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.member-resource-toolbar--list-only {
    margin-bottom: 20px;
}

.member-vip-quick-actions {
    margin-top: 20px;
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.member-vip-quick-alert {
    margin: 0;
    flex: 1 1 100%;
}

.member-hint {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: #6b7280;
}

.member-resource-panel .font-upload-list {
    margin-top: 0;
}

@media (max-width: 640px) {
    .member-resource-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .member-resource-create {
        width: 100%;
        text-align: center;
    }
}

.font-upload-toolbar {
    margin: 16px 0 12px;
}

.font-upload-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.font-upload-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}

.font-item-name-label {
    font-size: 14px;
    color: var(--ink);
    flex: 0 0 auto;
}

.font-item-name {
    width: 6.5em;
    max-width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    background: #fff;
}

.font-item-filename {
    flex: 1;
    min-width: 100px;
    font-size: 13px;
    color: var(--muted);
}

.font-item-filename.is-chosen {
    color: var(--ink);
}

.font-item-remove {
    margin-left: auto;
    font-size: 14px;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    font-family: inherit;
}

.font-item-remove:hover {
    color: #ff4242;
}

.font-file-btn {
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.font-file-name {
    flex: 1;
    min-width: 120px;
    font-size: 14px;
    color: var(--muted);
}

.font-file-name.is-chosen {
    color: var(--ink);
}

.btn-danger-outline {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 200px;
    border: 1px solid #ff4242;
    background: #fff;
    color: #ff4242;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}

.btn-danger-outline:hover {
    background: #fff5f5;
}

.font-upload-hint {
    margin-top: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.font-upload-progress-wrap {
    margin-top: 12px;
}
.font-upload-progress-track {
    height: 6px;
    border-radius: 999px;
    background: #e8eaed;
    overflow: hidden;
    margin-bottom: 8px;
}
.font-upload-progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff4242, #ff7142);
    transition: width 0.15s ease-out;
}
.font-upload-progress {
    margin: 0;
    padding: 10px 14px;
    font-size: 14px;
    color: #0d5c2e;
    background: #eef9f1;
    border-radius: 8px;
    border: 1px solid #b8e6c8;
}

.font-status {
    display: inline-block;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 4px;
}

.font-status-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 320px;
}

.font-status--ok {
    color: #0d5c2e;
    background: #eef9f1;
}

.font-status--pending {
    color: #8a5a00;
    background: #fff8e6;
}

.font-retry-btn,
.btn-link {
    border: none;
    background: none;
    padding: 0;
    margin-left: 6px;
    color: var(--primary, #c41e3a);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
}

.font-list-foot {
    margin-top: 20px;
    text-align: center;
}

.font-list-actions {
    text-align: right;
    white-space: nowrap;
}

.font-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.font-list-table th,
.font-list-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
}

.font-list-table th {
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 980px) {
    .member-layout {
        flex-direction: column;
        padding: 16px 12px 32px;
    }
    .member-layout.main {
        width: auto;
        max-width: 100%;
    }
    .member-sidebar {
        position: static;
        width: 100%;
        flex: none;
        margin-right: 0;
        margin-bottom: 16px;
    }
    .member-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    .member-sidebar-link {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .page-member-login main {
        min-height: calc(100vh - 52px - 100px);
    }
    .member-login-card {
        padding: 24px 20px 28px;
    }
}

/* 会员购买 */
.member-vip-alert {
    margin-bottom: 16px;
}

.member-vip-split-notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff8e6;
    border: 1px solid #ffe0a3;
    color: #5c4a1e;
    font-size: 14px;
    line-height: 1.6;
    max-width: 100%;
    box-sizing: border-box;
}

/* —— 页眉页脚：简化编辑器 —— */
/* 单列编辑页：勿沿用旧版 .pt-editor 左栏 360px 网格，否则表单被挤在左侧 */
.pt-editor.pt-editor--single {
    display: block;
    max-width: none;
    width: 100%;
    grid-template-columns: none;
}

.pt-editor--single .member-card.pt-editor-form {
    padding: 28px 32px 32px;
    width: 100%;
    box-sizing: border-box;
}

.pt-editor-form .pt-input,
.pt-editor-form .pt-textarea,
.pt-editor-form input[type="text"],
.pt-editor-form textarea,
.pt-editor-form select {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

.pt-editor-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 8px;
}

.pt-editor-topbar .pt-editor-hint--top {
    flex: 1;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pt-form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
    align-items: start;
}

.pt-form-columns .pt-block {
    margin-bottom: 0;
    border-bottom: none;
    padding: 20px 22px 22px;
    background: #fafafa;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-width: 0;
}

.pt-form-columns .pt-segment {
    flex-wrap: wrap;
    max-width: 100%;
}

.pt-form-columns .pt-field-row {
    align-items: center;
}

.pt-field-row .pt-segment {
    flex: 0 0 auto;
    margin-left: auto;
}

.pt-display-picks {
    margin-bottom: 8px;
}

.pt-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 20px;
    margin-left: auto;
}

.pt-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
}

.pt-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.pt-display-hint {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.pt-display-section.is-off {
    opacity: 0.45;
    pointer-events: none;
}

.pt-display-section.is-off .pt-field-label {
    color: var(--muted);
}

.pt-toggle-stack {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 4px;
}

.pt-toggle-stack .pt-field-row {
    margin-top: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.pt-toggle-stack .pt-field-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.btn-preview-a4 {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    background-image: var(--gradient);
    box-shadow: 0 4px 16px rgba(255, 66, 66, 0.35);
    white-space: nowrap;
}

.btn-preview-a4:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 20px rgba(255, 66, 66, 0.4);
}

@media (max-width: 900px) {
    .pt-editor-topbar {
        flex-direction: column;
    }
    .btn-preview-a4 {
        width: 100%;
    }
    .pt-form-columns {
        grid-template-columns: 1fr;
    }
    .pt-form-columns .pt-block {
        padding-bottom: 24px;
        border-bottom: 1px solid var(--line);
        margin-bottom: 8px;
    }
    .pt-form-columns .pt-block:last-child {
        border-bottom: none;
    }
}

.pt-block {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.pt-block--flat {
    border-bottom: none;
    padding-bottom: 0;
}

.pt-block-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
}

.pt-field-label {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.pt-dim {
    font-weight: 400;
    color: var(--muted);
    font-size: 13px;
}

.pt-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pt-field-row--tight {
    margin-top: 12px;
}

.pt-field-row .pt-field-label {
    margin: 0;
    flex-shrink: 0;
}

.pt-segment {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--field);
}

.pt-segment--wide {
    display: flex;
    width: 100%;
}

.pt-segment--wide .pt-seg {
    flex: 1;
}

.pt-seg {
    border: none;
    background: transparent;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1.3;
    font-family: inherit;
}

.pt-seg + .pt-seg {
    border-left: 1px solid var(--line);
}

.pt-seg.is-on {
    background-image: var(--gradient);
    color: #fff;
}

.pt-seg.is-on + .pt-seg,
.pt-seg + .pt-seg.is-on {
    border-left-color: transparent;
}

.pt-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 180px;
    justify-content: flex-end;
}

.pt-range {
    flex: 1;
    max-width: 220px;
    accent-color: #ff4242;
}

.pt-range-val {
    font-size: 14px;
    color: var(--muted);
    min-width: 44px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pt-upload {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: var(--field);
    border: 1px solid var(--line);
}

.pt-upload-frame {
    width: 100%;
    height: 75px;
    min-height: 75px;
    background: #fff;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.pt-upload-frame:hover {
    border-color: #ff8a7a;
    background: #fffaf8;
}

.pt-upload-frame.has-image {
    cursor: default;
    border-style: solid;
    border-color: var(--line);
}

.pt-upload-frame.has-image:hover {
    background: #fff;
}

.pt-upload-frame img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
}

.pt-upload-frame img[hidden] {
    display: none !important;
}

.pt-upload-pick {
    border: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #ff6b5a;
    cursor: pointer;
    padding: 8px 16px;
    text-align: center;
    line-height: 1.4;
}

.pt-upload-pick small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.pt-upload-placeholder {
    display: none;
}

.pt-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.pt-upload-actions {
    margin-top: 8px;
}

.pt-upload-actions:empty,
.pt-upload-actions button[hidden] {
    display: none;
}

.pt-upload-btn {
    margin: 0;
    cursor: pointer;
}

.pt-upload-clear[hidden] {
    display: none;
}

.pt-editor-hint--top {
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    line-height: 1.5;
}

.pt-editor-hint {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
}

/* 页眉页脚：真实字帖预览页（复用 make 预览区） */
.page-pt-preview .site-footer {
    display: none;
}

/* editor.js 依赖的隐藏字段：勿用 [hidden]，会被 app.css #txtContent{display:block} 盖掉 */
.page-pt-preview .pt-preview-editor-hooks {
    display: none !important;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.page-pt-preview main {
    padding: 0;
    max-width: none;
}

.pt-preview-shell {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px;
}

.pt-preview-topbar {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.pt-preview-topbar-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 2px;
}

.pt-preview-topbar-text span {
    font-size: 13px;
    color: var(--muted);
}

.pt-preview-topbar-actions {
    display: flex;
    gap: 10px;
}

.make-workspace.is-pt-preview-only {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 120px);
}

.make-workspace.is-pt-preview-only .preview-stage {
    width: 100%;
    max-width: none;
}

.pt-preview-lattice-sizes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    flex-wrap: wrap;
}

.pt-preview-lattice-label {
    font-size: 13px;
    color: var(--muted);
    margin-right: 2px;
}

.pt-preview-lattice-sizes .chip {
    padding: 4px 10px;
    font-size: 13px;
    min-height: 0;
}

.pt-preview-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

/* 旧弹层预览（已弃用，保留以免残留节点样式异常） */
.pt-print-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.pt-print-overlay[hidden] {
    display: none !important;
}

body.pt-print-open {
    overflow: hidden;
}

.pt-print-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.pt-print-dialog {
    position: relative;
    z-index: 1;
    width: min(860px, 96vw);
    height: min(92vh, 900px);
    max-height: calc(100vh - 16px);
    background: var(--panel);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pt-print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.pt-print-toolbar strong {
    font-size: 16px;
    font-weight: 600;
}

.pt-print-toolbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pt-print-stage {
    overflow: auto;
    padding: 20px;
    background: #c5c5c5;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.pt-print-scale {
    transform-origin: top center;
    flex-shrink: 0;
    margin: 0 auto;
}

.pt-print-stage .to-print {
    width: 794px;
    margin: 0;
}

.pt-print-stage .page {
    width: 794px !important;
    height: 1123px !important;
    min-width: 794px;
    min-height: 1123px;
    max-width: none;
    margin: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    background: #fff;
}

.pt-print-toolbar .btn-print-sheet {
    min-width: 88px;
    padding: 8px 20px;
    border: none;
    border-radius: 200px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #fff;
    background-image: var(--gradient);
}

.pt-print-toolbar .btn-print-sheet:hover {
    filter: brightness(1.05);
}

.pt-print-sample-main {
    position: relative;
    background: #fafafa;
}

.pt-print-sample-grid {
    position: absolute;
    inset: 12px 16px;
    background-image:
        linear-gradient(#e8e8e8 1px, transparent 1px),
        linear-gradient(90deg, #e8e8e8 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.9;
    pointer-events: none;
}

.pt-editor {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 24px;
    align-items: start;
}

.pt-sheet {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    aspect-ratio: 210 / 297;
    max-height: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
}

.pt-sheet-chrome {
    flex: 0 0 auto;
}

.pt-sheet-chrome .org-page-header,
.pt-sheet-chrome .org-page-footer {
    height: auto;
    min-height: 48px;
    padding: 8px 0;
}

.pt-sheet-body {
    flex: 1;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 11px,
        #f0f0f0 11px,
        #f0f0f0 12px
    );
    margin: 0 12px;
}

.pt-editor-form .pt-label {
    display: block;
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.pt-editor-form .pt-label:first-child {
    margin-top: 0;
}

.pt-label-hint {
    margin: -4px 0 8px;
    font-size: 12px;
    color: var(--muted);
}

.pt-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--field);
    font-size: 14px;
}

.pt-input:focus {
    outline: none;
    border-color: #ff6b5a;
    background: #fff;
}

.pt-textarea {
    resize: vertical;
    min-height: 64px;
    font-family: inherit;
}

.pt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.pt-chip {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 200px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
}

.pt-chip:hover {
    border-color: #ff8a7a;
}

.pt-chip.is-on {
    background-image: var(--gradient);
    border-color: transparent;
    color: #fff;
}

.pt-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.pt-option-row .pt-label {
    margin: 0;
    font-weight: 500;
}

.pt-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.pt-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pt-switch span {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.2s;
    cursor: pointer;
}

.pt-switch span::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.pt-switch input:checked + span {
    background: linear-gradient(#ff4242, #ff7142);
}

.pt-switch input:checked + span::before {
    transform: translateX(20px);
}

.pt-form-actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.pt-form-actions-primary {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

.btn-preview-template {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    color: #0d6b5c;
    background: #fff;
    border: 2px solid #1a9e8a;
    box-shadow: 0 2px 8px rgba(26, 158, 138, 0.15);
}

.btn-preview-template:hover {
    background: #f0faf8;
    border-color: #0d6b5c;
}

.pt-form-actions .btn-primary {
    min-width: 120px;
}

/* 列表 */
.pt-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--field);
}

.pt-list-item {
    border-bottom: 1px solid var(--line);
}

.pt-list-item:last-child {
    border-bottom: 0;
}

.pt-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: inherit;
    transition: background 0.15s;
}

.pt-list-item:hover .pt-list-row {
    background: var(--panel);
}

.pt-list-row-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-list-row-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.pt-list-row-action {
    font-size: 14px;
    color: #ff6b5a;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.pt-list-row-action:hover {
    text-decoration: underline;
}

.pt-list-row-action--danger {
    color: #999;
}

.pt-list-row-action--danger:hover {
    color: #e04545;
}

.pt-list-row-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pt-list-meta strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.pt-list-meta span {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .pt-editor {
        grid-template-columns: 1fr;
    }
    .pt-editor-preview-wrap {
        order: -1;
    }
    .pt-sheet {
        max-height: 320px;
        max-width: 280px;
        margin: 0 auto;
    }
}

.member-bind-banner-card {
    margin-bottom: 20px;
    border: 1px solid #ffe0d6;
    background: #fff9f7;
}

.member-bind-banner-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 600;
}

.member-bind-banner {
    margin-bottom: 16px;
}

.member-bind-phone-form label {
    display: block;
    margin: 16px 0 6px;
    font-size: 14px;
    color: var(--text, #333);
}

.member-bind-phone-form input[type="tel"],
.member-bind-phone-form input[type="text"],
.member-bind-phone-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.member-bind-phone-sms-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.member-bind-phone-sms-row input {
    flex: 1;
    min-width: 0;
}

.member-bind-phone-sms-row .btn-secondary {
    flex-shrink: 0;
    white-space: nowrap;
}

.member-bind-phone-form .btn-primary {
    margin-top: 20px;
    width: 100%;
}

.member-bind-phone-form-alerts {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-bind-phone-form-alerts:empty {
    display: none;
}

.member-bind-phone-alert {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    padding: 12px 14px 12px 40px;
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
}

.member-bind-phone-alert[hidden] {
    display: none !important;
}

.member-bind-phone-alert::before {
    position: absolute;
    left: 14px;
    top: 12px;
    width: 18px;
    height: 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.member-bind-phone-alert--error {
    color: #b42318;
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.member-bind-phone-alert--error::before {
    content: "!";
    color: #fff;
    background: #f04438;
    border-radius: 50%;
    font-size: 12px;
}

.member-bind-phone-alert--ok {
    color: #067647;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}

.member-bind-phone-alert--ok::before {
    content: "✓";
    color: #fff;
    background: #12b76a;
    border-radius: 50%;
    font-size: 11px;
}

#bindPhoneFieldAlert {
    margin-top: 8px;
}

.member-bind-phone-form input.member-bind-phone-input--invalid {
    border-color: #f04438;
    box-shadow: 0 0 0 2px rgba(240, 68, 56, 0.12);
}

.alert-ok {
    color: #067647;
    background: #ecfdf3;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #abefc6;
    line-height: 1.5;
}
