/* ============================================================
   颐泰延年平台 V3 补充样式
   健康管理主航道 + 四类看板 + V3规范UI
   ============================================================ */

:root {
    --health-primary: #2E7D32;
    --health-light: #4CAF50;
    --health-bg: #F1F8E9;
    --family-primary: #1565C0;
    --family-bg: #E3F2FD;
    --medical-primary: #6A1B9A;
    --medical-bg: #F3E5F5;
    --ops-primary: #E65100;
    --ops-bg: #FFF3E0;
    --risk-low: #2E7D32;
    --risk-medium: #F57F17;
    --risk-high: #C62828;
    --risk-critical: #6A1B9A;
}

/* ============================================================
   四类看板卡片
   ============================================================ */
.dashboard-card-v3 {
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card-v3:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.dashboard-card-v3::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.dashboard-card-v3.health-card {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 60%, #43A047 100%);
}

.dashboard-card-v3.family-card {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 60%, #1976D2 100%);
}

.dashboard-card-v3.ops-card {
    background: linear-gradient(135deg, #BF360C 0%, #E64A19 60%, #FF5722 100%);
}

.dashboard-card-v3.medical-card {
    background: linear-gradient(135deg, #4A148C 0%, #6A1B9A 60%, #8E24AA 100%);
}

.dashboard-card-v3 .card-icon-v3 {
    font-size: 2.5rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.dashboard-card-v3 .card-value-v3 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.dashboard-card-v3 .card-label-v3 {
    font-size: 0.875rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.dashboard-card-v3 .card-action-v3 {
    font-size: 0.8rem;
    opacity: 0.8;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

/* ============================================================
   健康指标卡片 V3
   ============================================================ */
.metric-card-v3 {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.metric-card-v3:hover {
    border-color: var(--health-primary);
    box-shadow: 0 4px 20px rgba(46,125,50,0.1);
    transform: translateY(-2px);
}

.metric-icon-v3 {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.4rem;
}

.metric-icon-v3.heart { background: #FFEBEE; color: #C62828; }
.metric-icon-v3.bp { background: #E3F2FD; color: #1565C0; }
.metric-icon-v3.oxygen { background: #E8F5E9; color: #2E7D32; }
.metric-icon-v3.sleep { background: #EDE7F6; color: #4527A0; }
.metric-icon-v3.steps { background: #FFF8E1; color: #F57F17; }
.metric-icon-v3.weight { background: #E0F7FA; color: #00695C; }
.metric-icon-v3.glucose { background: #FCE4EC; color: #AD1457; }

.metric-value-v3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1;
}

.metric-unit-v3 {
    font-size: 0.7rem;
    color: #6B7280;
    margin-left: 2px;
}

.metric-label-v3 {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 0.35rem;
}

.metric-status-v3 {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.4rem;
    font-weight: 500;
}

.status-normal { background: #E8F5E9; color: #2E7D32; }
.status-warning { background: #FFF3E0; color: #E65100; }
.status-danger { background: #FFEBEE; color: #C62828; }
.status-unknown { background: #F3F4F6; color: #6B7280; }

/* ============================================================
   风险标签
   ============================================================ */
.risk-badge-v3 {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.risk-low-v3 { background: #E8F5E9; color: #2E7D32; }
.risk-medium-v3 { background: #FFF3E0; color: #E65100; }
.risk-high-v3 { background: #FFEBEE; color: #C62828; }
.risk-critical-v3 { background: #F3E5F5; color: #6A1B9A; }

/* ============================================================
   健康评分环
   ============================================================ */
.health-score-v3 {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

.health-score-v3.score-good { border: 10px solid #E8F5E9; }
.health-score-v3.score-fair { border: 10px solid #FFF3E0; }
.health-score-v3.score-poor { border: 10px solid #FFEBEE; }

.health-score-v3 .score-num {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.health-score-v3.score-good .score-num { color: #2E7D32; }
.health-score-v3.score-fair .score-num { color: #E65100; }
.health-score-v3.score-poor .score-num { color: #C62828; }

.health-score-v3 .score-text {
    font-size: 0.7rem;
    color: #6B7280;
    margin-top: 2px;
}

/* ============================================================
   告警卡片
   ============================================================ */
.alert-item-v3 {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border-left: 4px solid;
}

.alert-item-v3.critical {
    background: #FFF5F5;
    border-color: #C62828;
}

.alert-item-v3.warning {
    background: #FFFBF0;
    border-color: #F57F17;
}

.alert-item-v3.info {
    background: #F0F8FF;
    border-color: #1565C0;
}

.alert-item-v3 .alert-icon-v3 {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-item-v3.critical .alert-icon-v3 { color: #C62828; }
.alert-item-v3.warning .alert-icon-v3 { color: #F57F17; }
.alert-item-v3.info .alert-icon-v3 { color: #1565C0; }

/* ============================================================
   家庭成员卡片
   ============================================================ */
.family-member-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
    cursor: pointer;
}

.family-member-card:hover {
    border-color: var(--family-primary);
    box-shadow: 0 4px 20px rgba(21,101,192,0.1);
}

.family-member-card .member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #E3F2FD;
}

.family-member-card .member-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    position: absolute;
    bottom: 0;
    right: 0;
}

.member-status-dot.online { background: #4CAF50; }
.member-status-dot.offline { background: #9E9E9E; }
.member-status-dot.alert { background: #F44336; }

/* ============================================================
   医生卡片 V3
   ============================================================ */
.doctor-card-v3 {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    text-align: center;
    transition: all 0.3s;
}

.doctor-card-v3:hover {
    border-color: var(--medical-primary);
    box-shadow: 0 4px 20px rgba(106,27,154,0.1);
    transform: translateY(-2px);
}

.doctor-card-v3 .doctor-avatar-v3 {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F3E5F5;
    margin: 0 auto 1rem;
    display: block;
}

.doctor-card-v3 .online-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.online-badge.online { background: #E8F5E9; color: #2E7D32; }
.online-badge.offline { background: #F3F4F6; color: #6B7280; }

/* ============================================================
   步骤流程
   ============================================================ */
.flow-steps {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
    position: relative;
}

.flow-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -12px;
    top: 18px;
    color: #9CA3AF;
    font-size: 1rem;
    z-index: 1;
}

.flow-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #E5E7EB;
    background: white;
    color: #9CA3AF;
    margin-bottom: 0.5rem;
    z-index: 2;
    position: relative;
}

.flow-step.active .flow-step-circle {
    background: var(--health-primary);
    border-color: var(--health-primary);
    color: white;
}

.flow-step.completed .flow-step-circle {
    background: var(--health-primary);
    border-color: var(--health-primary);
    color: white;
}

.flow-step-label {
    font-size: 0.72rem;
    color: #6B7280;
    text-align: center;
    white-space: nowrap;
}

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

/* ============================================================
   侧边栏导航 V3
   ============================================================ */
.sidebar-v3 {
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.sidebar-v3 .sidebar-header {
    padding: 1rem 1.25rem;
    background: var(--health-bg);
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: var(--health-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-v3 .nav-item-v3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar-v3 .nav-item-v3:last-child {
    border-bottom: none;
}

.sidebar-v3 .nav-item-v3:hover,
.sidebar-v3 .nav-item-v3.active {
    background: var(--health-bg);
    color: var(--health-primary);
}

.sidebar-v3 .nav-item-v3 i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ============================================================
   状态标签
   ============================================================ */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}

.status-pending { background: #FFF3E0; color: #E65100; }
.status-active { background: #E8F5E9; color: #2E7D32; }
.status-completed { background: #E3F2FD; color: #1565C0; }
.status-cancelled { background: #F3F4F6; color: #6B7280; }
.status-rejected { background: #FFEBEE; color: #C62828; }
.status-processing { background: #F3E5F5; color: #6A1B9A; }

/* ============================================================
   数据统计
   ============================================================ */
.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    border: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-card .kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1;
}

.kpi-card .kpi-label {
    font-size: 0.8rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

.kpi-card .kpi-trend {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.kpi-trend.up { color: #2E7D32; }
.kpi-trend.down { color: #C62828; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
    .dashboard-card-v3 { min-height: 120px; }
    .dashboard-card-v3 .card-value-v3 { font-size: 1.75rem; }
    .health-score-v3 { width: 100px; height: 100px; }
    .health-score-v3 .score-num { font-size: 1.75rem; }
    .flow-steps { flex-wrap: wrap; gap: 0.5rem; }
    .flow-step:not(:last-child)::after { display: none; }
}
