/* ====================================================
   登录/注册页面样式
   简洁大气健康蓝色风格，小程序风格适配
   ==================================================== */

.login-page {
    background: linear-gradient(180deg, #EBF4FF 0%, #F0F4F8 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(43, 108, 176, 0.08);
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    margin: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
}

.login-title {
    font-size: 22px;
    color: #1A202C;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-subtitle {
    color: #A0AEC0;
    font-size: 14px;
}

/* 登录方式切换标签 */
.login-tabs {
    display: flex;
    background-color: #F0F4F8;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    color: #4A5568;
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.login-tab.active {
    background-color: #FFFFFF;
    color: #2B6CB0;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(43, 108, 176, 0.1);
}

/* 登录表单容器 */
.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

/* 输入框样式 */
.login-input-group {
    position: relative;
    margin-bottom: 16px;
}

.login-input-group .form-input {
    padding-left: 16px;
    padding-right: 16px;
    height: 48px;
    font-size: 15px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background-color: #F7FAFC;
    transition: all 0.2s;
}

.login-input-group .form-input:focus {
    border-color: #4299E1;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.12);
}

.login-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #A0AEC0;
    display: none;
}

.login-input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 6px 12px;
    background-color: #EBF4FF;
    border-radius: 6px;
    font-size: 13px;
    color: #2B6CB0;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.login-input-suffix:hover {
    background-color: #2B6CB0;
    color: #FFFFFF;
}

.login-input-suffix.disabled {
    cursor: not-allowed;
    color: #A0AEC0;
    background-color: #F0F4F8;
}

/* 提交按钮 */
.login-submit {
    width: 100%;
    height: 48px;
    font-size: 16px;
    background: #2B6CB0;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 600;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.login-submit:hover {
    background: #4299E1;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.25);
}

.login-submit:active {
    transform: scale(0.98);
}

.login-submit:disabled {
    background-color: #CBD5E0;
    cursor: not-allowed;
    box-shadow: none;
}

/* 辅助信息 */
.login-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 20px;
    font-size: 13px;
    color: #4A5568;
}

.login-help a {
    color: #2B6CB0;
    text-decoration: none;
    font-weight: 500;
}

.login-help a:hover {
    color: #4299E1;
}

/* 分隔线 */
.login-divider {
    text-align: center;
    margin: 24px 0 16px;
    color: #A0AEC0;
    font-size: 13px;
    position: relative;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background-color: #E2E8F0;
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

/* 第三方登录按钮 */
.login-thirdparty {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.login-thirdparty-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 14px;
    color: #4A5568;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.login-thirdparty-btn:hover {
    border-color: #4299E1;
    background-color: #EBF4FF;
    color: #2B6CB0;
}

.login-thirdparty-icon {
    display: none;
}

/* 登录页底部提示 */
.login-footer-tip {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #EDF2F7;
    font-size: 13px;
    color: #4A5568;
}

.login-footer-tip a {
    color: #2B6CB0;
    font-weight: 600;
    margin-left: 4px;
}

/* 开发模式提示 */
.dev-mode-tip {
    background-color: #EBF4FF;
    border: 1px solid #BEE3F8;
    color: #2B6CB0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
}

/* 微信登录引导 */
.wechat-login-area {
    text-align: center;
    padding: 24px;
    background-color: #F0FFF4;
    border: 1px solid #C6F6D5;
    border-radius: 10px;
    margin-bottom: 16px;
}

.wechat-login-area .big-icon {
    display: none;
}

/* ============ 首页样式 ============ */

.home-hero {
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    color: #FFFFFF;
    padding: 28px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.home-hero h2 {
    font-size: 20px;
    margin-bottom: 6px;
    font-weight: 600;
}

.home-hero p {
    opacity: 0.9;
    font-size: 13px;
    margin-bottom: 16px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.quick-action-btn {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    padding: 12px 8px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

.quick-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.quick-action-btn .icon {
    display: none;
}

/* 提醒列表 */
.reminder-list {
    margin-top: 12px;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 10px;
    background-color: #F7FAFC;
    margin-bottom: 10px;
    border-left: 3px solid #2B6CB0;
}

.reminder-item.urgent {
    border-left-color: #E53E3E;
    background-color: #FFF5F5;
}

.reminder-item.completed {
    border-left-color: #38A169;
    background-color: #F0FFF4;
    opacity: 0.8;
}

.reminder-info {
    flex: 1;
}

.reminder-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1A202C;
    font-size: 14px;
}

.reminder-meta {
    font-size: 12px;
    color: #A0AEC0;
}

.reminder-actions {
    display: flex;
    gap: 8px;
}

/* AI对话 */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #F7FAFC;
    border-radius: 10px;
    margin-bottom: 16px;
    max-height: 500px;
}

.ai-chat-message {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.ai-chat-message.user {
    flex-direction: row-reverse;
}

.ai-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.ai-chat-message.user .ai-chat-avatar {
    background: linear-gradient(135deg, #805AD5 0%, #B794F4 100%);
}

.ai-chat-bubble {
    background-color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    line-height: 1.7;
    font-size: 14px;
    color: #1A202C;
}

.ai-chat-message.user .ai-chat-bubble {
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    color: #FFFFFF;
}

.ai-chat-time {
    font-size: 11px;
    color: #A0AEC0;
    margin-top: 4px;
    display: block;
}

.ai-chat-input {
    display: flex;
    gap: 10px;
}

.ai-chat-input textarea {
    flex: 1;
    min-height: 46px;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    background-color: #F7FAFC;
}

.ai-chat-input textarea:focus {
    outline: none;
    border-color: #4299E1;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.12);
}

.ai-chat-input button {
    padding: 0 24px;
    background: #2B6CB0;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.ai-chat-input button:hover {
    background: #4299E1;
}

/* 药品卡片 */
.medicine-card {
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 16px;
    background-color: #FFFFFF;
    transition: all 0.2s;
    cursor: pointer;
}

.medicine-card:hover {
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.08);
    border-color: #BEE3F8;
}

.medicine-name {
    font-size: 15px;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 6px;
}

.medicine-spec {
    font-size: 13px;
    color: #4A5568;
    margin-bottom: 8px;
}

.medicine-info {
    font-size: 12px;
    color: #A0AEC0;
    line-height: 1.6;
}

.medicine-expiring {
    color: #D69E2E;
    font-weight: 600;
    font-size: 12px;
}

.medicine-expiring.urgent {
    color: #E53E3E;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 6px 14px;
    background-color: #F0F4F8;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #4A5568;
    font-weight: 500;
    transition: all 0.2s;
}

.category-btn:hover {
    background-color: #EBF4FF;
    color: #2B6CB0;
}

.category-btn.active {
    background-color: #2B6CB0;
    color: #FFFFFF;
}

/* 健康日志 */
.health-log-entry {
    padding: 14px 16px;
    background-color: #F7FAFC;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 3px solid #2B6CB0;
}

.health-log-entry.type-medicine { border-left-color: #D69E2E; }
.health-log-entry.type-metric { border-left-color: #38A169; }
.health-log-entry.type-feeling { border-left-color: #805AD5; }

.health-log-date {
    color: #A0AEC0;
    font-size: 12px;
    margin-bottom: 4px;
}

.health-log-content {
    color: #4A5568;
    line-height: 1.6;
    font-size: 14px;
}

/* 趋势图表 */
.trend-chart {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 120px;
    padding: 10px 0;
}

.trend-bar {
    flex: 1;
    background: linear-gradient(to top, #2B6CB0 0%, #4299E1 100%);
    border-radius: 4px 4px 0 0;
    min-height: 10px;
    transition: height 0.5s ease;
    position: relative;
}

.trend-bar-label {
    text-align: center;
    font-size: 11px;
    color: #A0AEC0;
    margin-top: 4px;
}

/* 移动端登录页优化 */
@media (max-width: 480px) {
    .login-page {
        padding: 0;
        align-items: stretch;
    }

    .login-container {
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 32px 24px;
        box-shadow: none;
        margin: 0;
    }

    .login-title {
        font-size: 20px;
    }

    .home-hero {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .home-hero h2 {
        font-size: 18px;
    }

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