* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
}

.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.top-nav {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2c5aa0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.logo-section h1 {
    font-size: 20px;
    color: #2c5aa0;
    font-weight: bold;
}

.login-btn {
    background: #2c5aa0;
    color: #fff;
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
}

.login-btn:hover {
    background: #1e4080;
}

/* 主布局 */
.layout-container {
    display: grid;
    grid-template-columns: 220px 1fr 480px;
    gap: 0;
    flex: 1;
    min-height: calc(100vh - 75px);
}

/* 左侧深蓝色菜单 */
.sidebar {
    background: #1a3a6e;
    color: #fff;
    padding: 25px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    padding: 0 20px 20px;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    padding: 12px 25px;
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
}

.sidebar-menu li:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu li.active {
    color: #6ba6e8;
    font-weight: bold;
    background: rgba(107, 166, 232, 0.1);
    border-left: 4px solid #6ba6e8;
}

.sidebar-footer {
    padding: 15px 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
}

.date-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: bold;
    color: #fff;
}

/* 中间内容区 */
.content-area {
    padding: 20px 25px;
    background: #f5f7fa;
    overflow-y: auto;
}

.breadcrumb {
    background: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-back {
    background: #fff;
    border: 1px solid #ccc;
    padding: 8px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.btn-back:hover {
    background: #f0f0f0;
}

.report-end {
    background: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
}

.end-dot {
    color: #f44336;
    margin-right: 5px;
}

.report-link {
    color: #2c5aa0;
    text-decoration: underline;
    margin-left: 10px;
}

/* 信息卡片 */
.info-card {
    background: #fff;
    border: 1px solid #d0d7e0;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 12px;
}

.warning-card {
    background: #fef5ec;
    border-color: #f5c89a;
}

.baby-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.baby-name {
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

.baby-gender {
    color: #f44336;
    font-size: 14px;
}

.baby-status {
    display: flex;
    gap: 15px;
    font-size: 13px;
    margin-bottom: 12px;
}

.status-online {
    color: #4ade80;
}

.battery {
    color: #4ade80;
}

.task-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.progress-text {
    color: #2c5aa0;
    font-weight: bold;
}

.progress-bar {
    height: 6px;
    background: #e0e7ef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2c5aa0, #6ba6e8);
    border-radius: 3px;
}

.step-list {
    list-style: none;
}

.step-list li {
    padding: 6px 0;
    font-size: 14px;
}

.step-list li.completed {
    color: #4ade80;
}

.step-list li.active {
    color: #6ba6e8;
    font-weight: bold;
}

.step-list li.pending {
    color: #999;
}

/* 参数监控 */
.param-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.param-label {
    font-size: 14px;
    color: #333;
}

.param-status {
    font-size: 13px;
    font-weight: bold;
}

.param-status.correct {
    color: #2c5aa0;
}

.param-status.warning {
    color: #f44336;
}

.param-status.error {
    color: #f44336;
}

.param-value-text {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
}

.param-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.warn-icon {
    font-size: 16px;
}

/* 右侧图片区 */
.right-area {
    padding: 20px 25px 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.baby-image-box {
    background: #fff;
    border: 1px solid #d0d7e0;
    border-radius: 5px;
    overflow: hidden;
    flex: 1;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.baby-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 深色曲线图卡片 */
.chart-card-dark {
    background: linear-gradient(135deg, #1a2942 0%, #0f1a2e 100%);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(107, 166, 232, 0.2);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* 开关图标 */
.chart-switch {
    width: 40px;
    height: 20px;
    background: linear-gradient(90deg, #2a3f5f 0%, #1a2942 100%);
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(107, 166, 232, 0.3);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.switch-circle {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #6ba6e8, #4a90e2);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    box-shadow: 0 0 8px rgba(107, 166, 232, 0.8),
                0 0 4px rgba(107, 166, 232, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 8px rgba(107, 166, 232, 0.8), 0 0 4px rgba(107, 166, 232, 0.5); }
    50% { box-shadow: 0 0 12px rgba(107, 166, 232, 1), 0 0 6px rgba(107, 166, 232, 0.7); }
}

.chart-title-dark {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
}

/* 让 canvas 更高一点 */
.chart-card-dark canvas {
    width: 100% !important;
    height: 130px !important;
    display: block;
}

/* 通用按钮 */
.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #2c5aa0;
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* 响应式 */
@media (max-width: 1200px) {
    .layout-container {
        grid-template-columns: 200px 1fr 400px;
    }
}
/* 没有曲线图的提示 */
.no-chart-tip {
    background: #fff;
    border: 1px solid #d0d7e0;
    border-radius: 5px;
    padding: 25px 20px;
    text-align: center;
    color: #d4a017;
    font-size: 16px;
    font-weight: bold;
    background: #fffbe6;
    border-color: #ffe58f;
}