/* 监护人用户界面样式 - 专为30-50岁监护人设计 */

:root {
    --children-primary: #1e40af;
    --children-secondary: #3b82f6;
    --children-success: #059669;
    --children-warning: #d97706;
    --children-danger: #dc2626;
    --children-info: #0891b2;
    --children-bg-light: #f8fafc;
    --children-bg-card: #ffffff;
    --children-text-primary: #1f2937;
    --children-text-secondary: #6b7280;
    --children-border: #e5e7eb;
    --children-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --children-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 监护人端全局样式 */
.children-mode {
    background-color: var(--children-bg-light);
    color: var(--children-text-primary);
    font-family: 'Poppins', sans-serif;
}

/* 监控仪表板样式 */
.monitor-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.monitor-card {
    background: var(--children-bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--children-shadow-lg);
    border: 1px solid var(--children-border);
    transition: all 0.3s ease;
}

.monitor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 实时状态指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-online {
    background-color: #dcfce7;
    color: var(--children-success);
    border: 1px solid #bbf7d0;
}

.status-offline {
    background-color: #fee2e2;
    color: var(--children-danger);
    border: 1px solid #fecaca;
}

.status-warning {
    background-color: #fef3c7;
    color: var(--children-warning);
    border: 1px solid #fde68a;
}

/* 健康数据图表容器 */
.health-chart {
    background: var(--children-bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--children-shadow);
}

.chart-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--children-text-primary);
}

.chart-period {
    display: flex;
    gap: 0.5rem;
}

.period-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--children-border);
    border-radius: 6px;
    background: var(--children-bg-card);
    color: var(--children-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn.active {
    background: var(--children-primary);
    color: white;
    border-color: var(--children-primary);
}

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

/* 服务订单卡片 */
.order-card {
    background: var(--children-bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--children-border);
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: var(--children-primary);
    box-shadow: var(--children-shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-id {
    font-weight: 600;
    color: var(--children-text-primary);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-status-pending {
    background-color: #fef3c7;
    color: var(--children-warning);
}

.order-status-confirmed {
    background-color: #dbeafe;
    color: var(--children-primary);
}

.order-status-in-progress {
    background-color: #dcfce7;
    color: var(--children-success);
}

.order-status-completed {
    background-color: #f3f4f6;
    color: var(--children-text-secondary);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-detail-item {
    display: flex;
    flex-direction: column;
}

.order-detail-label {
    font-size: 0.875rem;
    color: var(--children-text-secondary);
    margin-bottom: 0.25rem;
}

.order-detail-value {
    font-weight: 600;
    color: var(--children-text-primary);
}

/* 实时监控视频 */
.video-monitor {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.video-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.video-status {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.video-controls {
    display: flex;
    gap: 0.5rem;
}

.video-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* 通知中心 */
.notification-center {
    background: var(--children-bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--children-shadow);
}

.notification-item {
    display: flex;
    align-items: start;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--children-bg-light);
}

.notification-item.unread {
    background: #eff6ff;
    border-left: 4px solid var(--children-primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.notification-icon.health {
    background: #dcfce7;
    color: var(--children-success);
}

.notification-icon.service {
    background: #dbeafe;
    color: var(--children-primary);
}

.notification-icon.emergency {
    background: #fee2e2;
    color: var(--children-danger);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--children-text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    color: var(--children-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.notification-time {
    color: var(--children-text-secondary);
    font-size: 0.75rem;
}

/* 数据统计卡片 */
.stats-card {
    background: linear-gradient(135deg, var(--children-primary), var(--children-secondary));
    color: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.stats-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.stats-change {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stats-change.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.stats-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .monitor-dashboard {
        padding: 1rem 0;
    }
    
    .monitor-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .video-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stats-value {
        font-size: 2rem;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--children-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--children-text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--children-text-primary);
}

.empty-state-message {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}
