/* =========================================================
   Partner 合作生态插件样式
   版本：1.0.2
   ========================================================= */

/* ---------- 1. 前台容器 ---------- */

.pt-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 20px 20px 48px;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 640px) {
    .pt-wrap { padding: 12px 12px 36px; }
}

/* ---------- 2. 卡片 ---------- */

.pt-card {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-sizing: border-box;
    color: var(--mn-text, #333);
}
.pt-card:last-child { margin-bottom: 0; }
.pt-card .pt-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--mn-text, #333);
    line-height: 1.4;
}
.pt-card h1.pt-title { font-size: 20px; }
.pt-card h2.pt-title { font-size: 17px; }
.pt-card h3.pt-title { font-size: 15px; }

.pt-muted {
    color: var(--mn-text-muted, #888);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- 3. 按钮 ---------- */

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--mn-primary, #0066cc);
    color: #fff;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    transition: opacity .15s, background .15s;
    white-space: nowrap;
    font-family: inherit;
}
.pt-btn:hover { opacity: .9; color: #fff; }
.pt-btn:disabled, .pt-btn.disabled { opacity: .5; cursor: not-allowed; }
.pt-btn-secondary {
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #333);
    border: 1px solid var(--mn-border, #e5e7eb);
}
.pt-btn-secondary:hover { color: var(--mn-primary, #0066cc); border-color: var(--mn-primary); opacity: 1; }
.pt-btn-danger { background: var(--mn-error, #ef4444); color: #fff; }
.pt-btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- 4. 徽章 ---------- */

.pt-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    background: var(--mn-primary-subtle, #e6f0ff);
    color: var(--mn-primary, #0066cc);
    vertical-align: middle;
}
.pt-badge-approved, .pt-badge-online, .pt-badge-synced {
    background: rgba(34, 197, 94, .15);
    color: var(--mn-success, #16a34a);
}
.pt-badge-pending, .pt-badge-draft {
    background: rgba(245, 158, 11, .15);
    color: var(--mn-warning, #f59e0b);
}
.pt-badge-rejected, .pt-badge-offline, .pt-badge-frozen {
    background: rgba(239, 68, 68, .15);
    color: var(--mn-error, #ef4444);
}

/* ---------- 5. 网格 / 统计卡片 ---------- */

.pt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.pt-stat-card {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}
.pt-stat-card .pt-stat-label {
    color: var(--mn-text-muted, #888);
    font-size: 13px;
    margin-bottom: 6px;
}
.pt-stat-card .pt-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--mn-text, #333);
    line-height: 1.3;
}

/* ---------- 6. 作品卡片 ---------- */

.pt-work-item {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
}
.pt-work-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}
.pt-work-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: var(--mn-bg-subtle, #f0f0f0);
}
.pt-work-item .info { padding: 10px 12px; color: var(--mn-text, #333); }
.pt-work-item .info strong {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pt-work-item .info a { color: var(--mn-text, #333); text-decoration: none; }
.pt-work-item .info a:hover { color: var(--mn-primary, #0066cc); }

/* ---------- 7. 列表行 ---------- */

.pt-wall-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mn-border-light, var(--mn-border, #e5e7eb));
}
.pt-wall-item:last-child { border-bottom: 0; padding-bottom: 0; }
.pt-wall-item:first-child { padding-top: 0; }
.pt-wall-item a { color: var(--mn-text, #333); text-decoration: none; }
.pt-wall-item a:hover { color: var(--mn-primary, #0066cc); }

/* ---------- 8. 表单 ---------- */

.pt-form-row { margin-bottom: 14px; }
.pt-form-row label {
    display: block;
    font-size: 13px;
    color: var(--mn-text-secondary, #555);
    margin-bottom: 6px;
}
.pt-form-row input[type="text"],
.pt-form-row input[type="email"],
.pt-form-row input[type="number"],
.pt-form-row input[type="date"],
.pt-form-row input[type="password"],
.pt-form-row select,
.pt-form-row textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 6px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #333);
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.pt-form-row input:focus,
.pt-form-row select:focus,
.pt-form-row textarea:focus {
    outline: none;
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .15));
}
.pt-form-row textarea { resize: vertical; min-height: 80px; }
.pt-form-row input[type="file"] {
    padding: 6px 0; border: 0; background: transparent;
    color: var(--mn-text, #333); width: 100%;
}
.pt-apply-form { max-width: 640px; }

/* ---------- 9. 空状态 / 冻结页 ---------- */

.pt-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--mn-text-muted, #888);
    font-size: 14px;
}
.pt-frozen { padding: 60px 20px; text-align: center; }
.pt-frozen h1 {
    font-size: 22px;
    color: var(--mn-text, #333);
    margin-bottom: 10px;
}

/* ---------- 10. 前台 Tab 导航 ---------- */

.pt-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.pt-tabs::-webkit-scrollbar { display: none; }
.pt-tab {
    padding: 9px 14px;
    color: var(--mn-text-muted, #888);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.pt-tab:hover { color: var(--mn-primary, #0066cc); }
.pt-tab.active {
    color: var(--mn-primary, #0066cc);
    border-bottom-color: var(--mn-primary, #0066cc);
    font-weight: 500;
}

/* ---------- 11. 提示条 ---------- */

.pt-alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
}
.pt-alert-success {
    background: var(--mn-comp-alert-success-bg, rgba(34, 197, 94, .12));
    color: var(--mn-success, #16a34a);
    border: 1px solid var(--mn-comp-alert-success-border, rgba(34, 197, 94, .3));
}
.pt-alert-error {
    background: var(--mn-comp-alert-error-bg, rgba(239, 68, 68, .12));
    color: var(--mn-error, #ef4444);
    border: 1px solid var(--mn-comp-alert-error-border, rgba(239, 68, 68, .3));
}
.pt-alert-warning {
    background: var(--mn-comp-alert-warning-bg, rgba(245, 158, 11, .12));
    color: var(--mn-warning, #f59e0b);
    border: 1px solid var(--mn-comp-alert-warning-border, rgba(245, 158, 11, .3));
}

/* ---------- 12. 工具类 ---------- */

.pt-flex { display: flex; align-items: center; gap: 8px; }
.pt-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pt-mt-8 { margin-top: 8px; }
.pt-mt-12 { margin-top: 12px; }
.pt-mt-16 { margin-top: 16px; }
.pt-mb-8 { margin-bottom: 8px; }
.pt-mb-12 { margin-bottom: 12px; }
.pt-mb-16 { margin-bottom: 16px; }
.pt-hidden { display: none !important; }
.pt-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================
   后台管理专用样式（在 .admin-content 内使用）
   ========================================================= */

/* 页头 */
.pt-admin-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}
.pt-admin-page-head h2 {
    margin: 0;
    font-size: 20px;
    color: var(--mn-text, #333);
}
.pt-admin-page-head .pt-admin-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Tab 导航 */
.pt-admin-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pt-admin-tab {
    padding: 8px 14px;
    color: var(--mn-text-muted, #888);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
}
.pt-admin-tab:hover { color: var(--mn-primary, #0066cc); }
.pt-admin-tab.active {
    color: var(--mn-primary, #0066cc);
    border-bottom-color: var(--mn-primary, #0066cc);
    font-weight: 500;
}
.pt-admin-tab .pt-admin-tab-num {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    background: rgba(239, 68, 68, .15);
    color: #ef4444;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.6;
    vertical-align: middle;
}

/* 筛选 */
.pt-admin-filter {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.pt-admin-filter .form-input {
    width: auto;
    min-width: 150px;
    max-width: 240px;
}
.pt-admin-filter select.form-input { min-width: 140px; }

/* 表格包裹 */
.pt-admin-table-wrap {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}
.pt-admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.pt-admin-table th,
.pt-admin-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    color: var(--mn-text, #333);
}
.pt-admin-table th {
    font-weight: 600;
    color: var(--mn-text-secondary, #555);
    background: var(--mn-bg-subtle, #f9fafb);
    white-space: nowrap;
    font-size: 13px;
}
.pt-admin-table tr:last-child td { border-bottom: 0; }
.pt-admin-table a {
    color: var(--mn-primary, #0066cc);
    text-decoration: none;
}
.pt-admin-table a:hover { text-decoration: underline; }

/* 操作列 */
.pt-admin-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.pt-admin-actions form {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin: 0;
}
.pt-admin-inline-input {
    width: 140px;
    padding: 5px 8px;
    font-size: 12px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 4px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #333);
    box-sizing: border-box;
}

/* 空状态 */
.pt-admin-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--mn-text-muted, #888);
    font-size: 14px;
}

/* 分页 */
.pt-admin-pagination {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.pt-admin-pagination a,
.pt-admin-pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 4px;
    text-decoration: none;
    color: var(--mn-text, #333);
    font-size: 13px;
    background: var(--mn-bg-card, #fff);
    transition: background .15s, color .15s;
}
.pt-admin-pagination a:hover {
    background: var(--mn-bg-subtle, #f9fafb);
    color: var(--mn-primary, #0066cc);
}
.pt-admin-pagination .active {
    background: var(--mn-primary, #0066cc);
    color: #fff;
    border-color: var(--mn-primary, #0066cc);
    font-weight: 500;
}
.pt-admin-pagination .disabled {
    color: var(--mn-text-muted, #bbb);
    cursor: not-allowed;
    opacity: .6;
}

/* 统计卡片 */
.pt-admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.pt-admin-stat {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    transition: box-shadow .15s;
}
.pt-admin-stat:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.pt-admin-stat-label {
    font-size: 13px;
    color: var(--mn-text-muted, #888);
    margin-bottom: 6px;
}
.pt-admin-stat-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--mn-text, #333);
    line-height: 1.3;
}
.pt-admin-stat-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.pt-admin-stat-link:hover .pt-admin-stat-value { color: var(--mn-primary, #0066cc); }

/* 后台徽章 */
.pt-admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    white-space: nowrap;
}
.pt-admin-badge-pending { background: rgba(245, 158, 11, .15); color: #d97706; }
.pt-admin-badge-approved { background: rgba(34, 197, 94, .15); color: #16a34a; }
.pt-admin-badge-rejected { background: rgba(239, 68, 68, .15); color: #dc2626; }
.pt-admin-badge-draft { background: rgba(107, 114, 128, .15); color: #6b7280; }
.pt-admin-badge-frozen { background: rgba(239, 68, 68, .15); color: #dc2626; }
.pt-admin-badge-synced { background: rgba(34, 197, 94, .15); color: #16a34a; }

/* 后台卡片 */
.pt-admin-card {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.pt-admin-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--mn-text, #333);
    font-weight: 600;
}

/* 后台详情表 */
.pt-admin-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.pt-admin-detail-table th,
.pt-admin-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    text-align: left;
    vertical-align: top;
}
.pt-admin-detail-table th {
    width: 140px;
    font-weight: 500;
    color: var(--mn-text-secondary, #555);
    background: var(--mn-bg-subtle, #f9fafb);
}
.pt-admin-detail-table tr:last-child th,
.pt-admin-detail-table tr:last-child td { border-bottom: 0; }

/* 后台表单 */
.pt-admin-form-group { margin-bottom: 16px; }
.pt-admin-form-group > label {
    display: block;
    font-size: 13px;
    color: var(--mn-text-secondary, #555);
    margin-bottom: 6px;
    font-weight: 500;
}
.pt-admin-form-group input[type="text"],
.pt-admin-form-group input[type="email"],
.pt-admin-form-group input[type="number"],
.pt-admin-form-group input[type="date"],
.pt-admin-form-group select,
.pt-admin-form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 6px;
    background: var(--mn-bg-card, #fff);
    color: var(--mn-text, #333);
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}
.pt-admin-form-group input:focus,
.pt-admin-form-group select:focus,
.pt-admin-form-group textarea:focus {
    outline: none;
    border-color: var(--mn-primary, #0066cc);
    box-shadow: 0 0 0 3px var(--mn-primary-subtle, rgba(0, 102, 204, .15));
}
.pt-admin-form-tip {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    margin-top: 4px;
    line-height: 1.5;
}

/* 后台提示 */
.pt-admin-msg {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
    background: rgba(34, 197, 94, .12);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, .3);
}

/* 后台只读值（详情页） */
.pt-admin-readonly {
    padding: 8px 10px;
    color: var(--mn-text, #333);
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

/* 响应式 */
@media (max-width: 768px) {
    .pt-admin-page-head h2 { font-size: 17px; }
    .pt-admin-table { font-size: 12px; }
    .pt-admin-table th,
    .pt-admin-table td { padding: 8px 8px; }
    .pt-admin-filter .form-input { min-width: 120px; }
    .pt-admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 弹窗 ---------- */

.pt-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pt-modal-box {
    background: var(--mn-bg-card, #fff);
    border-radius: 10px;
    padding: 22px 24px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    color: var(--mn-text, #333);
    box-sizing: border-box;
}

.pt-modal-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--mn-text, #333);
}

.pt-modal-box textarea {
    font-family: inherit;
    line-height: 1.7;
    resize: vertical;
}

/* 后台编辑页 Tab 内的小导航 */
.pt-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* =========================================================
   B端合作后台三栏布局
   ========================================================= */

.pt-console {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    align-items: start;
}

/* ---------- 左栏 ---------- */

.pt-console-side {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    padding: 16px 12px;
    position: sticky;
    top: 20px;
}

.pt-console-side-head {
    text-align: center;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
    margin-bottom: 12px;
}

.pt-console-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    background: var(--mn-primary-subtle, #e6f0ff);
    color: var(--mn-primary, #0066cc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--mn-border, #e5e7eb);
}

.pt-console-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pt-console-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--mn-text, #333);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-console-type {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
}

.pt-console-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-console-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--mn-text-secondary, #555);
    text-decoration: none;
    font-size: 14px;
    transition: background .15s, color .15s;
}

.pt-console-nav a:hover {
    background: var(--mn-bg-subtle, #f3f4f6);
    color: var(--mn-text, #333);
}

.pt-console-nav a.active {
    background: var(--mn-primary-subtle, #e6f0ff);
    color: var(--mn-primary, #0066cc);
    font-weight: 500;
}

.pt-console-nav-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    display: inline-block;
}

/* ---------- 中栏 ---------- */

.pt-console-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pt-console-main .pt-card {
    margin-bottom: 0;
}

.pt-console-main .pt-tabs {
    display: none; /* 左栏已提供导航，中栏内的旧 tabs 隐藏 */
}

.pt-console-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.pt-console-head h2 {
    margin: 0;
    font-size: 18px;
    color: var(--mn-text, #333);
}

/* ---------- 右栏 ---------- */

.pt-console-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 20px;
}

.pt-console-aside .pt-card {
    margin-bottom: 0;
    padding: 14px 16px;
}

.pt-aside-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--mn-text, #333);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mn-border, #e5e7eb);
}

.pt-aside-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 5px 0;
    color: var(--mn-text-muted, #888);
}

.pt-aside-row strong {
    color: var(--mn-text, #333);
    font-weight: 600;
}

.pt-aside-quick {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pt-aside-quick a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--mn-bg-subtle, #f3f4f6);
    color: var(--mn-text, #333);
    text-decoration: none;
    font-size: 13px;
    transition: background .15s, color .15s;
}

.pt-aside-quick a:hover {
    background: var(--mn-primary-subtle, #e6f0ff);
    color: var(--mn-primary, #0066cc);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
    .pt-console {
        grid-template-columns: 200px minmax(0, 1fr);
    }
    .pt-console-aside {
        display: none;
    }
}

@media (max-width: 768px) {
    .pt-console {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }
    .pt-console-side {
        position: static;
    }
    .pt-console-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    .pt-console-nav a {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* =========================================================
   平台管理后台：左右栏布局（views/admin/）
   ========================================================= */

.pt-admin-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 8px;
}

.pt-admin-layout-side {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 10px;
    position: sticky;
    top: 20px;
    box-sizing: border-box;
}

.pt-admin-side-title {
    font-size: 12px;
    color: #9ca3af;
    margin: 0 0 10px;
    padding: 0 8px;
    font-weight: 600;
    letter-spacing: .5px;
}

.pt-admin-side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-admin-side-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    transition: background .15s, color .15s;
}

.pt-admin-side-nav a:hover {
    background: #f3f4f6;
    color: #111827;
}

.pt-admin-side-nav a.active {
    background: #e6f0ff;
    color: #0066cc;
    font-weight: 500;
}

.pt-admin-side-nav a .pt-icon {
    width: 18px;
    text-align: center;
    display: inline-block;
}

.pt-admin-side-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    font-style: normal;
    line-height: 1.6;
    font-weight: 500;
}

.pt-admin-layout-main {
    min-width: 0;
}

@media (max-width: 900px) {
    .pt-admin-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .pt-admin-layout-side {
        position: static;
    }
    .pt-admin-side-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}

/* =========================================================
   默认头像 / 封面
   ========================================================= */

.pt-avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pt-av-bg, #6366f1);
    color: var(--pt-av-fg, #fff);
    font-weight: 600;
    border-radius: 50%;
    overflow: hidden;
    user-select: none;
    line-height: 1;
    letter-spacing: 0;
}

.pt-cover-default {
    background: linear-gradient(135deg, var(--pt-cv-c1, #667eea), var(--pt-cv-c2, #764ba2));
    width: 100%;
    display: block;
}

/* =========================================================
   章节管理表格：按钮间距 & 排版
   ========================================================= */

.pt-table {
    table-layout: auto;
}

.pt-table th,
.pt-table td {
    padding: 12px 14px;
    vertical-align: middle;
}

/* 操作列按钮组 */
.pt-table td .pt-flex {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.pt-table td .pt-flex .pt-btn {
    min-width: 56px;
    justify-content: center;
    white-space: nowrap;
}

/* 章节管理头部的两个按钮 */
.pt-card > .pt-flex-between .pt-flex {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.pt-card > .pt-flex-between .pt-flex .pt-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* 序号 / 状态 / 同步 / 操作 列宽 */
.pt-table th:first-child,
.pt-table td:first-child {
    width: 60px;
    text-align: center;
    color: #6b7280;
}

.pt-table th:nth-child(3),
.pt-table td:nth-child(3) {
    width: 90px;
}

.pt-table th:nth-child(4),
.pt-table td:nth-child(4) {
    width: 110px;
}

.pt-table th:last-child,
.pt-table td:last-child {
    width: 160px;
    white-space: nowrap;
}

/* 手机端降级 */
@media (max-width: 640px) {
    .pt-table th,
    .pt-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    .pt-table td .pt-flex .pt-btn {
        min-width: 48px;
        padding: 5px 8px;
    }
}

/* =========================================================
   后台整体美化（v2）
   ========================================================= */

/* ---------- 左栏侧边栏增强 ---------- */

.pt-admin-layout-side {
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    padding: 16px 10px;
}

.pt-admin-side-title {
    letter-spacing: 1px;
    font-size: 11.5px;
    padding: 0 10px 8px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 8px;
}

.pt-admin-side-nav a {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    position: relative;
}

.pt-admin-side-nav a:hover {
    background: #f3f4f6;
}

.pt-admin-side-nav a.active {
    background: linear-gradient(90deg, #e6f0ff 0%, #eef5ff 100%);
    color: #0066cc;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(0,102,204,.10);
}

.pt-admin-side-nav a.active::before {
    content: "";
    position: absolute;
    left: -10px; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #0066cc;
}

.pt-admin-side-nav a .pt-icon {
    font-size: 15px;
}

.pt-admin-side-badge {
    font-size: 10.5px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* ---------- 页头 ---------- */

.pt-admin-page-head {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.pt-admin-page-head h2 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: .2px;
}

.pt-admin-head-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---------- 卡片阴影 ---------- */

.pt-admin-card {
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    border-color: #eaecef;
}

.pt-admin-card h3 {
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 14px;
}

/* ---------- 表格斑马纹 + 行悬停 ---------- */

.pt-admin-table thead th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12.5px;
    letter-spacing: .2px;
}

.pt-admin-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.pt-admin-table tbody tr {
    transition: background .12s;
}

.pt-admin-table tbody tr:hover {
    background: #f0f7ff;
}

/* ---------- 状态徽章优化 ---------- */

.pt-admin-badge {
    position: relative;
    padding: 3px 9px 3px 18px;
    font-weight: 500;
    letter-spacing: .1px;
}

.pt-admin-badge::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .85;
}

/* ---------- 空状态更友好 ---------- */

.pt-admin-empty {
    padding: 60px 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.8;
}

/* ---------- 提示条 ---------- */

.pt-admin-msg {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
    color: #16a34a;
    border: 1px solid #bbf7d0;
    margin-bottom: 16px;
}

/* ---------- Tab 优化 ---------- */

.pt-admin-tabs {
    gap: 4px;
    margin-bottom: 16px;
}

.pt-admin-tab {
    padding: 8px 14px;
    border-radius: 6px 6px 0 0;
    font-size: 13.5px;
    font-weight: 500;
}

.pt-admin-tab.active {
    background: #f0f7ff;
}

/* ---------- 筛选栏 ---------- */

.pt-admin-filter {
    background: #f9fafb;
    border: 1px solid #eaecef;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.pt-admin-filter .form-input,
.pt-admin-filter select.form-input {
    background: #fff;
}

/* ---------- 统计卡片增强 ---------- */

.pt-admin-stat {
    transition: box-shadow .15s, transform .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

.pt-admin-stat-link:hover .pt-admin-stat {
    box-shadow: 0 4px 12px rgba(0,102,204,.10);
    transform: translateY(-1px);
}

/* ---------- 表单美化 ---------- */

.pt-admin-form-group > label {
    font-weight: 600;
    color: #374151;
    font-size: 13.5px;
}

.pt-admin-form-group input[type="text"],
.pt-admin-form-group input[type="email"],
.pt-admin-form-group input[type="number"],
.pt-admin-form-group input[type="date"],
.pt-admin-form-group select,
.pt-admin-form-group textarea {
    transition: border-color .15s, box-shadow .15s;
}

.pt-admin-form-tip {
    font-size: 12.5px;
    line-height: 1.7;
}

/* ---------- 按钮 ---------- */

.pt-admin-actions .pt-btn {
    transition: all .15s;
}

.pt-btn-sm {
    padding: 5px 11px;
    font-size: 12.5px;
    border-radius: 5px;
}

/* =========================================================
   首页左栏：合作机构滚动卡片
   ========================================================= */

.pt-wall-side {
    background: var(--mn-bg-card, #fff);
    border: 1px solid var(--mn-border, #e5e7eb);
    border-radius: 10px;
    padding: 14px 12px;
    margin-bottom: 12px;
    box-sizing: border-box;
    overflow: hidden;
}

.pt-wall-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mn-border-light, #eef0f3);
}

.pt-wall-side-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mn-text, #333);
    margin: 0;
    line-height: 1.4;
}

.pt-wall-side-more {
    font-size: 12px;
    color: var(--mn-text-muted, #888);
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.pt-wall-side-more:hover { color: var(--mn-primary, #f97316); }

.pt-wall-side-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pt-wall-side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 8px;
    box-sizing: border-box;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
    flex-shrink: 0;
}
.pt-wall-side-item:hover {
    background: var(--mn-bg-soft, #f8fafc);
}

.pt-wall-side-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--pt-av-fg, #fff);
    background: var(--pt-av-bg, #6366f1);
    line-height: 1;
    user-select: none;
}

.pt-wall-side-info {
    flex: 1;
    min-width: 0;
}

.pt-wall-side-name {
    font-size: 13px;
    color: var(--mn-text, #333);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.pt-wall-side-type {
    font-size: 11.5px;
    color: var(--mn-text-muted, #888);
    margin-top: 1px;
    line-height: 1.3;
}

/* 滚动窗口：高度由 JS 动态设定，默认 3 项 */
.pt-wall-side-scroll {
    position: relative;
    overflow: hidden;
}
.pt-wall-side-scroll .pt-wall-side-list {
    will-change: transform;
}

/* =========================================================
   移动端隐藏合作机构（兜底）
   ========================================================= */
@media (max-width: 768px) {
    /* wall.js 若被注入到移动端抽屉或移动端侧栏，一律隐藏 */
    .mn-drawer .pt-wall-side,
    .mn-drawer-body .pt-wall-side,
    .mn-mobile-sidebar .pt-wall-side,
    .mn-left .pt-wall-side {
        display: none !important;
    }
}