/* 睡眠记录页面专用样式 - 手动添加与编辑版本 */

.sleep-main {
    max-width: 800px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sleep-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.sleep-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a237e;
    border-left: 4px solid #3949ab;
    padding-left: 10px;
}

/* 输入表单样式 */
.sleep-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: bold;
    color: #555;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

/* 统计卡片样式 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-item .label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1a237e;
}

/* 历史列表样式 - 按天汇总 */
.sleep-day-group {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.day-header {
    background-color: #f8f9fa;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.day-date {
    font-weight: bold;
    color: #1a237e;
    font-size: 1.1rem;
}

.day-total {
    background-color: #3949ab;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.day-segments {
    background-color: white;
}

.sleep-segment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px dotted #eee;
}

.sleep-segment:last-child {
    border-bottom: none;
}

.segment-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.segment-time {
    color: #666;
    font-size: 0.9rem;
}

.segment-duration {
    font-weight: 500;
    color: #333;
}

.segment-actions {
    display: flex;
    gap: 5px;
}

.btn-edit-small, .btn-delete-small {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 3px;
    border-radius: 4px;
    transition: background 0.2s;
    opacity: 0.6;
}

.btn-edit-small:hover {
    background-color: #e3f2fd;
    opacity: 1;
}

.btn-delete-small:hover {
    background-color: #ffebee;
    opacity: 1;
}

/* 弹窗专用样式 */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
}

.btn-cancel {
    background-color: #9e9e9e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    flex: 1;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 30px;
}

.btn-start {
    background-color: #3949ab;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-start:hover {
    background-color: #1a237e;
}
