/* 健康驿系统 样式 - 移动优先 */
:root {
    --primary: #1aad7e;
    --primary-d: #138a64;
    --primary-l: #e8f7f1;
    --danger: #e74c3c;
    --warn: #f39c12;
    --info: #3498db;
    --text: #2c3e50;
    --text-l: #7f8c8d;
    --bg: #f4f6f8;
    --card: #ffffff;
    --border: #e3e8ee;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --radius: 10px;
    --topbar-h: 54px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 17px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 顶部导航 */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.topbar-inner {
    max-width: 100%; margin: 0 auto;
    height: var(--topbar-h);
    display: flex; align-items: center;
    padding: 0 14px; gap: 12px;
}
.topbar-inner.fluid { max-width: 100%; }
.brand { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 17px; font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-icon { background: rgba(255,255,255,.2); width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
.nav-toggle {
    margin-left: auto; background: none; border: 0; color: #fff;
    font-size: 22px; cursor: pointer; padding: 4px 8px;
    display: block;
}
.topnav { display: none; flex-direction: column; position: absolute; top: var(--topbar-h); left: 0; right: 0; background: var(--primary-d); box-shadow: var(--shadow); }
.topnav.open { display: flex; }
.topnav a {
    color: #fff; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.12);
    font-size: 17px;
}
.topnav a:last-child { border-bottom: 0; }
.topnav a:hover, .topnav a.active { background: rgba(0,0,0,.15); text-decoration: none; }

/* 主容器 */
.container {
    max-width: 100%; width: 100%;
    margin: 0 auto; padding: 16px;
    flex: 1 0 auto;
}
.container.fluid { max-width: 100%; }

/* 卡片 */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
}
.card-title { font-size: 18px; font-weight: 600; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 6px; }
.card-title .actions { margin-left: auto; }

/* 页面标题 */
.page-title { font-size: 22px; font-weight: 600; margin: 4px 0 16px; }
.section-title { font-size: 18px; font-weight: 600; margin: 18px 0 10px; padding-left: 10px; border-left: 3px solid var(--primary); }
.section-note { font-size: 13px; font-weight: 400; color: var(--text-l); margin-left: 8px; }

/* 表单 */
.form { max-width: 480px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; font-size: 17px; color: var(--text); font-weight: 500; }
.form-row .req { color: var(--danger); }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number], .form-row input[type=date], .form-row input[type=datetime-local], .form-row input[type=tel], .form-row input[type=file], .form-row select, .form-row textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; transition: border-color .15s, box-shadow .15s; font-size: 17px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l);
}
.form-row textarea { min-height: 80px; resize: vertical; }
.form-row .hint { font-size: 15px; color: var(--text-l); margin-top: 4px; }
.form-inline { display: flex; gap: 10px 12px; flex-wrap: wrap; align-items: flex-end; }
/* 行内表单：内部表单项不再保留下边距，保证与按钮底部对齐 */
.form-inline > .form-row { margin-bottom: 0; }
.form-inline > .btn, .form-inline > button { margin-bottom: 0; }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--text); cursor: pointer; font-size: 16px; font-weight: 500;
    transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f7f9fb; text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-success { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-success:hover { background: var(--primary-d); }
.btn-warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn-info { background: var(--info); border-color: var(--info); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-sm { padding: 6px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data-table th, table.data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 17px; vertical-align: middle; }
table.data-table th { background: #f7f9fb; font-weight: 600; color: var(--text); white-space: nowrap; }
table.data-table tr:hover td { background: #fafcfe; }
table.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 标签/徽章 */
.badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.badge-success { background: var(--primary-l); color: var(--primary-d); }
.badge-warn { background: #fef5e7; color: #b7791f; }
.badge-danger { background: #fdecea; color: #c0392b; }
.badge-info { background: #e8f4fd; color: #1c6ea4; }
.badge-gray { background: #eef1f4; color: var(--text-l); }

/* 工具类 */
.text-muted { color: var(--text-l); }

/* 提示框 */
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 17px; }
.alert-success { background: var(--primary-l); color: var(--primary-d); border: 1px solid #b7e4d3; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c0; }
.alert-warn { background: #fef5e7; color: #b7791f; border: 1px solid #fde2b3; }
.alert-info { background: #e8f4fd; color: #1c6ea4; border: 1px solid #b8dcef; }

/* 滑动验证 */
.slider-box { margin: 10px 0; }
.slider-track {
    position: relative; height: 42px; background: #eef1f4; border-radius: 8px;
    overflow: hidden; user-select: none; touch-action: none;
}
.slider-track .slider-tip {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-l); font-size: 16px; pointer-events: none;
}
.slider-track .slider-progress {
    position: absolute; top: 0; left: 0; bottom: 0; width: 0;
    background: linear-gradient(90deg, var(--primary-l), #cdeee0);
}
.slider-handle {
    position: absolute; top: 2px; left: 2px; width: 38px; height: 38px;
    background: #fff; border: 1px solid var(--primary); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,.12); color: var(--primary); font-size: 18px;
    z-index: 2;
}
.slider-handle.dragging { cursor: grabbing; }
.slider-track.ok .slider-progress { background: var(--primary-l); }
.slider-track.ok .slider-handle { background: var(--primary); color: #fff; border-color: var(--primary); }
.slider-track.ok .slider-tip { color: var(--primary-d); }
/* 失败/异常提示：红色文案，便于用户看到失败原因 */
.slider-error .slider-tip { color: var(--danger); font-weight: 600; }
.slider-error .slider-track { border: 1px solid var(--danger); }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card {
    background: var(--card); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); border-left: 3px solid var(--primary);
}
.stat-card .stat-label { font-size: 17px; color: var(--text-l); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; color: var(--primary-d); }
.stat-card .stat-sub { font-size: 15px; color: var(--text-l); margin-top: 2px; }

/* 管理首页统计：6 张卡片单行排列 */
.stat-grid.stat-grid-6 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.stat-grid-6 .stat-card { padding: 14px 12px; }
.stat-grid.stat-grid-6 .stat-card .stat-label { font-size: 15px; }
.stat-grid.stat-grid-6 .stat-card .stat-value { font-size: 24px; }
.stat-grid.stat-grid-6 .stat-card .stat-sub { font-size: 13px; }
@media (min-width: 992px) {
    .stat-grid.stat-grid-6 { grid-template-columns: repeat(6, 1fr); }
}

/* 空状态 */
.empty { text-align: center; padding: 32px 16px; color: var(--text-l); font-size: 17px; }
.empty .empty-icon { font-size: 40px; opacity: .5; margin-bottom: 8px; }

/* 网格列表 */
.grid-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.list-item { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.list-item .item-title { font-weight: 600; font-size: 19px; margin-bottom: 6px; }
.list-item .item-meta { font-size: 17px; color: var(--text-l); display: flex; flex-wrap: wrap; gap: 10px; }
.list-item .item-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }

/* 单行列表（老人友好） */
.list-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); font-size: 20px; text-align: left; }
.list-row strong { font-size: 22px; }
.list-row .text-muted { color: var(--text-l); font-size: 18px; }
.list-row .item-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* 页脚 */
.footer { text-align: center; padding: 16px; color: var(--text-l); font-size: 15px; }

/* 分页 */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.pagination a:hover { background: var(--primary-l); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--text-l); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; font-size: 17px; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* 图表容器 */
.chart-wrap { position: relative; height: 300px; background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; font-size: 15px; }
.chart-legend .lg-item { display: flex; align-items: center; gap: 6px; }
.chart-legend .lg-color { width: 14px; height: 14px; border-radius: 3px; }

/* 首页 hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff; border-radius: var(--radius); padding: 28px 20px; margin-bottom: 18px;
    box-shadow: var(--shadow); text-align: center;
}
.hero h1 { font-size: 24px; margin-bottom: 8px; }
.hero p { opacity: .92; font-size: 14px; }
.hero .hero-actions { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero .btn { background: #fff; color: var(--primary-d); border-color: #fff; }

/* 功能卡片网格 */
.feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 16px 0; }
.feature-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.feature-card .feat-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-l); color: var(--primary-d); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.feature-card .feat-body h3 { font-size: 15px; margin-bottom: 4px; }
.feature-card .feat-body p { font-size: 13px; color: var(--text-l); }

/* 详情行 */
.detail-list dt { font-size: 17px; color: var(--text-l); margin-top: 12px; }
.detail-list dd { font-size: 19px; margin: 2px 0 0; padding-bottom: 10px; border-bottom: 1px dashed var(--border); word-break: break-all; }
.detail-list dl { margin: 0; }

/* 详情行：一行两个 */
.detail-list.detail-list-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin: 0; }
.detail-list.detail-list-2 .detail-item { min-width: 0; }
.detail-list.detail-list-2 .detail-item dt { margin-top: 14px; }
@media (max-width: 767px) {
    .detail-list.detail-list-2 { grid-template-columns: 1fr; }
}

/* 药品最低价高亮 */
.min-price { color: var(--danger); font-weight: 700; }
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.price-row.is-min { background: var(--primary-l); border-radius: 6px; padding: 6px 8px; }

/* 上传预览 */
.upload-preview { margin-top: 8px; }
.upload-preview img { max-height: 120px; border-radius: 8px; border: 1px solid var(--border); }

/* 安装页 */
.install-card { max-width: 960px; margin: 24px auto; }
/* 安装界面按钮一律满容器宽 */
.install-card .btn { width: 100%; }
.check-list { list-style: none; margin: 12px 0; }
.check-list li { padding: 6px 8px; font-size: 14px; border-radius: 6px; }
.check-list li.ok::before { content: "\2714\fe0e"; color: var(--primary); margin-right: 8px; font-weight: 700; }
.check-list li.fail::before { content: "\2716\fe0e"; color: var(--danger); margin-right: 8px; font-weight: 700; }
.check-list li.fail { background: #fdecea; }

/* 桌面端适配 */
@media (min-width: 768px) {
    .container { padding: 24px; }
    .nav-toggle { display: none; }
    .topnav { display: flex !important; position: static; flex-direction: row; margin-left: auto; background: transparent; box-shadow: none; }
    .topnav a { border-bottom: 0; padding: 0 14px; line-height: var(--topbar-h); }
    .topnav a:hover, .topnav a.active { background: rgba(0,0,0,.12); }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 30px; }
    .chart-wrap { height: 550px; }
}

@media (min-width: 1024px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ================================== */
/* 用户端页面字号统一（再放大一倍）      */
/* ================================== */
body.user-page { font-size: 34px; line-height: 1.7; }
body.user-page .page-title { font-size: 44px; }
body.user-page .section-title { font-size: 36px; padding-left: 16px; border-left-width: 5px; }
body.user-page .card-title { font-size: 36px; }
body.user-page .card { padding: 28px; border-radius: 14px; }

/* 列表行（核心内容）翻倍 */
body.user-page .list-row { font-size: 36px; padding: 26px 28px; gap: 20px; }
body.user-page .list-row strong { font-size: 40px; }
body.user-page .list-row .text-muted { font-size: 32px; }

/* 表单统一加大一倍 */
body.user-page .form-row { margin-bottom: 22px; }
body.user-page .form-inline > .form-row { margin-bottom: 0; }
body.user-page .form-row label { font-size: 34px; margin-bottom: 10px; }
body.user-page .form-row input[type=text],
body.user-page .form-row input[type=password],
body.user-page .form-row input[type=number],
body.user-page .form-row input[type=date],
body.user-page .form-row input[type=datetime-local],
body.user-page .form-row input[type=tel],
body.user-page .form-row input[type=file],
body.user-page .form-row select,
body.user-page .form-row textarea { font-size: 34px; padding: 22px 24px; border-radius: 12px; border-width: 2px; }
body.user-page .form-row .hint { font-size: 30px; }

/* 按钮统一加大一倍 */
body.user-page .btn { font-size: 32px; padding: 18px 32px; border-radius: 12px; border-width: 2px; }
body.user-page .btn-sm { font-size: 30px; padding: 14px 26px; }

/* 标签/徽章 */
body.user-page .badge { font-size: 30px; padding: 8px 22px; border-radius: 16px; }

/* 提示框 */
body.user-page .alert { font-size: 32px; padding: 22px 26px; border-radius: 12px; }

/* 详情列表（用户资料等） */
body.user-page .detail-list dt { font-size: 32px; margin-top: 20px; }
body.user-page .detail-list dd { font-size: 38px; padding-bottom: 18px; }

/* 功能卡片（管理中心） */
body.user-page .feature-card { padding: 26px; gap: 22px; }
body.user-page .feature-card .feat-body h3 { font-size: 34px; margin-bottom: 10px; }
body.user-page .feature-card .feat-body p { font-size: 30px; }
body.user-page .feature-card .feat-icon { width: 90px; height: 90px; font-size: 46px; border-radius: 16px; }

/* 统计卡片 */
body.user-page .stat-card { padding: 24px; }
body.user-page .stat-card .stat-label { font-size: 32px; }
body.user-page .stat-card .stat-value { font-size: 54px; }
body.user-page .stat-card .stat-sub { font-size: 30px; margin-top: 6px; }

/* 图表图例 */
body.user-page .chart-legend { font-size: 30px; gap: 22px; margin: 16px 0; }
body.user-page .chart-legend .lg-color { width: 24px; height: 24px; border-radius: 5px; }

/* 标签页 */
body.user-page .tabs { margin-bottom: 24px; }
body.user-page .tabs a { font-size: 32px; padding: 16px 26px; }

/* 空状态 */
body.user-page .empty { font-size: 32px; padding: 48px 20px; }
body.user-page .empty .empty-icon { font-size: 72px; margin-bottom: 14px; }

/* 滑动验证 */
body.user-page .slider-track { height: 72px; border-radius: 12px; }
body.user-page .slider-handle { width: 66px; height: 66px; top: 3px; left: 3px; font-size: 32px; border-radius: 12px; }
body.user-page .slider-track .slider-tip { font-size: 32px; }

/* 导航菜单 */
body.user-page .topnav a { font-size: 32px; padding: 18px 22px; }
body.user-page .brand { font-size: 32px; }
body.user-page .brand-icon { width: 44px; height: 44px; font-size: 26px; }
body.user-page .topbar-inner { height: auto; padding: 12px 16px; }
body.user-page .nav-toggle { font-size: 40px; }

/* 分页 */
body.user-page .pagination a,
body.user-page .pagination span { font-size: 28px; padding: 12px 22px; border-radius: 10px; }

/* 容器边距加大 */
body.user-page .container { padding: 24px; }
body.user-page .grid-list { gap: 20px; }
body.user-page .stat-grid { gap: 20px; }
