/* ===== CSS 变量（轻松白底基调 + 四种强调色主题）===== */
:root,
:root[data-theme="mint"] {
    --bg-primary: #f5f7fa;        /* 页面浅灰白底，轻松不刺眼 */
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f3f5f9;
    --border: #e6eaf1;
    --border-hover: #d4dbe6;
    --text-primary: #1f2733;
    --text-secondary: #5a6473;
    --text-muted: #98a2b3;
    --gold: #2bb89a;              /* 薄荷绿（默认主题强调色）*/
    --gold-light: #5fcdb4;
    --gold-dark: #1f8f78;
    --red: #e05555;
    --red-light: #f47171;
    --red-dark: #c0392b;
    --blue: #5b8def;
    --blue-light: #7aa3f7;
    --green: #3fb27f;
    --green-light: #6cc98f;
    --orange: #e89c3f;
    --purple: #9b6fd9;
    --radius: 14px;               /* 大圆角，柔和轻松 */
    --radius-sm: 9px;
    --shadow: 0 8px 28px rgba(31, 39, 51, 0.08);
    --shadow-sm: 0 2px 10px rgba(31, 39, 51, 0.06);
    --transition: all 0.25s ease;
}
:root[data-theme="sakura"] {      /* 樱雾粉 */
    --gold: #ef7fa6;
    --gold-light: #f4a8c3;
    --gold-dark: #d65c87;
}
:root[data-theme="sky"] {          /* 晴空蓝 */
    --gold: #4a9be8;
    --gold-light: #7fb8ef;
    --gold-dark: #2f7fc9;
}
:root[data-theme="sunny"] {        /* 暖阳橙 */
    --gold: #f0a23b;
    --gold-light: #f4bd6e;
    --gold-dark: #d9841f;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { cursor: pointer; text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== Header ===== */
.header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--gold-dark);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.header-back-btn:hover {
    background: var(--bg-card-hover);
    color: var(--gold);
    border-color: var(--gold-dark);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    font-size: 28px;
    color: var(--gold);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 4px;
    border-left: 1px solid var(--border);
    padding-left: 8px;
}

.nav-tabs {
    display: flex;
    gap: 4px;
}

.nav-tab {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
}

.nav-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--gold-dark);
    color: #fff;
}

/* 未登录Header */
.header-guest .guest-actions {
    display: flex;
    gap: 10px;
}

/* 用户栏 */
.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== 通知铃铛 ===== */
.noti-wrap {
    position: relative;
    flex-shrink: 0;
}
.noti-bell {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary, #e8dcc0);
    transition: background .2s;
}
.noti-bell:hover { background: rgba(0, 0, 0, 0.06); }
.noti-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 9px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-sizing: border-box;
}
.noti-panel {
    position: absolute;
    right: 0;
    top: 44px;
    width: 340px;
    max-height: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.noti-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #e8dcc0);
    flex-shrink: 0;
}
.noti-clear {
    background: none;
    border: none;
    color: var(--gold, #d4af37);
    font-size: 12px;
    cursor: pointer;
}
.noti-clear:hover { text-decoration: underline; }
.noti-list {
    overflow-y: auto;
    flex: 1;
}
.noti-empty {
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted, #8a7f6a);
    font-size: 13px;
}
.noti-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background .15s;
}
.noti-item:hover { background: rgba(255, 255, 255, 0.06); }
.noti-msg {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary, #e8dcc0);
}
.noti-time {
    font-size: 11px;
    color: var(--text-muted, #8a7f6a);
    margin-top: 4px;
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.user-info-sm {
    font-size: 13px;
    line-height: 1.3;
}

.user-info-sm .user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-info-sm .user-role-tag {
    font-size: 11px;
    color: var(--text-muted);
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
}

.role-badge.role-user { background: rgba(91,141,239,0.15); color: var(--blue-light); }
.role-badge.role-judge { background: rgba(212,168,67,0.15); color: var(--gold-light); }
.role-badge.role-chief { background: rgba(155,111,217,0.15); color: var(--purple); }
.role-badge.role-partner { background: rgba(45,193,140,0.15); color: var(--green); }

/* ===== Main Content ===== */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - 64px);
}

/* ===== 登录/注册页 ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 40px 20px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .auth-logo-icon {
    font-size: 56px;
    color: var(--gold);
    margin-bottom: 12px;
}

.auth-logo .auth-logo-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 3px;
}

.auth-logo .auth-logo-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 15px;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    font-weight: 500;
}

.auth-tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.auth-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    line-height: 1.6;
}

.auth-hint code {
    color: var(--gold-light);
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

/* 登录页优化后的提示条（不再展示演示账号） */
.auth-hint-clean {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.auth-link {
    color: var(--gold-light);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.auth-link:hover { color: var(--gold); text-decoration: underline; }
.auth-hint-sep { color: var(--text-muted); }

/* ===== 通用组件 ===== */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--gold);
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold-dark);
    color: #fff;
}

.btn-primary:hover {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(212,168,67,0.3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: var(--red-dark);
    color: #fff;
}

.btn-danger:hover { background: var(--red); }

.btn-success {
    background: var(--green);
    color: #fff;
}

.btn-success:hover { background: var(--green-light); }

.btn-outline {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold-dark);
}

.btn-outline:hover {
    background: rgba(212,168,67,0.1);
}

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Badge 状态标签 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-gold { background: rgba(212,168,67,0.15); color: var(--gold-light); border: 1px solid rgba(212,168,67,0.3); }
.badge-red { background: rgba(224,85,85,0.15); color: var(--red-light); border: 1px solid rgba(224,85,85,0.3); }
.badge-blue { background: rgba(91,141,239,0.15); color: var(--blue-light); border: 1px solid rgba(91,141,239,0.3); }
.badge-green { background: rgba(76,175,114,0.15); color: var(--green-light); border: 1px solid rgba(76,175,114,0.3); }
.badge-orange { background: rgba(232,156,63,0.15); color: var(--orange); border: 1px solid rgba(232,156,63,0.3); }
.badge-gray { background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }
.badge-purple { background: rgba(155,111,217,0.15); color: var(--purple); border: 1px solid rgba(155,111,217,0.3); }
.badge-pink { background: rgba(233,111,155,0.15); color: #f191b5; border: 1px solid rgba(233,111,155,0.35); }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p { font-size: 15px; }

/* ===== 案件大厅 ===== */
.hall-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.hall-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    min-width: 120px;
}

.stat-card .stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }
.filter-tab.active { background: var(--gold-dark); color: #fff; border-color: var(--gold-dark); }

/* 案件卡片 */
.case-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.case-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.case-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.case-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.case-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}

.case-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vs-divider {
    color: var(--gold-dark);
    font-weight: 600;
}

/* ===== 案件详情 ===== */
.case-detail-header {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 24px;
    border-left: 4px solid var(--gold);
}

.case-detail-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.case-detail-number {
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
}

.case-detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.info-item .info-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.info-item .info-value {
    font-size: 14px;
    color: var(--text-primary);
}

.parties-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.party {
    flex: 1;
    text-align: center;
}

.party .party-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.party .party-name {
    font-size: 16px;
    font-weight: 600;
}

.party-plaintiff .party-name { color: var(--red-light); }
.party-defendant .party-name { color: var(--blue-light); }

.vs-center {
    font-size: 24px;
    color: var(--gold-dark);
    font-weight: 700;
}

/* Tab 切换 */
.detail-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.detail-tab {
    padding: 10px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
}

.detail-tab:hover { color: var(--text-primary); }
.detail-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ===== 证据区域 ===== */
.evidence-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.evidence-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.evidence-column-header {
    padding: 14px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.evidence-column.plaintiff .evidence-column-header {
    background: rgba(224,85,85,0.08);
    color: var(--red-light);
    border-bottom-color: rgba(224,85,85,0.2);
}

.evidence-column.defendant .evidence-column-header {
    background: rgba(91,141,239,0.08);
    color: var(--blue-light);
    border-bottom-color: rgba(91,141,239,0.2);
}

.evidence-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 120px;
}

.evidence-item {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border-left: 3px solid var(--border);
}

.evidence-item.plaintiff { border-left-color: var(--red-dark); }
.evidence-item.defendant { border-left-color: var(--blue); }

.evidence-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.evidence-item-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.evidence-item-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.evidence-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== 调解时间线 ===== */
.trial-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.trial-stage {
    position: relative;
    padding-left: 40px;
    padding-bottom: 32px;
}

.trial-stage:last-child { padding-bottom: 0; }

.trial-stage::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 28px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.trial-stage:last-child::before { display: none; }

.trial-dot {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg-input);
    border: 2px solid var(--border);
    color: var(--text-muted);
    z-index: 1;
}

.trial-stage.active .trial-dot {
    background: var(--gold-dark);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 8px rgba(212,168,67,0.4);
}

.trial-stage.done .trial-dot {
    background: var(--green);
    border-color: var(--green-light);
    color: #fff;
}

.trial-stage.skipped .trial-dot {
    opacity: 0.3;
}

.trial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.trial-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.trial-card-title {
    font-size: 16px;
    font-weight: 600;
}

.trial-card-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.trial-verdict {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
}

.trial-verdict-label {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trial-verdict-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.trial-verdict-result {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.verdict-result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* ===== 表单 ===== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 720px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-label .required { color: var(--red); }

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 2px rgba(212,168,67,0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ===== Modal 弹窗 ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--gold);
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-size: 14px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== 主审选择 ===== */
.judge-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.judge-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.judge-option:hover {
    border-color: var(--gold-dark);
    background: var(--bg-card-hover);
}

.judge-option.selected {
    border-color: var(--gold);
    background: rgba(212,168,67,0.08);
}

.judge-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.judge-info { flex: 1; }
.judge-name { font-size: 14px; font-weight: 600; }
.judge-stats { font-size: 12px; color: var(--text-muted); }

/* ===== 首席调处官后台 ===== */
.admin-panel {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

.admin-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    height: fit-content;
}

.admin-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.admin-menu-item:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.admin-menu-item.active {
    background: var(--gold-dark);
    color: #fff;
}

.admin-menu-badge {
    margin-left: auto;
    background: var(--red-dark);
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.admin-content {
    min-width: 0;
}

/* 主审申请卡片 */
.application-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    border-left: 4px solid var(--gold);
}

.application-card.pending { border-left-color: var(--orange); }
.application-card.approved { border-left-color: var(--green); }
.application-card.rejected { border-left-color: var(--red); }

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.application-title {
    font-size: 16px;
    font-weight: 600;
}

.application-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.application-body .app-field {
    margin-bottom: 8px;
}

.application-body .app-field-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-right: 8px;
}

.application-footer {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* 主审列表表格 */
.judge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.judge-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.judge-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.judge-table tr:hover td {
    background: var(--bg-card-hover);
}

/* ===== 主审工作台 ===== */
.workbench-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wb-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.wb-stat-card .wb-stat-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--gold);
}

.wb-stat-card .wb-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.wb-section {
    margin-bottom: 32px;
}

.wb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.wb-section-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-section-title::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--gold);
    border-radius: 2px;
}

/* ===== 界面主题选择（首席调处官后台）===== */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 18px; }
.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.theme-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); }
.theme-card.active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.theme-swatch { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.theme-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.theme-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 案件待确认接案卡片 */
.case-pending-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 12px;
    border-left: 4px solid var(--orange);
}

.case-pending-card .case-pending-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.case-pending-card .case-pending-title {
    font-size: 15px;
    font-weight: 600;
}

.case-pending-card .case-pending-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.case-pending-card .case-pending-actions {
    display: flex;
    gap: 8px;
}

/* ===== 工具类 ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.full-w { width: 100%; }

/* ===== 纠纷调节席位（原告席/主审席/被告席） ===== */
.courtroom-bar {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 16px;
    background: linear-gradient(180deg, rgba(212,168,67,0.06), transparent);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.courtroom-seat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.courtroom-seat .seat-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.courtroom-seat .seat-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.courtroom-seat .seat-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.seat-plaintiff .seat-name { color: var(--red-light); }
.seat-plaintiff { border-top: 2px solid var(--red-dark); }
.seat-defendant .seat-name { color: var(--blue-light); }
.seat-defendant { border-top: 2px solid var(--blue); }
.seat-judge { border-top: 2px solid var(--gold); background: rgba(212,168,67,0.06); }
.seat-judge .seat-name { color: var(--gold-light); }

/* ===== 被告答辩状卡片 ===== */
.response-card {
    border-left-color: var(--blue) !important;
    background: linear-gradient(180deg, rgba(91,141,239,0.05), var(--bg-card));
}

/* ===== 警告按钮 ===== */
.btn-warning {
    background: var(--orange);
    color: #fff;
}

.btn-warning:hover { filter: brightness(1.1); }

/* ===== 初始证据行 ===== */
.initial-evidence-row {
    background: var(--bg-input);
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
    position: relative;
}

.initial-evidence-row::before {
    content: "证据条目";
    position: absolute;
    top: -10px;
    left: 12px;
    background: var(--bg-card);
    padding: 0 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-label-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(201,168,76,0.15);
    color: var(--accent);
    font-size: 11px;
    border-radius: 10px;
    font-weight: normal;
    letter-spacing: 0.5px;
}

/* ===== 证据预览区（大厅卡片/工作台卡片通用）===== */
.evidence-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s;
}
.evidence-preview:hover { border-color: var(--border-hover); }

.evidence-preview-empty {
    cursor: default;
    background: transparent;
    border: 1px dashed var(--border);
    opacity: 0.7;
}
.evidence-preview-empty:hover { border-color: var(--border); }

.evidence-preview-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.evidence-preview-count {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.evidence-preview-thumbs {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.evidence-thumb {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    flex-shrink: 0;
}
.evidence-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.evidence-thumb.plaintiff { border-color: rgba(224,85,85,0.4); }
.evidence-thumb.defendant { border-color: rgba(91,141,239,0.4); }

.evidence-thumb-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 9px;
    padding: 1px 4px;
    color: #fff;
    font-weight: 600;
    border-top-right-radius: 4px;
}
.evidence-thumb-tag.plaintiff { background: var(--red-dark); }
.evidence-thumb-tag.defendant { background: var(--blue); }

.evidence-preview-more {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ===== 证据图片加载失败占位 ===== */
.evidence-image-broken {
    padding: 12px 14px;
    background: rgba(224,85,85,0.08);
    border: 1px dashed rgba(224,85,85,0.3);
    border-radius: 6px;
    font-size: 12px;
    color: var(--red-light);
    line-height: 1.6;
    word-break: break-all;
}

.evidence-image-wrap {
    margin: 10px 0;
    position: relative;
}
.evidence-image-wrap img {
    transition: transform 0.2s;
}
.evidence-image-wrap img:hover {
    transform: scale(1.02);
}

/* ==================================================================
   ===== 响应式布局（手机 / 平板 / 电脑 三档适配）· 2026-09-08 =====
   ================================================================== */

/* ===== 平板（≤1024px）：收窄留白、侧栏变窄，保持双栏 ===== */
@media (max-width: 1024px) {
    .header-inner { padding: 0 16px; gap: 16px; }
    .main-content { padding: 24px 18px; }
    .admin-panel { grid-template-columns: 200px 1fr; gap: 16px; }
    .auth-card { padding: 32px 28px; }
    .pf-header-inner { padding: 0 16px; gap: 14px; }
}

/* ===== 手机（≤768px）：单栏堆叠、弹窗全屏、顶栏换行 ===== */
@media (max-width: 768px) {
    /* 顶栏：logo + 用户栏在上行，导航标签整行居中 */
    .header-inner { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
    .logo-text { font-size: 18px; letter-spacing: 1px; }
    .logo-sub { display: none; }
    .nav-tabs { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; }
    .nav-tab { padding: 8px 12px; font-size: 13px; }
    .user-bar { margin-left: auto; gap: 8px; }

    /* 登录 / 注册页 */
    .auth-page { padding: 24px 14px; min-height: calc(100vh - 56px); }
    .auth-card { padding: 28px 20px; max-width: 100%; }
    .auth-logo { margin-bottom: 22px; }
    .auth-logo .auth-logo-icon { font-size: 46px; }
    .auth-logo .auth-logo-title { font-size: 22px; letter-spacing: 2px; }
    .auth-hint-clean { font-size: 11px; }

    /* 主体内容 */
    .main-content { padding: 18px 14px; min-height: calc(100vh - 56px); }
    .hall-stats { justify-content: center; }
    .stat-card { flex: 1 1 40%; min-width: 0; padding: 14px 12px; }
    .stat-card .stat-num { font-size: 24px; }

    /* 案件列表与详情 */
    .case-list { gap: 12px; }
    .case-card { padding: 16px 16px; }
    .case-card-top { flex-direction: column; gap: 8px; }
    .case-card-title { font-size: 15px; }
    .case-detail-info { grid-template-columns: 1fr; }
    .evidence-section { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .courtroom-bar { grid-template-columns: 1fr; }

    /* 筛选标签：可横向滚动，避免换行挤占 */
    .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .filter-tab { flex: 0 0 auto; }

    /* 弹窗：手机上全屏展示，更易操作 */
    .modal-overlay { align-items: stretch; padding: 0; }
    .modal { width: 100%; max-width: none; height: 100%; max-height: none; border-radius: 0; padding: 22px 18px; }
    .modal-title { font-size: 17px; }

    /* 表单与按钮：加大点按区域 */
    .form-input, .form-select, .btn { font-size: 16px; padding: 12px 14px; }
    .btn-block { padding: 13px; }

    /* 后台：侧栏移至顶部横向排列，内容占满 */
    .admin-panel { grid-template-columns: 1fr; gap: 14px; }
    .admin-sidebar { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 10px; -webkit-overflow-scrolling: touch; }
    .admin-sidebar-title { display: none; }
    .admin-menu-item { flex: 0 0 auto; margin-bottom: 0; white-space: nowrap; }
    .admin-content { overflow-x: auto; }
    .workbench-grid { grid-template-columns: 1fr; }
    .judge-table, table.data-table { display: block; width: 100%; overflow-x: auto; }
    .judge-table th, .judge-table td { padding: 8px 10px; font-size: 12px; white-space: nowrap; }

    /* 平台页头部换行 */
    .pf-header-inner { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }

    /* Toast 移动端靠右下，避免遮挡 */
    .toast-container { right: 12px; left: 12px; top: auto; bottom: 16px; }
    .toast { max-width: none; }

    /* 角落合规小字在极小屏缩小，避免遮挡 */
    .dcl-corner { font-size: 10px; max-width: 200px; }
}

/* ===== 小屏手机（≤480px）：进一步收紧 ===== */
@media (max-width: 480px) {
    .header-inner { padding: 8px 10px; }
    .main-content { padding: 14px 10px; }
    .auth-card { padding: 22px 14px; }
    .case-card { padding: 14px 12px; }
    .section-title { font-size: 18px; }
    .stat-card { flex: 1 1 100%; }
    .application-footer { flex-wrap: wrap; }
    .application-footer .btn { flex: 1 1 auto; }
    .modal { padding: 18px 14px; }
    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1 1 auto; }
}

/* ===== 被告应诉醒目横幅（详情页置顶，任何Tab下可见） ===== */
.defendant-alert {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin: 16px 0;
}

.defendant-alert-urgent {
    border-left-color: var(--orange);
    background: linear-gradient(180deg, rgba(232,156,63,0.10), var(--bg-card));
    border-color: rgba(232,156,63,0.4);
    animation: defendantAlertIn 0.4s ease;
}

@keyframes defendantAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.defendant-alert-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 10px;
}

.defendant-alert-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
}

.defendant-alert .btn { margin-top: 2px; }

/* ===== 免责声明（注册前置 + 全局守卫） ===== */
.dcl-check-wrap {
    margin: 4px 0 14px;
}

.dcl-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    cursor: pointer;
}

.dcl-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--gold-dark);
    cursor: pointer;
    flex-shrink: 0;
}

.dcl-link {
    color: var(--gold-light);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.dcl-link:hover { color: var(--gold); }

/* 声明弹窗（复用 .modal，内部放宽宽度） */
.dcl-modal {
    display: flex;
    flex-direction: column;
    max-height: 78vh;
}

.dcl-head {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.dcl-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.5;
}

.dcl-version {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.6;
}

.dcl-body {
    overflow-y: auto;
    padding-right: 6px;
    flex: 1;
}

.dcl-section {
    margin-bottom: 16px;
}

.dcl-sec-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}

.dcl-list {
    margin: 0;
    padding-left: 18px;
}

.dcl-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 4px;
}

.dcl-tail {
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
    padding-top: 10px;
    margin: 8px 0 4px;
    line-height: 1.7;
}

.dcl-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
}

/* ===== 合规常驻元素 ===== */

/* 页面角落常驻小字：本调处会为平台内部争议调处流程（非司法机关调处会） */
.dcl-corner {
    position: fixed;
    left: 12px;
    bottom: 10px;
    z-index: 9990;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.5;
    pointer-events: none;
    max-width: 300px;
}

/* 注册弹窗标题下灰色小字：非国家司法机关声明 */
.dcl-reg-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin: -2px 0 12px;
    padding: 0 8px;
}

/* 评议/审理页常驻 footer：AI辅助生成内容声明 */
.dcl-footer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    margin: 16px 0 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    opacity: 0.8;
}

/* ==================================================================
   ===== 平台层（推广 / 视频化 / 站内信 / 终审后台）样式 · 2026-08-29 =====
   ================================================================== */

/* ===== 平台页头部 ===== */
.pf-header { background: var(--bg-secondary); border-bottom: 2px solid var(--gold-dark); box-shadow: 0 2px 12px rgba(0,0,0,.4); position: sticky; top: 0; z-index: 90; }
.pf-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 58px; display: flex; align-items: center; gap: 22px; }
.pf-back-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.pf-back-btn:hover {
    background: var(--bg-card-hover);
    color: var(--gold);
    border-color: var(--gold-dark);
}
.pf-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.pf-logo-badge { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a1408; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.pf-nav { display: flex; gap: 4px; flex: 1; }
.pf-nav a { padding: 7px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary); transition: var(--transition); }
.pf-nav a:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.pf-nav a.active { color: var(--gold-light); background: rgba(212,168,67,.08); }
.pf-header-user { display: flex; align-items: center; gap: 10px; }
.pf-user-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 20px; background: var(--bg-input); border: 1px solid var(--border); font-size: 13px; }
.pf-user-chip:hover { border-color: var(--border-hover); }

/* ===== 通用按钮 ===== */
.pf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-input); color: var(--text-primary); border: 1px solid var(--border); transition: var(--transition); }
.pf-btn:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.pf-btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #1a1408; border: none; font-weight: 700; }
.pf-btn-primary:hover { filter: brightness(1.08); }
.pf-btn-danger { background: rgba(224,85,85,.12); border-color: var(--red-dark); color: var(--red-light); }
.pf-btn-danger:hover { background: rgba(224,85,85,.2); }
.pf-btn-ghost { background: transparent; }
.pf-btn-sm { padding: 6px 12px; font-size: 12px; }
.pf-btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ===== 页面容器 / 卡片 ===== */
.pf-page { max-width: 980px; margin: 24px auto 60px; padding: 0 20px; }
.pf-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.pf-card-inner { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.pf-card-title { font-size: 17px; margin-bottom: 14px; color: var(--gold-light); }
.pf-sub-title { font-size: 14px; margin: 18px 0 10px; color: var(--text-primary); }

/* ===== 表单 ===== */
.pf-field { margin-bottom: 14px; }
.pf-field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.pf-field input, .pf-field select { width: 100%; padding: 10px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; transition: var(--transition); }
.pf-field input:focus, .pf-field select:focus { border-color: var(--gold); }
.pf-err { color: var(--red-light); font-size: 13px; margin: 10px 0; min-height: 18px; }

/* ===== 用户主页 ===== */
.pf-profile-head { display: flex; gap: 18px; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.pf-avatar-lg { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-input)); border: 2px solid var(--gold-dark); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--gold-light); flex: none; }
.pf-avatar { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--bg-input); border: 1px solid var(--border); align-items: center; justify-content: center; font-size: 13px; color: var(--gold-light); vertical-align: middle; }
.pf-profile-info h1 { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.pf-profile-meta { color: var(--text-secondary); font-size: 13px; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.pf-role { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.pf-role-chief_judge { color: var(--gold-light); border-color: var(--gold-dark); background: rgba(212,168,67,.1); }
.pf-role-judge { color: var(--blue-light); border-color: var(--blue); background: rgba(91,141,239,.1); }
.pf-notice { color: var(--text-secondary); font-size: 13px; }

/* ===== 推广码区 ===== */
.pf-ref-code-row { display: flex; gap: 14px; flex-wrap: wrap; }
.pf-ref-code { flex: 1; min-width: 280px; background: var(--bg-input); border: 1px dashed var(--border-hover); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.pf-ref-code code { flex: 1; font-size: 15px; color: var(--gold-light); font-weight: 700; letter-spacing: .5px; word-break: break-all; }
.pf-ref-link { font-size: 12px !important; }
.pf-label { font-size: 12px; color: var(--text-muted); flex: none; }
.pf-share-hint { margin-top: 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.pf-inviter { margin-top: 12px; font-size: 13px; color: var(--text-secondary); }

/* ===== 三态阶梯进度 ===== */
.pf-stages { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; flex-wrap: wrap; }
.pf-stage { flex: 1; min-width: 110px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.pf-stage-num { display: block; font-size: 24px; font-weight: 800; color: var(--gold-light); }
.pf-stage-name { font-size: 12px; color: var(--text-secondary); }
.pf-stage-arrow { color: var(--text-muted); font-size: 18px; }
.pf-rule-list { list-style: none; font-size: 13px; color: var(--text-secondary); line-height: 2; }
.pf-rule-list b { color: var(--gold-light); }

/* ===== 列表 ===== */
.pf-list { display: flex; flex-direction: column; gap: 8px; }
.pf-list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; transition: var(--transition); }
.pf-list-item:hover { border-color: var(--border-hover); }
.pf-item-side { display: flex; align-items: center; gap: 10px; flex: none; }
.pf-case-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pf-case-title:hover { color: var(--gold-light); }
.pf-time { font-size: 12px; color: var(--text-muted); }
.pf-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 18px 0; }
.pf-tag { display: inline-flex; padding: 3px 9px; border-radius: 12px; font-size: 11px; background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); margin-right: 6px; }
.pf-status { display: inline-flex; padding: 2px 9px; border-radius: 10px; font-size: 11px; margin-left: 8px; }
.pf-status-ok { background: rgba(76,175,114,.14); color: var(--green-light); }
.pf-status-pending { background: rgba(232,156,63,.14); color: var(--orange); }
.pf-status-bad { background: rgba(224,85,85,.14); color: var(--red-light); }
.pf-status-warn { background: rgba(232,156,63,.14); color: var(--orange); }
.pf-amount { color: var(--gold-light); font-weight: 700; }

/* ===== 表格 ===== */
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th { text-align: left; padding: 9px 10px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); font-size: 12px; }
.pf-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.pf-table tr:hover td { background: rgba(255,255,255,.015); }

/* ===== 后台 tabs / 筛选 ===== */
.pf-admin-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.pf-admin-tabs a { padding: 8px 14px; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); font-size: 13px; color: var(--text-secondary); transition: var(--transition); }
.pf-admin-tabs a:hover { border-color: var(--border-hover); color: var(--text-primary); }
.pf-admin-tabs a.active { color: var(--gold-light); border-color: var(--gold-dark); background: rgba(212,168,67,.08); }
.pf-filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pf-filter-row input, .pf-filter-row select { padding: 8px 12px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px; min-width: 160px; }
.pf-filter-row input:focus, .pf-filter-row select:focus { border-color: var(--gold); outline: none; }

/* ===== 终审列表 ===== */
.pf-sub-item { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.pf-sub-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pf-sub-actions { display: flex; gap: 8px; margin-top: 12px; }
.pf-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.pf-reject { font-size: 12px; color: var(--red-light); margin-top: 10px; background: rgba(224,85,85,.08); border-radius: var(--radius-sm); padding: 8px 10px; }
.pf-hint { font-size: 12px; color: var(--text-muted); line-height: 1.8; margin-top: 12px; }
.pf-actions { display: flex; gap: 10px; margin: 6px 0 18px; }
.pf-flow-render { display: flex; flex-direction: column; gap: 8px; }
.pf-flow-step { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-input); border-radius: var(--radius-sm); padding: 10px 12px; border-left: 3px solid var(--gold-dark); }
.pf-flow-step .idx { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-card-hover); color: var(--gold-light); border: 1px solid var(--gold-dark); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pf-flow-step .name { font-size: 13px; font-weight: 700; }
.pf-flow-step .desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ===== Toast ===== */
.pf-toast { position: fixed; left: 50%; top: 74px; transform: translateX(-50%) translateY(-12px); background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 20px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 9999; box-shadow: var(--shadow); }
.pf-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pf-toast.ok { border-color: var(--green); color: var(--green-light); }
.pf-toast.warn { border-color: var(--orange); color: var(--orange); }

/* ===== 商业合作板块（/commerce/* 专用，追加于原样式末尾，不改动上方任何规则）===== */
.cm-entry-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)) !important; color: #1a1408 !important; font-weight: 700; border: none !important; }
.cm-entry-gold:hover { filter: brightness(1.1); }
.cm-corner { position: fixed; right: 10px; bottom: 10px; font-size: 11px; color: var(--text-muted); z-index: 90; max-width: 340px; text-align: right; line-height: 1.5; }
.cm-shell { display: flex; gap: 18px; align-items: flex-start; }
.cm-side { width: 210px; flex-shrink: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 10px; }
.cm-side-title { font-size: 12px; color: var(--text-muted); padding: 6px 10px; letter-spacing: 1px; }
.cm-menu-item { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 14px; text-decoration: none; margin-bottom: 2px; cursor: pointer; transition: background .15s, color .15s; }
.cm-menu-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.cm-menu-item.active { background: linear-gradient(135deg, rgba(212,168,67,.16), rgba(212,168,67,.05)); color: var(--gold-light); border-left: 2px solid var(--gold); }
.cm-menu-item[href*="apply.html"] { color: var(--gold-light); font-weight: 600; }
.cm-menu-item[href*="apply.html"]:hover { background: rgba(212,168,67,.12); color: var(--gold); }
.cm-main { flex: 1; min-width: 0; }
.cm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cm-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.cm-card-icon { font-size: 26px; margin-bottom: 8px; }
.cm-card-title { font-size: 15px; font-weight: 700; color: var(--gold-light); margin-bottom: 8px; }
.cm-card ul { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; }
.cm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cm-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.cm-stat-num { font-size: 22px; font-weight: 700; color: var(--gold-light); }
.cm-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cm-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; line-height: 1.6; }
.cm-badge-gold { background: rgba(212,168,67,.15); color: var(--gold-light); }
.cm-badge-green { background: rgba(76,175,114,.15); color: var(--green-light); }
.cm-badge-red { background: rgba(224,85,85,.15); color: var(--red-light); }
.cm-badge-blue { background: rgba(91,141,239,.15); color: var(--blue-light); }
.cm-badge-gray { background: rgba(107,113,134,.2); color: var(--text-secondary); }
.cm-flow-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; overflow-x: auto; }
.cm-flow-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.6; }
.cm-filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.cm-filter-row input, .cm-filter-row select { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cm-product { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: var(--transition); }
.cm-product:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.cm-product-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.cm-product-meta { font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
.cm-price { color: var(--gold-light); font-size: 17px; font-weight: 700; }
.cm-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.cm-modal { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); width: min(680px, 92vw); max-height: 86vh; overflow-y: auto; padding: 22px; }
.cm-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cm-form-item label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.cm-form-item input, .cm-form-item select, .cm-form-item textarea { width: 100%; box-sizing: border-box; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; }
.cm-form-item textarea { min-height: 60px; resize: vertical; }
.cm-chat-box { height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--bg-primary); }
.cm-msg { margin-bottom: 10px; max-width: 78%; }
.cm-msg .cm-msg-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.cm-msg .cm-msg-body { display: inline-block; padding: 8px 12px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); font-size: 13px; line-height: 1.6; word-break: break-all; }
.cm-msg.mine { margin-left: auto; text-align: right; }
.cm-msg.mine .cm-msg-body { background: rgba(212,168,67,.14); border-color: rgba(212,168,67,.35); }
.cm-msg.sys { text-align: center; max-width: 100%; }
.cm-msg.sys .cm-msg-body { background: transparent; border: none; color: var(--text-muted); font-size: 12px; }
.cm-track-code { background: var(--bg-input); border: 1px dashed var(--gold-dark); color: var(--gold-light); padding: 6px 10px; border-radius: var(--radius-sm); font-family: monospace; word-break: break-all; }

/* ===== 法务援助引导弹窗（点击「我的案件 / 法务援助」） ===== */
.legalaid-guide-tip {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: rgba(212,168,67,.10);
    border-left: 3px solid var(--gold);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin: 4px 0 10px;
}
.legalaid-guide-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 10px;
}
.legalaid-guide-img {
    display: block;
    width: 100%;
    max-height: 52vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: zoom-in;
    background: var(--bg-primary);
    transition: box-shadow .15s ease;
}
.legalaid-guide-img:hover {
    box-shadow: 0 0 0 2px var(--gold);
}
