/**
 * ============================================================
 * 养殖户端专用样式 - 完整版
 * ============================================================
 */

/* ===== 顶部风险状态栏 ===== */
.risk-status-bar {
    background: linear-gradient(135deg, #0B1A33, #1A3A5C);
    border-radius: 16px;
    padding: 16px 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 16px 0;
}
.risk-status-bar .left .level {
    font-size: 14px;
    opacity: 0.7;
}
.risk-status-bar .left .status {
    font-size: 20px;
    font-weight: 700;
    margin-top: 2px;
}
.risk-status-bar .left {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 12px;
}
.risk-status-bar .left .status {
    line-height: 1.25;
}
.risk-status-bar .left .sub {
    font-size: 12px;
    opacity: 0.82;
    margin-top: 5px;
    line-height: 1.45;
}
.risk-status-bar .right {
    text-align: right;
    flex: 0 0 auto;
    white-space: nowrap;
}
.risk-status-bar .right .location {
    font-size: 13px;
    opacity: 0.8;
}
.risk-status-bar .right .date {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 2px;
}
.risk-status-bar.risk-high .status {
    color: #FF4D4F;
}
.risk-status-bar.risk-medium .status {
    color: #FAAD14;
}
.risk-status-bar.risk-low .status {
    color: #52C41A;
}

/* ===== 地图预览缩略 ===== */
.map-preview {
    background: #E8ECF0;
    border-radius: 16px;
    height: 160px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
    background: #1A2A3A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.map-preview .map-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    text-align: center;
}
.map-preview .map-placeholder .icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}
.map-preview .map-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
}
.map-preview .goto-map {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #0088CC;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== 快捷功能入口 ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 16px 0;
}
.quick-actions .action-item {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
    cursor: pointer;
    border: none;
}
.quick-actions .action-item:active {
    transform: scale(0.95);
}
.quick-actions .action-item .icon {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}
.quick-actions .action-item .label {
    font-size: 12px;
    color: #4A5568;
}

/* ===== 警报卡片列表（首页预览） ===== */
.alert-preview-list .alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F2F5;
}
.alert-preview-list .alert-item:last-child {
    border-bottom: none;
}
.alert-preview-list .alert-item .alert-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.alert-preview-list .alert-item .alert-icon.high {
    background: #FFF1F0;
}
.alert-preview-list .alert-item .alert-icon.medium {
    background: #FFFBE6;
}
.alert-preview-list .alert-item .alert-icon.low {
    background: #F6FFED;
}
.alert-preview-list .alert-item .content {
    flex: 1;
    min-width: 0;
}
.alert-preview-list .alert-item .content .title {
    font-size: 14px;
    font-weight: 500;
    color: #1A2332;
}
.alert-preview-list .alert-item .content .meta {
    font-size: 12px;
    color: #8C94A3;
    margin-top: 2px;
}
.alert-preview-list .alert-item .time {
    font-size: 11px;
    color: #B0B8C4;
    flex-shrink: 0;
}

/* ============================================================
   实时警报页面专用
   ============================================================ */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px 0;
    flex-wrap: wrap;
}
.filter-tabs .tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: #F0F2F5;
    color: #4A5568;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}
.filter-tabs .tab.active {
    background: #0088CC;
    color: #fff;
}
.filter-tabs .tab:active {
    transform: scale(0.95);
}

.alert-full-list .alert-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #D9DEE5;
    transition: all 0.2s;
}
.alert-full-list .alert-card.high {
    border-left-color: #FF4D4F;
}
.alert-full-list .alert-card.medium {
    border-left-color: #FAAD14;
}
.alert-full-list .alert-card.low {
    border-left-color: #52C41A;
}
.alert-full-list .alert-card .top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.alert-full-list .alert-card .top .left .title {
    font-size: 14px;
    font-weight: 600;
}
.alert-full-list .alert-card .top .left .location {
    font-size: 12px;
    color: #8C94A3;
    margin-top: 2px;
}
.alert-full-list .alert-card .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
.alert-full-list .alert-card .bottom .detail-link {
    color: #0088CC;
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================================
   一键上报页面专用
   ============================================================ */
.report-form .form-group {
    margin-bottom: 18px;
}
.report-form .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1A2332;
    margin-bottom: 6px;
}
.report-form .form-group label .required {
    color: #FF4D4F;
}
.report-form .form-group .hint {
    font-size: 12px;
    color: #8C94A3;
    margin-top: 4px;
}

.symptom-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.symptom-grid .symptom-item {
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid #E8ECF0;
    background: #fff;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.symptom-grid .symptom-item.selected {
    border-color: #0088CC;
    background: #E6F7FF;
}
.symptom-grid .symptom-item:active {
    transform: scale(0.95);
}

.report-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #E8ECF0;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    background: #fff;
    transition: border-color 0.2s;
}
.report-form textarea:focus {
    border-color: #0088CC;
}

.report-form .upload-area {
    border: 2px dashed #D9DEE5;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    background: #FAFBFC;
    cursor: pointer;
    transition: all 0.2s;
}
.report-form .upload-area:active {
    transform: scale(0.98);
}
.report-form .upload-area .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}
.report-form .upload-area .text {
    font-size: 13px;
    color: #8C94A3;
}

.report-form .location-display {
    background: #F5F7FA;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #4A5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0088CC, #00D4FF);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin-top: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.3);
}
.submit-btn:active {
    transform: scale(0.97);
}

/* ============================================================
   地图页面专用
   ============================================================ */
.map-full {
    width: 100%;
    height: 65vh;
    border-radius: 12px;
    overflow: hidden;
    background: #1A2A3A;
    position: relative;
}
.map-full .map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}
.map-full .map-placeholder .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}
.map-full .map-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-full .map-controls .ctrl-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-full .map-controls .ctrl-btn:active {
    transform: scale(0.92);
}

.map-stats {
    display: flex;
    gap: 12px;
    margin: 12px 0;
}
.map-stats .stat-box {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.map-stats .stat-box .num {
    font-size: 20px;
    font-weight: 700;
    color: #0B1A33;
}
.map-stats .stat-box .num.high {
    color: #FF4D4F;
}
.map-stats .stat-box .num.medium {
    color: #FAAD14;
}
.map-stats .stat-box .num.low {
    color: #52C41A;
}
.map-stats .stat-box .label {
    font-size: 11px;
    color: #8C94A3;
}

/* ============================================================
   防疫日历页面专用（common.css 中未覆盖的部分）
   ============================================================ */
.calendar-container {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.calendar-header .month {
    font-size: 18px;
    font-weight: 700;
    color: #1A2332;
}
.calendar-header .nav-btn {
    background: none;
    font-size: 20px;
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #E8ECF0;
    cursor: pointer;
}
.calendar-header .nav-btn:active {
    background: #F0F2F5;
}
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: #8C94A3;
    margin-bottom: 8px;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-days .day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: #1A2332;
    background: #FAFBFC;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}
.calendar-days .day:active {
    transform: scale(0.92);
}
.calendar-days .day.empty {
    background: transparent;
    cursor: default;
}
.calendar-days .day.today {
    background: #0088CC;
    color: #fff;
    font-weight: 700;
}
.calendar-days .day.has-event {
    border: 2px solid #0088CC;
}
.calendar-days .day .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}
.calendar-days .day .dot.vaccine {
    background: #0088CC;
}
.calendar-days .day .dot.disinfect {
    background: #52C41A;
}

.today-tasks {
    background: #F0F7FF;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid #0088CC;
}
.today-tasks .label {
    font-size: 12px;
    color: #8C94A3;
}
.today-tasks .task {
    font-size: 15px;
    font-weight: 600;
    color: #1A2332;
    margin-top: 2px;
}
.today-tasks .task .highlight {
    color: #0088CC;
}

.event-list .event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F2F5;
}
.event-list .event-item:last-child {
    border-bottom: none;
}
.event-list .event-item .icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F7FA;
    flex-shrink: 0;
}
.event-list .event-item .icon.vaccine {
    background: #E6F7FF;
}
.event-list .event-item .icon.disinfect {
    background: #F6FFED;
}
.event-list .event-item .info {
    flex: 1;
}
.event-list .event-item .info .name {
    font-size: 14px;
    font-weight: 500;
    color: #1A2332;
}
.event-list .event-item .info .desc {
    font-size: 12px;
    color: #8C94A3;
}
.event-list .event-item .status {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    background: #F6FFED;
    color: #52C41A;
}
.add-event-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: #F5F7FA;
    border: 2px dashed #D9DEE5;
    font-size: 14px;
    color: #4A5568;
    margin-top: 8px;
    cursor: pointer;
}
.add-event-btn:active {
    background: #E8ECF0;
}

/* ============================================================
   防控科普页面专用
   ============================================================ */
.knowledge-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px 0;
    overflow-x: auto;
    flex-wrap: nowrap;
}
.knowledge-tabs .tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: #F0F2F5;
    color: #4A5568;
    border: none;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}
.knowledge-tabs .tab.active {
    background: #0088CC;
    color: #fff;
}
.knowledge-tabs .tab:active {
    transform: scale(0.95);
}

.knowledge-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    cursor: pointer;
}
.knowledge-card:active {
    transform: scale(0.98);
}
.knowledge-card .cover {
    height: 120px;
    background: linear-gradient(135deg, #0B1A33, #1A3A5C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
}
.knowledge-card .cover .emoji {
    font-size: 48px;
}
.knowledge-card .body {
    padding: 12px 16px 16px 16px;
}
.knowledge-card .body .title {
    font-size: 15px;
    font-weight: 600;
    color: #1A2332;
}
.knowledge-card .body .desc {
    font-size: 13px;
    color: #8C94A3;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.knowledge-card .body .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: #B0B8C4;
}
.knowledge-card .body .meta .tag {
    background: #F0F7FF;
    color: #0088CC;
    padding: 2px 10px;
    border-radius: 12px;
}

/* ===== 详情弹窗 ===== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    padding: 40px 20px;
    overflow-y: auto;
}
.detail-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.detail-modal .modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    padding: 24px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.detail-modal .modal-content .close-btn {
    position: sticky;
    top: 0;
    float: right;
    background: #F0F2F5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}
.detail-modal .modal-content .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A2332;
    margin: 8px 0 12px 0;
}
.detail-modal .modal-content .modal-body {
    font-size: 14px;
    color: #4A5568;
    line-height: 1.8;
}
.detail-modal .modal-content .modal-body .highlight-box {
    background: #F0F7FF;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #0088CC;
    margin: 12px 0;
}

/* ============================================================
   附近资源页面专用
   ============================================================ */
.resource-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0 16px 0;
    overflow-x: auto;
}
.resource-tabs .tab {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    background: #F0F2F5;
    color: #4A5568;
    border: none;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
}
.resource-tabs .tab.active {
    background: #0088CC;
    color: #fff;
}
.resource-tabs .tab:active {
    transform: scale(0.95);
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}
.resource-item:active {
    transform: scale(0.98);
}
.resource-item .icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #F5F7FA;
}
.resource-item .icon.veterinary {
    background: #E6F7FF;
}
.resource-item .icon.lab {
    background: #F6FFED;
}
.resource-item .icon.wildlife {
    background: #FFF1F0;
}
.resource-item .info {
    flex: 1;
    min-width: 0;
}
.resource-item .info .name {
    font-size: 14px;
    font-weight: 600;
    color: #1A2332;
}
.resource-item .info .address {
    font-size: 12px;
    color: #8C94A3;
    margin-top: 2px;
}
.resource-item .info .distance {
    font-size: 12px;
    color: #0088CC;
}
.resource-item .actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.resource-item .actions .btn {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    border: none;
    background: #0088CC;
    color: #fff;
    cursor: pointer;
}
.resource-item .actions .btn:active {
    transform: scale(0.92);
}
.resource-item .actions .btn.phone {
    background: #52C41A;
}

.wildlife-warning {
    background: linear-gradient(135deg, #FFF1F0, #FFFBE6);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 12px 0;
    border-left: 4px solid #FAAD14;
    display: flex;
    align-items: center;
    gap: 12px;
}
.wildlife-warning .icon {
    font-size: 28px;
}
.wildlife-warning .text {
    flex: 1;
}
.wildlife-warning .text .title {
    font-weight: 600;
    color: #1A2332;
    font-size: 14px;
}
.wildlife-warning .text .desc {
    font-size: 13px;
    color: #4A5568;
}

/* ===== 桌面端（宽屏）背景与容器质感：让窄栏页面不再空旷 ===== */
@media (min-width: 900px) {
    body {
        background:
            radial-gradient(900px 520px at 10% 2%, rgba(0,136,204,0.10), transparent 62%),
            radial-gradient(820px 480px at 92% 98%, rgba(26,196,168,0.10), transparent 64%),
            linear-gradient(180deg, #EDF3F9 0%, #E6EDF6 100%);
        background-attachment: fixed;
    }
    body .page-container {
        box-shadow: 0 0 0 1px rgba(12,32,60,0.05), 0 24px 64px rgba(12,32,60,0.10);
    }
    body .app-header {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 1px 0 rgba(12,32,60,0.06);
    }
    body .app-tabbar {
        left: 50%;
        right: auto;
        width: 480px;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -6px 24px rgba(12,32,60,0.10);
    }
}
