/* 基础变量 */
:root {
    --primary-blue: #4A90E2;
    --light-blue: #5BA0F2;
    --dark-blue: #3A7BC8;
    --pink: #FF8FAB;
    --light-pink: #FFB6C8;
    --orange: #FF9500;
    --green: #52C41A;
    --purple: #9B59B6;
    --teal: #0D9488;
    --teal-light: #14B8A6;
    --teal-dark: #0F766E;
    --dark: #1A1A2E;
    --gray: #666666;
    --light-gray: #F5F6F8;
    --white: #FFFFFF;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

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

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

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

.btn-white:hover {
    background: var(--light-gray);
}

.btn-large {
    padding: 15px 36px;
    font-size: 16px;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}
.btn-danger {
    background: #dc2626;
    color: #fff;
    border: 1px solid #dc2626;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    color: var(--gray);
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

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

/* Hero区域 */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, #F8FBFF 0%, var(--white) 100%);
}

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

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.hero-text h2 {
    font-size: 28px;
    color: var(--gray);
    font-weight: 400;
    margin-bottom: 24px;
}

.hero-text p {
    font-size: 17px;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image {
    flex: 0 0 auto;
}

.hero-image img {
    width: 350px;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 区域标题 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 17px;
    color: var(--gray);
}

/* 功能区域 */
.features {
    padding: 100px 0;
    background: var(--white);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 26px;
}

.feature-icon.blue {
    background: linear-gradient(135deg, #E6F2FF, #CCE0FF);
    color: var(--primary-blue);
}

.feature-icon.pink {
    background: linear-gradient(135deg, #FFE6EE, #FFCCD8);
    color: var(--pink);
}

.feature-icon.green {
    background: linear-gradient(135deg, #E6F9E6, #CCF0CC);
    color: var(--green);
}

.feature-icon.orange {
    background: linear-gradient(135deg, #FFF4E6, #FFE0C0);
    color: var(--orange);
}

.feature-icon.purple {
    background: linear-gradient(135deg, #F5E6FF, #E6CCFF);
    color: var(--purple);
}

.feature-icon.teal {
    background: linear-gradient(135deg, #E6FFFF, #CCFFFF);
    color: var(--teal);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.7;
}

/* 工作流程 */
.workflow {
    padding: 100px 0;
    background: var(--light-gray);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
}

.step-content h3 {
    font-size: 17px;
    color: var(--dark);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 13px;
    color: var(--gray);
}

.step-arrow {
    color: var(--primary-blue);
    font-size: 20px;
}

/* 适用场景 */
.scenarios {
    padding: 100px 0;
    background: var(--white);
}

.scenario-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.scenario-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.scenario-card i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.scenario-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 8px;
}

.scenario-card p {
    font-size: 14px;
    color: var(--gray);
}

/* CTA区域 */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    color: var(--white);
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}

/* 页脚 */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer-brand img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.footer-brand span {
    font-size: 20px;
    font-weight: 600;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

/* 表单页面通用 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8FBFF 0%, #E8F4FF 100%);
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--white);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
    object-fit: cover;
    background: #fff;
}

.auth-header h1 {
    font-size: 26px;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input::placeholder {
    color: #B0B0B0;
}

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

.form-row .form-group {
    flex: 1;
}

.auth-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary-blue);
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 仪表盘通用 */
.dashboard-page {
    min-height: 100vh;
    background: var(--light-gray);
}

.dashboard-nav {
    background: var(--white);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav .logo {
    position: relative;
    font-size: 20px;
    min-height: 48px;
    padding: 0 12px 0 4px;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dashboard-nav .logo:hover {
    background: #f3f8ff;
    transform: translateY(-1px);
}

.dashboard-nav .logo::after {
    content: "随时让小佑处理任务";
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-nav .logo-img {
    animation: xiaoyouLogoPulse 2.4s ease-in-out infinite;
}

@keyframes xiaoyouLogoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.22); }
    50% { box-shadow: 0 0 0 7px rgba(74, 144, 226, 0); }
}

.dashboard-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
}

.user-name {
    font-size: 14px;
    color: var(--dark);
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 26px;
    color: var(--dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #E6F2FF, #CCE0FF);
    color: var(--primary-blue);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #E6F9E6, #CCF0CC);
    color: var(--green);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #FFF4E6, #FFE0C0);
    color: var(--orange);
}

.stat-card.pink .stat-icon {
    background: linear-gradient(135deg, #FFE6EE, #FFCCD8);
    color: var(--pink);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 14px;
    color: var(--gray);
}

/* 标签页 */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #E8E8E8;
    padding-bottom: 1px;
}

.tab {
    padding: 12px 20px;
    font-size: 15px;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab:hover {
    color: var(--primary-blue);
}

.tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表格 */
.table-container {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #F0F0F0;
}

.data-table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    background: var(--light-gray);
}

.data-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.data-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.data-table td {
    font-size: 14px;
    color: var(--dark);
}

.data-table tr:hover td {
    background: #F8FBFF;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background: #E6F9E6;
    color: #52C41A;
}

.status.inactive {
    background: #F5F5F5;
    color: #999;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.action-btn.view {
    background: #E6F2FF;
    color: var(--primary-blue);
}

.action-btn.view:hover {
    background: #CCE0FF;
}

.action-btn.edit {
    background: #FFF4E6;
    color: var(--orange);
}

.action-btn.delete {
    background: #FFE6EE;
    color: var(--pink);
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* 响应式 */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 42px;
    }

    .hero-buttons {
        justify-content: center;
    }

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

    .workflow-steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

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

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-image img {
        width: 250px;
    }

    .feature-grid,
    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .search-bar {
        flex-direction: column;
    }
}

/* 登录/注册页顶部导航移动端 */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 16px;
    }

    .top-nav .container,
    .top-nav > * {
        height: 56px;
    }

    .top-nav .logo {
        font-size: 14px;
        gap: 6px;
        flex-shrink: 0;
        max-width: calc(100% - 50px);
    }

    .top-nav .logo img {
        width: 28px;
        height: 28px;
    }

    .top-nav .logo span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .top-nav .nav-links {
        position: fixed;
        top: 0;
        right: -260px;
        width: 260px;
        height: 100vh;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 70px 20px 30px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: flex;
    }

    .top-nav .nav-links.open {
        right: 0;
    }

    .top-nav .nav-links a {
        display: flex;
        align-items: center;
        padding: 13px 12px;
        font-size: 14px;
        color: var(--dark);
        border-bottom: 1px solid #F0F0F0;
        text-decoration: none;
        border-radius: 8px;
        margin-bottom: 2px;
        transition: all 0.2s;
    }

    .top-nav .nav-links a:hover {
        background: var(--teal-bg);
        color: var(--teal);
    }

    .top-nav .nav-buttons {
        display: none;
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 6px;
        font-size: 18px;
        color: var(--dark);
        background: var(--light-gray);
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.3s;
    }

    .hamburger:hover {
        background: var(--teal);
        color: white;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    .mobile-overlay.show {
        display: block;
    }
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.hamburger:hover {
    background: var(--light-gray);
    color: var(--primary-blue);
}

/* 移动端菜单遮罩 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-overlay.show {
    display: block;
    opacity: 1;
}

/* 移动端菜单 */
@media (max-width: 768px) {
    /* 导航栏整体优化 */
    .navbar .container {
        height: 56px;
        padding: 0 16px;
    }

    .logo {
        font-size: 14px;
        gap: 6px;
        flex-shrink: 0;
        max-width: calc(100% - 50px);
    }

    .logo-img {
        width: 28px;
        height: 28px;
    }

    .logo span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 汉堡按钮优化 */
    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 6px;
        font-size: 18px;
        color: var(--dark);
        background: var(--light-gray);
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.3s;
    }

    .hamburger:hover {
        background: var(--teal);
        color: white;
    }

    /* 侧边菜单优化 */
    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 70px 20px 30px;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: flex;
        overflow-y: auto;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        padding: 13px 12px;
        font-size: 14px;
        color: var(--dark);
        border-bottom: 1px solid #F0F0F0;
        text-align: left;
        border-radius: 8px;
        margin-bottom: 2px;
        transition: all 0.2s;
    }

    .nav-links a:last-child {
        border-bottom: 1px solid #F0F0F0;
    }

    .nav-links a:hover {
        background: var(--teal-bg);
        color: var(--teal);
    }

    .nav-buttons {
        display: none;
    }

    /* 移动端遮罩优化 */
    .mobile-overlay.show {
        display: block;
        opacity: 1;
    }

    /* Hero 移动端优化 */
    .hero {
        padding: 100px 0 60px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-text h2 {
        font-size: 20px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .hero-image img {
        width: 200px;
    }

    /* 功能卡片移动端优化 */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    /* 流程步骤移动端 */
    .workflow-steps {
        flex-direction: column;
        gap: 20px;
    }

    .workflow-step {
        flex-direction: column;
        text-align: center;
    }

    .workflow-step::after {
        display: none;
    }

    /* 适用场景移动端 */
    .scenario-grid {
        grid-template-columns: 1fr;
    }

    /* CTA移动端 */
    .cta-section .cta-buttons {
        flex-direction: column;
    }

    /* 底部移动端优化 */
    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 24px;
    }

    .footer-col {
        min-width: 140px;
    }

    /* 定价页移动端 */
    .pricing-cards {
        padding: 20px 0 60px;
    }

    .pricing-hero {
        padding: 90px 0 40px;
    }

    .pricing-hero h1 {
        font-size: 26px;
    }

    /* 登录注册页移动端 */
    .login-card,
    .register-card {
        flex-direction: column;
        width: 100%;
        border-radius: 20px;
    }

    .login-left,
    .register-left {
        padding: 36px 28px;
    }

    .login-left h2,
    .register-left h2 {
        font-size: 24px;
    }

    .login-right,
    .register-right {
        padding: 28px;
    }

    .login-tabs {
        flex-wrap: wrap;
    }

    .login-tab {
        font-size: 13px;
        padding: 10px 8px;
    }

    .benefits-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* 全局移动端按钮优化 */
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* ============================================================ */
/* Dashboard P1 新增样式 */
/* ============================================================ */

/* 疾病标签 */
.disease-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 4px;
    margin-bottom: 2px;
    background: var(--light-blue);
    color: white;
}
.disease-tag[data-tag="gout"] { background: #e74c3c; }
.disease-tag[data-tag="rheumatoid_arthritis"] { background: #9b59b6; }

/* AI标签 */
.ai-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    background: #f0f0f0;
    color: #888;
    margin-left: 4px;
}

/* 筛选按钮组 */
.filter-group {
    display: flex;
    gap: 8px;
}
.filter-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}
.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal {
    background: white;
    border-radius: 12px;
    width: 520px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.modal-close:hover { color: #333; }
.modal-body {
    padding: 24px;
}
.modal-body .form-group {
    margin-bottom: 16px;
}
.modal-body .form-group:last-child {
    margin-bottom: 0;
}
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

.birth-year-select,
.birth-month-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    appearance: auto;
}

/* 表单样式 */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}
.form-group textarea {
    resize: vertical;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.2s;
}
.checkbox-label:hover {
    border-color: var(--primary-blue);
}
.checkbox-label input:checked + * {
    color: var(--primary-blue);
}
.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* 患者详情 */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.detail-item label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-item span {
    font-size: 15px;
    color: #333;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--dark-blue); }
.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.btn-secondary:hover { background: #eee; }

/* 搜索框 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.search-bar input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #eee;
}
.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}
.data-table tbody tr:hover {
    background: #f8f9fa;
}
.data-table .action-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    margin-right: 4px;
}
.data-table .action-btn:hover { background: #f0f0f0; }
.data-table .action-btn.view { color: var(--primary-blue); border-color: var(--primary-blue); }
.data-table .action-btn.view:hover { background: #eaf4ff; }
.data-table .action-btn.edit { color: var(--orange); border-color: var(--orange); }
.data-table .action-btn.edit:hover { background: #fff8f0; }
.data-table .action-btn.delete { color: #e74c3c; border-color: #e74c3c; }
.data-table .action-btn.delete:hover { background: #fef0f0; }

/* 状态标签 */
.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.status.active { background: #d4edda; color: #155724; }
.status.inactive { background: #f8f8f8; color: #999; }

/* 标签页 */
.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}
.tab {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 15px;
    color: #999;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab:hover { color: #333; }
.tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    font-weight: 500;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.stat-card.blue { border-left: 4px solid var(--primary-blue); }
.stat-card.green { border-left: 4px solid #27ae60; }
.stat-card.orange { border-left: 4px solid #e67e22; }
.stat-card.pink { border-left: 4px solid #e91e8c; }
.stat-icon { font-size: 22px; color: #ccc; }
.stat-value { font-size: 32px; font-weight: 700; color: #333; }
.stat-label { font-size: 13px; color: #999; }

/* 响应式 */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .modal { width: 95vw; }
}

/* ============================================================
   患者详情 Tab 样式
   ============================================================ */
.detail-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    padding: 0 24px;
    gap: 0;
}

.detail-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    border-radius: 0;
}

.detail-tab:hover {
    color: var(--primary-blue);
}

.detail-tab.active {
    color: var(--primary-blue);
    font-weight: 600;
    border-bottom-color: var(--primary-blue);
}

/* 关注指标卡片 */
.indicator-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.indicator-card .ind-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.indicator-card .ind-value {
    font-size: 13px;
    color: #666;
}

/* 疾病参考区块 */
.ref-disease-block {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
}

.ref-disease-header {
    background: var(--primary-blue);
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
}

.ref-section {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.ref-section:last-child {
    border-bottom: none;
}

.ref-section-title {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ref-section-content {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

.ref-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px;
}

.ref-tag.high { background: #fde8e8; color: #c0392b; }

/* ============================================================
   小佑医生端工作台优化：统一导航、患者卡片、全屏工作台、聊天上下文
   ============================================================ */
.page-subtitle {
    margin-top: 4px;
    color: #6b7280;
    font-size: 13px;
}

.care-page-header {
    align-items: flex-start;
    gap: 16px;
}

.primary-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.mobile-add-patient-fab {
    display: none;
}

.patient-create-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px;
    margin: -12px 0 22px;
    border: 1px solid #dce8fb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    cursor: pointer;
}

.patient-create-hero:hover {
    border-color: var(--primary-blue);
    background: #f8fbff;
}

.create-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0ff;
    color: var(--primary-blue);
    font-size: 20px;
}

.create-hero-text h2 {
    margin: 0 0 3px;
    font-size: 18px;
    color: #1f2937;
}

.create-hero-text p {
    margin: 0;
    font-size: 13px;
    color: #667085;
}

.patient-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin: 0 0 14px;
}

.filter-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #667085;
}

.filter-control select,
.filter-reset-btn {
    min-height: 38px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
    color: #374151;
}

.filter-reset-btn {
    cursor: pointer;
    color: var(--primary-blue);
}

.patient-click-row {
    cursor: pointer;
}

.patient-click-row td:not(.row-actions):hover {
    color: var(--primary-blue);
}

.disease-combobox {
    position: relative;
}

.disease-combobox-control {
    min-height: 42px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fff;
    cursor: pointer;
}

.disease-selected {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.disease-placeholder {
    color: #9aa3b2;
    font-size: 13px;
}

.disease-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8f0ff;
    color: var(--primary-blue);
    font-size: 12px;
    font-weight: 600;
}

.disease-selected-chip button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.disease-dropdown {
    display: none;
    position: absolute;
    z-index: 1500;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    border: 1px solid #d8dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    padding: 10px;
}

.disease-dropdown.open {
    display: block;
}

.disease-search-input {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    margin-bottom: 8px;
}

.disease-option-list {
    max-height: 190px;
    overflow-y: auto;
}

.disease-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.disease-option:hover {
    background: #f4f7fb;
}

.disease-empty {
    padding: 12px;
    text-align: center;
    color: #9aa3b2;
    font-size: 13px;
}

#addPatientModal .modal,
#editPatientModal .modal {
    display: flex;
    flex-direction: column;
    overflow: visible;
}

#addPatientModal .modal-body,
#editPatientModal .modal-body {
    overflow-y: auto;
}

#addPatientModal .modal-footer,
#editPatientModal .modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 10;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-patient-list {
    display: none;
}

.muted-text {
    color: #9aa3b2;
    font-size: 12px;
}

.patient-detail-body {
    -webkit-overflow-scrolling: touch;
}

.push-config-toolbar {
    margin-bottom: 14px;
    padding: 14px 18px;
}

.push-config-row,
.push-config-fields,
.push-config-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.push-config-row {
    justify-content: space-between;
}

.push-config-fields label,
.push-time-grid label {
    color: #526173;
    font-size: 13px;
    font-weight: 800;
}

.push-config-fields select,
.push-time-grid input,
.push-time-grid select {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--xy-line);
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 13px;
}

.push-config-actions .btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
}

.push-time-grid {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.photo-capture-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
    font-size: 22px;
}

.patient-card-risk {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.patient-card-risk.risk-high {
    color: #c62828;
    background: #fde8e8;
}

.patient-card-risk.risk-warning {
    color: #b45309;
    background: #fff4df;
}

.patient-card-risk.risk-normal {
    color: #16803c;
    background: #e8f7ee;
}

.chat-mobile-back,
.context-close-btn {
    display: none;
}

.chat-context-panel {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid #e8edf3;
    background: #fbfcfe;
    display: flex;
    flex-direction: column;
}

.chat-context-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #e8edf3;
    background: #fff;
}

.chat-context-header strong {
    display: block;
    font-size: 14px;
}

.chat-context-header span {
    display: block;
    margin-top: 2px;
    color: #8a94a6;
    font-size: 12px;
}

.chat-context-body {
    padding: 12px;
    overflow-y: auto;
}

.chat-context-empty {
    padding: 24px 10px;
    color: #9aa3b2;
    font-size: 13px;
    text-align: center;
}

.context-section {
    border: 1px solid #e7eaf0;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    margin-bottom: 10px;
}

.context-section h4 {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #1f2937;
}

.context-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: 12px;
    border-top: 1px solid #f2f4f7;
}

.context-line:first-of-type {
    border-top: none;
}

.context-line span {
    color: #8a94a6;
}

.context-line b {
    color: #374151;
    font-weight: 600;
    text-align: right;
}

.context-tags,
.context-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.context-note {
    margin: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .dashboard-page {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .dashboard-nav {
        height: 58px;
        padding: 0 14px;
    }

    .dashboard-nav .logo span {
        font-size: 16px;
    }

    .dashboard-nav .logo {
        min-height: 44px;
        padding-right: 4px;
    }

    .dashboard-nav .logo::after {
        display: none;
    }

    .dashboard-nav .logo-img {
        width: 36px;
        height: 36px;
    }

    .dashboard-nav .nav-right .btn {
        display: none;
    }

    .dashboard-nav .nav-right {
        gap: 8px;
    }

    .user-name {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tabs {
        display: none !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0;
        min-height: 58px;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e8edf3;
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        color: #7b8494;
        font-size: 11px;
    }

    .mobile-nav-item i {
        font-size: 17px;
    }

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

    .mobile-nav-ai {
        transform: translateY(-11px);
        color: var(--primary-blue);
        font-weight: 700;
    }

    .mobile-nav-ai-img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        box-shadow: 0 8px 18px rgba(74, 144, 226, 0.28);
    }

    .dashboard-content {
        padding: 18px 12px 12px !important;
    }

    .care-page-header {
        align-items: center;
        margin-bottom: 16px !important;
    }

    .dashboard-header h1 {
        font-size: 20px;
    }

    .page-subtitle {
        display: none;
    }

    .primary-action-btn {
        width: 100%;
        min-height: 46px;
        justify-content: center;
        padding: 11px 14px !important;
        font-size: 15px !important;
    }

    .care-page-header .primary-action-btn {
        display: none;
    }

    .mobile-add-patient-fab {
        position: fixed;
        right: 14px;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        z-index: 1250;
        min-height: 44px;
        padding: 0 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 0;
        border-radius: 999px;
        background: var(--primary-blue);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 8px 22px rgba(74, 144, 226, 0.34);
    }

    .mobile-add-patient-fab i {
        font-size: 14px;
    }

    .patient-create-hero {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        margin: -4px 0 14px;
    }

    .create-hero-icon,
    .create-hero-text {
        display: none;
    }

    .patient-create-hero .btn {
        width: 100%;
        min-height: 46px;
    }

    .patient-filter-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .filter-control {
        gap: 4px;
    }

    .patient-list-panel {
        padding: 12px !important;
        border-radius: 8px !important;
    }

    .patient-list-panel .data-table {
        display: none;
    }

    .mobile-patient-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .patient-mobile-card {
        border: 1px solid #e7eaf0;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }

    .patient-card-top {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .patient-card-avatar {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        background: #e8f0ff;
        color: var(--primary-blue);
        font-weight: 700;
    }

    .patient-card-main {
        min-width: 0;
        flex: 1;
    }

    .patient-card-name {
        font-weight: 700;
        color: #1f2937;
    }

    .patient-card-meta {
        margin-top: 2px;
        color: #7b8494;
        font-size: 12px;
    }

    .patient-card-tags,
    .patient-card-facts {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 10px;
    }

    .patient-card-facts span,
    .patient-card-note {
        color: #667085;
        font-size: 12px;
    }

    .patient-card-note {
        margin-top: 8px;
        padding: 8px;
        border-radius: 8px;
        background: #f8fafc;
    }

    .patient-card-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 10px;
    }

    .patient-card-actions .action-btn {
        margin: 0;
        min-height: 36px;
        padding: 5px 6px;
        white-space: nowrap;
    }

    #addPatientModal {
        z-index: 1300 !important;
    }

    #addPatientModal .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        max-height: none;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #addPatientModal .modal-body {
        flex: 1;
        overflow-y: auto !important;
    }

    #addPatientModal .modal-footer {
        flex-shrink: 0;
        padding: 10px 16px calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        display: grid;
        grid-template-columns: 1fr 1fr;
        background: #fff;
        border-top: 1px solid #e8edf3;
    }

    #addPatientModal .modal-footer .btn {
        width: 100%;
        min-height: 42px;
    }

    .disease-dropdown {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        max-height: 42vh;
    }

    .disease-option {
        padding: 5px 8px;
        font-size: 12px;
        gap: 4px;
        line-height: 1.3;
    }

    .disease-option input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin: 0;
        flex-shrink: 0;
    }

    .disease-option-list {
        max-height: 150px;
    }

    .disease-search-input {
        padding: 7px 8px;
        font-size: 12px;
    }

    .disease-selected-chip {
        padding: 3px 6px;
        font-size: 11px;
    }

    .search-bar {
        gap: 8px !important;
    }

    .search-bar input {
        min-width: 0;
        border-radius: 8px !important;
    }

    .search-bar .btn {
        padding: 9px 12px !important;
        min-width: 48px;
    }

    .search-bar .btn i + * {
        display: none;
    }

    .patient-workbench-modal {
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .patient-workbench-modal .modal-header,
    .patient-workbench-modal .patient-hero,
    .patient-workbench-modal .detail-tabs {
        flex-shrink: 0;
    }

    .patient-workbench-modal .modal-body {
        flex: 1;
        max-height: none !important;
        overflow-y: auto;
        padding-bottom: 88px !important;
    }

    .patient-workbench-modal .modal-footer {
        display: none;
    }

    .upload-row {
        align-items: stretch !important;
    }

    .upload-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .upload-actions .btn,
    .upload-row > .btn {
        min-height: 38px;
    }

    .selected-file-name {
        max-width: 100% !important;
        width: 100%;
    }

    .chat-center-layout {
        position: fixed;
        inset: 58px 0 calc(58px + env(safe-area-inset-bottom, 0px)) 0;
        height: auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #f4f6f8 !important;
    }

    .chat-patient-list {
        width: 100% !important;
        height: 100%;
        border-right: 0 !important;
        background: #fff !important;
    }

    .chat-patient-list-header {
        display: block !important;
        padding: 12px 16px !important;
        background: #fff !important;
        color: #1f2937 !important;
        font-size: 16px !important;
    }

    .chat-patient-list-body {
        display: block !important;
        flex: 1;
        overflow-y: auto;
    }

    .chat-patient-chips {
        display: none !important;
    }

    .chat-main-area {
        display: none !important;
        height: 100% !important;
    }

    body.chat-active .chat-patient-list {
        display: none !important;
    }

    body.chat-active .chat-main-area {
        display: flex !important;
    }

    .chat-view {
        height: 100%;
    }

    .chat-header {
        min-height: 58px;
        padding: 8px 10px !important;
        flex-shrink: 0;
    }

    .chat-mobile-back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 0;
        background: transparent;
        color: #374151;
        font-size: 16px;
    }

    .chat-header-actions .header-btn:not(.chat-context-toggle) {
        display: none;
    }

    .chat-messages {
        flex: 1;
        padding: 12px !important;
        overflow-y: auto;
    }

    .chat-input-area {
        flex-shrink: 0;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .chat-input-hint {
        display: none;
    }

    .chat-input-row textarea {
        border-radius: 18px !important;
        max-height: 88px !important;
    }

    .chat-send-btn {
        width: 46px;
        height: 38px;
        padding: 0 !important;
        border-radius: 18px !important;
        font-size: 0 !important;
    }

    .chat-send-btn i {
        font-size: 15px;
    }

    .chat-context-panel {
        position: fixed;
        top: 58px;
        right: 0;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px));
        z-index: 1250;
        width: min(86vw, 340px);
        transform: translateX(100%);
        transition: transform 0.22s ease;
        box-shadow: -12px 0 30px rgba(15, 23, 42, 0.16);
    }

    .chat-context-panel.open {
        transform: translateX(0);
    }

    .context-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: 0;
        border-radius: 50%;
        background: #f1f5f9;
        color: #667085;
    }
}
.ref-tag.medium { background: #fef3e2; color: #d35400; }
.ref-tag.good { background: #e8f5e9; color: #27ae60; }
.ref-tag.info { background: #e3f2fd; color: #2980b9; }

/* ============================================================
   风险等级标识
   ============================================================ */
.risk-high { color: var(--red); font-weight: 700; font-size: 13px; }
.risk-warning { color: var(--orange); font-weight: 600; font-size: 13px; }
.risk-normal { color: #27ae60; font-size: 13px; }

/* ============================================================
   Image2-inspired patient workbench refresh
   ============================================================ */
:root {
    --xy-blue: #2f7de1;
    --xy-blue-2: #4a90e2;
    --xy-blue-soft: #eaf4ff;
    --xy-line: #dbe6f3;
    --xy-line-strong: #c8d9ef;
    --xy-page: #f6f9fd;
    --xy-panel: #ffffff;
    --xy-text: #1f2937;
    --xy-muted: #6b7280;
    --xy-soft-shadow: 0 8px 24px rgba(38, 84, 132, 0.08);
    --xy-card-shadow: 0 2px 12px rgba(31, 41, 55, 0.05);
    --xy-green: #16a34a;
    --xy-green-bg: #eaf9ef;
    --xy-yellow: #d97706;
    --xy-yellow-bg: #fff7df;
    --xy-orange: #ea580c;
    --xy-orange-bg: #fff1e6;
    --xy-red-bg: #fff0f0;
    --xy-purple: #7c5ce6;
    --xy-purple-bg: #f1edff;
}

.dashboard-page {
    color: var(--xy-text);
    background:
        radial-gradient(circle at 8% 4%, rgba(47, 125, 225, 0.08), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, var(--xy-page) 42%, #f7fbff 100%);
}

.dashboard-nav {
    width: min(calc(100% - 32px), 1440px);
    height: 76px;
    margin: 16px auto 0;
    padding: 0 20px;
    border: 1px solid var(--xy-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--xy-soft-shadow);
    backdrop-filter: blur(18px);
}

.dashboard-nav .logo {
    color: var(--xy-text);
    font-size: 22px;
    font-weight: 700;
}

.dashboard-nav .logo-img {
    border: 1px solid #dbeaff;
    background: #fff;
    box-shadow: 0 4px 14px rgba(47, 125, 225, 0.14);
}

.user-avatar {
    border: 2px solid #ffd85a;
    box-shadow: 0 4px 14px rgba(47, 125, 225, 0.16);
}

.dashboard-nav .logo::after {
    content: "AI医疗助手";
    border-radius: 999px;
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-nav .nav-right { gap: 12px; }

.dashboard-nav .btn,
.tabs .tab,
.btn,
.action-btn,
.pagination-btn,
.quick-action-btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.dashboard-nav .btn:hover,
.btn:hover,
.action-btn:hover,
.pagination-btn:hover:not(:disabled),
.quick-action-btn:hover {
    transform: translateY(-1px);
}

.tabs {
    width: min(calc(100% - 32px), 1440px);
    margin: 12px auto 0 !important;
    padding: 8px !important;
    border: 1px solid var(--xy-line) !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: var(--xy-card-shadow);
    gap: 6px;
    overflow-x: auto;
}

.tabs .tab {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    color: #475569;
    white-space: nowrap;
    margin-bottom: 0;
}

.tabs .tab:hover {
    background: #f2f7ff;
    color: var(--xy-blue);
}

.tabs .tab.active {
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
    border-bottom-color: transparent;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #d8eaff;
}

.care-dashboard-shell {
    max-width: 1440px;
    padding: 18px 16px 44px;
}

.care-page-header {
    margin: 4px 0 14px;
    padding: 4px 4px 0;
}

.care-page-header h1 {
    font-size: 24px;
    line-height: 1.25;
    color: var(--xy-text);
    letter-spacing: 0;
}

.page-subtitle {
    color: var(--xy-muted);
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(180deg, #3487ee 0%, #236fd4 100%) !important;
    border: 1px solid #1f6dd0 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(47, 125, 225, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2f7de1 0%, #1d64c4 100%) !important;
    box-shadow: 0 10px 24px rgba(47, 125, 225, 0.28);
}

.btn-outline,
.btn-secondary {
    background: #fff !important;
    border: 1px solid #8bbcff !important;
    color: var(--xy-blue) !important;
    box-shadow: none;
}

.btn-outline:hover,
.btn-secondary:hover {
    background: var(--xy-blue-soft) !important;
    border-color: var(--xy-blue) !important;
}

.primary-action-btn {
    min-height: 42px;
    padding: 0 18px !important;
}

.table-container,
.workbench-card,
.workbench-panel,
.dcc-primary,
.dcc-risk-card,
.modal,
.archive-confirm-box,
.modal-content {
    border: 1px solid var(--xy-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--xy-card-shadow);
}



.panel-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-title-row h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    line-height: 1.25;
}

.panel-title-row span {
    color: #64748b;
    font-size: 12px;
}

.ai-status-pill,
.status,
.disease-tag,
.management-todo-chip,
.patient-card-risk,
.phase-badge,
.lab-status-badge,
.ai-push-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.ai-status-pill.active,
.status.active,
.patient-card-risk.risk-normal,
.management-todo-empty {
    background: var(--xy-green-bg);
    color: var(--xy-green);
    border-color: #cbeed6;
}

.patient-card-risk.risk-warning,
.risk-warning {
    background: var(--xy-orange-bg);
    color: var(--xy-orange);
    border-color: #ffd8bd;
}

.patient-card-risk.risk-high,
.risk-high,
.summary-danger {
    background: var(--xy-red-bg);
    color: #dc2626;
    border-color: #ffcaca;
}

.ai-status-pill {
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
    border-color: #d5e8ff;
}

.disease-tag {
    min-height: 24px;
    padding: 3px 9px;
    background: #edf6ff !important;
    color: #2864b3 !important;
    border-color: #d6eaff;
}

.disease-tag[data-tag="gout"] {
    background: #fff7df !important;
    color: #b45309 !important;
    border-color: #fde9ab;
}

.disease-tag[data-tag="rheumatoid_arthritis"] {
    background: #f1edff !important;
    color: #6d28d9 !important;
    border-color: #ddd3ff;
}





.patient-create-hero {
    border-radius: 12px;
    border-color: var(--xy-line);
    background: #fff;
}

.patient-list-panel {
    padding: 18px !important;
    overflow: hidden;
}

.patient-list-title { margin-bottom: 12px; }

.search-bar {
    align-items: center;
    padding: 10px;
    border: 1px solid var(--xy-line);
    border-radius: 10px;
    background: #f8fbff;
}

.search-bar input {
    min-height: 42px;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: #fff;
    color: var(--xy-text);
}

.search-bar input:focus {
    border-color: #9bc7ff !important;
    box-shadow: 0 0 0 3px rgba(47, 125, 225, 0.12);
}

.patient-filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--xy-line);
    border-radius: 10px;
    background: #fbfdff;
}

.filter-control span {
    color: #526173;
    font-size: 12px;
    font-weight: 800;
}

.filter-control select,
.filter-reset-btn,
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="month"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea,
.template-box,
.disease-combobox-control,
.disease-search-input {
    border: 1px solid var(--xy-line) !important;
    border-radius: 8px !important;
    background-color: #fff;
    color: var(--xy-text);
}

.filter-control select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.template-box:focus,
.disease-combobox-control:focus-within,
.disease-search-input:focus {
    outline: none;
    border-color: #9bc7ff !important;
    box-shadow: 0 0 0 3px rgba(47, 125, 225, 0.12);
}

.filter-reset-btn {
    color: var(--xy-blue);
    font-weight: 800;
}

.filter-reset-btn:hover { background: var(--xy-blue-soft); }

.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    padding: 13px 16px;
    background: #f2f6fb !important;
    border-bottom: 1px solid var(--xy-line) !important;
    color: #526173 !important;
    font-size: 12px;
}

.data-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf2f8 !important;
    color: var(--xy-text) !important;
}

.data-table tbody tr:hover td,
.data-table tbody tr:hover {
    background: #f8fbff !important;
}

.patient-name-cell {
    gap: 4px;
    color: #172033;
    font-weight: 800;
}

.patient-phone-sub,
.clinical-risk-reason,
.summary-line,
.management-todo-empty,
.muted-text {
    color: var(--xy-muted);
}

.clinical-risk-cell { gap: 7px; }

.clinical-risk-cell > span:first-child {
    width: max-content;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.summary-line {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
}

.summary-normal {
    background: #f5f8fc;
    color: #64748b;
}

.management-todo-list { max-width: 320px; }

.management-todo-chip {
    min-height: 24px;
    padding: 3px 9px;
    background: #f5f8fc;
    color: #526173;
    border-color: #e1e9f3;
}

.management-todo-chip.return_overdue,
.management-todo-chip.document_pending {
    background: var(--xy-red-bg);
    color: #dc2626;
    border-color: #ffcaca;
}

.management-todo-chip.push_overdue,
.management-todo-chip.pending_visit_plan {
    background: var(--xy-orange-bg);
    color: #c2410c;
    border-color: #ffd8bd;
}

.management-todo-chip.followup_gap,
.management-todo-chip.response_low {
    background: var(--xy-yellow-bg);
    color: #a16207;
    border-color: #fde9ab;
}

.action-btn,
.data-table .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #8bbcff;
    background: #fff;
    color: var(--xy-blue);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.data-table .action-btn.view,
.data-table .action-btn.edit {
    border-color: #8bbcff;
    color: var(--xy-blue);
}

.data-table .action-btn:hover,
.data-table .action-btn.view:hover,
.data-table .action-btn.edit:hover {
    background: var(--xy-blue-soft);
    border-color: var(--xy-blue);
}

.pagination-container { padding-top: 16px; }

.pagination-btn {
    min-height: 32px;
    border-radius: 8px;
    border-color: var(--xy-line);
    font-weight: 700;
}

.skeleton-cell {
    border-radius: 999px;
    background: linear-gradient(90deg, #edf3fa 25%, #f8fbff 50%, #edf3fa 75%);
}

.patient-empty-state,
.patient-error-state,
.empty-panel,
.placeholder-text {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px dashed var(--xy-line-strong);
    border-radius: 12px;
    background:
        url("images/mascot.png") center 30px / 86px auto no-repeat,
        linear-gradient(180deg, #fff, #f8fbff);
    color: var(--xy-muted);
    padding-top: 128px !important;
}

.patient-error-state .retry-btn {
    border-color: #8bbcff;
    border-radius: 8px;
    color: var(--xy-blue);
    font-weight: 800;
}

.modal-overlay {
    background: rgba(24, 39, 62, 0.42);
    backdrop-filter: blur(6px);
}

.modal,
.modal-content,
.archive-confirm-box {
    border-radius: 12px;
    border-color: var(--xy-line);
    box-shadow: 0 24px 60px rgba(24, 39, 62, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--xy-line);
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.modal-header h3 {
    color: #172033;
    font-size: 18px;
    font-weight: 800;
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #64748b;
    font-size: 24px;
}

.modal-close:hover {
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
}

.modal-footer {
    border-top: 1px solid var(--xy-line);
    background: #fbfdff;
}

.form-group label {
    color: #526173;
    font-size: 13px;
    font-weight: 800;
}

.upload-panel,
.draft-preview,
.photo-capture-area,
.current-med-select-item,
.push-track-card,
.push-module-card,
.followup-plan-card,
.medication-item,
.ai-analysis-card,
.med-alert-card,
.return-trigger-card,
.overview-status-card {
    border: 1px solid var(--xy-line);
    border-radius: 10px;
    background: #fbfdff;
}

#patientDetailModal {
    background: rgba(246, 249, 253, 0.98);
}

#patientDetailModal .patient-workbench-modal {
    background: var(--xy-page);
}

#patientDetailModal .modal-header,
#patientDetailModal .patient-hero,
#patientDetailModal .detail-tabs {
    border-color: var(--xy-line);
    background: rgba(255, 255, 255, 0.96);
}

.patient-avatar-lg {
    border-radius: 12px;
    background: linear-gradient(180deg, #4a90e2, #2f7de1);
    box-shadow: 0 8px 18px rgba(47, 125, 225, 0.22);
}

.patient-title-row h3 {
    color: #172033;
    font-weight: 800;
}

.detail-tabs {
    gap: 6px;
    border-bottom: 1px solid var(--xy-line);
}

.detail-tab {
    min-height: 44px;
    padding: 0 15px;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    font-weight: 700;
}

.detail-tab:hover {
    background: #f2f7ff;
    color: var(--xy-blue);
}

.detail-tab.active {
    background: var(--xy-blue-soft);
    color: var(--xy-blue);
    border-bottom-color: var(--xy-blue);
}

.dcc-primary {
    background:
        linear-gradient(135deg, #eef6ff 0%, #fff 74%),
        radial-gradient(circle at 92% 8%, rgba(255, 213, 90, 0.22), transparent 16rem);
}

.dcc-eyebrow { color: var(--xy-blue); }

.dcc-action-item,
.workbench-card,
.workbench-panel,
.dcc-risk-card,
.return-decision-current,
.lab-due-detail-item {
    border-color: var(--xy-line);
    border-radius: 12px;
    box-shadow: var(--xy-card-shadow);
}

.dcc-action-btn,
.quick-action-btn,
.filter-chip,
#timeline-filters .filter-chip {
    border: 1px solid #8bbcff;
    border-radius: 8px;
    background: #fff;
    color: var(--xy-blue);
    font-weight: 800;
}

.dcc-action-btn:hover,
.quick-action-btn:hover,
.filter-chip:hover,
#timeline-filters .filter-chip:hover {
    background: var(--xy-blue-soft);
    border-color: var(--xy-blue);
}

#timeline-filters .filter-chip.active {
    background: var(--xy-blue) !important;
    color: #fff !important;
    border-color: var(--xy-blue) !important;
}

@media (max-width: 1024px) {
    .patient-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-reset-btn { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .dashboard-page {
        background: linear-gradient(180deg, #fbfdff 0%, var(--xy-page) 100%);
    }

    .dashboard-nav {
        width: 100%;
        height: 58px;
        margin: 0;
        border-width: 0 0 1px;
        border-radius: 0;
        box-shadow: 0 3px 14px rgba(31, 41, 55, 0.06);
    }

    .care-dashboard-shell { padding: 14px 12px 18px !important; }

    .care-page-header {
        padding: 0;
        margin-bottom: 10px !important;
    }

    .care-page-header h1 { font-size: 22px; }

    .patient-list-panel { padding: 12px !important; }

    .patient-list-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .search-bar { padding: 8px; }

    .patient-filter-bar {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .mobile-patient-list { gap: 12px; }

    .patient-mobile-card {
        border: 1px solid var(--xy-line) !important;
        border-radius: 12px !important;
        padding: 14px !important;
        background: #fff !important;
        box-shadow: var(--xy-card-shadow);
    }

    .patient-mobile-card:active { transform: scale(0.99); }

    .patient-card-avatar {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
        background: var(--xy-blue-soft) !important;
        color: var(--xy-blue) !important;
    }

    .patient-card-name {
        color: #172033 !important;
        font-size: 16px;
    }

    .patient-card-meta { color: var(--xy-muted) !important; }

    .patient-card-facts {
        padding: 9px;
        border-radius: 10px;
        background: #f8fbff;
    }

    .patient-card-actions { grid-template-columns: 1fr 1fr !important; }

    .patient-card-actions .action-btn {
        min-height: 40px !important;
        border-radius: 8px;
        font-weight: 800;
    }

    .mobile-add-patient-fab {
        right: 16px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        min-height: 46px;
        padding: 0 16px;
        border-radius: 999px;
        background: linear-gradient(180deg, #3487ee 0%, #236fd4 100%);
        box-shadow: 0 12px 28px rgba(47, 125, 225, 0.28);
    }

    #addPatientModal .modal,
    #editPatientModal .modal {
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    #addPatientModal .modal-header,
    #editPatientModal .modal-header {
        min-height: 58px;
    }

    #addPatientModal .modal-footer,
    #editPatientModal .modal-footer {
        box-shadow: 0 -8px 24px rgba(31, 41, 55, 0.08);
    }

    .detail-tab { min-width: max-content; }
}

/* ============================================================
   Patient detail mobile workspace stabilization
   ============================================================ */
@media (max-width: 768px) {
    #patientDetailModal {
        align-items: stretch !important;
        background: var(--xy-page) !important;
        overflow: hidden !important;
    }

    #patientDetailModal .patient-workbench-modal {
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding-bottom: 0 !important;
        background: var(--xy-page) !important;
    }

    #patientDetailModal .modal-header {
        min-height: 48px;
        padding: 10px 14px !important;
        flex-shrink: 0 !important;
    }

    #patientDetailModal .modal-header h3 { font-size: 15px !important; }

    #patientDetailModal .modal-close {
        width: 34px !important;
        height: 34px !important;
        flex-shrink: 0;
    }

    #patientDetailModal .patient-hero {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 12px 14px !important;
        border-bottom: 1px solid var(--xy-line);
        flex-shrink: 0 !important;
    }

    #patientDetailModal .patient-identity {
        gap: 10px;
        align-items: center;
    }

    #patientDetailModal .patient-avatar-lg {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
        font-size: 18px !important;
    }

    #patientDetailModal .patient-title-row {
        gap: 8px;
        align-items: center;
    }

    #patientDetailModal .patient-title-row h3 {
        font-size: 18px !important;
        line-height: 1.2;
    }

    #patientDetailModal .ai-status-pill {
        min-height: 24px;
        padding: 2px 8px;
        font-size: 11px;
    }

    #patientDetailModal .patient-meta-line {
        gap: 7px;
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.35;
    }

    #patientDetailModal .patient-meta-line span:first-child {
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #patientDetailModal #detail-disease-tags {
        margin-top: 7px !important;
        gap: 6px;
    }

    #patientDetailModal .disease-tag,
    #patientDetailModal .info-chip {
        min-height: 24px;
        padding: 3px 8px;
        font-size: 11px;
    }

    #patientDetailModal .detail-tabs {
        display: flex !important;
        gap: 8px !important;
        padding: 8px 12px !important;
        border-bottom: 1px solid var(--xy-line) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0 !important;
    }

    #patientDetailModal .detail-tabs::-webkit-scrollbar { display: none; }

    #patientDetailModal .detail-tab {
        min-width: max-content;
        min-height: 44px !important;
        padding: 0 14px !important;
        border: 1px solid var(--xy-line) !important;
        border-radius: 999px !important;
        background: #fff !important;
        color: #64748b !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    #patientDetailModal .detail-tab.active {
        border-color: var(--xy-blue) !important;
        background: var(--xy-blue-soft) !important;
        color: var(--xy-blue) !important;
        box-shadow: inset 0 0 0 1px #d5e8ff;
    }

    #patientDetailModal .modal-body,
    #patientDetailModal .patient-detail-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 12px 12px calc(104px + env(safe-area-inset-bottom, 0px)) !important;
        background: var(--xy-page) !important;
        -webkit-overflow-scrolling: touch;
    }

    #patientDetailModal .doctor-command-center,
    #patientDetailModal .patient-workbench-grid,
    #patientDetailModal .workbench-grid,
    #patientDetailModal .followup-two-col,
    #patientDetailModal .return-decision-current,
    #patientDetailModal .return-trigger-grid,
    #patientDetailModal .lab-due-detail-grid,
    #patientDetailModal .overview-status-grid {
        grid-template-columns: 1fr !important;
    }

    #patientDetailModal .dcc-primary,
    #patientDetailModal .workbench-card,
    #patientDetailModal .workbench-panel,
    #patientDetailModal .dcc-risk-card,
    #patientDetailModal .return-decision-current,
    #patientDetailModal .return-trigger-card,
    #patientDetailModal .push-module-card,
    #patientDetailModal .push-track-card {
        border-radius: 12px !important;
    }

    #patientDetailModal .dcc-primary { padding: 14px !important; }

    #patientDetailModal .dcc-title {
        font-size: 18px !important;
        line-height: 1.35 !important;
    }

    #patientDetailModal .dcc-meta { gap: 6px; }

    #patientDetailModal .dcc-action-item {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
    }

    #patientDetailModal .dcc-action-btn {
        width: 100%;
        min-height: 38px;
    }

    #patientDetailModal .panel-heading,
    #patientDetailModal .plan-section-header,
    #patientDetailModal .push-section-header {
        align-items: flex-start !important;
        gap: 10px !important;
        flex-direction: column !important;
    }

    #patientDetailModal .plan-section-header #timeline-filters { width: 100%; }

    #timeline-filters {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto !important;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #timeline-filters::-webkit-scrollbar { display: none; }

    #timeline-filters .filter-chip {
        min-height: 36px;
        padding: 0 12px !important;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    #plan-indicator-cards {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 10px !important;
        -webkit-overflow-scrolling: touch;
    }

    #plan-indicator-cards .indicator-card {
        min-width: 126px !important;
        max-width: 126px !important;
        flex: 0 0 126px !important;
    }

    #patientDetailModal .tl-event {
        gap: 9px;
        padding: 10px 0;
    }

    #patientDetailModal .tl-body > div:first-child { flex-wrap: wrap; }
    #patientDetailModal .tl-detail-grid { grid-template-columns: 1fr !important; }

    .push-config-toolbar { padding: 14px !important; }

    .push-config-row,
    .push-config-fields,
    .push-config-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .push-config-fields label,
    .push-time-grid label {
        margin-top: 2px;
    }

    .push-config-fields select,
    .push-config-actions .btn,
    .push-time-grid input,
    .push-time-grid select {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
    }

    .push-time-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    #patientDetailModal .push-module-header {
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }

    #patientDetailModal .push-module-title {
        flex: 1 1 100%;
        min-width: 0;
    }

    #patientDetailModal .push-module-freq {
        margin-left: 0;
        margin-right: auto;
    }

    #patientDetailModal .push-item-row,
    #patientDetailModal .schedule-item-row,
    #patientDetailModal .push-schedule-item,
    #patientDetailModal .existing-reminder-item {
        align-items: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    #patientDetailModal .push-item-row .pi-text,
    #patientDetailModal .schedule-item-row .sch-question,
    #patientDetailModal .push-schedule-item .ps-note {
        flex-basis: 100%;
        min-width: 0;
    }

    #patientDetailModal .pi-actions { margin-left: auto; }

    #patientDetailModal .upload-row,
    #patientDetailModal .upload-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    #patientDetailModal .upload-actions .btn,
    #patientDetailModal .upload-row > .btn,
    #patientDetailModal .selected-file-name {
        width: 100%;
        max-width: none;
    }

    #patientDetailModal .quick-action-btn {
        min-height: 42px;
        flex: 1 1 calc(50% - 8px);
        padding: 9px 10px;
        font-size: 13px;
    }
}

/* ============================================================
   Image reference UI kit polish: light medical SaaS components
   ============================================================ */
:root {
    --xy-ref-bg: #f3f7fc;
    --xy-ref-card: #ffffff;
    --xy-ref-card-soft: #f8fbff;
    --xy-ref-line: #dce7f5;
    --xy-ref-line-soft: #edf3fa;
    --xy-ref-blue: #1677ff;
    --xy-ref-blue-dark: #0f63df;
    --xy-ref-blue-soft: #eaf4ff;
    --xy-ref-text: #0f1f3a;
    --xy-ref-muted: #6f7f95;
    --xy-ref-green: #19b66a;
    --xy-ref-green-soft: #e9f9f1;
    --xy-ref-orange: #ff7a1a;
    --xy-ref-orange-soft: #fff3e8;
    --xy-ref-red: #ef4444;
    --xy-ref-red-soft: #fff0f0;
    --xy-ref-shadow: 0 10px 28px rgba(40, 84, 132, 0.08);
    --xy-ref-shadow-soft: 0 4px 16px rgba(40, 84, 132, 0.055);
}

.dashboard-page,
#patientDetailModal,
#patientDetailModal .patient-workbench-modal {
    background:
        radial-gradient(circle at 8% 0%, rgba(22, 119, 255, 0.06), transparent 28rem),
        linear-gradient(180deg, #fbfdff 0%, var(--xy-ref-bg) 100%) !important;
    color: var(--xy-ref-text);
}

.dashboard-nav,
.tabs,
.patient-list-panel,
.patient-mobile-card,
#patientDetailModal .patient-hero,
#patientDetailModal .modal-header,
#patientDetailModal .detail-tabs,
.workbench-card,
.workbench-panel,
.dcc-primary,
.dcc-risk-card,
.return-decision-current,
.return-trigger-card,
.push-module-card,
.push-track-card,
.followup-plan-card,
.medication-item,
.overview-status-card,
.upload-panel,
.draft-preview,
.photo-capture-area,
.modal {
    border: 1px solid var(--xy-ref-line) !important;
    background: var(--xy-ref-card) !important;
    box-shadow: var(--xy-ref-shadow-soft);
}

.patient-list-panel,
.patient-mobile-card,
.workbench-card,
.workbench-panel,
.dcc-primary,
.dcc-risk-card,
.return-decision-current,
.return-trigger-card,
.push-module-card,
.push-track-card,
.followup-plan-card,
.overview-status-card,
.upload-panel,
.draft-preview,
.photo-capture-area {
    border-radius: 12px !important;
}

.dcc-primary,
.patient-create-hero {
    background:
        linear-gradient(135deg, rgba(234, 244, 255, 0.94), #fff 68%),
        radial-gradient(circle at 96% 4%, rgba(22, 119, 255, 0.08), transparent 13rem) !important;
}

.workbench-card:hover,
.workbench-panel:hover,
.push-module-card:hover,
.patient-mobile-card:hover {
    border-color: #b9d7ff !important;
    box-shadow: var(--xy-ref-shadow);
}

.btn,
.action-btn,
.quick-action-btn,
.dcc-action-btn,
.filter-chip,
#timeline-filters .filter-chip,
.pagination-btn,
.push-add-item-btn,
.mode-tab {
    min-height: 38px;
    border-radius: 9px !important;
    font-weight: 700;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn-primary {
    background: linear-gradient(180deg, #2283ff 0%, var(--xy-ref-blue-dark) 100%) !important;
    border: 1px solid #0f63df !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(22, 119, 255, 0.22);
}

.btn-outline,
.btn-secondary,
.quick-action-btn,
.dcc-action-btn,
.filter-chip,
#timeline-filters .filter-chip {
    border: 1px solid #b7d7ff !important;
    background: #fff !important;
    color: var(--xy-ref-blue) !important;
}

.btn:hover,
.action-btn:hover,
.quick-action-btn:hover,
.dcc-action-btn:hover,
.filter-chip:hover,
#timeline-filters .filter-chip:hover {
    transform: translateY(-1px);
}

.btn-primary:hover {
    box-shadow: 0 10px 22px rgba(22, 119, 255, 0.28) !important;
}

.btn-outline:hover,
.btn-secondary:hover,
.quick-action-btn:hover,
.dcc-action-btn:hover,
.filter-chip:hover,
#timeline-filters .filter-chip:hover {
    background: var(--xy-ref-blue-soft) !important;
    border-color: var(--xy-ref-blue) !important;
}

.detail-tab,
.tabs .tab {
    border-radius: 999px !important;
    border: 1px solid transparent !important;
}

.detail-tab.active,
.tabs .tab.active,
#timeline-filters .filter-chip.active {
    background: var(--xy-ref-blue) !important;
    border-color: var(--xy-ref-blue) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(22, 119, 255, 0.18);
}

.patient-avatar-lg,
.patient-card-avatar,
.photo-capture-icon,
.med-icon,
.tl-dot,
.ic-icon,
.push-module-icon,
.ps-type,
.pr-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--xy-ref-blue-soft);
    color: var(--xy-ref-blue);
}

.patient-avatar-lg {
    background: linear-gradient(180deg, #eaf4ff, #dbeeff) !important;
    color: var(--xy-ref-blue) !important;
    box-shadow: inset 0 0 0 1px #cfe4ff, 0 8px 18px rgba(22, 119, 255, 0.14) !important;
}

.ai-status-pill,
.status,
.disease-tag,
.info-chip,
.management-todo-chip,
.lab-status-badge,
.med-status,
.push-module-type-badge,
.push-rv-status,
.checkin-status-badge,
.phase-badge,
.tn-status-badge,
.rtc-badge,
.tdl-flag {
    min-height: 24px;
    border-radius: 7px !important;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.25;
}

.ai-status-pill.active,
.status.active,
.risk-low,
.lab-status-badge.normal,
.med-status.active,
.push-status-phase.remission,
.checkin-status-badge.answered,
.phase-badge.remission,
.tn-status-badge.completed,
.ai-push-badge.ok {
    background: var(--xy-ref-green-soft) !important;
    border-color: #b9efd2 !important;
    color: #0d8b4f !important;
}

.risk-warning,
.lab-status-badge.overdue,
.med-status.pending,
.push-status-phase.acute,
.checkin-status-badge.pending,
.phase-badge.acute,
.tn-status-badge.soon,
.ai-push-badge.warn,
.tdl-flag.high {
    background: var(--xy-ref-orange-soft) !important;
    border-color: #ffd3ad !important;
    color: #e45f00 !important;
}

.risk-high,
.lab-status-badge.abnormal,
.return-trigger-card.need .rtc-badge,
.ai-push-badge.bad {
    background: var(--xy-ref-red-soft) !important;
    border-color: #ffc9c9 !important;
    color: #e03131 !important;
}

.lab-status-badge.unknown,
.med-status.prn,
.push-module-type-badge.tracking,
.ai-push-badge.info {
    background: var(--xy-ref-blue-soft) !important;
    border-color: #cfe4ff !important;
    color: var(--xy-ref-blue) !important;
}

.form-group input,
.form-group select,
.form-group textarea,
.push-config-fields select,
.push-time-grid input,
.push-time-grid select,
.push-module-freq select,
.push-edit-popup-content input,
.push-edit-popup-content select,
.push-edit-popup-content textarea,
.template-box,
.draft-preview textarea {
    min-height: 38px;
    border: 1px solid var(--xy-ref-line) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: var(--xy-ref-text);
    box-shadow: inset 0 1px 2px rgba(40, 84, 132, 0.035);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.push-config-fields select:focus,
.push-time-grid input:focus,
.push-time-grid select:focus,
.template-box:focus,
.draft-preview textarea:focus {
    outline: none;
    border-color: var(--xy-ref-blue) !important;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.upload-panel,
.photo-capture-area {
    border-style: dashed !important;
    border-color: #a9ccff !important;
    background:
        linear-gradient(180deg, #fbfdff, #f7fbff) !important;
}

.photo-capture-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    font-size: 24px;
    margin-bottom: 12px;
    box-shadow: inset 0 0 0 1px #cfe4ff;
}

.draft-preview {
    background: linear-gradient(180deg, #fff, #fbfdff) !important;
}

.indicator-card {
    border: 1px solid var(--xy-ref-line) !important;
    border-radius: 11px !important;
    background: #fff !important;
    box-shadow: var(--xy-ref-shadow-soft);
}

.indicator-card .ic-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    font-size: 14px;
}

.indicator-card .ic-value {
    color: var(--xy-ref-text) !important;
    font-variant-numeric: tabular-nums;
}

.indicator-card.trend-up {
    border-color: #ffd3ad !important;
    background: linear-gradient(180deg, #fff, #fff8f3) !important;
}

.indicator-card.trend-down {
    border-color: #b9efd2 !important;
    background: linear-gradient(180deg, #fff, #f4fff8) !important;
}

.tl-event {
    border: 1px solid var(--xy-ref-line-soft) !important;
    border-radius: 11px;
    background: #fff;
    padding: 12px !important;
    margin-bottom: 9px;
}

.tl-event .tl-dot {
    width: 30px;
    height: 30px;
    font-size: 13px;
    box-shadow: inset 0 0 0 1px #cfe4ff;
}

.tl-event .tl-type,
.tl-toggle-btn {
    border-radius: 7px;
}

.tl-event .tl-detail {
    border-color: var(--xy-ref-line) !important;
    background: var(--xy-ref-card-soft) !important;
}

.push-module-card {
    overflow: hidden;
}

.push-module-header {
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.push-module-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.push-item-row,
.schedule-item-row,
.push-schedule-item,
.push-related-item,
.existing-reminder-item,
.photo-result-item,
.lab-history-item {
    border-radius: 9px !important;
    border: 1px solid var(--xy-ref-line-soft) !important;
    background: var(--xy-ref-card-soft) !important;
}

.push-item-row .pi-num,
.schedule-item-row .sch-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--xy-ref-blue-soft);
    color: var(--xy-ref-blue);
}

.patient-empty-state,
.patient-error-state,
.empty-panel,
#patientDetailModal .placeholder-text {
    position: relative;
    min-height: 150px;
    padding: 82px 18px 24px !important;
    background: linear-gradient(180deg, #fff, #f8fbff) !important;
}

.patient-empty-state::before,
.patient-error-state::before,
.empty-panel::before,
#patientDetailModal .placeholder-text::before {
    content: "\f187";
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef3f9;
    color: #a9b5c4;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 22px;
}

@media (max-width: 768px) {
    #patientDetailModal .patient-hero,
    #patientDetailModal .detail-tabs {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(14px);
    }

    #patientDetailModal .workbench-card,
    #patientDetailModal .workbench-panel,
    #patientDetailModal .dcc-primary,
    #patientDetailModal .dcc-risk-card,
    #patientDetailModal .push-module-card,
    #patientDetailModal .upload-panel,
    #patientDetailModal .photo-capture-area {
        box-shadow: none;
    }

    #patientDetailModal .photo-capture-icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
}

/* ============================================================
   复诊依据与触发项 — 布局 + 卡片 + 表格
   ============================================================ */
.return-decision-panel { display:flex; flex-direction:column; gap:12px; }
.return-trigger-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }

/* 顶部一行：日期 + 依据 + 关注点 + 来源 */
.rd-top-row { display:flex; gap:16px; margin-bottom:16px; }
.rd-date-card { flex:0 0 180px; background:#f8fafc; border-radius:8px; padding:16px; text-align:center; }
.rd-date-label { font-size:12px; color:#6b7280; margin-bottom:4px; }
.rd-date-value { font-size:22px; font-weight:700; color:#1f2937; }
.rd-date-status { font-size:13px; color:#6b7280; margin-top:2px; }
.rd-date-type { font-size:12px; color:#9ca3af; margin-top:6px; }

.rd-basis-card, .rd-focus-card { flex:1; background:#f8fafc; border-radius:8px; padding:12px 16px; }
.rd-card-title { font-weight:600; font-size:13px; color:#374151; margin-bottom:8px; }
.rd-basis-manual { font-size:12px; color:#1f2937; }
.rd-basis-item { display:flex; align-items:flex-start; gap:8px; margin-bottom:6px; font-size:12px; }
.rd-basis-title { flex:0 0 56px; color:#6b7280; }
.rd-basis-finding { color:#9ca3af; }
.rd-basis-finding.rd-triggered { color:#d97706; }
.rd-empty-hint { font-size:12px; color:#9ca3af; }

.rd-focus-label { font-size:12px; color:#6b7280; margin-bottom:4px; }
.rd-focus-value { font-size:12px; color:#1f2937; margin-bottom:8px; }
.rd-focus-list { font-size:12px; color:#1f2937; }
.rd-focus-item { margin-bottom:2px; }

.rd-source-badge { flex:0 0 130px; border-radius:8px; padding:12px; text-align:center; font-size:11px; background:#fef9c3; border:1px solid #fde68a; }
.rd-source-badge.rd-source-confirmed { background:#f0fdf4; border:1px solid #bbf7d0; }
.rd-source-status { font-weight:600; margin-bottom:6px; color:#854d0e; }
.rd-source-confirmed .rd-source-status { color:#166534; }
.rd-source-hint { font-size:10px; color:#6b7280; margin-bottom:6px; }
.rd-confirm-btn { font-size:11px; padding:3px 10px; background:#16a34a; color:#fff; border:none; border-radius:4px; cursor:pointer; }
.rd-revert-link { font-size:10px; color:#9ca3af; text-decoration:underline; }

/* 医生确认表单 */
.rd-evidence { border:1px dashed #cbd5e1; border-radius:8px; padding:9px 10px; color:#475569; font-size:12px; line-height:1.55; background:#fff; }
.rd-evidence-form { display:grid; grid-template-columns:160px 150px 1fr auto; gap:8px; align-items:end; }
.rd-form-label { font-size:12px; color:#374151; }
.rd-form-input { width:100%; margin-top:4px; }
.rd-form-textarea { grid-column:1 / -1; min-height:54px; }

/* 触发卡片 */
.rtc-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.rtc-title { font-size:13px; font-weight:700; color:#111827; }
.rtc-body { color:#4b5563; font-size:12px; line-height:1.5; }
.rtc-body-compact { margin-bottom:8px; }
.rtc-flow { margin-top:8px; color:#64748b; font-size:11px; }
.return-trigger-card.need { border-color:#fecaca; background:#fff7f7; }
.return-trigger-card.watch { border-color:#fde68a; background:#fffbeb; }
.return-trigger-card.ok { border-color:#bbf7d0; background:#f0fdf4; }
.return-trigger-card.neutral { border-color:#e5e7eb; background:#f9fafb; }
.return-trigger-card.need .rtc-badge { background:#fee2e2; color:#b91c1c; }
.return-trigger-card.watch .rtc-badge { background:#fef3c7; color:#92400e; }
.return-trigger-card.ok .rtc-badge { background:#dcfce7; color:#166534; }
.return-trigger-card.neutral .rtc-badge { background:#e5e7eb; color:#374151; }

/* 触发维度详情表格 */
.rtc-table { width:100%; border-collapse:collapse; font-size:12px; margin-top:4px; }
.rtc-table th { text-align:left; padding:5px 8px; font-size:10px; color:#9ca3af; font-weight:600; border-bottom:1px solid #f0f0f0; background:#fafafa; }
.rtc-table td { padding:6px 8px; border-bottom:1px solid #f5f5f5; color:#374151; }
.rtc-table .s-ok { color:#166534; font-weight:500; }
.rtc-table .s-warn { color:#92400e; font-weight:500; }
.rtc-table .s-bad { color:#b91c1c; font-weight:500; }
.rtc-table .s-miss { color:#9ca3af; }
.rtc-table .s-info { color:#2563eb; }
.rtc-tag { display:inline-block; padding:1px 6px; border-radius:3px; font-size:11px; background:#e5e7eb; color:#374151; }

/* ═══ 饮食打卡食材明细表（改5/改6） ═══ */
.food-detail-table { margin-top:8px; background:#f9fafb; border-radius:6px; padding:8px 10px; font-size:13px; border:1px solid #e5e7eb; }
.food-detail-head { display:grid; grid-template-columns: 1fr 60px 100px; gap:6px; font-weight:600; color:#6b7280; padding-bottom:4px; border-bottom:1px solid #e5e7eb; margin-bottom:4px; }
.food-row { display:grid; grid-template-columns: 1fr 60px 100px; gap:6px; padding:2px 0; align-items:center; font-size:12px; }
.food-row.food-missing { color:#f59e0b; }
.food-row.food-adjusted { color:#7c3aed; }
.food-row.food-ok { color:#374151; }
.food-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.food-grams, .food-kcal { text-align:right; }
.food-note { color:#9ca3af; font-size:11px; }
.food-summary-row { display:flex; gap:12px; padding:6px 0; font-size:11px; color:#6b7280; border-top:1px solid #e5e7eb; margin-top:4px; flex-wrap:wrap; }
.food-edit-area { margin-top:6px; display:flex; justify-content:flex-end; }
.btn-edit-meal { padding:4px 12px; font-size:12px; border:1px solid #d1d5db; border-radius:4px; background:#fff; color:#374151; cursor:pointer; }
.btn-edit-meal:hover { background:#f3f4f6; border-color:#9ca3af; }

/* ═══ 编辑饮食打卡模态窗（改6b） ═══ */
.wp-edit-meal-overlay { position:fixed; top:0; left:0; width:100%; height:100%; z-index:10000; display:flex; align-items:center; justify-content:center; }
.wp-edit-meal-bg { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.4); }
.wp-edit-meal-panel { position:relative; width:560px; max-width:95vw; max-height:85vh; background:#fff; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,0.3); overflow:hidden; display:flex; flex-direction:column; }
.wp-edit-meal-header { display:flex; align-items:center; padding:16px 20px; border-bottom:1px solid #e5e7eb; gap:12px; }
.wp-edit-meal-header h3 { margin:0; font-size:16px; flex:1; }
.meal-date-sub { font-size:12px; color:#9ca3af; }
.wp-edit-meal-close { border:none; background:none; font-size:24px; cursor:pointer; color:#6b7280; padding:0 4px; line-height:1; }
.wp-edit-meal-close:hover { color:#111827; }
.wp-edit-meal-body { padding:16px 20px; overflow-y:auto; flex:1; }
.wp-edit-meal-body .edit-section { margin-bottom:16px; }
.wp-edit-meal-body .edit-section h4 { font-size:14px; color:#374151; margin:0 0 8px; }
.wp-edit-meal-body .edit-section label { display:block; font-size:13px; color:#6b7280; margin-bottom:4px; }
.edit-food-table { width:100%; border-collapse:collapse; font-size:13px; }
.edit-food-table th { text-align:left; padding:6px 8px; color:#6b7280; font-weight:500; border-bottom:1px solid #e5e7eb; font-size:12px; }
.edit-food-table td { padding:4px 8px; border-bottom:1px solid #f3f4f6; }
.edit-food-table input { width:70px; padding:3px 6px; border:1px solid #d1d5db; border-radius:4px; font-size:12px; }
.edit-food-table input:focus { outline:none; border-color:#6366f1; box-shadow:0 0 0 2px rgba(99,102,241,0.15); }
.food-edit-row.missing td { background:#fffbeb; }
.food-edit-row.adjusted td { background:#f5f3ff; }
.food-edit-row.food-add-row td { background:#f0fdf4; }
.food-status-tag { display:inline-block; padding:1px 6px; border-radius:3px; font-size:11px; }
.food-status-tag.missing { background:#fef3c7; color:#b45309; }
.food-status-tag.adjusted, .food-status-tag.added { background:#ede9fe; color:#7c3aed; }
.food-status-tag.ok { background:#d1fae5; color:#065f46; }
.edit-history-list { max-height:120px; overflow-y:auto; }
.edit-history-item { display:flex; gap:12px; padding:4px 0; font-size:12px; color:#6b7280; border-bottom:1px solid #f3f4f6; }
.eh-time { color:#9ca3af; white-space:nowrap; }
.eh-by { color:#374151; font-weight:500; }
.eh-changes { color:#6b7280; }
.wp-edit-meal-footer { display:flex; justify-content:flex-end; gap:8px; padding:12px 20px; border-top:1px solid #e5e7eb; }
.btn-sm { padding:3px 10px; font-size:12px; border:1px solid #d1d5db; border-radius:4px; background:#fff; color:#374151; cursor:pointer; }
.btn-sm:hover { background:#f3f4f6; }

@media (max-width:768px) {
    .rd-top-row { flex-direction:column; }
    .rd-date-card { flex:auto; }
    .return-trigger-grid { grid-template-columns:1fr; }
    .rd-evidence-form { grid-template-columns:1fr 1fr; }
}
