/**
 * 萌宠健康 App 样式文件
 * 设计风格：极简、温暖、圆角卡片、柔和配色
 */

:root {
    --primary: #FF8A50;
    --primary-light: #FFF1E6;
    --secondary: #6BCB77;
    --secondary-light: #E8F8EA;
    --accent: #4D96FF;
    --accent-light: #E8F2FF;
    --warning: #FFD93D;
    --warning-light: #FFF9E6;
    --danger: #FF6B6B;
    --danger-light: #FFECEC;
    --purple: #A855F7;
    --purple-light: #F5E8FF;
    --teal: #14B8A6;
    --teal-light: #E8FAF8;
    --pink: #EC4899;
    --pink-light: #FDEAF4;
    --amber: #F59E0B;
    --amber-light: #FEF3C7;
    --cyan: #06B6D4;
    --cyan-light: #E0F7FA;
    --muted: #737373;
    --muted-light: #F5F5F5;
    
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    --ink: #262626;
    --text-primary: #262626;
    --text-secondary: #737373;
    --border: #F0F0F0;
    --divider: #F5F5F5;
    --info: #4D96FF;
    --info-light: #E8F2FF;
    --primary-dark: #E67A3E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans CN', 'Noto Sans CJK SC', sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    height: 100%;
}

body {
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* App 容器 - 手机尺寸 */
.app-container {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    height: 100vh;
    background: var(--bg);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

@media (min-width: 431px) {
    .app-container {
        box-shadow: 0 0 60px rgba(0,0,0,0.1);
        height: 100vh;
    }
}

/* 页面容器 */
.page {
    display: none;
    min-height: calc(100vh - 88px);
    flex-direction: column;
    position: relative;
}

.page.active {
    display: flex;
    flex-direction: column;
    animation: pageSlideIn 0.3s ease-out;
}

@keyframes pageSlideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 状态栏 */
.status-bar {
    height: 40px;
    padding: 0 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 6px;
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.status-bar.dark {
    background: var(--surface);
}

.status-bar .time {
    font-weight: 600;
    font-size: 14px;
}

.status-bar .icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 导航栏 */
.nav-bar {
    padding: 6px 16px 10px;
    background: var(--surface);
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 44px;
    z-index: 10;
}

.nav-bar.transparent {
    background: transparent;
}

.nav-bar h1 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.nav-bar .back-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--divider);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-bar .back-btn:active {
    transform: scale(0.95);
    background: var(--border);
}

.nav-bar .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--divider);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.nav-bar .icon-btn:active {
    transform: scale(0.95);
}

/* 悬浮返回按钮 */
.floating-back-btn {
    position: absolute;
    top: 12px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
    padding: 0;
    color: var(--ink);
    font-size: 18px;
}
.floating-back-btn:active {
    transform: scale(0.92);
    background: var(--divider);
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* 底部导航 */
.tab-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 72px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    padding-top: 8px;
    padding-bottom: 20px;
    z-index: 50;
    margin-top: auto;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 10px;
    font-weight: 500;
    background: none;
    border: none;
    padding: 4px 8px;
}

.tab-item.active {
    color: var(--primary);
}

.tab-item i {
    font-size: 24px;
}

.fab-btn {
    width: 56px;
    height: 56px;
    margin-top: -20px;
    background: linear-gradient(135deg, var(--primary) 0%, #FF6B35 100%);
    border-radius: 20px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255,138,80,0.4);
    cursor: pointer;
    transition: all 0.2s;
}

.fab-btn:active {
    transform: scale(0.95);
}

.fab-btn i {
    font-size: 24px;
    color: white;
}

/* 右下角悬浮FAB */
.fab-corner {
    position: fixed;
    bottom: 88px;
    right: 16px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #FF6B35 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(255,138,80,0.45);
    cursor: pointer;
    transition: all 0.2s;
    z-index: 50;
    color: white;
}
.fab-corner:active {
    transform: scale(0.92);
}
.fab-corner i {
    font-size: 26px;
    color: white;
}

/* 卡片 */
.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    margin-bottom: 10px;
}

.card.flat {
    box-shadow: none;
    border: 1px solid var(--border);
}

/* 内容区域 */
.content {
    padding: 0 16px;
    flex: 1;
    padding-bottom: 16px;
}

/* 宠物切换头部 */
/* 首页头部 - 问候语+头像条 */
.home-header {
    padding: 4px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.home-greeting { flex: 1; min-width: 0; }
.greeting-text {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 2px;
}
.greeting-petname {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pet-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
    background: var(--surface);
    padding: 3px;
    border-radius: 20px;
    flex-shrink: 0;
}
.pet-chip-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border: 2px solid transparent;
    padding: 0;
    overflow: hidden;
}
.pet-chip-avatar.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
.pet-chip-avatar.add {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 14px;
}
.pet-chip-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 健康评分卡片 - 白卡 */
.hs-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.hs-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.hs-card-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}
.hs-card-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}
.hs-card-body {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}
.hs-score-num {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}
.hs-score-num span {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}
.hs-score-bar-wrap {
    flex: 1;
}
.hs-score-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}
.hs-score-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}
.hs-score-trend {
    font-size: 11px;
    color: var(--muted);
}
.hs-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.hs-metric-item {
    text-align: center;
    padding: 10px 4px;
    background: var(--bg);
    border-radius: 12px;
}
.hs-metric-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.hs-metric-lbl {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

/* 我的页面 - 横排宠物卡片（整合操作按钮） */
.profile-card-h {
    background: var(--surface);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.profile-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.profile-avatar-h {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.profile-avatar-h img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.profile-camera-btn {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: white;
    font-size: 11px;
}
.profile-info-h {
    flex: 1;
    min-width: 0;
}
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.profile-name-h {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}
.profile-edit-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.profile-meta-h {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}
.profile-stats-h {
    display: flex;
    gap: 20px;
}
.ps-item {
    cursor: pointer;
    text-align: left;
}
.ps-val {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.ps-lbl {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

/* 宠物切换行 - 融入卡片底部 */
.profile-pets-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
}
.profile-pets-row::-webkit-scrollbar { display: none; }
.pp-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 6px;
    background: var(--bg);
    border-radius: 20px;
    border: 1.5px solid transparent;
    font-size: 12px;
    color: var(--ink-2);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.pp-chip.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.pp-chip.add {
    border: 1px dashed var(--border);
    background: transparent;
    color: var(--primary);
    padding: 6px 12px;
}
.pp-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    overflow: hidden;
}
.pp-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.health-score-status {
    font-size: 12px;
    color: var(--secondary);
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.health-score-circle {
    width: 80px;
    height: 80px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #FF6B35 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255,138,80,0.3);
}

.btn-secondary {
    background: var(--divider);
    color: var(--ink);
}

.btn-success {
    background: var(--secondary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 12px;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
}

/* 快速记录网格 */
.quick-records {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.quick-record-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 14px;
    background: var(--surface);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-record-btn:active {
    transform: scale(0.95);
}

.quick-record-btn .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.quick-record-btn span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

/* 快速记录空状态 */
.quick-empty-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 12px;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.quick-empty-tip:active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}
.quick-empty-tip i {
    font-size: 18px;
    color: var(--primary);
}

.quick-record-btn.orange .icon-wrap { background: var(--primary-light); color: var(--primary); }
.quick-record-btn.amber .icon-wrap { background: var(--amber-light); color: var(--amber); }
.quick-record-btn.red .icon-wrap { background: var(--danger-light); color: var(--danger); }
.quick-record-btn.blue .icon-wrap { background: var(--accent-light); color: var(--accent); }
.quick-record-btn.green .icon-wrap { background: var(--secondary-light); color: var(--secondary); }
.quick-record-btn.purple .icon-wrap { background: var(--purple-light); color: var(--purple); }
.quick-record-btn.pink .icon-wrap { background: var(--pink-light); color: var(--pink); }
.quick-record-btn.teal .icon-wrap { background: var(--teal-light); color: var(--teal); }
.quick-record-btn.cyan .icon-wrap { background: #E0F7FA; color: var(--cyan); }
.quick-record-btn.yellow .icon-wrap { background: #FEF9C3; color: var(--warning); }

/* 快速记录管理网格 */
.quick-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.quick-type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: 12px;
    background: var(--bg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-size: 11px;
    color: var(--ink-2);
}
.quick-type-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}
.quick-type-item .qt-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.quick-type-item .qt-check {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 14px;
}

/* 迷你图表 */
.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 80px;
    padding: 8px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, #FFB088 100%);
    border-radius: 6px 6px 3px 3px;
    min-height: 8px;
    position: relative;
    transition: height 0.5s ease;
}

.chart-bar.normal {
    background: linear-gradient(180deg, var(--secondary) 0%, #A5D6A7 100%);
}

/* 记录列表项 */
.record-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--divider);
}

.record-item:last-child {
    border-bottom: none;
}

.record-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.record-content {
    flex: 1;
    min-width: 0;
}

.record-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}

.record-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.record-time {
    font-size: 11px;
    color: var(--muted);
    flex-shrink: 0;
}

/* 提醒项 */
.reminder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border-radius: 16px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary);
}

.reminder-item.done {
    opacity: 0.6;
    border-left-color: var(--muted);
}

.reminder-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.reminder-content {
    flex: 1;
}

.reminder-title {
    font-size: 14px;
    font-weight: 500;
}

.reminder-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.reminder-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--divider);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.reminder-item.done .reminder-action {
    background: var(--secondary);
    color: white;
}

/* 表单元素 */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
    min-height: 42px;
}

.form-input:focus {
    border-color: var(--primary);
}

.form-input::placeholder {
    color: #BDBDBD;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 15px;
    color: var(--ink);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* 选项按钮组 */
.option-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.option-btn {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 38px;
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.option-btn.success.selected {
    border-color: var(--secondary);
    background: var(--secondary-light);
    color: var(--secondary);
}

.option-btn.danger.selected {
    border-color: var(--danger);
    background: var(--danger-light);
    color: var(--danger);
}

/* 数值选择器 */
.number-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.number-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--divider);
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:active {
    background: var(--border);
}

.number-value {
    font-size: 36px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.number-unit {
    font-size: 16px;
    color: var(--muted);
    font-weight: 400;
}

/* Toggle 开关 */
.toggle {
    width: 52px;
    height: 30px;
    background: var(--border);
    border-radius: 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.toggle.active {
    background: var(--secondary);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.toggle.active::after {
    left: 24px;
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--divider);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 15px;
    color: var(--ink);
}

.list-item-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.list-item-action {
    color: var(--muted);
    font-size: 14px;
}

/* 欢迎页 */
.welcome-page {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary-light) 0%, white 50%);
    display: flex;
    flex-direction: column;
    padding: 40px 28px 28px;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #FF6B35 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto 20px;
    box-shadow: 0 8px 28px rgba(255,138,80,0.3);
}

.welcome-logo svg {
    width: 48px;
    height: 48px;
    fill: white;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: var(--ink);
    margin-bottom: 6px;
}

.welcome-subtitle {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
    margin-bottom: auto;
}

.welcome-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
}

.welcome-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
    transition: all 0.3s;
}

.welcome-dot.active {
    width: 24px;
    background: var(--primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-sheet {
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 10px 16px 28px;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 12px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    text-align: center;
}

.modal-center {
    align-items: center;
}

.modal-center .modal-sheet {
    border-radius: 20px;
    max-width: 340px;
    margin: auto;
    padding: 20px;
}

/* 周日期选择器 */
.week-dates {
    display: flex;
    gap: 8px;
    padding: 0 20px 16px;
    overflow-x: auto;
}

.week-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 44px;
    padding: 10px 0;
    border-radius: 14px;
    background: var(--surface);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.week-date.today {
    background: var(--primary);
    color: white;
}

.week-date.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.week-date .day-name {
    font-size: 10px;
    opacity: 0.7;
}

.week-date .day-num {
    font-size: 16px;
    font-weight: 600;
}

/* 时间轴 */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -22px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--primary);
    z-index: 1;
}

.timeline-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 12px;
}

/* 分段控制器 */
.segmented-control {
    display: flex;
    background: var(--divider);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}

.segmented-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.segmented-btn.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 日历热力图 */
.calendar-heatmap {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    background: var(--divider);
}

.heatmap-cell.level-1 { background: rgba(107,203,119,0.3); }
.heatmap-cell.level-2 { background: rgba(107,203,119,0.5); }
.heatmap-cell.level-3 { background: rgba(107,203,119,0.7); }
.heatmap-cell.level-4 { background: rgba(107,203,119,1); }
.heatmap-cell.abnormal { background: rgba(255,107,107,0.6); }

.weekday-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.weekday-label {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: var(--muted);
}

.heatmap-scale {
    display: flex;
    align-items: center;
    gap: 3px;
}

.heatmap-scale span {
    font-size: 10px;
}

.poop-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.1);
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--secondary); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.w-full { width: 100%; }

.section-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title .more {
    font-size: 13px;
    font-weight: 400;
    color: var(--primary);
}

/* 滚动条隐藏 */
::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Phosphor icons */
.ph {
    font-family: 'Phosphor' !important;
}

/* ==================== 新增优化样式 ==================== */

/* 页面隐藏Tab栏标记 */
.page.no-tab-bar ~ .tab-bar {
    display: none !important;
}

/* 表单页底部安全距离 */
.page.form-page {
    padding-bottom: 24px !important;
}

/* 日期快捷按钮组 */
.date-quick-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.date-quick-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.date-quick-btn:active {
    transform: scale(0.97);
}
.date-quick-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

/* 日期输入行 */
.datetime-row {
    display: flex;
    gap: 8px;
}
.datetime-row .form-input {
    flex: 1;
}

/* 头像上传区域 */
.avatar-upload {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--divider);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--muted);
    font-size: 11px;
    gap: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.avatar-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.avatar-upload img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload .camera-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 26px;
    height: 26px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    border: 2px solid white;
    z-index: 5;
}

/* 透明覆盖层 - 确保移动端文件选择正常工作 */
.avatar-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
    padding: 0;
    font-size: 0;
}

/* 确认对话框样式（修复Tailwind类缺失问题） */
.modal-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

.modal-confirm-box {
    background: white;
    border-radius: 24px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.25s ease-out;
}

.modal-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.modal-confirm-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-confirm-icon.warning {
    background: var(--warning-light);
    color: #D97706;
}

.modal-confirm-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.modal-confirm-message {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
}

.modal-confirm-buttons {
    display: flex;
    gap: 12px;
}

.modal-confirm-btn {
    flex: 1;
    padding: 14px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.modal-confirm-btn:active {
    transform: scale(0.98);
}

.modal-confirm-btn.cancel {
    background: var(--divider);
    color: var(--ink);
}

.modal-confirm-btn.confirm {
    background: var(--danger);
    color: white;
}

.modal-confirm-btn.confirm.primary {
    background: var(--primary);
}

/* Toast优化 */
.toast-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 300;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-notification.toast-success {
    background: var(--secondary);
    color: white;
}

.toast-notification.toast-error {
    background: var(--danger);
    color: white;
}

.toast-notification.toast-warning {
    background: var(--warning);
    color: #78350F;
}

/* 按钮Loading状态 */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 一键打卡按钮 */
.quick-checkin-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--secondary) 0%, #4ADE80 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(107,203,119,0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    min-height: 52px;
}

.quick-checkin-btn:active {
    transform: scale(0.98);
}

/* 逾期提醒高亮 */
.reminder-item.overdue {
    border-left-color: var(--danger) !important;
    background: linear-gradient(90deg, var(--danger-light) 0%, white 30%);
}

.reminder-item.overdue .reminder-title {
    color: var(--danger);
    font-weight: 600;
}

.reminder-item .handle-now-btn {
    padding: 8px 14px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-height: 36px;
}

/* 按钮点击区域扩大 */
.back-btn, .icon-btn, .reminder-action, .week-date,
.tab-item, .fab-btn, .quick-record-btn {
    min-width: 44px;
    min-height: 44px;
}

/* 宠物头像切换优化 */
.pet-header {
    overflow-x: auto;
    padding-bottom: 8px;
}

.pet-avatar {
    flex-shrink: 0;
}

/* 欢迎页装饰元素 */
.welcome-page::before {
    content: '';
    position: absolute;
    top: 100px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255,138,80,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-page::after {
    content: '';
    position: absolute;
    top: 220px;
    left: -60px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(107,203,119,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-page {
    position: relative;
    overflow: hidden;
}

.welcome-features {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 20px 0 32px;
}

.welcome-feature-item {
    text-align: center;
}

.welcome-feature-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.welcome-feature-text {
    font-size: 11px;
    color: var(--muted);
}

.welcome-logo svg {
    width: 56px;
    height: 56px;
}

/* 表单分组卡片 */
.form-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.form-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-section.optional .form-section-title {
    color: var(--muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* 健康评分卡片等级 */
.health-score-grade {
    font-size: 14px;
    font-weight: 700;
    fill: currentColor;
}

/* 修复图标按钮大小 */
.icon-btn {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 修复提醒操作按钮 */
.reminder-action {
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 第二轮优化新增样式 ========== */

/* 设置页面 */
.setting-group {
    background: var(--surface);
    border-radius: 16px;
    margin: 0 16px 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.setting-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--divider);
    gap: 12px;
    min-height: 52px;
}
.setting-item:last-child { border-bottom: none; }
.setting-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.setting-text { flex: 1; min-width: 0; }
.setting-title { font-size: 15px; font-weight: 500; }
.setting-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.setting-section-header {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    padding: 16px 16px 8px;
}
.setting-footer {
    text-align: center;
    padding: 24px 16px 40px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
}

/* 导入警告弹窗 */
.import-warning-box {
    background: var(--danger-light);
    border: 1px solid #FCA5A5;
    border-radius: 16px;
    padding: 18px;
    margin: 16px;
}
.import-warning-title {
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}
.import-warning-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 周选择器 */
.week-selector {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--surface);
    gap: 4px;
    position: sticky;
    top: 40px;
    z-index: 10;
}
.week-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.15s;
    flex-shrink: 0;
    line-height: 1;
    font-weight: bold;
}

.week-nav-btn:active {
    transform: scale(0.92);
    background: var(--primary-light);
    color: var(--primary);
}

.week-label-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.week-label-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.week-today-btn {
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-light);
    border: none;
    border-radius: 10px;
    padding: 2px 8px;
    cursor: pointer;
    font-weight: 500;
}
.week-date.today:not(.selected) {
    border: 1.5px solid var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.week-date-range {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    padding: 4px 0 8px;
    background: var(--surface);
}

/* 信息提示框 */
.warning-box {
    background: var(--accent-light);
    border: 1px solid rgba(77,150,255,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
}
.warning-box .icon {
    flex-shrink: 0;
    font-size: 18px;
    line-height: 1.4;
}

/* 月份选择器 */
.mp-year-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    margin-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.mp-year-scroll::-webkit-scrollbar { display: none; }
.mp-year-btn, .mp-month-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 14px;
    cursor: pointer;
    background: var(--divider);
    color: var(--ink);
    transition: all 0.15s;
    font-weight: 500;
}
.mp-year-btn {
    padding: 8px 14px;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 56px;
    text-align: center;
}
.mp-year-btn.active, .mp-month-btn.active {
    background: var(--primary);
    color: white;
}
.mp-year-btn:active, .mp-month-btn:active {
    transform: scale(0.95);
}

/* 版本更新日志 */
.vh-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.vh-item:last-child {
    border-bottom: none;
}
.vh-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.vh-version {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--divider);
}
.vh-version-latest {
    background: var(--primary);
    color: white;
}
.vh-date {
    font-size: 12px;
    color: var(--muted);
}
.vh-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.vh-changes {
    list-style: none;
    padding: 0;
    margin: 0;
}
.vh-changes li {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}
.vh-changes li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
}

/* textarea字数统计 */
.textarea-counter {
    text-align: right;
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* 输入框前缀 */
.input-with-prefix { position: relative; }
.input-prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}
.input-with-prefix .form-input { padding-left: 32px; }

/* 档案页头像 */
.profile-header {
    text-align: center;
    padding: 20px 16px;
    background: var(--surface);
}
.pet-avatar-large {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 12px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}
.pet-avatar-large:active { transform: scale(0.95); }
.pet-avatar-large .avatar-edit-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}
.profile-name { font-size: 22px; font-weight: 700; }
.profile-meta { font-size: 14px; color: var(--muted); margin-top: 4px; }
.health-score-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(107,203,119,0.1);
    border-radius: 20px;
    font-size: 14px;
    color: var(--primary-dark);
    cursor: pointer;
    transition: all 0.15s;
}
.health-score-mini:active { transform: scale(0.97); }
.health-score-mini .score-num { font-size: 20px; font-weight: 700; }

/* 逾期汇总横幅 */
.overdue-summary-banner {
    background: linear-gradient(90deg, var(--danger-light) 0%, white 40%);
    border-left: 4px solid var(--danger);
    padding: 12px 16px;
    margin: 12px 16px;
    border-radius: 0 14px 14px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}
.overdue-summary-banner .osb-icon { font-size: 24px; }
.overdue-summary-banner .osb-text { flex: 1; font-size: 14px; font-weight: 500; color: var(--danger); }
.overdue-summary-banner .osb-btn {
    color: white;
    background: var(--danger);
    border: none;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* 排便颜色圆点已在上方定义 */

/* 热力图星期标签已在上方定义 */

/* ========== 自定义日期选择器 ========== */

/* 日期触发器（模拟form-input外观） */
.dp-trigger {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 15px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s;
}
.dp-trigger:active {
    border-color: var(--primary);
}
.dp-trigger.has-value {
    color: var(--ink);
}
.dp-trigger.placeholder {
    color: var(--muted);
}
.dp-trigger-icon {
    color: var(--muted);
    font-size: 16px;
    flex-shrink: 0;
}
.dp-trigger-value {
    flex: 1;
}

/* 隐藏原生input（保留在DOM中用于表单提交） */
.dp-native-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* 日期选择器弹窗（底部sheet） */
.dp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.dp-sheet {
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    padding: 10px 16px 32px;
    animation: slideUp 0.3s ease-out;
}
.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dp-header-title {
    font-size: 16px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}
.dp-header-btn {
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 8px;
    min-height: 36px;
}
.dp-header-btn.cancel {
    color: var(--muted);
}
.dp-header-btn.confirm {
    color: var(--primary);
    font-weight: 600;
}
.dp-header-btn:active {
    background: var(--divider);
}

/* ---- 模式A: 滚轮选择器 ---- */
.dp-wheel-container {
    display: flex;
    gap: 4px;
    position: relative;
    padding: 8px 0;
}
.dp-wheel-col {
    flex: 1;
    height: 180px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    position: relative;
    text-align: center;
    -webkit-overflow-scrolling: touch;
}
.dp-wheel-col::-webkit-scrollbar { display: none; }
.dp-wheel-col::before,
.dp-wheel-col::after {
    content: '';
    position: sticky;
    left: 0;
    right: 0;
    height: 72px;
    display: block;
    z-index: 2;
    pointer-events: none;
}
.dp-wheel-col::before { top: 0; background: linear-gradient(to bottom, var(--surface), rgba(255,255,255,0)); }
.dp-wheel-col::after { bottom: 0; background: linear-gradient(to top, var(--surface), rgba(255,255,255,0)); }
:root[data-widget-theme="dark"] .dp-wheel-col::before { background: linear-gradient(to bottom, var(--surface), rgba(31,31,31,0)); }
:root[data-widget-theme="dark"] .dp-wheel-col::after { background: linear-gradient(to top, var(--surface), rgba(31,31,31,0)); }
.dp-wheel-item {
    height: 36px;
    line-height: 36px;
    scroll-snap-align: center;
    font-size: 16px;
    color: var(--muted);
    transition: all 0.15s;
}
.dp-wheel-item.selected {
    color: var(--primary);
    font-weight: 600;
    font-size: 18px;
}
.dp-wheel-highlight {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    pointer-events: none;
    z-index: 1;
}
.dp-wheel-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--muted);
    pointer-events: none;
}

/* ---- 模式D: 抽屉日历 ---- */
.dp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
}
.dp-cal-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--divider);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dp-cal-nav:active { background: var(--primary-light); color: var(--primary); }
.dp-cal-title {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
}
.dp-cal-title:active { background: var(--divider); }
.dp-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.dp-cal-wd {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 4px 0;
}
.dp-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.dp-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--ink);
    min-height: 36px;
    transition: all 0.15s;
}
.dp-cal-day.other-month { color: var(--border); }
.dp-cal-day.today { color: var(--primary); font-weight: 600; }
.dp-cal-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
}
.dp-cal-day:active { transform: scale(0.9); }
.dp-cal-day.disabled {
    color: var(--border);
    pointer-events: none;
}

/* 年月选择面板（模式D的年月弹窗） */
.dp-ym-panel {
    padding: 8px 0;
}
.dp-ym-section {
    margin-bottom: 12px;
}
.dp-ym-label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
    padding: 0 4px;
}
.dp-ym-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.dp-ym-btn {
    padding: 8px 0;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    color: var(--ink);
    transition: all 0.15s;
}
.dp-ym-btn:active { transform: scale(0.95); }
.dp-ym-btn.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* 时间选择行（datetime模式下） */
.dp-time-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.dp-time-label {
    font-size: 13px;
    color: var(--muted);
}
.dp-time-input {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dp-time-col {
    width: 48px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
}

/* 日期快捷按钮行（在选择器内） */
.dp-quick-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.dp-quick-btn {
    flex: 1;
    padding: 7px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.dp-quick-btn:active { transform: scale(0.97); }
.dp-quick-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}
.heatmap-scale {
    display: flex;
    gap: 2px;
    align-items: center;
}
.heatmap-cell {
    transition: transform 0.1s;
}
.heatmap-cell:active { transform: scale(1.3); }

/* 分段控制器（健康图表） */
.chart-segmented {
    display: flex;
    gap: 6px;
    margin: 0 16px 10px;
}
.chart-segmented .segmented-btn {
    flex: 1;
    padding: 8px 4px;
    font-size: 12px;
}

/* 提醒类型彩色图标 */
.reminder-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* 时间轴操作按钮class化 */
.timeline-action-btn {
    min-width: 40px;
    min-height: 36px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    transition: all 0.15s;
}
.timeline-action-btn:active { transform: scale(0.95); }
.timeline-action-btn.edit { background: var(--info-light); color: var(--info); }
.timeline-action-btn.delete { background: var(--danger-light); color: var(--danger); }

/* 就诊记录"查看全部" */
.view-all-btn {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: var(--surface);
    margin: 0 16px;
    border-radius: 0 0 16px 16px;
    border-top: 1px solid var(--divider);
}

/* 图表点提示 */
.chart-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    transform: translateX(-50%);
}

/* 统一图标大小 */
.list-icon { font-size: 20px; }

/* 快速记录类型彩色圆点 */
.quick-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

