/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 顶部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    position: relative;
    left: 0;
    right: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #1890ff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 16px;
    font-weight: 500;
}

/* 主要内容区 */
.main-content {
    padding: 30px 0 30px;
}

/* 欢迎区域 */
.welcome-section {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.welcome-info h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-info p {
    font-size: 16px;
    opacity: 0.9;
}

/* 健康数据摘要 */
.health-summary {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.health-summary h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.health-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.health-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.health-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.card-icon.blood-pressure {
    background-color: #ff4d4f;
}

.card-icon.blood-sugar {
    background-color: #faad14;
}

.card-icon.heart-rate {
    background-color: #1890ff;
}

.card-icon.temperature {
    background-color: #52c41a;
}

.card-content h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.data-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.data-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.data-status.normal {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.data-status.abnormal {
    background-color: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

/* 快速入口 */
.quick-access {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quick-access h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.quick-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 20px;
    background-color: #fafafa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #f0f9ff;
}

.quick-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.quick-icon.family {
    background-color: #1890ff;
}

.quick-icon.records {
    background-color: #52c41a;
}

.quick-icon.stats {
    background-color: #faad14;
}

.quick-icon.medication {
    background-color: #ff4d4f;
}

.quick-card span {
    font-size: 14px;
    font-weight: 500;
}

/* 最近健康记录 */
.recent-records {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-records h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.record-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.record-item:hover {
    background-color: #f0f9ff;
}

.record-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1890ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.record-content {
    flex: 1;
}

.record-content h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.record-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.record-desc {
    font-size: 12px !important;
    opacity: 0.8;
}

.status-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.status-tag.completed {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-tag.upcoming {
    background-color: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

/* 底部导航 */
.footer {
    background-color: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    width: 100%;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #666;
    font-size: 12px;
    padding: 10px;
    transition: color 0.3s ease;
}

.footer-nav .nav-item i {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item.active {
    color: #1890ff;
}

.nav-item:hover {
    color: #1890ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 15px 0;
    }

    .logo {
        font-size: 20px;
    }

    .welcome-section {
        padding: 30px 20px;
    }

    .welcome-info h2 {
        font-size: 24px;
    }

    .health-summary,
    .quick-access,
    .recent-records {
        padding: 20px;
    }

    .health-cards {
        grid-template-columns: 1fr;
    }

    .quick-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding-bottom: 100px;
    }
}

/* 表单样式 */
.form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #40a9ff;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    margin-right: 10px;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* 表格样式 */
.table-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
}

.table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #333;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #1890ff;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #1890ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

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

/* 错误提示 */
.error-message {
    background-color: #fff1f0;
    color: #ff4d4f;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #ff4d4f;
}

/* 成功提示 */
.success-message {
    background-color: #f6ffed;
    color: #52c41a;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #52c41a;
}

/* 网站备案信息 */
.beian-info {
    background-color: #fafafa;
    border-top: 1px solid #e8e8e8;
    padding: 20px 15px;
    text-align: center;
    line-height: 1.8;
    font-size: 12px;
    margin-top: 30px;
    margin-bottom: 80px;
    color: #666;
}

.beian-info .row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.beian-info .row-center {
    justify-content: center;
}

.beian-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.beian-link:hover {
    color: #1890ff;
}

.beian-link img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.beian-link span {
    font-size: 12px;
}

/* 响应式设计 - 备案信息 */
@media (max-width: 768px) {
    .footer {
        bottom: 0;
    }

    .beian-info {
        padding: 15px 10px;
        margin-bottom: 70px;
        font-size: 11px;
    }

    .beian-link img {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    .beian-link span {
        font-size: 10px;
    }

    .main-content {
        padding-bottom: 20px;
    }
}