/* ================================
   IPM 虫害防制系统 - iOS Style v2.0
   仿 iPhone App 设计风格
================================ */

:root {
    /* iOS 系统色 (iOS 15+) */
    --ios-blue: #007AFF;
    --ios-blue-dark: #0051D5;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-pink: #FF2D55;
    --ios-purple: #AF52DE;
    --ios-teal: #30B0C7;
    --ios-yellow: #FFCC00;
    --ios-indigo: #5856D6;
    --ios-gray: #8E8E93;
    --ios-gray2: #AEAEB2;
    --ios-gray3: #C7C7CC;
    --ios-gray4: #D1D1D6;
    --ios-gray5: #E5E5EA;
    --ios-gray6: #F2F2F7;

    /* iOS 语义色 */
    --label: #000000;
    --secondary-label: rgba(60, 60, 67, 0.6);
    --tertiary-label: rgba(60, 60, 67, 0.3);
    --quaternary-label: rgba(60, 60, 67, 0.18);
    --separator: rgba(60, 60, 67, 0.29);
    --separator-non-opaque: #C6C6C8;
    --system-background: #F2F2F7;
    --secondary-system-background: #FFFFFF;
    --tertiary-system-background: #F2F2F7;
    --system-fill: rgba(120, 120, 128, 0.2);
    --secondary-system-fill: rgba(120, 120, 128, 0.16);
    --tertiary-system-fill: rgba(120, 120, 128, 0.12);
    --quaternary-system-fill: rgba(120, 120, 128, 0.08);

    /* 兼容别名 */
    --primary: var(--ios-blue);
    --success: var(--ios-green);
    --warning: var(--ios-orange);
    --danger: var(--ios-red);
    --info: var(--ios-teal);
    --bg: var(--system-background);
    --card-bg: var(--secondary-system-background);
    --text: var(--label);
    --text-secondary: var(--secondary-label);
    --border: var(--separator-non-opaque);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 18px;
    --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
}

@media (prefers-color-scheme: dark) {
    :root {
        --label: #FFFFFF;
        --secondary-label: rgba(235, 235, 245, 0.6);
        --tertiary-label: rgba(235, 235, 245, 0.3);
        --separator: rgba(84, 84, 88, 0.65);
        --separator-non-opaque: #38383A;
        --system-background: #000000;
        --secondary-system-background: #1C1C1E;
        --tertiary-system-background: #2C2C2E;
        --system-fill: rgba(120, 120, 128, 0.36);
        --secondary-system-fill: rgba(120, 120, 128, 0.32);
        --tertiary-system-fill: rgba(120, 120, 128, 0.24);
    }
}

/* ================ 基础样式 ================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
        'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--system-background);
    color: var(--label);
    min-height: 100vh;
    /* iOS Safari 的 100vh 包含地址栏后方区域，导致 iPhone 底部留白。
       dvh 随地址栏动态变化，优先使用；旧浏览器回退到 100vh。 */
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    letter-spacing: -0.01em;
    font-weight: 400;
    line-height: 1.47;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 84px;
    position: relative;
}

/* ================ 页面切换 ================ */
.page {
    display: none;
    animation: pageIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.page.active { display: block; }

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================ 导航栏 ================ */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(242, 242, 247, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid var(--separator);
}

.nav-back-btn {
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 17px;
    font-weight: 400;
    padding: 8px 12px;
    margin-left: -8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    font-family: inherit;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.nav-back-btn::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--ios-blue);
    border-bottom: 2px solid var(--ios-blue);
    transform: rotate(45deg);
    margin-right: 4px;
}

.nav-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--label);
    letter-spacing: -0.02em;
}

.nav-right-btn {
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 16px;
    font-weight: 400;
    padding: 4px 8px;
    cursor: pointer;
    font-family: inherit;
}

.nav-placeholder { width: 60px; }

/* 大标题导航栏（首页） */
.nav-bar-large {
    padding: 8px 16px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--system-background);
}
.nav-bar-large .brand { display: flex; align-items: center; gap: 8px; }
.nav-bar-large .brand-icon { font-size: 24px; }
.nav-title-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.nav-subtitle-text {
    font-size: 11px;
    color: var(--secondary-label);
    margin-top: 1px;
}

/* ================ Section Header ================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-label);
    text-transform: none;
    letter-spacing: 0;
}
.section-header > span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary-label);
}

/* ================ iOS 按钮样式 ================ */
.ios-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--ios-blue);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    min-height: 44px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.01em;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-btn-primary:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.ios-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--secondary-system-fill);
    color: var(--ios-blue);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    min-height: 44px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-btn-secondary:active {
    transform: scale(0.97);
    background: var(--tertiary-system-fill);
}

.ios-btn-success {
    background: var(--ios-green);
    color: #fff;
}
.ios-btn-danger {
    background: var(--ios-red);
    color: #fff;
}
.ios-btn-warning {
    background: var(--ios-orange);
    color: #fff;
}

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

.ios-btn-small {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 10px;
}
.ios-btn-small.ios-btn-blue {
    background: rgba(0, 122, 255, 0.12);
    color: var(--ios-blue);
    box-shadow: none;
}
.ios-btn-small.ios-btn-blue:active {
    background: rgba(0, 122, 255, 0.2);
}

/* ================ 统计卡片网格 ================ */
.ios-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 12px 16px;
    background: var(--secondary-system-background);
    border-radius: 16px;
    padding: 14px 6px;
    box-shadow: var(--shadow-card);
}

.ios-stat-card {
    text-align: center;
    padding: 6px 2px;
    cursor: pointer;
    transition: transform 0.15s;
    border-right: 0.5px solid var(--separator);
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-stat-card:last-child { border-right: none; }
.ios-stat-card:active { transform: scale(0.96); }

.ios-stat-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
}
.ios-stat-icon.blue { background: linear-gradient(135deg, #007AFF, #5AC8FA); }
.ios-stat-icon.green { background: linear-gradient(135deg, #34C759, #30B0C7); }
.ios-stat-icon.orange { background: linear-gradient(135deg, #FF9500, #FFCC00); }
.ios-stat-icon.red { background: linear-gradient(135deg, #FF3B30, #FF9500); }
.ios-stat-icon.teal { background: linear-gradient(135deg, #30B0C7, #5AC8FA); }
.ios-stat-icon.purple { background: linear-gradient(135deg, #AF52DE, #5856D6); }

.ios-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--label);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.ios-stat-label {
    font-size: 11px;
    color: var(--secondary-label);
    margin-top: 2px;
    font-weight: 500;
}

/* ================ 主操作卡片（首页） ================ */
.ios-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 16px 0;
}

.ios-hero-card {
    position: relative;
    padding: 18px 14px;
    border-radius: 18px;
    border: none;
    cursor: pointer;
    text-align: left;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 110px;
    transition: transform 0.15s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    overflow: hidden;
    font-family: inherit;
}
.ios-hero-card:active { transform: scale(0.97); }
.ios-hero-card.bg-blue { background: linear-gradient(135deg, #007AFF, #5AC8FA); }
.ios-hero-card.bg-green { background: linear-gradient(135deg, #34C759, #30D158); }
.ios-hero-card.bg-orange { background: linear-gradient(135deg, #FF9500, #FFCC00); }
.ios-hero-card.bg-purple { background: linear-gradient(135deg, #AF52DE, #5856D6); }

.ios-hero-emoji {
    font-size: 24px;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.ios-hero-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
}
.ios-hero-sub {
    font-size: 11px;
    opacity: 0.92;
    font-weight: 400;
    line-height: 1.35;
    color: #fff;
}

/* ================ 快捷功能网格 ================ */
.ios-quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin: 4px 16px;
    background: var(--secondary-system-background);
    border-radius: 16px;
    padding: 12px 8px;
    box-shadow: var(--shadow-card);
}

.ios-quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 70px;
    border-radius: 10px;
    font-family: inherit;
}
.ios-quick-btn:active {
    transform: scale(0.92);
    background: var(--tertiary-system-fill);
}
.ios-quick-emoji {
    font-size: 22px;
    margin-bottom: 4px;
}
.ios-quick-label {
    font-size: 11px;
    color: var(--label);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ================ Segmented Control (iOS风格分段选择器) ================ */
.ios-seg-btn.active {
    background: #fff !important;
    color: #000 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.04);
}
.ios-upload-zone.dragover {
    border-color: var(--ios-blue) !important;
    background: rgba(0,122,255,0.04) !important;
}

/* ================ iOS 表单分组 ================ */
.ios-form-group {
    background: var(--secondary-system-background);
    border-radius: 14px;
    margin: 0 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.ios-form-group-textarea {
    padding: 0;
}

.ios-form-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--separator);
    min-height: 48px;
    gap: 12px;
}
.ios-form-row:last-child,
.ios-form-row-multi-last { border-bottom: none; }

.ios-form-row-multi {
    border-bottom: 0.5px solid var(--separator);
}

.ios-form-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.ios-form-label {
    font-size: 15px;
    color: var(--label);
    min-width: 72px;
    flex-shrink: 0;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.ios-form-input {
    flex: 1;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--label);
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.ios-form-input::placeholder {
    color: var(--tertiary-label);
}
.ios-form-input-right {
    text-align: right;
}
select.ios-form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath fill='%233C3C43' fill-opacity='0.4' d='M0 6L6 0l2 2-4 4 4 4-2 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 8px 12px;
    padding-right: 18px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.ios-form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    font-size: 15px;
    color: var(--label);
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}
.ios-form-textarea::placeholder { color: var(--tertiary-label); }

.ios-form-action {
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 14px;
    padding: 4px 6px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
}

/* ================ 快速选择按钮组 ================ */
.ios-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}
.ios-pill-btn {
    padding: 8px 14px;
    background: var(--secondary-system-fill);
    border: none;
    border-radius: 14px;
    font-size: 12px;
    color: var(--label);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    font-weight: 500;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-pill-btn:active { background: var(--ios-blue); color: #fff; }
.ios-pill-btn.active { background: var(--ios-blue); color: #fff; }

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-left: 8px;
}
.quick-option {
    padding: 6px 12px;
    background: var(--secondary-system-fill);
    border: none;
    border-radius: 12px;
    font-size: 12px;
    color: var(--label);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.quick-option:active { background: var(--ios-blue); color: #fff; }

/* ================ 复选框/单选框（iOS 风格） ================ */
.ios-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: var(--label);
    padding: 8px 0;
    flex: 1;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-check-label.inline {
    justify-content: flex-start;
}
.ios-check-input { display: none; }

.ios-check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--separator-non-opaque);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}
.ios-check-input:checked + .ios-check-box {
    background: var(--ios-blue);
    border-color: var(--ios-blue);
}
.ios-check-input:checked + .ios-check-box::after {
    content: '';
    width: 6px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) translate(-1px, -1px);
}

.ios-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: var(--label);
    min-height: 44px;
    padding: 8px 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-radio-input { display: none; }

.ios-radio-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--separator-non-opaque);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}
.ios-radio-input:checked + .ios-radio-dot {
    border-color: var(--ios-blue);
}
.ios-radio-input:checked + .ios-radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ios-blue);
}

/* ================ iOS 列表项 ================ */
.ios-list {
    background: var(--secondary-system-background);
    border-radius: 14px;
    margin: 0 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.ios-list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--secondary-system-background);
    border-bottom: 0.5px solid var(--separator);
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    min-height: 54px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-list-item:last-child { border-bottom: none; }
.ios-list-item:active { background: var(--tertiary-system-fill); }

.ios-list-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}
.ios-list-item-icon.blue { background: linear-gradient(135deg, #007AFF, #5AC8FA); }
.ios-list-item-icon.green { background: linear-gradient(135deg, #34C759, #30D158); }
.ios-list-item-icon.orange { background: linear-gradient(135deg, #FF9500, #FFCC00); }
.ios-list-item-icon.red { background: linear-gradient(135deg, #FF3B30, #FF9500); }
.ios-list-item-icon.purple { background: linear-gradient(135deg, #AF52DE, #5856D6); }
.ios-list-item-icon.teal { background: linear-gradient(135deg, #30B0C7, #5AC8FA); }
.ios-list-item-icon.gray { background: linear-gradient(135deg, #8E8E93, #636366); }

.ios-list-item-info {
    flex: 1;
    min-width: 0;
}
.ios-list-item-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--label);
    letter-spacing: -0.01em;
}
.ios-list-item-desc {
    font-size: 12px;
    color: var(--secondary-label);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.ios-list-item-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    color: var(--secondary-label);
    font-size: 14px;
}
.ios-list-item-chevron {
    color: var(--tertiary-label);
    font-size: 13px;
}

/* ================ 滑动操作 (Swipe Actions) ================ */
.swipe-container {
    position: relative;
    overflow: hidden;
}
.swipe-content {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    background: var(--secondary-system-background);
}
.swipe-actions {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: stretch;
    z-index: 1;
}
.swipe-actions-left {
    left: 0;
}
.swipe-actions-right {
    right: 0;
}
.swipe-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 0 20px;
    cursor: pointer;
    border: none;
    min-width: 70px;
    min-height: 54px;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.swipe-action-btn .swipe-action-icon {
    font-size: 20px;
    margin-bottom: 2px;
}
.swipe-action-edit {
    background: var(--ios-blue);
}
.swipe-action-delete {
    background: var(--ios-red);
}

/* ================ 报告列表行（按键操作） ================ */
/* 将原来的滑动操作改为直接显示的圆形图标按钮，方便操作 */
.report-row {
    display: flex;
    align-items: stretch;
    background: var(--secondary-system-background);
    border-bottom: 0.5px solid var(--separator);
}
.report-row:last-child { border-bottom: none; }
/* report-row 内的 ios-list-item 不再需要自己的下边框（由 report-row 统一管理） */
.report-row .ios-list-item {
    flex: 1;
    min-width: 0;
    border-bottom: none;
    background: transparent;
}
/* 按钮已占据右侧，隐藏原来的箭头以节省空间 */
.report-row .ios-list-item-chevron { display: none; }

.report-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px 0 4px;
    flex-shrink: 0;
}

.report-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.15s, opacity 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.report-action-btn:active {
    transform: scale(0.88);
    opacity: 0.85;
}
.report-action-btn.edit   { background: var(--ios-blue); }
.report-action-btn.delete { background: var(--ios-red); }
.report-action-btn.sign   { background: var(--ios-orange); }

/* ================ Tab 标签页 ================ */
.ios-tab-group {
    display: flex;
    background: var(--secondary-system-fill);
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
    margin-top: 0;
}
.ios-tab {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--label);
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.15s;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 500;
}
.ios-tab.active {
    background: var(--secondary-system-background);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    color: var(--label);
    font-weight: 600;
}

/* ================ 搜索栏 ================ */
.ios-search-bar {
    position: relative;
    background: var(--secondary-system-fill);
    border-radius: 12px;
    padding: 10px 12px 10px 40px;
}
.ios-search-bar input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--label);
    width: 100%;
    font-family: inherit;
}
.ios-search-bar .ios-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--secondary-label);
}

/* ================ 底部 Tab 栏 ================ */
.ios-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    display: flex;
    border-top: 0.5px solid var(--separator);
    z-index: 100;
    padding: 6px 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
}

.ios-tab-item {
    flex: 1;
    text-align: center;
    padding: 6px 2px;
    cursor: pointer;
    color: var(--secondary-label);
    font-size: 10px;
    transition: color 0.2s;
    font-weight: 500;
    letter-spacing: -0.01em;
    position: relative;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.ios-tab-item.active { color: var(--ios-blue); }

.ios-tab-icon {
    font-size: 22px;
    margin-bottom: 2px;
    line-height: 1.2;
    display: block;
    height: 26px;
}
.ios-tab-label {
    font-size: 10px;
    display: block;
    margin-top: 1px;
}

/* 中间凸起按钮 */
.ios-tab-item.ios-tab-center {
    position: relative;
}
.ios-tab-plus {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--ios-blue), #5AC8FA);
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    line-height: 46px;
    text-align: center;
    margin: -8px auto 2px;
    box-shadow: 0 4px 14px rgba(0,122,255,0.35);
    transition: transform 0.15s;
}
.ios-tab-item.ios-tab-center:active .ios-tab-plus {
    transform: scale(0.92);
}
.ios-tab-item.ios-tab-center .ios-tab-label {
    margin-top: 0;
}

/* ================ 模态框（底部弹出） ================ */
.ios-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    animation: modalFade 0.25s ease;
}
.ios-modal.show { display: flex; }

.ios-modal-sheet {
    background: var(--system-background);
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ios-modal-handle {
    width: 40px;
    height: 5px;
    background: var(--separator-non-opaque);
    border-radius: 3px;
    margin: 10px auto 4px;
    opacity: 0.6;
}

.ios-modal-header {
    padding: 8px 16px 12px;
    border-bottom: 0.5px solid var(--separator);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ios-modal-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--label);
}

.ios-modal-close {
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 400;
    margin-left: -8px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.ios-modal-save {
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 16px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    margin-right: -8px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.ios-modal-placeholder { width: 50px; }

.ios-modal-body {
    padding: 16px 0;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* 全屏模态框 */
.ios-modal-full {
    align-items: stretch;
    background: var(--system-background);
    backdrop-filter: none;
}
.ios-modal-full .ios-modal-sheet {
    max-height: 100vh;
    max-width: 100%;
    border-radius: 0;
}

/* 签名模态框全屏 */
#signatureModal .ios-modal-sheet {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
#signatureModal #signBoardWrap {
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* ================ Toast 提示 ================ */
.ios-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 18px 22px;
    border-radius: 16px;
    background: rgba(40, 40, 45, 0.92);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    min-width: 140px;
    max-width: 80%;
    animation: toastIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ios-toast-success { background: rgba(52, 199, 89, 0.95); }
.ios-toast-error { background: rgba(255, 59, 48, 0.95); }
.ios-toast-warning { background: rgba(255, 149, 0, 0.95); }
.ios-toast-info { background: rgba(0, 122, 255, 0.95); }

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

/* ================ 空状态 ================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--secondary-label);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--secondary-label);
}

/* ================ 登录页 ================ */
.login-container {
    padding: 60px 24px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.login-logo { margin-bottom: 40px; margin-top: 20px; }

.login-logo-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.3);
    background: linear-gradient(135deg, #007AFF, #5AC8FA);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 52px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--label);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.login-logo p {
    font-size: 14px;
    color: var(--secondary-label);
    font-weight: 400;
}

.login-form-wrap {
    text-align: left;
    margin-top: 20px;
    flex: 1;
}

.login-form-wrap .ios-check-label {
    padding: 16px 4px;
    font-size: 14px;
    color: var(--secondary-label);
    justify-content: flex-start;
    font-weight: 500;
}

.login-form-wrap .ios-btn-primary {
    margin-top: 12px;
    padding: 15px;
    font-size: 17px;
    border-radius: 14px;
}

.login-footer {
    margin-top: auto;
    padding-top: 24px;
    font-size: 11px;
    color: var(--tertiary-label);
    text-align: center;
}

/* ================ 照片网格 ================ */
.ios-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 12px 16px;
}

.ios-photo-add-group {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    margin-top: 8px;
    flex-direction: column;
}

/* ================ 步骤指示 ================ */
.ios-step-bar {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 4px;
    background: var(--secondary-system-background);
    margin: 0 16px 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    overflow-x: auto;
}

.ios-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 54px;
    flex: 1;
}
.ios-step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--system-fill);
    color: var(--label);
    transition: all 0.25s;
}
.ios-step.active .ios-step-circle {
    background: var(--ios-blue);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
}
.ios-step.done .ios-step-circle {
    background: var(--ios-green);
    color: #fff;
}
.ios-step-label {
    font-size: 11px;
    color: var(--secondary-label);
    margin-top: 6px;
    text-align: center;
    font-weight: 500;
    letter-spacing: -0.01em;
}
.ios-step.active .ios-step-label {
    color: var(--ios-blue);
    font-weight: 600;
}

.ios-step-line {
    flex: 1;
    height: 2px;
    background: var(--separator-non-opaque);
    min-width: 10px;
    margin: 0 4px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.ios-step-line.done { background: var(--ios-green); opacity: 1; }

/* 底部步骤导航 */
.ios-step-nav {
    display: none;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    position: sticky;
    bottom: 70px;
    background: rgba(242, 242, 247, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    border-top: 0.5px solid var(--separator);
}
.ios-step-nav.show { display: flex; }
.ios-step-nav .ios-step-prev {
    flex: 1;
}
.ios-step-nav .ios-step-next {
    flex: 2;
}

/* 步骤面板 - 真正分页 */
.step-panel {
    display: none;
    animation: stepFadeIn 0.2s ease-out;
}
.step-panel.active {
    display: block;
}

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================ 签名区域 ================ */
.signature-card {
    background: var(--secondary-system-background);
    border-radius: 14px;
    margin: 0 16px 12px;
    padding: 16px;
    box-shadow: var(--shadow-card);
    text-align: center;
}
.signature-hint {
    font-size: 11px;
    color: var(--secondary-label);
    margin-top: 10px;
    line-height: 1.4;
}

.sign-canvas-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
}

.sign-canvas-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #C6C6C8;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    pointer-events: none;
}

/* 签名旋转提示动画 */
@keyframes rotateHint {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ================ 扫码相关 ================ */
.qr-scanner-box {
    position: relative;
    background: var(--tertiary-system-fill);
    border-radius: 14px;
    overflow: hidden;
    margin: 0 16px;
    aspect-ratio: 4 / 3;
}

/* ================ 徽章/标签 ================ */
.ios-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: var(--secondary-system-fill);
    color: var(--label);
    letter-spacing: -0.01em;
}
.ios-badge.primary { background: rgba(0, 122, 255, 0.12); color: var(--ios-blue); }
.ios-badge.success { background: rgba(52, 199, 89, 0.15); color: var(--ios-green); }
.ios-badge.warning { background: rgba(255, 149, 0, 0.15); color: var(--ios-orange); }
.ios-badge.danger { background: rgba(255, 59, 48, 0.12); color: var(--ios-red); }
.ios-badge.teal { background: rgba(48, 176, 199, 0.15); color: var(--ios-teal); }
.ios-badge.purple { background: rgba(175, 82, 222, 0.15); color: var(--ios-purple); }
.ios-badge.gray { background: var(--secondary-system-fill); color: var(--secondary-label); }

/* ================ 卡片容器 ================ */
.card-wrapper {
    background: var(--secondary-system-background);
    border-radius: 14px;
    margin: 0 16px 12px;
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}

/* ================ 文本样式 ================ */
.text-muted { color: var(--secondary-label); }
.text-small { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-bold { font-weight: 600; }

.app-version {
    padding: 20px 16px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--tertiary-label);
    letter-spacing: 0.02em;
}

.page-bottom-pad {
    height: 32px;
}

/* ================ 响应式调整 ================ */
@media (min-width: 768px) {
    body { max-width: 720px; }
    .ios-tab-bar { max-width: 720px; }
    .ios-modal-sheet { max-width: 640px; border-radius: 20px 20px 0 0; }
    .quick-grid { grid-template-columns: repeat(6, 1fr); }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 360px) {
    .ios-quick-grid { grid-template-columns: repeat(4, 1fr); }
    .ios-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .ios-hero-grid { grid-template-columns: 1fr; }
}

/* ================ 隐藏滚动条 ================ */
::-webkit-scrollbar { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }

/* ================ 可访问性 ================ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--ios-blue);
    outline-offset: 2px;
}

/* ================ 打印样式 ================ */
/* ========== 兼容 iOS 风格下缺失的旧样式 ========== */
.step-item { }
.nav-item { }
.quick-btn { }
.btn-back { }
.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #007AFF, #5AC8FA);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-title-btn {
    background: transparent;
    border: none;
    color: #007AFF;
    font-size: 15px;
    font-weight: 400;
    padding: 6px 4px;
    cursor: pointer;
    font-family: inherit;
}

/* ========== 客户搜索下拉 ========== */
.customer-search-wrapper {
    position: relative;
    touch-action: manipulation;
}
.customer-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    max-height: 320px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 9999;
    display: none;
}
.customer-search-item {
    padding: 14px 16px;
    min-height: 44px;
    border-bottom: 0.5px solid rgba(60,60,67,0.18);
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto;
}
.customer-search-item:last-child { border-bottom: none; }
.customer-search-item:hover,
.customer-search-item:active { background: #f2f2f7; -webkit-tap-highlight-color: rgba(0,0,0,0.05); }
.customer-hint {
    color: #FF9500;
    font-size: 12px;
    margin-top: 6px;
    padding-left: 4px;
    display: none;
}
.customer-selected-hint {
    color: #34C759;
    font-size: 12px;
    margin-top: 6px;
    padding-left: 4px;
    display: none;
}

/* ========== 照片项目 ========== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
}
.photo-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f2f7;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: #fff;
    font-size: 11px;
    padding: 16px 8px 6px;
    text-align: center;
}
.photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,59,48,0.9);
    color: #fff;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ========== 检查记录卡片 ========== */
.check-record-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
}
.check-record-card .row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.check-record-card .row:last-child { margin-bottom: 0; }
.check-record-card .label {
    min-width: 72px;
    font-size: 14px;
    color: #3c3c43;
    font-weight: 500;
}
.check-record-card input[type="text"],
.check-record-card input[type="number"] {
    flex: 1;
    padding: 8px 10px;
    border: 0.5px solid #c6c6c8;
    border-radius: 8px;
    font-size: 14px;
    background: #f2f2f7;
    outline: none;
    font-family: inherit;
}
.check-record-card textarea {
    flex: 1;
    min-height: 60px;
    padding: 8px 10px;
    border: 0.5px solid #c6c6c8;
    border-radius: 8px;
    font-size: 14px;
    background: #f2f2f7;
    resize: vertical;
    outline: none;
    font-family: inherit;
}
.check-record-card .btn-delete {
    background: rgba(255,59,48,0.12);
    color: #ff3b30;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* ========== 用药记录卡片 ========== */
.treatment-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
}
.treatment-card .row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.treatment-card .row:last-child { margin-bottom: 0; }
.treatment-card .label {
    min-width: 72px;
    font-size: 14px;
    color: #3c3c43;
    font-weight: 500;
}
.treatment-card input[type="text"],
.treatment-card input[type="number"],
.treatment-card select {
    flex: 1;
    padding: 8px 10px;
    border: 0.5px solid #c6c6c8;
    border-radius: 8px;
    font-size: 16px;
    background: #f2f2f7;
    outline: none;
    font-family: inherit;
    min-height: 44px;
}

/* ========== 统计标签 ========== */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    background: rgba(0,122,255,0.12);
    color: #007AFF;
    font-weight: 500;
}
.tag-primary { background: rgba(0,122,255,0.12); color: #007AFF; }
.tag-success { background: rgba(52,199,89,0.15); color: #34C759; }
.tag-warning { background: rgba(255,149,0,0.15); color: #FF9500; }
.tag-danger { background: rgba(255,59,48,0.12); color: #FF3B30; }

/* ========== 客户/报告/工单列表项 ========== */
.list-item {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 12px;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}
.list-item .info .desc {
    font-size: 12px;
    color: #8e8e93;
    line-height: 1.5;
}
.list-item .badge-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.list-item .btn {
    background: rgba(0,122,255,0.12);
    color: #007AFF;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

/* ========== 害虫识别页 ========== */
.pest-empty-box {
    text-align: center;
    padding: 40px 20px;
    color: #8e8e93;
}
.pest-emoji {
    font-size: 56px;
    display: block;
    margin-bottom: 12px;
}
.pest-result-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    margin: 8px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
}
.pest-result-card .title {
    font-size: 16px;
    font-weight: 600;
    color: #007AFF;
    margin-bottom: 8px;
}
.pest-result-card .content {
    font-size: 14px;
    color: #3c3c43;
    line-height: 1.7;
}

/* ========== 看板图表 ========== */
.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 12px 16px;
}
.chart-bar-wrap {
    background: #fff;
    border-radius: 14px;
    margin: 8px 16px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
}
.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.chart-bar-row:last-child { margin-bottom: 0; }
.chart-bar-row .label {
    min-width: 64px;
    font-size: 13px;
    color: #3c3c43;
}
.chart-bar-row .bar-container {
    flex: 1;
    background: #f2f2f7;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}
.chart-bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #5AC8FA);
    border-radius: 6px;
}
.chart-bar-row .value {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    color: #007AFF;
    font-weight: 600;
}

/* ========== 药剂溯源列表 ========== */
.trace-list-item {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
}
.trace-list-item .name {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-bottom: 6px;
}
.trace-list-item .meta {
    font-size: 12px;
    color: #8e8e93;
    line-height: 1.6;
}

/* ========== 打印样式增强 ========== */
@media print {
    body {
        max-width: none;
        background: #fff;
        color: #000;
    }
    .nav-bar, .ios-tab-bar, .ios-step-bar, .ios-step-nav,
    .ios-modal, .ios-toast { display: none !important; }
    .page { display: block !important; padding: 0; }
    .ios-form-group, .ios-list, .card-wrapper {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* 列表项 hover 效果 */
.ios-list-item { transition: background-color 0.2s ease; }
.ios-list-item:hover { background-color: rgba(0, 0, 0, 0.04); }
.ios-quick-btn { transition: transform 0.15s ease, background-color 0.2s ease; }
.ios-quick-btn:active { transform: scale(0.95); }
.treatment-card { transition: box-shadow 0.2s ease; }
.treatment-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
/* 按钮点击反馈 */
.ios-btn-primary:active, .ios-btn-secondary:active { transform: scale(0.98); opacity: 0.9; }
/* 必填字段标识 */
.required-mark { color: #FF3B30; margin-left: 2px; }
