/* ====================================================
   药知道 - 主样式表
   专业健康蓝色风格，小程序风格适配
   ==================================================== */

:root {
    --primary: #2B6CB0;
    --primary-light: #4299E1;
    --primary-dark: #1A4D80;
    --primary-bg: #EBF4FF;
    --bg: #F0F4F8;
    --bg-card: #FFFFFF;
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #A0AEC0;
    --border: #E2E8F0;
    --border-light: #EDF2F7;
    --success: #38A169;
    --success-bg: #F0FFF4;
    --warning: #D69E2E;
    --warning-bg: #FFFFF0;
    --danger: #E53E3E;
    --danger-bg: #FFF5F5;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
}

/* 避免横向滚动条，但不作用于 html 和 body（会破坏 position:fixed） */
.main-content,
.content-container,
.page-container {
    overflow-x: hidden;
}

/* 全局图片安全样式：确保图片不会撑满屏幕，始终受到容器限制 */
img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: cover;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-light);
}

/* ====================================================
   页面头部（小程序风格）
   ==================================================== */
.page-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
}

.page-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
}

/* ====================================================
   底部TabBar（小程序风格）
   ==================================================== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    padding: 8px 0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    transition: color 0.2s;
    text-decoration: none;
}

.tabbar-item:hover {
    color: var(--primary-light);
}

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

.tabbar-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.tabbar-item span {
    font-size: 12px;
    font-weight: 500;
}

/* 主内容区域需要底部padding，避免被TabBar遮挡 */
.main-content {
    padding-bottom: 70px;
}

/* ====================================================
   导航栏（保留，用于登录页等）
   ==================================================== */
.navbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-icon {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 2px;
    align-items: center;
}

.nav-item {
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: var(--primary-bg);
    color: var(--primary);
}

.nav-item.active {
    background-color: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ====================================================
   主内容区
   ==================================================== */
.main-content {
    flex: 1;
    padding: 16px 16px 90px 16px;  /* 底部加大 padding，避免被 tabbar 遮挡 */
    max-width: 750px;
    margin: 0 auto;
    width: 100%;
}

.content-container {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    min-height: 400px;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ====================================================
   按钮组件
   ==================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    background-color: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary);
}

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

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #FFFFFF;
}

.btn-danger {
    background-color: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
}

.btn-danger:hover {
    background-color: #FC8181;
    color: #FFFFFF;
}

.btn-success {
    background-color: var(--success);
    color: #FFFFFF;
    border-color: var(--success);
}

.btn-success:hover {
    background-color: #48BB78;
    color: #FFFFFF;
}

.btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ====================================================
   表单组件
   ==================================================== */
.form-group {
    margin-bottom: 16px;
}

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

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    background-color: var(--bg-card);
    font-family: inherit;
    color: var(--text-primary);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.12);
}

.form-select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 10px center;
    background-size: 16px;
}

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

input[type="date"].form-input,
input[type="date"] {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* 左右布局表单：label 在左，input 在右 */
.form-row-inline {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.form-row-inline:last-child {
    border-bottom: none;
}

.form-row-inline .form-label {
    flex: 0 0 110px;
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.form-row-inline .form-input,
.form-row-inline select.form-input,
.form-row-inline input[type="text"].form-input,
.form-row-inline input[type="date"].form-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    transition: all 0.2s;
}

.form-row-inline .form-input:focus,
.form-row-inline select.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-row-inline .form-input::placeholder {
    color: #bbb;
}

/* 带必填星的 label */
.form-row-inline .form-label .required-star {
    color: var(--danger);
    margin-right: 2px;
}

/* 图片上传区域 */
.form-row-image {
    display: flex;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.form-row-image .form-label {
    flex: 0 0 110px;
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.form-row-image .image-upload-area {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* 多行文本字段（左右布局，与单行保持一致） */
.form-area-block {
    display: flex;
    align-items: flex-start;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.form-area-block:last-child {
    border-bottom: none;
}

.form-area-block .form-label {
    flex: 0 0 110px;
    margin-bottom: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    padding-top: 8px;
}

.form-area-block textarea.form-input {
    flex: 1;
    min-height: 80px;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-area-block textarea.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* 带必填星的 label（多行文本） */
.form-area-block .form-label .required-star {
    color: var(--danger);
    margin-right: 2px;
}

/* 移动端响应式 */
@media (max-width: 600px) {
    .form-row-inline,
    .form-row-image,
    .form-area-block {
        flex-direction: row;
        gap: 8px;
        padding: 8px 4px;
    }

    .form-row-inline .form-label,
    .form-row-image .form-label,
    .form-area-block .form-label {
        flex: 0 0 80px;
        font-size: 13px;
        padding-top: 6px;
    }

    .form-row-inline .form-input,
    .form-row-inline select.form-input,
    .form-area-block textarea.form-input {
        font-size: 13px;
        padding: 7px 10px;
    }
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ====================================================
   卡片组件
   ==================================================== */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.card-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ====================================================
   网格布局
   ==================================================== */
.grid {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* ====================================================
   统计卡片
   ==================================================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-card.blue {
    background: var(--primary-bg);
}

.stat-card.blue::before {
    background: var(--primary);
}

.stat-card.orange {
    background: var(--warning-bg);
}

.stat-card.orange::before {
    background: var(--warning);
}

.stat-card.green {
    background: var(--success-bg);
}

.stat-card.green::before {
    background: var(--success);
}

.stat-card.purple {
    background: #FAF5FF;
}

.stat-card.purple::before {
    background: #805AD5;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.stat-card.blue .stat-value { color: var(--primary); }
.stat-card.orange .stat-value { color: var(--warning); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.purple .stat-value { color: #805AD5; }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    display: none;
}

/* ====================================================
   列表组件
   ==================================================== */
.list {
    list-style: none;
}

.list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.list-item-title {
    font-weight: 600;
    color: var(--text-primary);
}

.list-item-desc {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.list-item-time {
    color: var(--text-muted);
    font-size: 12px;
}

/* ====================================================
   标签/状态
   ==================================================== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    background-color: var(--bg);
    color: var(--text-secondary);
    font-weight: 500;
}

.tag-success {
    background-color: var(--success-bg);
    color: var(--success);
}

.tag-warning {
    background-color: var(--warning-bg);
    color: var(--warning);
}

.tag-danger {
    background-color: var(--danger-bg);
    color: var(--danger);
}

.tag-info {
    background-color: var(--primary-bg);
    color: var(--primary);
}

.tag-medicine {
    background-color: #FFFAF0;
    color: #C05621;
}

/* ====================================================
   表格
   ==================================================== */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.table th,
.table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.table th {
    background-color: var(--bg);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.table tr:hover td {
    background-color: var(--bg);
}

/* ====================================================
   模态框
   ==================================================== */
.modal-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-mask.show {
    display: flex;
}

.modal {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ====================================================
   提示/消息
   ==================================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.6;
}

.alert-info {
    background-color: var(--primary-bg);
    border: 1px solid #BEE3F8;
    color: var(--primary-dark);
}

.alert-success {
    background-color: var(--success-bg);
    border: 1px solid #C6F6D5;
    color: #276749;
}

.alert-warning {
    background-color: var(--warning-bg);
    border: 1px solid #FEFCBF;
    color: #975A16;
}

.alert-danger {
    background-color: var(--danger-bg);
    border: 1px solid #FED7D7;
    color: #9B2C2C;
}

.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(26, 32, 44, 0.9);
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-size: 13px;
    font-weight: 500;
    animation: toastIn 0.3s ease-out;
    backdrop-filter: blur(8px);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ====================================================
   页脚
   ==================================================== */
.footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 24px 20px;
    margin-top: 24px;
}

.footer-container {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
}

.footer-section p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ====================================================
   工具类
   ==================================================== */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    align-items: center;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}

.pagination .current {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap-10 { gap: 10px; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    display: none;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.empty-state p {
    font-size: 13px;
}

/* ====================================================
   响应式：移动端优化
   ==================================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 12px;
        height: auto;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .nav-menu {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .nav-user {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid var(--border-light);
        padding-top: 8px;
    }

    .main-content {
        padding: 12px;
    }

    .content-container {
        padding: 16px;
        border-radius: var(--radius-sm);
    }

    .page-title {
        font-size: 17px;
    }

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

    .stat-value {
        font-size: 24px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .btn {
        padding: 8px 14px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ====================================================
   扫码识别入口卡片
   ==================================================== */
.scan-entry-card {
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    color: #FFFFFF;
    box-shadow: var(--shadow-lg);
}

.scan-entry-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.scan-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    opacity: 0.9;
}

.scan-entry-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #FFFFFF;
}

.scan-entry-text p {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
}

.scan-entry-actions {
    display: flex;
    gap: 12px;
}

.scan-btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #FFFFFF;
    color: var(--primary);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.scan-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--primary);
}

.scan-btn-primary svg {
    width: 20px;
    height: 20px;
}

.scan-btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.15);
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.scan-btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    color: #FFFFFF;
}

.scan-btn-secondary svg {
    width: 20px;
    height: 20px;
}

/* ====================================================
   扫描页面样式
   ==================================================== */
.scan-container {
    margin-top: 16px;
}

.scan-upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.scan-upload-area:hover {
    border-color: var(--primary-light);
}

.scan-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scan-camera-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-light);
    opacity: 0.7;
}

.scan-hint {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.scan-sub-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.scan-btn-group {
    margin-top: 16px;
}

.scan-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.scan-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.scan-actions {
    margin-top: 20px;
    text-align: center;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.scan-result {
    margin-top: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.scan-result-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.scan-result-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.scan-result-tip {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.medicine-form .form-group {
    margin-bottom: 16px;
}

.medicine-form .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

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

.medicine-form .required {
    color: var(--danger);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid var(--border-light);
}

.form-footer {
    padding-bottom: 30px;
}

.scan-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.scan-loading p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.scan-tips {
    margin-top: 24px;
    padding: 16px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.scan-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 8px 0;
}

.scan-tips ul {
    margin: 0;
    padding-left: 20px;
}

.scan-tips li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 药品列表样式 */
.medicine-toolbar {
    margin-bottom: 16px;
}

.medicine-search {
    display: flex;
    gap: 8px;
}

.medicine-search .form-input {
    flex: 1;
}

.medicine-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.medicine-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.medicine-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.medicine-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.medicine-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.medicine-spec {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.medicine-info {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.medicine-info-item {
    margin-bottom: 4px;
}

.medicine-expiring {
    color: var(--warning);
    font-weight: 500;
}

.medicine-expiring.urgent {
    color: var(--danger);
}

.medicine-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

@media (max-width: 480px) {
    .scan-entry-actions {
        flex-direction: column;
    }
    
    .medicine-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .medicine-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-item {
        font-size: 12px;
        padding: 4px 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .content-container {
        padding: 12px;
    }
}

/* ====================================================
   打印样式
   ==================================================== */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none;
    }

    .content-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ====================================================
   首页 - 顶部Hero Banner（全屏宽度 + 渐隐过渡）
   ==================================================== */
.home-hero-banner {
    position: relative;
    width: calc(100% + 32px);
    margin: -16px -16px 0 -16px;
    background: linear-gradient(180deg, #1A4D80 0%, #2B6CB0 40%, #4299E1 75%, #EBF2FA 100%);
    color: #FFFFFF;
    overflow: visible;
    padding-bottom: 0;
}

/* Banner内容区域 - 居中限制宽度 */
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 16px 24px 16px;
}

/* 底部渐隐过渡层：让蓝色自然过渡到页面背景色，不留痕迹 */
.hero-bottom-gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 36px;
    background: linear-gradient(
        180deg,
        rgba(235, 242, 250, 0) 0%,
        rgba(240, 244, 248, 0.6) 50%,
        rgba(240, 244, 248, 1) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Banner上半部分的高光装饰 */
.home-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, transparent 55%);
    pointer-events: none;
    z-index: 1;
}

.hero-bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 1;
}

.hero-bg-circle-1 {
    width: 260px;
    height: 260px;
    top: -90px;
    right: -70px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18) 0%, transparent 70%);
}

.hero-bg-circle-2 {
    width: 160px;
    height: 160px;
    bottom: 30px;
    left: -40px;
    background: radial-gradient(circle at 60% 60%, rgba(255,255,255,0.14) 0%, transparent 70%);
}

.hero-bg-circle-3 {
    width: 70px;
    height: 70px;
    top: 40px;
    right: 140px;
    background: rgba(255,255,255,0.10);
}

.hero-main {
    position: relative;
    padding-bottom: 18px;
}

.hero-greeting {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.hero-greeting-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-greeting-text {
    font-weight: 500;
}

.hero-user {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-title-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0,0,0,0.18);
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Banner底部数据卡 */
.hero-data {
    position: relative;
    z-index: 3;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.hero-data-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 6px;
}

.hero-data-num {
    font-size: 24px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.hero-data-unit {
    font-size: 14px;
    font-weight: 600;
    margin-left: 1px;
    opacity: 0.92;
}

.hero-data-label {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.hero-data-divider {
    width: 1px;
    height: 38px;
    background: rgba(255, 255, 255, 0.26);
    align-self: center;
    flex-shrink: 0;
}

/* 数据项链接样式 */
.hero-data-link {
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hero-data-link:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hero-data-link:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.97);
}

/* ====================================================
   首页 - 主容器
   ==================================================== */
.home-container {
    padding: 12px;
    max-width: 720px;
    margin: 0 auto;
    box-sizing: border-box;
}

.home-footer-space {
    height: 20px;
}

/* ====================================================
   首页 - 服药提醒倒计时卡片
   ==================================================== */
.countdown-card {
    background: linear-gradient(135deg, #1A4D80 0%, #2B6CB0 50%, #4299E1 100%);
    border-radius: 18px;
    padding: 18px;
    margin-top: 0;
    margin-bottom: 12px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(43, 108, 176, 0.28), 0 3px 8px rgba(43, 108, 176, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.countdown-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(43, 108, 176, 0.32), 0 4px 12px rgba(43, 108, 176, 0.18);
}

.countdown-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.countdown-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.countdown-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.countdown-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.countdown-title {
    flex: 1;
    min-width: 0;
}

.countdown-title > span:first-child {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.countdown-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
}

.countdown-medicine {
    font-weight: 600;
    color: #FFFFFF;
}

.countdown-dosage {
    color: rgba(255, 255, 255, 0.85);
}

.countdown-time {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.countdown-dot {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.countdown-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 14px 8px 10px 8px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 14px;
    position: relative;
    z-index: 1;
}

.digit-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.digit-box {
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F4FA 100%);
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 52px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15), inset 0 1px 2px rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
}

.digit-num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2B6CB0;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    text-align: center;
    line-height: 1;
    letter-spacing: 1px;
    transition: transform 0.35s ease, opacity 0.35s ease;
    transform-origin: center;
}

.digit-num.digit-flip {
    transform: translateY(-8px) rotateX(-20deg);
    opacity: 0.3;
}

.digit-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    margin-top: 2px;
}

.digit-sep {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'SF Mono', monospace;
    padding-bottom: 18px;
    animation: digit-sep-blink 1s ease-in-out infinite;
}

@keyframes digit-sep-blink {
    0%, 40% { opacity: 0.7; }
    50%, 90% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* 空状态卡片（无提醒） */
.countdown-empty {
    background: linear-gradient(135deg, #FFFFFF 0%, #F7FAFD 100%);
    border: 1px solid rgba(66, 153, 225, 0.15);
    padding: 16px;
}

.countdown-empty::before,
.countdown-empty::after {
    display: none;
}

.countdown-empty .countdown-title > span:first-child {
    color: #2B6CB0;
    font-weight: 600;
    font-size: 15px;
}

.countdown-empty .countdown-medicine {
    color: #718096;
    font-weight: 400;
}

.countdown-empty .countdown-meta {
    color: #718096;
}

.countdown-action {
    display: flex;
    justify-content: center;
    margin-top: 12px;
    padding: 10px;
    position: relative;
    z-index: 1;
}

.countdown-add-btn {
    display: inline-block;
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    color: #FFFFFF;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(43, 108, 176, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.countdown-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(43, 108, 176, 0.3);
}

/* ====================================================
   首页 - 拍照识别卡片（清爽浅色卡片设计）
   ==================================================== */
.home-scan-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px;
    margin-top: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 6px 18px rgba(43, 108, 176, 0.08), 0 2px 6px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(66, 153, 225, 0.08);
}

/* 左侧药盒图片徽章 */
.scan-icon-badge {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(43, 108, 176, 0.15), 0 2px 6px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(66, 153, 225, 0.12);
}

.scan-icon-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* 右侧内容区域 */
.scan-content {
    flex: 1;
    min-width: 0;
}

.scan-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.scan-content p {
    font-size: 13px;
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 按钮组 */
.scan-actions {
    display: flex;
    gap: 8px;
}

.scan-btn-primary,
.scan-btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
    border: none;
    line-height: 1.3;
    font-family: inherit;
}

.scan-btn-primary {
    background: linear-gradient(135deg, #2B6CB0 0%, #4299E1 100%);
    color: #FFFFFF;
    box-shadow: 0 3px 8px rgba(43, 108, 176, 0.25);
}

.scan-btn-primary svg,
.scan-btn-secondary svg {
    flex-shrink: 0;
}

.scan-btn-primary span,
.scan-btn-secondary span {
    white-space: nowrap;
}

.scan-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(43, 108, 176, 0.32);
}

.scan-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(43, 108, 176, 0.2);
}

.scan-btn-secondary {
    background: #F0F7FF;
    color: var(--primary);
    border: 1px solid rgba(66, 153, 225, 0.2);
}

.scan-btn-secondary:hover {
    background: #E6F2FF;
    border-color: rgba(66, 153, 225, 0.35);
}

.scan-btn-secondary:active {
    background: #D6EAFF;
}

/* ====================================================
   首页 - 分区卡片（优化版）
   ==================================================== */
.section-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 0;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.section-title-wrap svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.section-more {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    flex-shrink: 0;
    padding: 4px 0;
}

.section-more:hover {
    color: var(--primary-light);
}

/* ====================================================
   首页 - 用药统计卡片
   ==================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
}

.stats-item {
    text-align: center;
    padding: 14px 6px;
    background: var(--bg-page);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.stats-item:hover {
    transform: translateY(-2px);
    background: var(--primary-light-bg);
}

.stats-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
    font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.stats-value-primary {
    color: var(--primary);
}

.stats-unit {
    font-size: 14px;
    font-weight: 600;
    margin-left: 2px;
    color: inherit;
}

.stats-label {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stats-value {
        font-size: 22px;
    }
}

.empty-state-sm {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.empty-state-sm p {
    margin: 0;
    line-height: 1.6;
}

/* ====================================================
   首页 - 简易药物列表（优化版）
   ==================================================== */
.medicine-simple-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.medicine-simple-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.medicine-simple-item:hover {
    background: var(--primary-bg);
    border-color: #BEE3F8;
}

.medicine-icon-box {
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.medicine-icon-box svg {
    width: 20px;
    height: 20px;
}

.medicine-simple-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.medicine-simple-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.medicine-simple-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    line-height: 1.4;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.4;
}

.meta-item .meta-icon {
    margin-right: 4px;
    flex-shrink: 0;
}

.medicine-time {
    color: var(--primary);
    font-weight: 500;
}

/* ====================================================
   首页 - AI助手区域（优化版）
   ==================================================== */
.ai-section {
    background: linear-gradient(135deg, #FAF5FF 0%, #EBF8FF 100%);
    border: 1px solid #E6DFFC;
}

.ai-section .section-title-wrap svg {
    color: #805AD5;
}

.ai-section .section-title {
    color: #553C9A;
}

.ai-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #805AD5;
    color: #FFFFFF;
    font-size: 11px;
    border-radius: 12px;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 8px;
}

/* 快捷问题 */
.ai-quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.quick-question-btn {
    padding: 7px 12px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    font-size: 12px;
    color: #553C9A;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1.4;
}

.quick-question-btn:hover {
    background: #805AD5;
    color: #FFFFFF;
    border-color: #805AD5;
}

/* 对话历史 */
.ai-history {
    margin-bottom: 14px;
}

.ai-history-title {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.4;
}

.ai-chat-item {
    background: #FFFFFF;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid #EDF2F7;
    transition: all 0.2s;
}

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

.ai-chat-item:hover {
    background: #FAF5FF;
    border-color: #D6BCFA;
}

.ai-chat-user {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 3px;
    line-height: 1.4;
}

.ai-chat-reply {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* AI输入框 */
.ai-input-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ai-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-size: 14px;
    background: #FFFFFF;
    outline: none;
    transition: all 0.2s;
    min-width: 0;
    color: var(--text-primary);
}

.ai-input::placeholder {
    color: var(--text-muted);
}

.ai-input:focus {
    border-color: #805AD5;
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.ai-send-btn {
    padding: 10px 18px;
    background: #805AD5;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}

.ai-send-btn:hover {
    background: #6B46C1;
}

/* ====================================================
   首页 - 服药提醒列表（优化版）
   ==================================================== */
.reminder-simple-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-simple-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: 10px;
    transition: all 0.2s;
}

.reminder-simple-item:hover {
    background: var(--primary-bg);
}

.reminder-time-box {
    width: 60px;
    flex-shrink: 0;
    text-align: center;
    padding: 6px 4px;
    background: var(--primary-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reminder-time {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.reminder-simple-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.reminder-simple-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reminder-simple-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    line-height: 1.4;
}

.reminder-simple-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.btn-done {
    padding: 7px 14px;
    background: var(--success);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-done:hover {
    background: #2F855A;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(56, 161, 105, 0.3);
}

/* ====================================================
   AI对话弹窗（优化版）
   ==================================================== */
.scan-modal,
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.scan-modal-content,
.ai-modal-content {
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    padding: 20px 20px 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.scan-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.scan-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.scan-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.scan-close-btn:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.scan-modal-body {
    min-height: 160px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

/* 扫描上传区域（弹窗内） */
.scan-upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    transition: border-color 0.2s;
}

.scan-upload-area:hover {
    border-color: var(--primary-light);
}

.scan-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scan-camera-icon {
    width: 56px;
    height: 56px;
    color: var(--primary-light);
    opacity: 0.8;
}

.scan-hint {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.scan-sub-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.scan-btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

.scan-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.scan-preview img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.scan-loading {
    text-align: center;
    padding: 36px 20px;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
}

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

.scan-loading p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.scan-result {
    margin-top: 16px;
}

.scan-result-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.scan-result-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.scan-result-tip {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.medicine-form .form-group {
    margin-bottom: 14px;
}

.medicine-form .form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

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

.medicine-form .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

/* ====================================================
   弹窗底部固定按钮区（在 scan-modal-content 内，与 scan-modal-body 同级）
   按钮不随表单滚动，始终固定在弹窗底部
   ==================================================== */
.scan-modal-footer {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 0 20px;
    margin-top: 8px;
    border-top: 1px solid var(--border-light);
    background: #ffffff;
}

.scan-modal-footer .btn {
    flex: 1;
    margin: 0;
}

.scan-modal-footer .btn-primary {
    flex: 1.5;
}

/* ====================================================
   AI对话弹窗内容（优化版）
   ==================================================== */
.ai-modal-body {
    padding: 12px 0;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ai-message {
    margin-bottom: 12px;
    display: flex;
}

.ai-message:last-child {
    margin-bottom: 0;
}

.ai-message.ai-message-system {
    justify-content: center;
}

.ai-message.ai-message-system .ai-bubble {
    background: #FAF5FF;
    color: #553C9A;
    font-size: 13px;
    border: 1px solid #E6DFFC;
    text-align: center;
}

.ai-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    max-width: 85%;
    word-wrap: break-word;
}

.ai-message-ai {
    justify-content: flex-start;
}

.ai-message-ai .ai-bubble {
    background: var(--bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.ai-message-user {
    justify-content: flex-end;
}

.ai-message-user .ai-bubble {
    background: #805AD5;
    color: #FFFFFF;
}

.ai-bubble-loading {
    background: var(--bg) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-muted) !important;
    padding: 12px 14px !important;
}

.loading-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    margin: 0 2px;
    animation: loadingBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ====================================================
   AI 消息内 Markdown 内容样式（可视化渲染）
   ==================================================== */
.ai-message-ai .ai-bubble h1,
.ai-message-ai .ai-bubble h2,
.ai-message-ai .ai-bubble h3 {
    margin: 12px 0 8px 0;
    font-weight: 700;
    line-height: 1.4;
    color: #553C9A;
}

.ai-message-ai .ai-bubble h1 {
    font-size: 17px;
    padding-bottom: 6px;
    border-bottom: 2px solid #E6DFFC;
}

.ai-message-ai .ai-bubble h2 {
    font-size: 15px;
}

.ai-message-ai .ai-bubble h3 {
    font-size: 14px;
}

.ai-message-ai .ai-bubble p {
    margin: 8px 0;
    line-height: 1.7;
}

.ai-message-ai .ai-bubble strong {
    font-weight: 700;
    color: #553C9A;
}

.ai-message-ai .ai-bubble em {
    font-style: italic;
    color: var(--text-primary);
}

.ai-message-ai .ai-bubble ul.ai-list,
.ai-message-ai .ai-bubble ol.ai-list {
    margin: 8px 0;
    padding-left: 20px;
    line-height: 1.7;
}

.ai-message-ai .ai-bubble ul.ai-list li {
    list-style-type: disc;
    margin-bottom: 4px;
}

.ai-message-ai .ai-bubble ol.ai-list li {
    list-style-type: decimal;
    margin-bottom: 4px;
}

.ai-message-ai .ai-bubble blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    border-left: 3px solid #805AD5;
    background: #FAF5FF;
    color: #553C9A;
    font-size: 13px;
    line-height: 1.6;
    border-radius: 0 6px 6px 0;
}

.ai-message-ai .ai-bubble hr {
    margin: 12px 0;
    border: none;
    border-top: 1px dashed var(--border-light);
}

.ai-message-ai .ai-bubble code.ai-inline-code {
    display: inline-block;
    padding: 1px 6px;
    background: #F1E4FF;
    color: #553C9A;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', Consolas, monospace;
    margin: 0 2px;
}

.ai-message-ai .ai-bubble pre.ai-code {
    margin: 10px 0;
    padding: 10px 12px;
    background: #2D2D2D;
    color: #E0E0E0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

.ai-message-ai .ai-bubble pre.ai-code code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-family: 'Courier New', Consolas, monospace;
}

.ai-message-ai .ai-bubble a.ai-link {
    color: #805AD5;
    text-decoration: underline;
    word-break: break-all;
}

.ai-message-ai .ai-bubble a.ai-link:hover {
    color: #6B46C1;
}

.ai-message-ai .ai-bubble > *:first-child {
    margin-top: 0;
}

.ai-message-ai .ai-bubble > *:last-child {
    margin-bottom: 0;
}

.ai-modal-input {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 14px;
    align-items: center;
}

/* ====================================================
   移动端优化 - 首页专属
   ==================================================== */
@media (max-width: 480px) {
    /* 倒计时卡片适配 */
    .countdown-card {
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 10px;
    }
    
    .countdown-icon {
        font-size: 24px;
    }
    
    .countdown-title > span:first-child {
        font-size: 13px;
    }
    
    .countdown-meta {
        font-size: 11px;
        gap: 4px;
    }
    
    .countdown-time {
        padding: 2px 6px;
        font-size: 10px;
    }
    
    .countdown-digits {
        gap: 4px;
        padding: 12px 6px 8px 6px;
        border-radius: 12px;
        margin-top: 10px;
    }
    
    .digit-box {
        padding: 6px 10px;
        min-width: 42px;
        border-radius: 8px;
    }
    
    .digit-num {
        font-size: 22px;
    }
    
    .digit-label {
        font-size: 10px;
    }
    
    .digit-sep {
        font-size: 18px;
        padding-bottom: 14px;
    }
    
    .countdown-empty {
        padding: 14px;
    }
    
    .countdown-add-btn {
        padding: 8px 20px;
        font-size: 12px;
        border-radius: 10px;
    }

    .home-scan-card {
        padding: 14px;
        border-radius: 14px;
        margin-bottom: 10px;
    }

    .scan-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .scan-icon-wrap {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .scan-icon-wrap svg {
        width: 20px;
        height: 20px;
    }

    .scan-text h3 {
        font-size: 15px;
    }

    .scan-text p {
        font-size: 12px;
    }

    .scan-actions {
        gap: 8px;
    }

    .scan-btn-primary,
    .scan-btn-secondary {
        padding: 9px 10px;
        font-size: 13px;
        border-radius: 8px;
        gap: 5px;
    }

    .scan-btn-primary svg,
    .scan-btn-secondary svg {
        width: 15px;
        height: 15px;
    }

    .section-card {
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .section-header {
        margin-bottom: 10px;
    }

    .section-title {
        font-size: 14px;
    }

    .section-title-wrap {
        gap: 6px;
    }

    .section-title-wrap svg {
        width: 16px;
        height: 16px;
    }

    .section-more {
        font-size: 12px;
    }

    .medicine-simple-list,
    .reminder-simple-list {
        gap: 8px;
    }

    .medicine-simple-item,
    .reminder-simple-item {
        padding: 10px;
        gap: 10px;
    }

    .medicine-icon-box {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .medicine-icon-box svg {
        width: 18px;
        height: 18px;
    }

    .medicine-simple-name,
    .reminder-simple-title {
        font-size: 13px;
    }

    .medicine-simple-info,
    .reminder-simple-info {
        gap: 3px;
    }

    .medicine-simple-meta,
    .reminder-simple-meta {
        font-size: 11px;
        gap: 3px 8px;
    }

    .reminder-time-box {
        width: 54px;
        padding: 5px 3px;
        border-radius: 8px;
    }

    .reminder-time {
        font-size: 14px;
    }

    .reminder-simple-action {
        flex-shrink: 0;
    }

    .btn-done {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 6px;
    }

    .ai-section {
        padding: 12px;
    }

    .ai-quick-questions {
        gap: 6px;
        margin-bottom: 12px;
    }

    .quick-question-btn {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 14px;
    }

    .ai-history {
        margin-bottom: 12px;
    }

    .ai-input-box {
        gap: 6px;
    }

    .ai-input {
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .ai-send-btn {
        padding: 9px 14px;
        font-size: 13px;
        border-radius: 8px;
    }

    .ai-badge {
        padding: 3px 8px;
        font-size: 10px;
        margin-left: 6px;
    }

    .empty-state-sm {
        padding: 16px 12px;
        font-size: 12px;
    }

    .home-footer-space {
        height: 16px;
    }

    .scan-modal-content,
    .ai-modal-content {
        padding: 14px;
        max-height: 90vh;
    }

    .medicine-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-actions {
        gap: 8px;
    }
}

@media (max-width: 360px) {
    .scan-btn-primary,
    .scan-btn-secondary {
        font-size: 12px;
        padding: 9px 10px;
    }

    .section-title {
        font-size: 13px;
    }
}

/* ====================================================
   药箱页面 - 头部工具栏
   ==================================================== */
.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.page-header-bar .page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-add-small {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-add-small:hover {
    background: var(--primary-dark);
    color: #FFFFFF;
}

.btn-add-small svg {
    width: 16px;
    height: 16px;
}

/* 快捷操作 */
.medicine-quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.medicine-quick-actions .quick-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--primary-bg);
    border: 1px solid #BEE3F8;
    border-radius: var(--radius-sm);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.medicine-quick-actions .quick-action-btn:hover {
    background: #BEE3F8;
}

.medicine-quick-actions .quick-action-btn svg {
    width: 16px;
    height: 16px;
}

/* 搜索栏 */
.medicine-search-bar {
    margin-bottom: 12px;
}

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

.category-btn {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.category-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary-light);
    color: var(--primary);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #FFFFFF;
}

/* 药品卡片列表 */
.medicine-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.medicine-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.medicine-detail-card:hover {
    box-shadow: var(--shadow-md);
}

.medicine-detail-card.medicine-card-expiring {
    border-color: #FBD38D;
    background: linear-gradient(to bottom, #FFFFF0, #FFFFFF);
}

.medicine-detail-card.medicine-card-expired {
    border-color: #FC8181;
    background: linear-gradient(to bottom, #FFF5F5, #FFFFFF);
}

.medicine-detail-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
}

.medicine-icon-box-large {
    width: 50px;
    height: 50px;
    background: var(--primary-bg);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.medicine-detail-card.medicine-card-expiring .medicine-icon-box-large {
    background: #FEFCBF;
    color: #D69E2E;
    border-color: #FBD38D;
}

.medicine-detail-card.medicine-card-expired .medicine-icon-box-large {
    background: #FED7D7;
    color: #E53E3E;
    border-color: #FC8181;
}

.medicine-icon-box-large svg {
    width: 24px;
    height: 24px;
}

.medicine-detail-info {
    flex: 1;
    min-width: 0;
}

.medicine-detail-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.medicine-detail-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 500;
}

.tag-otc {
    background: #C6F6D5;
    color: #22543D;
}

.tag-处方 {
    background: #FED7D7;
    color: #822727;
}

.tag-保健 {
    background: #FAF5FF;
    color: #553C9A;
}

.tag-中药 {
    background: #FCE7F3;
    color: #97266D;
}

.medicine-detail-spec {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.medicine-detail-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.medicine-detail-meta .expiring-text {
    color: var(--warning);
    font-weight: 500;
}

.medicine-detail-meta .expired-text {
    color: var(--danger);
    font-weight: 600;
}

/* 核心知识和用药提示 */
.medicine-knowledge-section {
    margin-top: 14px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.medicine-detail-card.medicine-card-expiring .medicine-knowledge-section {
    background: #FFFFF0;
    border-left-color: var(--warning);
}

.medicine-detail-card.medicine-card-expired .medicine-knowledge-section {
    background: #FFF5F5;
    border-left-color: var(--danger);
}

.medicine-knowledge-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.medicine-detail-card.medicine-card-expiring .medicine-knowledge-title {
    color: var(--warning);
}

.medicine-detail-card.medicine-card-expired .medicine-knowledge-title {
    color: var(--danger);
}

.medicine-knowledge-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.medicine-knowledge-item {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 2px;
}

/* 操作按钮 */
.medicine-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.medicine-detail-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ====================================================
   提醒页面
   ==================================================== */
.reminder-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.legend-item.legend-important {
    color: var(--danger);
    font-weight: 500;
}

.legend-item svg {
    width: 12px;
    height: 12px;
}

/* 提醒列表 */
.reminder-list-section {
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.reminder-card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.reminder-card:hover {
    box-shadow: var(--shadow-md);
}

.reminder-card.reminder-important {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);
    border-color: #FC8181;
    border-left: 4px solid var(--danger);
}

.reminder-card.reminder-normal {
    border-left: 4px solid var(--primary);
}

.reminder-card.reminder-inactive {
    opacity: 0.7;
    background: var(--bg);
    border-left: 4px solid var(--border);
}

.reminder-card-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reminder-time-box {
    flex-shrink: 0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    min-width: 56px;
    text-align: center;
}

.reminder-time-box.time-important {
    background: var(--danger);
    color: #FFFFFF;
}

.reminder-time-box.time-normal {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.reminder-time-box.time-inactive {
    background: var(--border);
    color: var(--text-muted);
}

.reminder-time-large {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.reminder-important-badge {
    display: block;
    font-size: 10px;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    font-weight: 600;
}

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

.reminder-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.reminder-medicine {
    font-size: 13px;
    color: var(--primary-dark);
    margin-bottom: 4px;
    font-weight: 500;
}

.reminder-dosage {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.reminder-notes {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.reminder-card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.reminder-card-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.reminder-card-actions .btn-success {
    background: var(--success);
    color: #FFFFFF;
    border-color: var(--success);
}

.reminder-card-actions .btn-success:hover {
    background: #2F855A;
    border-color: #2F855A;
}

.reminder-card-actions .btn-danger {
    background: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
}

.reminder-card-actions .btn-danger:hover {
    background: #C53030;
    border-color: #C53030;
}

.text-muted {
    color: var(--text-muted);
}

/* ====================================================
   首页 - 正在服用药物横向布局 (2x2，左图右文)
   ==================================================== */
.medicine-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.medicine-grid-item {
    background: var(--bg);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    gap: 10px;
}

.medicine-grid-item:hover {
    background: var(--primary-bg);
    border-color: #BEE3F8;
}

.medicine-grid-left {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.medicine-grid-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
}

.medicine-grid-icon {
    width: 44px;
    height: 44px;
    background: #FFFFFF;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.medicine-grid-icon svg {
    width: 22px;
    height: 22px;
}

.medicine-grid-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.medicine-grid-spec {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ====================================================
   药箱页面 - 优化样式
   ==================================================== */
/* 筛选按钮紧凑 - 不换行 */
.category-filter-compact {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.category-filter-compact .category-btn {
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 删除按钮 - 灰色背景 */
.btn-delete-gray {
    background-color: #A0AEC0 !important;
    color: #FFFFFF !important;
    border-color: #A0AEC0 !important;
}

.btn-delete-gray:hover {
    background-color: #718096 !important;
    border-color: #718096 !important;
}

/* 精简提示区域 */
.medicine-tips-compact {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--primary-bg);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.medicine-tips-compact .tip-item {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-bottom: 3px;
}

.medicine-tips-compact .tip-item:last-child {
    margin-bottom: 0;
}

.medicine-tips-compact .tip-label {
    color: var(--primary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.medicine-tips-compact .tip-item span:last-child {
    flex: 1;
    text-align: justify;
}

/* 药品卡片内容区域 - 点击可进入详情 */
.medicine-detail-card .medicine-detail-header,
.medicine-detail-card .medicine-detail-info,
.medicine-detail-card .medicine-tips-compact {
    cursor: pointer;
}

/* 移动端响应式调整 */
@media (max-width: 480px) {
    .medicine-grid {
        gap: 6px;
    }
    
    .medicine-grid-item {
        padding: 8px 6px;
    }
    
    .medicine-grid-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }
    
    .medicine-grid-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .medicine-grid-name {
        font-size: 12px;
    }
    
    .medicine-grid-spec,
    .medicine-grid-time {
        font-size: 10px;
    }
    
    .category-filter-compact {
        gap: 5px;
    }
    
    .category-filter-compact .category-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
}

/* ====================================================
   照片预览样式
   ==================================================== */
.medicine-grid-photo {
    width: 44px !important;
    height: 44px !important;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden !important;
    display: block;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-shrink: 0;
    position: relative;
}

.medicine-grid-photo img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.medicine-icon-photo {
    width: 64px !important;
    height: 64px !important;
    background: var(--primary-bg);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    overflow: hidden !important;
    display: block;
    position: relative;
}

.medicine-icon-photo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    max-width: 100% !important;
    max-height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* ====================================================
   药箱列表 - 左滑删除
   ==================================================== */
.medicine-card-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--danger);
}

.medicine-card-swipe {
    position: relative;
    transition: transform 0.3s ease;
    z-index: 2;
}

.medicine-card-swipe.medicine-detail-card {
    margin-bottom: 0;
}

.medicine-card-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: var(--danger);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 13px;
    z-index: 1;
    cursor: pointer;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.medicine-card-delete svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

.medicine-card-delete:hover,
.medicine-card-delete:active {
    background: #C53030;
}

.medicine-card-wrapper.swiped .medicine-card-swipe {
    transform: translateX(-80px);
}

/* ====================================================
   用药提醒页面 - 左滑删除
   ==================================================== */
.reminder-card-wrapper {
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 12px;
}

.reminder-card-swipe {
    position: relative;
    transition: transform 0.3s ease;
    background: var(--card-bg);
    z-index: 2;
}

.reminder-card-delete {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 14px;
    z-index: 1;
    cursor: pointer;
}

.reminder-card-delete:hover {
    background: #C53030;
}

.reminder-card-wrapper.swiped .reminder-card-swipe {
    transform: translateX(-80px);
}

@media (max-width: 480px) {
    .medicine-grid-item {
        padding: 8px;
        gap: 8px;
    }

    .medicine-grid-left {
        width: 38px;
        height: 38px;
    }

    .medicine-grid-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .medicine-grid-icon svg {
        width: 18px;
        height: 18px;
    }

    .medicine-grid-photo {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }

    .medicine-grid-name {
        font-size: 12px;
    }

    .medicine-grid-spec {
        font-size: 10px;
    }

    .medicine-icon-photo {
        width: 56px;
        height: 56px;
    }
}

/* ===== V1.2 新增：章节标题、内联按钮、打卡/统计样式 ===== */
.medicine-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 4px 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.section-icon { font-size: 16px; }
.section-count { color: var(--text-secondary); font-weight: 500; font-size: 13px; }

/* ====================================================
   药箱：右侧圆形打卡按钮 - 醒目突出版
   ==================================================== */
.medicine-detail-info-with-action {
    padding-right: 12px;
}

.medicine-action-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    align-self: center;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    border: 3px solid rgba(255, 255, 255, 0.7);
}

.medicine-action-circle:active {
    transform: scale(0.94);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

.medicine-action-circle-text {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* 历史药品：绿色（复用） */
.medicine-action-circle-accent {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.medicine-action-circle-accent:active {
    box-shadow: 0 3px 8px rgba(34, 197, 94, 0.4);
}

/* 过期/临期药品：按钮颜色调整 */
.medicine-detail-card.medicine-card-expiring .medicine-action-circle {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.medicine-detail-card.medicine-card-expired .medicine-action-circle {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 6px 16px rgba(107, 114, 128, 0.25);
}

/* 小屏幕适配 */
@media (max-width: 380px) {
    .medicine-action-circle {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }
    .medicine-action-circle-text {
        font-size: 13px;
        letter-spacing: 1px;
    }
}

.medicine-card-inline-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
}
.action-mini-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    background: #f1f5f9;
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}
.action-mini-btn:active { transform: scale(0.97); background: #e2e8f0; }
.action-primary { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.action-primary:active { background: #bfdbfe; }
.action-accent { background: #dcfce7; color: #16a34a; font-weight: 600; }
.action-accent:active { background: #bbf7d0; }

.medicine-detail-tag.tag-history {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
}

.medicine-card-history {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
}

/* 今日打卡页 */
.today-stats-panel {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: var(--radius);
    padding: 20px 16px;
    margin-bottom: 16px;
}
.today-stats-date { font-size: 13px; color: #475569; margin-bottom: 8px; }
.today-stats-row { display: flex; justify-content: space-around; text-align: center; }
.today-stat-item .num { font-size: 28px; font-weight: 700; color: var(--primary); }
.today-stat-item .label { font-size: 12px; color: #64748b; margin-top: 4px; }

.today-log-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #f1f5f9;
}
.today-log-item .log-main { display: flex; align-items: center; gap: 10px; }
.today-log-item .log-icon {
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; background: #dcfce7; color: #16a34a;
}
.today-log-item.status-missed .log-icon { background: #fee2e2; color: var(--danger); }
.today-log-item .log-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.today-log-item .log-time { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.today-log-item .log-status {
    font-size: 12px; font-weight: 600;
    padding: 4px 8px; border-radius: 12px;
    background: #dcfce7; color: #166534;
}
.today-log-item.status-missed .log-status { background: #fee2e2; color: #991b1b; }

/* 统计页 */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}
.stats-summary-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid #f1f5f9;
}
.stats-summary-item .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stats-summary-item .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.stats-section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 16px 0 10px; }

.stats-day-list {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 8px 14px;
    border: 1px solid #f1f5f9;
}
.stats-day-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f8fafc;
    font-size: 13px;
}
.stats-day-row:last-child { border-bottom: none; }
.stats-day-row .date-col { color: var(--text-secondary); min-width: 70px; }
.stats-day-row .bar-col { flex: 1; margin: 0 12px; height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.stats-day-row .bar-fill { height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); border-radius: 3px; }
.stats-day-row .num-col { font-size: 12px; color: var(--text-primary); font-weight: 600; min-width: 50px; text-align: right; }

/* ====================================================
   Hero Banner & 拍照卡片 - 移动端响应式优化
   ==================================================== */
@media (max-width: 480px) {
    /* Banner 适配 */
    .hero-inner {
        padding: 24px 14px 12px 14px;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: 1.5px;
    }

    .hero-subtitle {
        font-size: 12px;
        padding: 4px 10px;
        border-radius: 10px;
    }

    .hero-user {
        font-size: 13px;
        max-width: 140px;
        padding: 3px 10px;
    }

    .hero-greeting-title {
        font-size: 13px;
        gap: 6px;
    }

    .hero-title-row {
        gap: 8px;
    }

    .hero-data {
        padding: 12px 8px;
        border-radius: 14px;
    }

    .hero-data-num {
        font-size: 22px;
    }

    .hero-data-unit {
        font-size: 12px;
    }

    .hero-data-label {
        font-size: 11px;
        margin-top: 4px;
    }

    .hero-data-divider {
        height: 32px;
    }

    .hero-bg-circle-1 {
        width: 180px;
        height: 180px;
        top: -60px;
        right: -50px;
    }

    .hero-bg-circle-2 {
        width: 120px;
        height: 120px;
        bottom: 30px;
        left: -30px;
    }

    .hero-bg-circle-3 {
        width: 50px;
        height: 50px;
        top: 28px;
        right: 100px;
    }

    /* 拍照卡片适配 */
    .home-scan-card {
        padding: 14px;
        border-radius: 16px;
        gap: 12px;
        margin-bottom: 10px;
    }

    .scan-icon-badge {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .scan-content h3 {
        font-size: 15px;
    }

    .scan-content p {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .scan-actions {
        gap: 8px;
    }

    .scan-btn-primary,
    .scan-btn-secondary {
        padding: 9px 10px;
        font-size: 13px;
        border-radius: 9px;
        gap: 5px;
    }
}

@media (max-width: 360px) {
    .hero-inner {
        padding: 22px 12px 10px 12px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-data {
        padding: 10px 6px;
    }

    .hero-data-num {
        font-size: 20px;
    }

    .hero-data-label {
        font-size: 10px;
    }

    .home-scan-card {
        padding: 12px;
        gap: 10px;
    }

    .scan-icon-badge {
        width: 46px;
        height: 46px;
        border-radius: 11px;
    }

    .scan-icon-badge svg {
        width: 22px;
        height: 22px;
    }

    .scan-content h3 {
        font-size: 14px;
    }

    .scan-content p {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .scan-btn-primary,
    .scan-btn-secondary {
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 8px;
        gap: 4px;
    }
}

