:root {
    --bg: #f4f6f5;
    --panel: #ffffff;
    --text: #1d2b27;
    --muted: #6b7d76;
    --line: #e4eae7;
    --primary: #16795a;
    --primary-dark: #0f5c44;
    --primary-light: #2ba57e;
    --primary-soft: #e6f4ee;
    --gradient: linear-gradient(135deg, #16795a 0%, #2ba57e 100%);
    --gradient-soft: linear-gradient(135deg, #e6f4ee 0%, #f0faf5 100%);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 32, 0.04);
    --shadow: 0 2px 8px rgba(16, 40, 32, 0.06), 0 12px 32px rgba(16, 40, 32, 0.08);
    --shadow-lg: 0 8px 24px rgba(16, 40, 32, 0.10), 0 24px 64px rgba(16, 40, 32, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none; }

button, input, select { font: inherit; color: inherit; }

/* ---------- 登录 ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 500px at 12% -10%, #dff0e7 0%, transparent 60%),
        radial-gradient(700px 460px at 100% 110%, #e8f1ec 0%, transparent 55%),
        var(--bg);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--primary);
    letter-spacing: 0.4px;
}

.login-brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.login-card h1 {
    margin: 18px 0 6px;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.login-sub {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 13px;
}

.login-form { display: grid; gap: 14px; }

.login-form label { display: grid; gap: 6px; }

.login-form span {
    font-size: 12px;
    color: var(--muted);
}

.login-form input {
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfb;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 121, 90, 0.12);
}

.btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    transition: all .15s ease;
    font-weight: 500;
}

.btn:hover { background: #f7faf9; }
.btn:active { transform: scale(.97); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; height: 46px; }
.btn.primary {
    background: var(--gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(22, 121, 90, .25);
}
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 4px 12px rgba(22, 121, 90, .3); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.ghost.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.login-hint {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}
.wechat-login {
    margin-top: 12px;
    background: #07c160;
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.wechat-login:hover { background: #06ad56; }
.wechat-login:disabled { opacity: .6; }

/* ---------- 布局 ---------- */
.shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 216px;
    background: #12211c;
    color: #dbe7e1;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 20;
}

.side-brand {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .4px;
    color: #fff;
    padding: 4px 10px 18px;
}

.side-brand span { color: #6fe0ae; }

.sidebar nav { display: grid; gap: 4px; }

.nav-item {
    text-align: left;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #b9ccc4;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 500; }

.side-foot {
    margin-top: auto;
    font-size: 12px;
    color: #7f978e;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.main { margin-left: 216px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    background: rgba(244, 246, 245, .88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.page-title { font-size: 16px; font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.org-select {
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    max-width: 200px;
}

.user-chip {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    color: var(--muted);
}

.user-chip .sep { margin: 0 6px; color: #c3cfca; }

.content { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- 汉堡菜单（移动端） ---------- */
.menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    cursor: pointer;
    flex-shrink: 0;
}

.menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 19;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- 底部 Tab 导航（移动端） ---------- */
.tabbar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    display: none;
    z-index: 15;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 0 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s, transform .15s;
    font-size: 11px;
    font-weight: 500;
}

.tab-item:active { transform: scale(.92); }

.tab-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-item.active .tab-icon svg {
    fill: var(--primary-soft);
    stroke: var(--primary);
}

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

/* ---------- 更多功能页 ---------- */
.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.more-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    cursor: pointer;
    transition: all .15s;
}

.more-item:active { transform: scale(.96); background: var(--primary-soft); }

.more-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--gradient-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.more-label { font-size: 13px; color: var(--text); font-weight: 500; }

/* ---------- 卡片与面板 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 16px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
}

.stat-card:active { transform: scale(.98); }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 4px;
    background: var(--gradient);
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #f0faf5 0%, #fff 60%); }
.stat-card:nth-child(1)::before { background: linear-gradient(180deg, #16795a, #2ba57e); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #eff6ff 0%, #fff 60%); }
.stat-card:nth-child(2)::before { background: linear-gradient(180deg, #2563eb, #60a5fa); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #fffbeb 0%, #fff 60%); }
.stat-card:nth-child(3)::before { background: linear-gradient(180deg, #d97706, #fbbf24); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #faf5ff 0%, #fff 60%); }
.stat-card:nth-child(4)::before { background: linear-gradient(180deg, #7c3aed, #a78bfa); }

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

.stat-card strong {
    font-size: 26px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -.5px;
}

.stat-card small { font-size: 14px; color: var(--muted); margin-left: 2px; font-weight: 500; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    padding-left: 10px;
}

.panel-head h2::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 14px;
    border-radius: 2px;
    background: var(--gradient);
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.org-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    display: grid;
    gap: 10px;
    background: #fcfdfd;
    transition: box-shadow .15s;
}

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

.org-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.org-card-head .rate {
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 15px;
}

.bar {
    height: 8px;
    border-radius: 999px;
    background: #e9efec;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gradient);
    transition: width .4s ease;
}

.org-card-foot {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
}

.org-card-foot span { font-weight: 500; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.dot.free { background: #d9e0dd; }
.dot.reserved { background: #9fc3f0; }
.dot.occupied { background: #63c79c; }
.dot.maintenance { background: #efc27a; }
.dot.isolated { background: #e99690; }

/* ---------- 床位图 ---------- */
.toolbar { display: grid; gap: 12px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs button, .floor-chips button {
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    color: var(--muted);
    transition: all .15s;
    font-weight: 500;
}

.tabs button:hover, .floor-chips button:hover { border-color: var(--primary-light); color: var(--primary); }

.tabs button.active, .floor-chips button.active {
    border-color: transparent;
    color: #fff;
    background: var(--gradient);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(22, 121, 90, .2);
}

.floor-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.room-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-sm);
}

.room-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--line);
}

.room-no { font-weight: 600; font-size: 15px; letter-spacing: .2px; color: var(--text); }

.room-type {
    font-size: 12px;
    color: var(--muted);
    background: var(--primary-soft);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.bed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }

.bed {
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    padding: 4px 2px;
    transition: transform .12s, box-shadow .12s, filter .12s;
}

.bed:active { transform: scale(.95); }
.bed:hover { box-shadow: 0 2px 8px rgba(16, 40, 32, .12); filter: brightness(1.02); }

.bed .bed-no { font-size: 12px; font-weight: 600; }
.bed em { font-style: normal; font-size: 11px; opacity: .85; }
.bed-elder {
    font-size: 10px;
    line-height: 1.15;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.bed.free { background: #f3f5f4; border-color: #dde4e1; color: #6b7d76; }
.bed.reserved { background: #e8f1fc; border-color: #c2dbf7; color: #1e40af; }
.bed.occupied { background: #e0f5ea; border-color: #b8e6cc; color: #0f6b48; }
.bed.maintenance { background: #fdf3de; border-color: #f3d8a8; color: #92400e; }
.bed.isolated { background: #fde8e6; border-color: #f2bdb8; color: #991b1b; }

/* ---------- 床位详情弹窗 ---------- */
.bed-modal { max-width: 520px; }

.resident-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    background: var(--primary-soft);
    border: 1px solid #c7e6d8;
    border-radius: 10px;
}

.resident-head { display: flex; align-items: center; gap: 8px; }
.resident-head strong { font-size: 16px; }
.resident-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.resident-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.bed-section { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.bed-section .sub-head { margin-bottom: 8px; }

.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.bed-task {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dashed var(--line);
}

.bed-task:last-child { border-bottom: none; }
.bed-task-time { min-width: 44px; color: var(--muted); }
.bed-task-name { flex: 1; }

.bed-vital {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px dashed var(--line);
}

.bed-vital:last-child { border-bottom: none; }
.bed-vital-time { color: var(--muted); }

/* ---------- 列表 ---------- */
.org-list { display: grid; gap: 10px; }

.org-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfdfd;
    flex-wrap: wrap;
}

.org-row-main { display: flex; align-items: center; gap: 10px; }

.org-row-meta { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid transparent;
}

.tag.ok { background: var(--primary-soft); color: var(--primary); border-color: #c7e6d8; }
.tag.off { background: #f1f3f2; color: var(--muted); border-color: var(--line); }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; min-width: 640px; }

.table th, .table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table th { font-size: 12px; color: var(--muted); font-weight: 500; background: #fafcfb; }
.table tbody tr:hover { background: #fafcfb; }

.empty { color: var(--muted); font-size: 13px; padding: 8px 2px; }

/* ---------- 弹层 ---------- */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(10, 24, 19, .42);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 40;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 { margin: 0; font-size: 15px; }

.modal-body { padding: 16px 18px 20px; }

.modal-tip { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

.status-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    background: #12211c;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    z-index: 60;
    box-shadow: var(--shadow);
}

/* ---------- 老人档案 ---------- */
.head-actions { display: flex; gap: 8px; align-items: center; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.input {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfb;
    outline: none;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 121, 90, .12);
    background: #fff;
}

.input:disabled { background: #f1f3f2; color: var(--muted); }

.filter-bar .input { flex: 1 1 160px; max-width: 240px; }

.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; }

.link-btn {
    border: 0;
    background: none;
    padding: 0;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}

.link-btn:hover { text-decoration: underline; }

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

.elder-list { display: grid; gap: 8px; }

.elder-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfdfd;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s;
}

.elder-row:hover { border-color: #bfded1; background: #f7fbf9; }

.elder-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex: 0 0 auto;
}

.elder-avatar.male { background: #e5f0fb; color: #1d4ed8; }
.elder-avatar.female { background: #fbe9ef; color: #a9275c; }

.elder-main { flex: 1 1 auto; min-width: 0; }

.elder-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.elder-title strong { font-size: 15px; }

.elder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.elder-bed { font-size: 12px; color: var(--muted); text-align: right; flex: 0 0 auto; }

.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge.ok { background: var(--primary-soft); color: var(--primary); border-color: #c7e6d8; }
.badge.warn { background: #fdf0d9; color: #99670e; border-color: #f1d6a6; }
.badge.info { background: #e5f0fb; color: #1d4ed8; border-color: #bcd7f5; }
.badge.off { background: #f1f3f2; color: var(--muted); border-color: var(--line); }
.badge.soft { background: #f4f6f5; color: var(--muted); border-color: var(--line); }

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}

.pager-actions { display: flex; align-items: center; gap: 10px; }

.pager-num { font-variant-numeric: tabular-nums; }

/* ---------- 详情侧滑 ---------- */
.sheet-mask {
    position: fixed;
    inset: 0;
    background: rgba(10, 24, 19, .42);
    display: flex;
    justify-content: flex-end;
    z-index: 32;
}

.sheet {
    width: min(560px, 100%);
    height: 100%;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(16, 40, 32, .12);
    animation: sheet-in .2s ease;
}

@keyframes sheet-in {
    from { transform: translateX(24px); opacity: .6; }
    to { transform: translateX(0); opacity: 1; }
}

.sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.sheet-head h3 { margin: 0 0 4px; font-size: 17px; }

.sheet-head h3 small {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    margin-left: 6px;
}

.sheet-head p { margin: 0; font-size: 12px; color: var(--muted); }

.sheet-head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.sheet-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 14px 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.sheet-tabs button {
    border: 0;
    background: none;
    padding: 8px 10px 12px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.sheet-tabs button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

.sheet-body { padding: 16px 18px 28px; overflow-y: auto; flex: 1 1 auto; }

.kv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }

.kv {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.kv.wide { grid-column: 1 / -1; }

.kv span { font-size: 12px; color: var(--muted); }

.kv b { font-weight: 500; word-break: break-all; }

.stack { display: grid; gap: 10px; }

.sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

.mini-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    background: #fcfdfd;
    display: grid;
    gap: 6px;
}

.mini-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mini-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}

.mini-card-foot { display: flex; gap: 8px; }

.risk-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.mini-note { margin: 0; font-size: 12px; color: var(--muted); }

.log-row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 12px;
    flex-wrap: wrap;
}

.log-time { color: var(--muted); font-variant-numeric: tabular-nums; }

.log-text { flex: 1 1 auto; }

.log-who { color: var(--muted); }

/* ---------- 表单 ---------- */
.modal.wide { max-width: 640px; }

.modal-body { max-height: 70vh; overflow-y: auto; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.field { display: grid; gap: 5px; min-width: 0; }

.field.wide { grid-column: 1 / -1; }

.field span { font-size: 12px; color: var(--muted); }

.field .input { width: 100%; }

.check-line {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 照护执行 ---------- */
.care-date { max-width: 150px; }

.care-tabs { margin: 4px 0 12px; }

.text-warn { color: #99670e !important; }

.modal-tip.wide { grid-column: 1 / -1; }

.care-mine { grid-column: auto; flex: 0 0 auto; white-space: nowrap; }

.precheck-warn {
    border: 1px solid #f0c36d;
    background: #fdf6e7;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.precheck-title { margin: 0 0 6px; font-weight: 600; color: #8a5a00; font-size: 13px; }

.precheck-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
}

.checkin-actions { margin: 8px 0 0; padding-left: 18px; }

.checkin-actions li { padding: 3px 0; font-size: 13px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }

/* 护理计划快捷添加 */
.quick-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #fbfdfc;
}

.quick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.quick-row em {
    font-style: normal;
    font-size: 12px;
    color: var(--muted);
    min-width: 68px;
}

.chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 3px 12px;
    font-size: 12px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.15s;
}

.chip:hover { border-color: var(--primary); color: var(--primary); }

.chip.on {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
    font-weight: 600;
}

/* 排班负责范围-床位维度 */
.bed-scope-group { margin-top: 6px; }
.bed-scope-floor { font-size: 12px; color: var(--muted); margin: 4px 0 2px; display: flex; align-items: center; gap: 8px; }
.bed-scope-floor .btn.link { font-size: 12px; padding: 0 4px; color: var(--primary); background: none; border: none; cursor: pointer; }
.bed-scope-floor .btn.link:hover { text-decoration: underline; }
.bed-scope-room { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.bed-scope-room-no { font-size: 12px; color: var(--text); min-width: 40px; flex-shrink: 0; }
.bed-scope-room .chips { padding-top: 0; }
.chip.covered { border-color: var(--muted); background: #f1f3f5; color: var(--muted); text-decoration: line-through; }
.chip.covered.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); text-decoration: none; }
.covered-tag { font-size: 10px; background: #868e96; color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 4px; font-weight: 400; }
.bed-scope-legend { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; gap: 12px; align-items: center; }
.bed-scope-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.bed-scope-legend .dot.free { background: #fff; border: 1px solid var(--line); }
.bed-scope-legend .dot.covered { background: #f1f3f5; border: 1px dashed var(--muted); }

.photo-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.photo-preview { position: relative; width: 120px; height: 120px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #f8f9fa; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 22px; padding: 0; }
.photo-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 8px; background: #f8f9fa; color: var(--muted); cursor: pointer; font-size: 14px; transition: all .15s; padding: 0 12px; text-align: center; }
.photo-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.photo-btn.disabled { opacity: .5; pointer-events: none; }

.template-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: var(--primary-soft);
    border-radius: 8px;
}

.field-hint { font-style: normal; color: var(--primary); font-weight: 600; margin-left: 6px; }

.care-elder-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    white-space: nowrap;
}

.care-elder-chip button {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-size: 15px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
}

.care-elder-chip button:hover { color: #b3261e; }

.care-cards { display: none; gap: 10px; }

.care-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.care-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.care-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--muted);
}

.care-card-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.care-card-actions .btn { min-height: 44px; flex: 1 1 auto; }

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

.plan-items { display: flex; flex-wrap: wrap; gap: 6px; }

.plan-item {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.plan-item-grid {
    display: grid;
    grid-template-columns: 1.6fr .8fr .9fr .9fr auto auto;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.exec-summary {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    background: var(--primary-soft);
    border-radius: 10px;
}

.exec-summary span { font-size: 12px; color: var(--muted); }

.scan-line { display: flex; gap: 8px; }

.scan-line .input { flex: 1 1 auto; }

/* ---------- 风险监管 / 用药 ---------- */
.risk-tabs { margin: 4px 0 12px; }

.med-cards { display: none; gap: 10px; }

.field textarea.input {
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
    padding: 8px 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.detail-item {
    display: grid;
    gap: 2px;
    padding: 8px 12px;
    background: #f5f7f6;
    border-radius: 10px;
}

.detail-item.wide { grid-column: 1 / -1; }

.detail-item span { font-size: 12px; color: var(--muted); }

.detail-item p { margin: 0; font-size: 13px; line-height: 1.6; }

.log-list { display: grid; gap: 8px; margin-top: 8px; }

.log-item {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
}

.log-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- 费用管理 ---------- */
.fee-unpaid { color: #d64545; font-weight: 600; }

.fee-stat-grid { margin-bottom: 14px; }

.fee-recon-panel { margin-top: 4px; }

.recon-list {
    display: grid;
    gap: 8px;
}

.recon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: #f5f7f6;
    border-radius: 10px;
}

.recon-row span { font-size: 13px; color: var(--muted); }

.recon-row b { font-size: 15px; }

.fee-detail { display: grid; gap: 10px; }

.fee-detail .sub-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    color: var(--text);
}

/* ---------- 家属 H5 ---------- */
.fam-body { background: #eef3f0; }

.fam-shell {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    box-shadow: 0 0 40px rgba(16, 40, 32, 0.08);
}

.fam-login-tip {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

.fam-header {
    padding: 22px 18px 18px;
    color: #fff;
    background: linear-gradient(135deg, #16795a 0%, #0f5c44 100%);
}

.fam-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
}

.fam-relation { font-size: 13px; font-weight: 400; opacity: .85; }

.fam-logout {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.fam-header-sub {
    margin: 6px 0 14px;
    font-size: 13px;
    opacity: .85;
}

.fam-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.fam-stat {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.fam-stat span { font-size: 12px; opacity: .85; }

.fam-stat b { font-size: 19px; }

.fam-stat .fee-unpaid { color: #ffd6d6; }

.fam-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.fam-tabs button {
    border: 0;
    background: transparent;
    padding: 13px 0;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.fam-tabs button.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

.fam-main { flex: 1; padding: 14px 14px 28px; }

.fam-section-title {
    margin: 16px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.4px;
}

.fam-section-title:first-child { margin-top: 2px; }

.fam-notice {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--panel);
    border-left: 3px solid var(--primary);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.fam-notice.fee { border-left-color: #d64545; }

.fam-notice.care { border-left-color: #1d4ed8; }

.fam-notice strong { font-size: 14px; }

.fam-notice p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.fam-info-card {
    background: var(--panel);
    border-radius: 12px;
    padding: 6px 14px;
    box-shadow: var(--shadow);
}

.fam-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.fam-info-row:last-child { border-bottom: 0; }

.fam-info-row span { color: var(--muted); }

.fam-info-row b { font-weight: 500; text-align: right; }

.fam-bill {
    background: var(--panel);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.fam-bill-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.fam-bill-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
    flex-wrap: wrap;
}

.fam-care {
    background: var(--panel);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.fam-care-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.fam-care p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }

.fam-care-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.fam-sheet-mask {
    position: fixed;
    inset: 0;
    background: rgba(12, 24, 19, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 50;
}

.fam-sheet {
    width: 100%;
    max-width: 560px;
    max-height: 86vh;
    overflow-y: auto;
    background: var(--bg);
    border-radius: 18px 18px 0 0;
    padding: 16px 16px 28px;
}

.fam-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    font-size: 16px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .sidebar { width: 176px; padding: 18px 10px; }
    .main { margin-left: 176px; }
}

@media (max-width: 768px) {
    /* 汉堡按钮显示 */
    .menu-btn { display: flex; }

    /* 遮罩层显示 */
    .sidebar-backdrop { display: block; }

    /* 侧边栏改为抽屉，默认滑出屏幕 */
    .sidebar {
        width: 240px;
        padding: 18px 14px;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 2px 0 16px rgba(0, 0, 0, .15);
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .side-brand { padding: 4px 8px 16px; font-size: 16px; }
    .nav-item { padding: 12px 10px; font-size: 14px; }

    /* 主内容全宽 */
    .main { margin-left: 0; }
    .content { padding: 14px 14px 80px; gap: 12px; }

    /* 底部 Tab 显示 */
    .tabbar { display: flex; }

    .topbar { padding: 0 12px; height: 56px; gap: 8px; }
    .page-title { font-size: 15px; }

    /* 用户信息精简 */
    .top-right { gap: 6px; }
    .org-select { max-width: 110px; font-size: 12px; }
    .user-chip { padding: 0 8px; font-size: 12px; }
    .user-chip .sep { margin: 0 4px; }

    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card strong { font-size: 22px; }
    .panel { padding: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .room-grid { grid-template-columns: 1fr; }
    .bed-list { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
    .bed { min-height: 52px; }
    .org-row { flex-direction: column; align-items: flex-start; }
    .org-row-meta { flex-wrap: wrap; gap: 10px; }
    .table { min-width: 640px; }
    .elder-row { flex-wrap: wrap; }
    .elder-bed { text-align: left; }
    .filter-bar .input { max-width: none; flex: 1 1 100%; }
    .kv-list { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .care-table { display: none; }
    .care-cards { display: grid; }
    .med-cards { display: grid; }
    .detail-grid { grid-template-columns: 1fr; }
    .head-actions { flex-wrap: wrap; }
    .care-date { max-width: none; flex: 1 1 100%; }
    .plan-grid { grid-template-columns: 1fr; }
    .plan-item-grid { grid-template-columns: 1fr 1fr; }
    .plan-item-grid .btn { min-height: 44px; }
    .btn.sm, .btn.xs { min-height: 40px; }
    .sheet-head { flex-direction: column; }
    .sheet-head-actions { justify-content: flex-start; }

    /* 更多页 3 列 */
    .more-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

    /* 弹窗适配 */
    .modal-mask { padding: 10px; }
    .modal { max-width: 94vw; }
    .modal-body { max-height: 60vh; }
    .modal.wide { max-width: 94vw; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-card strong { font-size: 20px; }
    .content { padding: 10px; }
    .panel { padding: 12px; }
    .login-card { padding: 24px 18px; }
    .login-card h1 { font-size: 19px; }
    .bed-list { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
    .bed { min-height: 48px; font-size: 12px; }
}

/* 院区床位结构配置 */
.struct-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.struct-summary span {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
}

.struct-add {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.struct-add .input { flex: 1; }

.struct-building {
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfdfd;
}

.struct-building-head,
.struct-floor-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.struct-building-head {
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
}

.struct-floor {
    padding: 8px 0 8px 12px;
    margin-top: 8px;
    border-left: 2px solid var(--primary-soft);
}

.struct-floor-name {
    font-size: 13px;
    font-weight: 600;
}

.struct-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.struct-actions select.mini-input { width: 118px; }

.mini-input {
    width: 76px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fbfcfb;
    font-size: 12px;
}

.struct-rooms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.struct-room {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
}

.struct-room em {
    font-style: normal;
    color: var(--muted);
}

.icon-btn.tiny {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 11px;
}

.btn.danger {
    color: #b42318;
    border-color: #f3c8c2;
    background: #fff5f4;
}

@media (max-width: 768px) {
    .struct-actions {
        width: 100%;
        margin-left: 0;
    }

    .struct-add { flex-direction: column; }
}

/* ===== 入住办理页快捷联动（第二批） ===== */
.checkin-banner {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.banner-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.banner-item:hover {
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.banner-item strong { font-size: 15px; }

.banner-item.warn {
    background: #fdf6ec;
    border-color: #f1d6a6;
    color: #99670e;
}

.banner-item.warn:hover { border-color: #d9a94f; }

tr.row-overdue td { background: #fffaf2; }

.badge.overdue-tag {
    margin-left: 6px;
    background: #fdeaea;
    color: #b42318;
    border-color: #f3c8c2;
}

.deposit-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8faf9;
    font-size: 13px;
}

.deposit-bar .deposit-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.deposit-bar .fee-unpaid { color: #b42318; }

.deposit-bar .refund-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.deposit-bar .refund-row select { width: 130px; }

/* ===== sug 联想下拉 ===== */
.sug-wrap { position: relative; }

.sug-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
    z-index: 30;
}

.sug-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sug-item:hover { background: var(--primary-soft); color: var(--primary); }

.sug-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--muted);
}

/* ===== 班次方案管理 ===== */
.scheme-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px;
    background: var(--primary-soft);
    border-radius: 8px;
}

.scheme-form-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.scheme-form-panel {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ===== 排班维度视图 ===== */
.view-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    margin-left: auto;
}

.view-toggle button {
    padding: 6px 14px;
    font-size: 13px;
    border: none;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.view-toggle button.active {
    background: var(--primary);
    color: #fff;
}

.shift-dim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dim-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.dim-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f7f9f8;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.dim-card-head strong {
    font-size: 14px;
}

.dim-card-body {
    padding: 6px 0;
}

.dim-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px dashed var(--line);
    font-size: 13px;
}

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

.dim-primary {
    font-weight: 600;
    min-width: 60px;
}

.dim-meta {
    color: var(--muted);
    font-size: 12px;
}

.dim-row .row-actions {
    margin-left: auto;
}


/* 任务派单 · 按人看板 */
.board-summary {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 14px;
    margin-top: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
}
.board-ok { color: var(--primary); font-weight: 600; }
.board-warn { color: #99670e; font-weight: 600; }
.board-elder {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 10px;
}
.board-elder.gap { border-color: #f1d6a6; background: #fffdf6; }
.board-elder-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.board-elder-head strong { font-size: 15px; }
.board-progress { margin-left: auto; font-size: 12px; }
.board-steps { display: grid; gap: 6px; margin-top: 10px; }
.board-step {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}
.board-step.missing { border-style: dashed; border-color: #f1d6a6; background: #fffaf0; }
.step-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 42px; }
.step-name { font-weight: 600; }
.step-assignee { color: var(--muted); }
.board-step .row-actions { margin-left: auto; }
.board-no-steps { margin-top: 8px; font-size: 13px; }
.board-keyword { width: 140px; }

/* 台账今日总览时间线 */
.tl-filter { margin: 10px 0 14px; }
.tl-filter .input { max-width: 220px; }
.tl-list { display: grid; gap: 10px; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; }
.tl-time {
    min-width: 46px;
    padding-top: 10px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    text-align: right;
}
.tl-body {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
}
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-meta { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; }
.tl-photo { margin-top: 8px; }
.tl-photo img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    cursor: zoom-in;
}
.warn-text { color: #b45309; }
