@import url('https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css');

:root {
    /* 品牌色 - 更现代的医疗蓝 */
    --primary-hue: 215;
    --primary-color: hsl(var(--primary-hue), 90%, 52%); /* #0f7bf9 */
    --primary-dark: hsl(var(--primary-hue), 90%, 45%);
    --primary-light: hsl(var(--primary-hue), 100%, 94%);
    --primary-gradient: linear-gradient(135deg, #2b8cff 0%, #0063f2 100%);
    
    /* 功能色 */
    --success-color: #34c759;
    --warning-color: #ff9f0a;
    --danger-color: #ff3b30;
    
    /* 文本色 */
    --text-main: #1c1c1e;
    --text-secondary: #636366;
    --text-tertiary: #aeaeb2;
    --text-white: #ffffff;
    
    /* 背景色 */
    --bg-body: #f2f2f7;
    --bg-card: #ffffff;
    --bg-translucent: rgba(255, 255, 255, 0.8);
    
    /* 界面度量 */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-glow: 0 8px 20px rgba(15, 123, 249, 0.25);
    
    --header-height: 0px;
    --tab-height: 60px; /* 加高一点，更像原生App */
    --safe-area-bottom: env(safe-area-inset-bottom, 20px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.5;
    padding-bottom: calc(var(--tab-height) + var(--safe-area-bottom));
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* --- 布局容器 --- */
.page-container {
    max-width: 480px; /* 限制最大宽度，桌面端看也不至于太宽 */
    margin: 0 auto;
    background: var(--bg-body);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
}

.content {
    padding: 16px;
}

/* --- 大标题 (替代 Header) --- */
.page-title-area {
    padding: 16px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* --- 卡片 --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.02);
}

/* --- 按钮 --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px; /* 胶囊圆角 */
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    outline: none;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
    height: 48px;
    width: 100%;
    font-size: 16px;
}
.btn-ghost {
    background: rgba(118, 118, 128, 0.12);
    color: var(--primary-color);
    height: 32px;
    padding: 0 16px;
    font-size: 13px;
}

/* --- 列表 --- */
.list-group {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.list-cell {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    position: relative;
    transition: background 0.2s;
}
.list-cell:active { background: #f2f2f7; }
.list-cell::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px; /* 缩进分割线 */
    right: 0;
    height: 1px;
    background: #e5e5ea;
    transform: scaleY(0.5);
}
.list-cell:last-child::after { display: none; }

.cell-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.cell-body { flex: 1; min-width: 0; }
.cell-title { font-weight: 500; font-size: 16px; margin-bottom: 2px; }
.cell-subtitle { color: var(--text-secondary); font-size: 13px; }
.cell-value { font-weight: 500; color: var(--text-main); font-size: 15px; }
.cell-arrow { color: #c7c7cc; font-size: 20px; margin-left: 8px; }

/* --- 底部导航 --- */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-translucent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid rgba(0,0,0,0.1);
    height: calc(var(--tab-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    display: flex;
    z-index: 1000;
    max-width: 480px;
    margin: 0 auto; /* 配合 page-container 居中 */
}
.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 10px;
    gap: 2px;
    transition: color 0.2s;
}
.tab-item i { font-size: 24px; }
.tab-item.active { color: var(--primary-color); }
.tab-item.active i { font-weight: normal; } /* RemixIcon 不需要加粗 */

/* --- 统计卡片 (Dashboard) --- */
.stat-hero {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    margin-bottom: 20px;
}
.stat-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    filter: blur(40px);
}
.stat-label { font-size: 13px; opacity: 0.9; margin-bottom: 8px; font-weight: 500; }
.stat-value { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
.stat-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-top: 8px;
    backdrop-filter: blur(4px);
}

/* 时间切换控件 */
.time-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2px;
    display: flex;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.switch-item {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.switch-item.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* --- 工具类 --- */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.bg-blue { background: #007aff; }
.bg-green { background: #34c759; }
.bg-orange { background: #ff9f0a; }
.bg-purple { background: #5856d6; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mb-2 { margin-bottom: 8px; }
.mt-4 { margin-top: 16px; }

/* 筛选条 */
.filter-scroll {
    display: flex;
    overflow-x: auto;
    padding: 12px 16px;
    gap: 10px;
    background: var(--bg-body);
    position: sticky;
    top: 0;
    z-index: 90;
    scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.chip {
    padding: 6px 16px;
    border-radius: 18px;
    background: white;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(15, 123, 249, 0.3);
}