/* ============================================================
 * 物业监管平台 · 全局样式表
 * 适用范围：所有管理后台页面（仪表盘、列表页、详情页、表单页）
 * 版本：v3.2.1
 * ============================================================ */

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

/* ========== CSS 变量（设计令牌） ========== */
:root {
    /* 品牌色 */
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #e8f0fe;

    /* 语义色 */
    --success: #34a853;
    --warning: #f9a825;
    --danger: #ea4335;
    --info: #00acc1;
    --purple: #7e57c2;
    --orange: #ff6d00;

    /* 中性色 */
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-secondary: #5f6368;
    --border: #e0e0e0;

    /* 阴影 */
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ========== 全局基础 ========== */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.header-title small {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    margin-left: 8px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

.header-badge .dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* ========== 主体布局 ========== */
.main-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* ========== 左侧菜单 ========== */
.sidebar {
    width: 260px;
    background: #fafbfc;
    border-right: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-label {
    padding: 10px 24px 6px;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

/* 财务管理独立分区高亮 */
.finance-section {
    margin-top: 8px;
    border-top: 1px dashed #ddd;
    padding-top: 8px;
}

.finance-label {
    color: #b8860b !important;
}

/* 台账高亮（三个核心台账） */
.taizhang-section {
    margin-top: 8px;
    border-top: 1px solid #e8e0c8;
    padding-top: 8px;
}

.taizhang-label {
    color: var(--primary) !important;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #4a4a4a;
    border-left: 3px solid transparent;
    user-select: none;
}

.sidebar-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

/* 台账菜单项特殊高亮 */
.sidebar-item.taizhang-item {
    font-weight: 600;
    color: var(--primary);
    background: #f0f5ff;
}

.sidebar-item.taizhang-item .icon {
    font-size: 17px;
}

.sidebar-item.taizhang-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-item .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-item .arrow {
    margin-left: auto;
    font-size: 12px;
    color: #bbb;
    transition: transform 0.3s;
}

.sidebar-item .arrow.small {
    font-size: 10px;
}

.sidebar-item.expanded .arrow,
.sidebar-item.expanded .arrow.small {
    transform: rotate(90deg);
}

.sidebar-item .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #f5f7fa;
}

.sub-menu.open {
    max-height: 500px;
}

.sub-menu.nested.open {
    max-height: 300px;
}

.sub-item {
    padding: 9px 24px 9px 52px;
    font-size: 13px;
    color: #666;
    border-left: none;
    position: relative;
}

.sub-item:hover {
    background: #eef2f7;
    color: var(--primary);
}

.sub-item.active {
    background: #e8f0fe;
    color: var(--primary);
    font-weight: 600;
}

.sub-item .sub-icon {
    margin-right: 8px;
    font-size: 14px;
    width: 20px;
    text-align: center;
    display: inline-block;
    flex-shrink: 0;
}

.sub-item.deep {
    padding-left: 72px;
    font-size: 12.5px;
}

.sub-item.deep::before {
    content: '';
    position: absolute;
    left: 56px;
    top: 50%;
    width: 6px;
    height: 1px;
    background: #ccc;
}

.sub-item.has-child .arrow.small {
    margin-left: auto;
}

/* ========== 内容区 ========== */
.content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

/* ========== 页面标题区 ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
}

.page-title p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* ========== 按钮 ========== */
.btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

.btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
	
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
	text-decoration: none;
}

/* ========== 欢迎横幅 ========== */
.welcome-banner {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    border-radius: 12px;
    padding: 24px 32px;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.welcome-banner .welcome-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.welcome-banner .welcome-text p {
    font-size: 13px;
    opacity: 0.85;
}

.welcome-banner .welcome-info {
    display: flex;
    gap: 24px;
}

.welcome-banner .info-item {
    text-align: center;
}

.welcome-banner .info-item .info-value {
    font-size: 24px;
    font-weight: 800;
}

.welcome-banner .info-item .info-label {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ========== 核心指标卡片 ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.kpi-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.kpi-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.kpi-card.blue::before { background: var(--primary); }
.kpi-card.green::before { background: var(--success); }
.kpi-card.orange::before { background: var(--orange); }
.kpi-card.red::before { background: var(--danger); }
.kpi-card.purple::before { background: var(--purple); }
.kpi-card.cyan::before { background: var(--info); }
.kpi-card.gray::before { background: #999; }

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpi-icon.blue { background: #e8f0fe; color: var(--primary); }
.kpi-icon.green { background: #e6f4ea; color: var(--success); }
.kpi-icon.orange { background: #fff3e0; color: var(--orange); }
.kpi-icon.red { background: #fce8e6; color: var(--danger); }
.kpi-icon.purple { background: #f3e5f5; color: var(--purple); }
.kpi-icon.cyan { background: #e0f7fa; color: var(--info); }

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    margin-top: 6px;
    line-height: 1.1;
}

.kpi-value.danger { color: var(--danger); }
.kpi-value.warning { color: var(--warning); }
.kpi-value.success { color: var(--success); }

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    margin-top: 5px;
}

.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.warn { color: var(--warning); }

/* ========== 图表区域 ========== */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.charts-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title .title-dot {
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: var(--primary);
}

.card-body {
    padding: 20px 24px;
}

.chart-container {
    position: relative;
    height: 280px;
}

.chart-container.tall {
    height: 320px;
}

/* ========== 表格 ========== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9ff;
}

.data-table tr.timeout-row {
    background: #fff5f5;
}

.data-table tr.timeout-row:hover {
    background: #fff0f0;
}

.data-table tr.warning-row {
    background: #fffcf0;
}

.data-table tr.warning-row:hover {
    background: #fff8e0;
}

/* ========== 状态标签 ========== */
.status-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag.green { background: #e6f4ea; color: var(--success); }
.status-tag.red { background: #fce8e6; color: var(--danger); }
.status-tag.orange { background: #fff3e0; color: var(--orange); }
.status-tag.blue { background: #e8f0fe; color: var(--primary); }
.status-tag.gray { background: #f0f0f0; color: var(--text-secondary); }
.status-tag.purple { background: #f3e5f5; color: var(--purple); }

/* ========== 进度条 ========== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.green { background: var(--success); }
.progress-fill.blue { background: var(--primary); }
.progress-fill.orange { background: var(--orange); }
.progress-fill.red { background: var(--danger); }

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========== 告警列表 ========== */
.alert-list {
    max-height: 380px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
    cursor: pointer;
}

.alert-item:hover {
    background: #f8f9ff;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.alert-icon.danger { background: #fce8e6; color: var(--danger); }
.alert-icon.warning { background: #fff3e0; color: var(--warning); }
.alert-icon.info { background: #e8f0fe; color: var(--primary); }
.alert-icon.success { background: #e6f4ea; color: var(--success); }

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.alert-time {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
}

/* ========== 倒计时 ========== */
.countdown {
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.countdown.danger { color: var(--danger); }
.countdown.warning { color: var(--warning); }

/* ========== 评分分布条 ========== */
.rating-bar-container {
    margin-bottom: 10px;
}

.rating-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.rating-bar-label .stars {
    font-size: 13px;
}

.rating-bar-label .count {
    color: var(--text-secondary);
}

.rating-bar-track {
    width: 100%;
    height: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.rating-bar-fill.five { background: linear-gradient(90deg, #34a853, #81c995); }
.rating-bar-fill.four { background: linear-gradient(90deg, #1a73e8, #669df6); }
.rating-bar-fill.three { background: linear-gradient(90deg, #f9a825, #fdd835); }
.rating-bar-fill.two { background: linear-gradient(90deg, #ff6d00, #ff9e00); }
.rating-bar-fill.one { background: linear-gradient(90deg, #ea4335, #f28b82); }

/* ========== 差评卡片 ========== */
.review-card {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.review-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

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

.review-card-header .user-info {
    font-size: 13px;
    font-weight: 600;
}

.review-card-header .stars {
    font-size: 14px;
}

.review-card-body {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
}

.review-card-footer {
    display: flex;
    gap: 8px;
}

/* ========== 欠费列表 ========== */
.debt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.debt-item:last-child {
    border-bottom: none;
}

.debt-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.debt-rank.rank-1 { background: #fff3e0; color: #e65100; }
.debt-rank.rank-2 { background: #f5f5f5; color: #616161; }
.debt-rank.rank-3 { background: #fff8e1; color: #f57f17; }
.debt-rank.rank-other { background: #f5f5f5; color: #999; }

.debt-info {
    flex: 1;
}

.debt-info .debt-name {
    font-size: 13px;
    font-weight: 600;
}

.debt-info .debt-detail {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.debt-amount {
    font-size: 16px;
    font-weight: 800;
    color: var(--danger);
    font-family: 'Courier New', monospace;
}

.debt-amount.warning {
    color: var(--warning);
}

/* ========== 底部信息 ========== */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

/* ========== 标签云 ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.cloud-tag {
    padding: 5px 14px;
    border-radius: 16px;
    font-size: 12px;
    background: #f5f5f5;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.cloud-tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.cloud-tag.active {
    background: var(--primary);
    color: #fff;
}

/* ========== 时间线 ========== */
.timeline {
    padding: 8px 0;
}

.timeline-item {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 36px;
    bottom: -10px;
    width: 2px;
    background: #eee;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    z-index: 1;
}

.timeline-dot.blue { background: var(--primary-light); color: var(--primary); }
.timeline-dot.green { background: #e6f4ea; color: var(--success); }
.timeline-dot.orange { background: #fff3e0; color: var(--orange); }

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-size: 13px;
    font-weight: 600;
}

.timeline-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ========== 快速操作卡片 ========== */
.quick-action-card {
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-card:hover {
    transform: scale(1.03);
}

/* ========== 表单组件（通用） ========== */
.form-group {
    margin-bottom: 20px;
}

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

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-input::placeholder {
    color: #bbb;
}

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

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

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ========== Yii2 ActiveForm 校验样式 ========== */
/* 必填字段的红星号 */
.control-label.required:after,
label.required:after {
    content: " *";
    color: var(--danger);
    font-weight: bold;
}

/* 字段错误提示文字 */
.help-block {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}
.help-block:not(:empty) {
    color: var(--danger);
}

/* 校验失败时输入框高亮 */
.form-group.has-error .form-control,
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(234, 67, 53, 0.1);
}

/* 错误汇总块（errorSummary）列表项 */
.error-summary ul {
    margin: 0;
    padding-left: 20px;
}
.error-summary li {
    margin-bottom: 4px;
}

/* ========== 内联复选框组 ========== */
.inline-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 4px 0;
}

.inline-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.inline-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========== 垂直单选列表 ========== */
.vertical-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.vertical-radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.vertical-radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========== 带帮助文本的选择框 ========== */
.form-select-help {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}

.form-select-help:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== 数字输入带单位 ========== */
.number-input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-input-with-unit input[type="number"] {
    width: 80px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.number-input-with-unit input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.number-input-with-unit .unit {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========== 详情页描述列表 ========== */
.desc-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0;
}

.desc-list dt {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    background: #fafbfc;
    border-bottom: 1px solid #f5f5f5;
    text-align: right;
}

.desc-list dd {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid #f5f5f5;
}

/* ========== 筛选区 ========== */
.filter-bar {
    background: #fafbfc;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-bar .form-input,
.filter-bar .form-select {
    width: auto;
    min-width: 160px;
}

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

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

.empty-state .empty-text {
    font-size: 14px;
    margin-bottom: 8px;
}

/* ========== 分页器 ========== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.pagination-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

/* ========== 分步表单（Step Wizard） ========== */
.step-wizard {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 140px);
    padding-bottom: 80px;
}

/* 步骤指示器 */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    gap: 0;
}

.step-indicator .step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.step-indicator .step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8eaed;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.step-indicator .step-item.active .step-circle {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}

.step-indicator .step-item.completed .step-circle {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.step-indicator .step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.step-indicator .step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-indicator .step-item.completed .step-label {
    color: var(--success);
}

.step-indicator .step-line {
    width: 60px;
    height: 2px;
    background: #e8eaed;
    margin: 0 8px;
    transition: background 0.3s;
}

.step-indicator .step-line.active {
    background: var(--success);
}

/* 步骤面板 */
.step-panel {
    display: none;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 32px;
    flex: 1;
}

.step-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-panel h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.step-panel .step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* 步骤表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* 规则配置选项卡 */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-card {
    flex: 1;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.radio-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.radio-card .card-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.radio-card .card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.radio-card .card-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 议题项 */
.topic-item {
    background: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.topic-item:hover {
    border-color: var(--primary);
}

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

.topic-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.topic-actions {
    display: flex;
    gap: 8px;
}

/* 固定底部操作栏 */
.step-footer {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 0;
    height: 72px;
    background: #fff;
    border-top: 1px solid #e8eaed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 50;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.step-footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-footer-right {
    display: flex;
    gap: 12px;
}

/* 按钮样式补充 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-outline {
    background: #fff;
    color: var(--text);
    border: 1px solid #ddd;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-success:hover {
    background: #2d7a3f;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: #f5f5f5;
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fafbfc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.checkbox-item:hover {
    border-color: var(--primary);
}

.checkbox-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* 开关组件 */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.switch-row:last-child {
    border-bottom: none;
}

.switch-info {
    flex: 1;
}

.switch-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.switch-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.switch-control {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch-control input {
    display: none;
}

.switch-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.3s;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.switch-control input:checked + .switch-slider {
    background-color: var(--primary);
}

.switch-control input:checked + .switch-slider:before {
    transform: translateX(22px);
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.upload-area-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-area-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* ========== 议题选项行 ========== */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.option-row .form-input {
    flex: 1;
}

.option-row .vote-weight {
    width: 120px;
}

.option-delete {
    width: auto;
    min-width: 52px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.option-delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #ffebee;
}

.option-delete::before {
    content: '✕';
    font-size: 12px;
}

.option-add-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.option-add {
    width: auto;
    min-width: 52px;
    height: 36px;
    padding: 0 12px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.option-add:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.option-add::before {
    content: '+';
    font-size: 16px;
    font-weight: bold;
}

.option-add-text {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ========== 投票方式选择 ========== */
.vote-method-group {
    display: flex;
    gap: 20px;
    padding: 12px 0;
}

.vote-method-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.vote-method-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.vote-method-option:hover {
    color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-sm.danger {
    color: var(--danger);
}

/* ========== 预览卡片 ========== */
.preview-card {
    background: #e8f4ea;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.preview-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 8px;
}

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

.preview-card-content strong {
    color: var(--text);
}

/* ========== 数字输入组 ========== */
.number-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-input-group .form-input {
    flex: 1;
}

/* ========== 步骤说明文字 ========== */
.step-footer-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ========== 间距工具类 ========== */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }

/* ========== 全宽按钮 ========== */
.btn-full {
    width: 100%;
    border-style: dashed;
    padding: 16px;
}

/* ========== 页面 Tab 切换 ========== */
.page-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
    margin-bottom: 20px;
}

.page-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.page-tab:hover {
    color: var(--primary);
}

.page-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.page-tab .tab-icon {
    margin-right: 6px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ========== 分组标签 ========== */
.group-label {
    padding: 4px 0 8px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========== 评价维度配置 ========== */
.weight-summary {
    margin-top: 16px;
    padding: 12px 18px;
    background: #f8f9ff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-progress {
    width: 200px;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.total-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #81c995);
    border-radius: 5px;
    transition: width 0.3s;
}

.total-weight {
    font-weight: 700;
    font-size: 16px;
    color: var(--success);
}

.weight-ok {
    font-size: 12px;
    color: var(--success);
}

/* ============================================================
 * archive-card 通用样式（来源：community/index 基础信息卡片）
 * 用于所有 index 页面的"基础信息"摘要展示
 * ============================================================ */
.archive-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}

.archive-card-header {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-card-body {
    padding: 16px 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.info-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.info-item .info-label {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    width: 110px;
    flex-shrink: 0;
}

.info-item .info-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.info-item .info-value.link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.info-item .info-value.success { color: var(--success); }
.info-item .info-value.danger { color: var(--danger); }
.info-item .info-value.warning { color: var(--warning); }
.info-item .info-value.primary { color: var(--primary); }
