* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    background: #e9eef6;
    color: #1b2333;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* 手机外壳：桌面端居中显示，移动端全宽 */
.appbar,
.app-main,
.tabbar {
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- 顶部栏 ---------- */
.appbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 0.5px solid rgba(20, 40, 80, 0.08);
    padding-top: env(safe-area-inset-top);
    height: calc(52px + env(safe-area-inset-top));
}

.appbar-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    height: 52px;
}

.appbar-title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.appbar-back {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1677ff;
    font-size: 22px;
    cursor: pointer;
    user-select: none;
}

.appbar-back:active {
    background: rgba(22, 119, 255, 0.1);
}

.appbar-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #1677ff;
    cursor: pointer;
}

/* ---------- 主体 ---------- */
.app-main {
    padding: calc(60px + env(safe-area-inset-top)) 14px calc(84px + env(safe-area-inset-bottom));
    min-height: 100vh;
    background: #f2f5fa;
    animation: fade 0.18s ease;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(20, 60, 120, 0.05);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
}

.row .label {
    color: #6b7787;
    font-size: 13.5px;
    flex-shrink: 0;
}

.row .value {
    font-size: 13.5px;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.value-danger {
    color: #f53f3f;
    font-weight: 600;
}

.value-success {
    color: #00b578;
    font-weight: 600;
}

.value-strong {
    font-size: 16px;
    font-weight: 700;
}

.divider {
    height: 1px;
    background: #eef2f7;
    margin: 10px 0;
}

.muted {
    color: #8a919f;
    font-size: 12.5px;
    line-height: 1.6;
}

.footer-tip {
    text-align: center;
    color: #a2abb8;
    font-size: 11.5px;
    line-height: 1.8;
    margin: 16px 0 4px;
}

/* ---------- 首页 hero ---------- */
.hero {
    border-radius: 20px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #1677ff 0%, #2f9bff 100%);
    box-shadow: 0 10px 24px rgba(22, 119, 255, 0.26);
    margin-bottom: 14px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.hero-greeting {
    font-size: 17px;
    font-weight: 600;
}

.hero-sub {
    font-size: 12.5px;
    opacity: 0.85;
    margin-top: 3px;
}

.hero-badge {
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    white-space: nowrap;
}

.hero-balance {
    display: flex;
    align-items: baseline;
    margin-top: 16px;
}

.hero-balance-value {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-balance-unit {
    font-size: 12.5px;
    margin-left: 6px;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    font-size: 12.5px;
    opacity: 0.92;
    flex-wrap: wrap;
}

/* ---------- 搜索 ---------- */
.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 0 6px 0 16px;
    height: 46px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(20, 60, 120, 0.06);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    min-width: 0;
}

.search-btn {
    border: none;
    background: #1677ff;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    cursor: pointer;
}

.search-btn:active {
    opacity: 0.8;
}

.search-scan {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1677ff;
    font-size: 17px;
    cursor: pointer;
}

/* ---------- 列表 ---------- */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f5fa;
    cursor: pointer;
}

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

.list-item:active {
    opacity: 0.7;
}

.item-name {
    font-size: 14.5px;
    font-weight: 600;
}

.item-sub {
    font-size: 12.5px;
    color: #8a919f;
    margin-top: 3px;
}

.item-right {
    text-align: right;
    flex-shrink: 0;
}

.money {
    font-size: 15px;
    font-weight: 600;
}

/* ---------- 标签 ---------- */
.tag {
    display: inline-block;
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.6;
    white-space: nowrap;
}

.tag-open,
.tag-done {
    color: #00b578;
    background: rgba(0, 181, 120, 0.1);
}

.tag-closed,
.tag-fail {
    color: #f53f3f;
    background: rgba(245, 63, 63, 0.1);
}

.tag-pending {
    color: #ff8a00;
    background: rgba(255, 138, 0, 0.12);
}

.tag-sent {
    color: #1677ff;
    background: rgba(22, 119, 255, 0.1);
}

.tag-gray {
    color: #6b7787;
    background: #eef2f7;
}

/* ---------- 按钮 ---------- */
.btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 12px;
    height: 48px;
    font-size: 15.5px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.06s ease, opacity 0.15s ease;
}

.btn:active {
    transform: scale(0.985);
    opacity: 0.9;
}

.btn-primary {
    background: #1677ff;
    color: #fff;
}

.btn-danger {
    background: #f53f3f;
    color: #fff;
}

.btn-ghost {
    background: #fff;
    color: #1677ff;
    border: 1px solid rgba(22, 119, 255, 0.4);
}

.btn-soft {
    background: #eef5ff;
    color: #1677ff;
}

.btn[disabled] {
    background: #c3cfdd;
    color: #fff;
    pointer-events: none;
}

.btn + .btn {
    margin-top: 10px;
}

.btn-row {
    display: flex;
    gap: 10px;
}

.btn-row .btn + .btn {
    margin-top: 0;
}

/* ---------- 余额卡 ---------- */
.balance-card {
    border-radius: 20px;
    padding: 18px;
    color: #fff;
    background: linear-gradient(135deg, #0b4fbf 0%, #1677ff 100%);
    box-shadow: 0 10px 24px rgba(11, 79, 191, 0.22);
    margin-bottom: 12px;
}

.balance-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.balance-name {
    font-size: 16px;
    font-weight: 600;
}

.balance-main {
    display: flex;
    align-items: baseline;
    margin-top: 12px;
}

.balance-value {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.balance-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 12.5px;
    opacity: 0.92;
}

.balance-foot span {
    cursor: pointer;
}

/* ---------- 阀门卡 ---------- */
.valve-panel {
    display: flex;
    align-items: center;
    gap: 14px;
}

.valve-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.valve-badge.tag-open {
    background: rgba(0, 181, 120, 0.12);
}

.valve-badge.tag-closed {
    background: rgba(245, 63, 63, 0.12);
}

.valve-state {
    font-size: 15px;
    font-weight: 600;
}

/* ---------- 柱状图 ---------- */
.chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 130px;
    gap: 4px;
    margin-top: 6px;
}

.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.chart-value {
    font-size: 10.5px;
    color: #8a919f;
    margin-bottom: 4px;
}

.chart-bar {
    width: 60%;
    max-width: 22px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, #4ea6ff 0%, #1677ff 100%);
}

.chart-label {
    font-size: 10px;
    color: #8a919f;
    margin-top: 6px;
    transform: scale(0.95);
}

/* ---------- 表单 ---------- */
.field {
    margin-bottom: 14px;
}

.field-label {
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #3a4453;
}

.select,
.textarea,
.input {
    width: 100%;
    border: 1px solid #e6ecf4;
    background: #f7f9fc;
    border-radius: 11px;
    padding: 12px 14px;
    font-size: 14.5px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.select:focus,
.textarea:focus,
.input:focus {
    border-color: #1677ff;
    background: #fff;
}

.textarea {
    min-height: 84px;
    resize: vertical;
    line-height: 1.6;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #9aa6b6;
    border-bottom: 2px solid #9aa6b6;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.agree {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 4px 0;
}

.agree input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.agree-box {
    width: 20px;
    height: 20px;
    border: 1.5px solid #c9d3e0;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    margin-top: 1px;
}

.agree input:checked + .agree-box {
    background: #1677ff;
    border-color: #1677ff;
}

.agree-text {
    font-size: 12.5px;
    color: #4a5568;
    line-height: 1.65;
}

.approve-tip {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff8ec;
    color: #a86800;
    font-size: 12.5px;
    line-height: 1.6;
}

/* ---------- 提示条 ---------- */
.banner {
    border-radius: 14px;
    padding: 13px 15px;
    margin-bottom: 12px;
}

.banner-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.banner-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: #5b6673;
}

.banner-danger {
    background: #fff1f0;
    border-left: 4px solid #f53f3f;
}

.banner-info {
    background: #eef5ff;
    border-left: 4px solid #1677ff;
}

/* ---------- 快捷入口 ---------- */
.quick-grid {
    display: flex;
    gap: 6px;
}

.quick-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 4px;
    border-radius: 12px;
    cursor: pointer;
}

.quick-item:active {
    background: #f2f6fc;
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eef5ff;
    color: #1677ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 700;
}

.quick-text {
    font-size: 12px;
    color: #4a5568;
}

/* ---------- 状态块 ---------- */
.state-box {
    text-align: center;
    padding: 40px 16px;
    color: #8a919f;
    font-size: 13.5px;
    line-height: 1.7;
}

.state-title {
    font-size: 15px;
    font-weight: 600;
    color: #3a4453;
    margin-bottom: 6px;
}

.spinner {
    width: 26px;
    height: 26px;
    margin: 0 auto 14px;
    border: 3px solid #dbe8fb;
    border-top-color: #1677ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---------- 结果页 ---------- */
.result {
    border-radius: 20px;
    padding: 22px 18px;
    color: #fff;
    margin-bottom: 12px;
}

.result-success {
    background: linear-gradient(135deg, #00b578 0%, #35c98f 100%);
    box-shadow: 0 10px 24px rgba(0, 181, 120, 0.22);
}

.result-warn {
    background: linear-gradient(135deg, #ff8a00 0%, #ffab40 100%);
    box-shadow: 0 10px 24px rgba(255, 138, 0, 0.22);
}

.result-fail {
    background: linear-gradient(135deg, #f53f3f 0%, #ff7875 100%);
    box-shadow: 0 10px 24px rgba(245, 63, 63, 0.22);
}

.result-title {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 7px;
}

.result-desc {
    font-size: 13.5px;
    opacity: 0.95;
    line-height: 1.6;
}

.result-meta {
    margin-top: 14px;
    font-size: 11.5px;
    opacity: 0.88;
    line-height: 1.9;
}

/* ---------- 指令条目 ---------- */
.cmd-item {
    padding: 12px 0;
    border-bottom: 1px solid #f2f5fa;
    cursor: pointer;
}

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

.cmd-item:active {
    opacity: 0.7;
}

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

.cmd-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cmd-action {
    font-size: 11.5px;
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.action-open {
    color: #00b578;
    background: rgba(0, 181, 120, 0.1);
}

.action-close {
    color: #f53f3f;
    background: rgba(245, 63, 63, 0.1);
}

.cmd-name {
    font-size: 14.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmd-sub {
    font-size: 12.5px;
    color: #6b7787;
    margin-top: 6px;
}

.cmd-foot {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: #a2abb8;
    margin-top: 6px;
    gap: 10px;
}

/* ---------- 筛选条 ---------- */
.filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 12px;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.chip {
    flex-shrink: 0;
    padding: 7px 15px;
    border-radius: 999px;
    background: #fff;
    color: #6b7787;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(20, 60, 120, 0.05);
    cursor: pointer;
}

.chip.active {
    background: #1677ff;
    color: #fff;
    font-weight: 600;
}

/* ---------- 统计 ---------- */
.stat-row {
    display: flex;
    background: #fff;
    border-radius: 16px;
    padding: 14px 0;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(20, 60, 120, 0.05);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 21px;
    font-weight: 700;
}

.stat-label {
    display: block;
    font-size: 11.5px;
    color: #8a919f;
    margin-top: 2px;
}

.stat-split {
    width: 1px;
    background: #eef2f7;
}

/* ---------- 我的 ---------- */
.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 20px;
    padding: 20px 18px;
    color: #fff;
    background: linear-gradient(135deg, #1677ff 0%, #2f9bff 100%);
    box-shadow: 0 10px 24px rgba(22, 119, 255, 0.24);
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.profile-name {
    font-size: 17px;
    font-weight: 700;
}

.profile-role {
    font-size: 12.5px;
    opacity: 0.9;
    margin-top: 4px;
    line-height: 1.5;
}

.cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #f2f5fa;
    cursor: pointer;
}

.cell:last-child {
    border-bottom: none;
}

.cell:active {
    opacity: 0.65;
}

.cell-text {
    font-size: 14.5px;
}

.cell-danger {
    color: #f53f3f;
}

.cell-right {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8a919f;
    font-size: 13px;
    max-width: 60%;
}

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

.cell-arrow {
    color: #c9d3e0;
    font-size: 17px;
    line-height: 1;
}

/* ---------- 轨迹 ---------- */
.timeline {
    position: relative;
    padding-left: 4px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #1677ff;
    margin-top: 6px;
    flex-shrink: 0;
}

.timeline-body {
    flex: 1;
    border-left: 1px solid #eef2f7;
    padding-left: 14px;
    margin-left: -5px;
}

.timeline-title {
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 2px;
}

.timeline-desc {
    font-size: 12.5px;
    color: #6b7787;
    line-height: 1.6;
}

.timeline-time {
    font-size: 11px;
    color: #a2abb8;
    margin-top: 3px;
}

/* ---------- 底部标签栏 ---------- */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 0.5px solid rgba(20, 40, 80, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 7px 0 6px;
    color: #9aa6b6;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
}

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

.tab.active {
    color: #1677ff;
    font-weight: 600;
}

.tab-badge {
    position: absolute;
    transform: translate(14px, -2px);
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: #f53f3f;
    color: #fff;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
    font-weight: 600;
}

/* ---------- 弹层 ---------- */
.modal-root {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(14, 24, 40, 0.45);
    backdrop-filter: blur(2px);
}

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

.sheet {
    width: 100%;
    max-width: 340px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    animation: pop 0.18s ease;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

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

.sheet-title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.sheet-desc {
    font-size: 13px;
    color: #5b6673;
    line-height: 1.65;
    text-align: center;
}

.sheet-actions {
    display: flex;
    border-top: 1px solid #eef2f7;
}

.sheet-btn {
    flex: 1;
    border: none;
    background: transparent;
    height: 48px;
    font-size: 15.5px;
    color: #6b7787;
    cursor: pointer;
}

.sheet-btn.primary {
    color: #1677ff;
    font-weight: 600;
}

.sheet-btn.danger {
    color: #f53f3f;
    font-weight: 600;
}

.sheet-btn + .sheet-btn {
    border-left: 1px solid #eef2f7;
}

.sheet-btn:active {
    background: #f7f9fc;
}

.toast-root {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 96px;
    z-index: 120;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.toast {
    max-width: 80%;
    background: rgba(24, 32, 46, 0.9);
    color: #fff;
    font-size: 13.5px;
    padding: 10px 18px;
    border-radius: 999px;
    line-height: 1.5;
    animation: pop 0.16s ease;
}

/* ---------- 帮助页 ---------- */
.para {
    font-size: 13.5px;
    color: #4a5568;
    line-height: 1.75;
    margin-bottom: 10px;
}

.para:last-child {
    margin-bottom: 0;
}

code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #0b4fbf;
    background: #eef5ff;
    padding: 1px 5px;
    border-radius: 4px;
    word-break: break-all;
}

.step {
    display: flex;
    gap: 9px;
    margin-bottom: 8px;
}

.step-index {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1677ff;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-text {
    flex: 1;
    font-size: 13.5px;
    color: #4a5568;
    line-height: 1.7;
}

.check {
    font-size: 13.5px;
    color: #4a5568;
    line-height: 1.9;
    padding-left: 20px;
    position: relative;
}

.check::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00b578;
    font-weight: 700;
}

/* ================= 内部员工版新增样式 ================= */

/* ---------- 顶部栏右侧姓名 ---------- */
.appbar-side {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    color: #8a919f;
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 登录页 ---------- */
body.login-mode .app-main {
    padding: 0 0 calc(20px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #1668e3 0%, #2f8bff 33%, #eef3fb 33.1%, #eef3fb 100%);
    min-height: 100vh;
    animation: none;
}

.login {
    max-width: 460px;
    margin: 0 auto;
    padding: calc(52px + env(safe-area-inset-top)) 18px 24px;
}

.login-brand {
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.login-logo {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.login-title {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.login-sub {
    font-size: 12.5px;
    opacity: 0.9;
    margin-top: 7px;
    letter-spacing: 0.3px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px 18px 16px;
    box-shadow: 0 14px 34px rgba(18, 48, 105, 0.14);
}

.login-card .field:last-of-type {
    margin-bottom: 8px;
}

.login-btn {
    margin-top: 8px;
    letter-spacing: 4px;
}

.login-error {
    display: none;
    font-size: 12.5px;
    color: #f53f3f;
    background: #fff1f0;
    border-radius: 9px;
    padding: 9px 12px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.login-error.show {
    display: block;
}

.login-remember {
    justify-content: center;
    margin-top: 14px;
}

.login-remember .agree-text {
    font-size: 12.5px;
    color: #7a838f;
}

.login-foot {
    text-align: center;
    font-size: 12px;
    color: #7a838f;
    margin-top: 20px;
    line-height: 2;
}

.login-demo {
    color: #1677ff;
}

/* ---------- 角色标签与头像 ---------- */
.role-tag {
    display: inline-block;
    font-size: 11px;
    line-height: 1.6;
    padding: 1px 7px;
    border-radius: 6px;
    margin-left: 6px;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: 1px;
}

.role-admin {
    background: #eaf1ff;
    color: #1c5fce;
}

.role-supervisor {
    background: #e8f8f1;
    color: #00895c;
}

.role-operator {
    background: #fff4e6;
    color: #b96600;
}

.role-viewer {
    background: #f0f2f7;
    color: #5a6473;
}

.avatar {
    background: #eef2f9;
    color: #46536a;
    font-size: 20px;
    font-weight: 700;
}

.profile-card .avatar {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.avatar-admin {
    background: #e4edff;
    color: #1c5fce;
}

.avatar-supervisor {
    background: #e2f6ee;
    color: #00895c;
}

.avatar-operator {
    background: #fff0dd;
    color: #b96600;
}

.avatar-viewer {
    background: #eef0f5;
    color: #5a6473;
}

.profile-card .avatar-admin,
.profile-card .avatar-supervisor,
.profile-card .avatar-operator,
.profile-card .avatar-viewer {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

.avatar-sm {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 16px;
}

.profile-name .role-tag {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
    vertical-align: 2px;
}

/* ---------- 员工列表 ---------- */
.staff-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f5fa;
    cursor: pointer;
}

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

.staff-item:active {
    opacity: 0.6;
}

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

.staff-name {
    font-size: 14.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.staff-name .role-tag {
    margin-left: 0;
}

.staff-sub {
    font-size: 12px;
    color: #8a919f;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 开关 ---------- */
.switch {
    width: 46px;
    height: 27px;
    border-radius: 14px;
    background: #d4dbe6;
    position: relative;
    transition: background 0.18s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.switch i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 40, 80, 0.24);
    transition: transform 0.18s ease;
}

.switch.on {
    background: #1677ff;
}

.switch.on i {
    transform: translateX(19px);
}

/* ---------- 表单补充 ---------- */
.field-hint {
    font-size: 11.5px;
    color: #98a2b3;
    margin-top: 6px;
    line-height: 1.5;
}

.input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-row .input {
    flex: 1;
    min-width: 0;
}

.btn-inline {
    width: auto;
    flex-shrink: 0;
    height: 44px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 0 !important;
}

.role-desc-list {
    margin-top: 10px;
    border-top: 1px dashed #e6ecf4;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.role-desc {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #7a838f;
    line-height: 1.55;
}

.role-desc .role-tag {
    margin-left: 0;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---------- 一次性密码弹层 ---------- */
.code-box {
    background: #f4f7fc;
    border: 1px dashed #b9cbe8;
    border-radius: 12px;
    padding: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    line-height: 1.9;
    color: #1b2333;
    white-space: pre-wrap;
    word-break: break-all;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ---------- 审核提醒条 ---------- */
.banner-warn {
    background: #fff8ec;
    border-left: 4px solid #ff8a00;
    cursor: pointer;
}

.banner-warn .banner-title {
    color: #a86800;
}

button.switch {
    border: none;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
}

/* ---------- 巡户员角色配色 ---------- */
.role-patroller {
    background: #f0eaff;
    color: #5b3fc4;
}

.avatar-patroller {
    background: #ece5ff;
    color: #5b3fc4;
}

.profile-card .avatar-patroller {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

/* ---------- 巡查打卡 ---------- */
.card-count {
    float: right;
    font-size: 12.5px;
    font-weight: 400;
    color: #86909c;
}

.patrol-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 2px;
    border-bottom: 1px solid #f1f3f6;
    cursor: pointer;
    border-radius: 8px;
}

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

.patrol-item:active {
    background: #f7f9fc;
}

.patrol-badge {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #d7dce6;
    color: #1677ff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.patrol-item.done .patrol-badge {
    border-color: #00b42a;
    background: #e9f8ee;
    color: #00b42a;
}

.patrol-item.bad .patrol-badge {
    border-color: #f53f3f;
    background: #fdecec;
    color: #f53f3f;
}

.patrol-body {
    flex: 1 1 auto;
    min-width: 0;
}

.patrol-body .item-name {
    font-size: 14.8px;
    font-weight: 500;
}

.patrol-body .item-sub {
    font-size: 12.5px;
    color: #86909c;
    margin-top: 2px;
}

.patrol-tail {
    flex: 0 0 auto;
}

/* 定位状态条 */
.loc-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f7f8fa;
    border: 1px solid #eef0f4;
}

.loc-box.ok {
    background: #effaf3;
    border-color: #cfeddb;
}

.loc-box.bad {
    background: #fdf2f2;
    border-color: #f8d7d7;
}

.loc-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1677ff;
    font-size: 17px;
    border: 1px solid #e5e8ef;
}

.loc-box.ok .loc-icon {
    color: #00b42a;
}

.loc-box.bad .loc-icon {
    color: #f53f3f;
}

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

.loc-title {
    font-size: 14.5px;
    font-weight: 500;
}

.loc-main .item-sub {
    font-size: 12.5px;
    color: #6b7688;
    margin-top: 2px;
}

.loc-icon.spin {
    animation: patrol-pulse 1s ease-in-out infinite;
}

@keyframes patrol-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 检查项 */
.check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #f2f4f7;
}

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

.check-label {
    font-size: 14.5px;
    flex: 1 1 auto;
    min-width: 0;
}

.seg {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.seg-wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.seg-btn {
    min-width: 50px;
    height: 33px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid #dfe3ea;
    background: #fff;
    color: #4e5969;
    font-size: 13.5px;
    cursor: pointer;
}

.seg-btn:active {
    opacity: 0.85;
}

.seg-btn.active {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}

.seg-btn.active-danger {
    background: #f53f3f;
    border-color: #f53f3f;
    color: #fff;
}

/* 照片 */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.photo-cell {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f4f7;
}

.photo-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #86909c;
    text-align: center;
    padding: 6px;
}

.photo-del {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
}

.photo-add {
    width: 92px;
    height: 92px;
    border-radius: 10px;
    border: 1px dashed #cfd6e2;
    background: #fafbfd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
}

.photo-plus {
    font-size: 22px;
    color: #1677ff;
    line-height: 1;
}

.photo-add-text {
    font-size: 12px;
    color: #86909c;
}

.text-danger {
    color: #f53f3f;
    font-weight: 500;
}

.btn-block {
    width: 100%;
}

/* ===== 三类巡查切换（管网 / 巡户 / 排污） ===== */
.patrol-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 5px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.patrol-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #4e5969;
    font-size: 13.5px;
    line-height: 1.3;
    transition: background 0.15s ease, color 0.15s ease;
}

.patrol-tab .pt-name {
    font-weight: 600;
}

.patrol-tab .pt-sub {
    font-size: 11.5px;
    color: #86909c;
    font-variant-numeric: tabular-nums;
}

.patrol-tab.active {
    background: #1677ff;
    color: #fff;
}

.patrol-tab.active .pt-sub {
    color: rgba(255, 255, 255, 0.82);
}

.patrol-tab:active {
    opacity: 0.88;
}

/* 点位/记录上的类型小标签 */
.type-tag {
    display: inline-block;
    padding: 1px 6px;
    margin-right: 5px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    background: #eef4ff;
    color: #1677ff;
}

.type-tag.type-customer {
    background: #e8f7ef;
    color: #0f9d58;
}

.type-tag.type-drain {
    background: #fff3e8;
    color: #d46b08;
}

/* ===== 巡户任务清单（v2.3 周期覆盖） ===== */
.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f3f5;
    cursor: pointer;
}

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

.task-item:active {
    opacity: 0.7;
}

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

.task-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d2129;
    line-height: 1.4;
    word-break: break-all;
}

.task-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: #86909c;
    line-height: 1.4;
    word-break: break-all;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 11.5px;
    color: #86909c;
}

.task-go {
    flex: none;
    font-size: 22px;
    color: #c9cdd4;
    line-height: 1;
    padding-right: 2px;
}

.ov-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}

.ov-badge.late {
    background: #ffece8;
    color: #f53f3f;
}

.ov-badge.due {
    background: #fff7e8;
    color: #d46b08;
}

.ov-badge.soon {
    background: #eef4ff;
    color: #1677ff;
}

.key-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 3px;
    background: #fff1f0;
    color: #f53f3f;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.6;
    vertical-align: 1px;
}

.soon-card {
    background: #fafbfc;
}

/* ===== 触达方式选择 ===== */
.mode-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mode-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 11px 13px;
    border: 1px solid #e5e6eb;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.mode-item .mode-name {
    font-size: 14.5px;
    font-weight: 600;
    color: #1d2129;
}

.mode-item .mode-desc {
    font-size: 12px;
    color: #86909c;
    line-height: 1.4;
}

.mode-item.active {
    border-color: #1677ff;
    background: #f2f7ff;
}

.mode-item.active .mode-name {
    color: #1677ff;
}

.mode-item:active {
    opacity: 0.85;
}

/* 远程触达的定位占位卡 */
.loc-box.remote {
    background: #f2f7ff;
    border: 1px dashed #bedaff;
}

.loc-box.remote .loc-icon {
    color: #1677ff;
}

.loc-box.remote .loc-title {
    color: #1677ff;
}

/* ===== 水表读数 ===== */
.reading-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reading-input {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.reading-unit {
    flex: none;
    font-size: 14px;
    color: #86909c;
}

/* ===== 受阻申报 ===== */
.reason-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.reason-item {
    padding: 11px 8px;
    border: 1px solid #e5e6eb;
    border-radius: 9px;
    background: #fff;
    color: #4e5969;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
}

.reason-item.active {
    border-color: #1677ff;
    background: #f2f7ff;
    color: #1677ff;
    font-weight: 600;
}

.reason-item:active {
    opacity: 0.85;
}

.block-item {
    padding: 13px 14px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.block-reason {
    font-size: 14.5px;
    font-weight: 600;
    color: #1d2129;
}

.block-status {
    flex: none;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
}

.block-status.pending {
    background: #fff7e8;
    color: #d46b08;
}

.block-status.approved {
    background: #e8ffea;
    color: #00a854;
}

.block-status.rejected {
    background: #ffece8;
    color: #f53f3f;
}

.block-note {
    margin-top: 8px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #f7f8fa;
    font-size: 13px;
    color: #4e5969;
    line-height: 1.6;
    word-break: break-all;
}

.block-review {
    margin-top: 8px;
    font-size: 12.5px;
    color: #86909c;
    line-height: 1.5;
}

.block-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.block-actions .btn {
    flex: 1;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
}

/* 远程触达的记录徽标换颜色，一眼区分"电话访的"和"到场访的" */
.patrol-badge.remote {
    background: #eef4ff;
    color: #1677ff;
}

/* ---------------- 全屏照片查看器 ----------------
   点照片放大查看：双指捏合缩放、拖动平移、双击切换 1x/2.5x。
   mask 要盖过 tabbar(z-40) 和 toast(z-120)，所以给到 9999。 */
.pv-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 16, 18, 0.94);
    touch-action: none;
}

.pv-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pv-img {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: 96%;
    max-height: 84%;
    transform: translate(-50%, -50%);
    transition: transform 0.16s ease-out;
    will-change: transform;
    -webkit-user-drag: none;
    user-select: none;
}

/* 拖动/捏合时关掉过渡，跟手 */
.pv-mask.pv-dragging .pv-img {
    transition: none;
}

.pv-close {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top));
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 0;
}

.pv-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(16px + env(safe-area-inset-bottom));
    text-align: center;
    color: #e5e6eb;
    font-size: 13px;
    padding: 0 16px;
}
