/**
 * features/smart-analysis.css — 스마트 분석 카드 전용 스타일
 * analysis_card.css + analysis_smart.css 통합
 * components/badge.css 로 이동된 항목 제외:
 *   - .advice-badge, .status-*, .bg-status-*, .mini-card-status-dot (base)
 */

/* ── 차트 래퍼 기본 (dashboard + analysis 공통) ── */
.a-chart-wrap {
    position: relative;
    height: 320px;
    width: 100%;
}

.a-chart-wrap--no-top {
    margin-top: 0;
}

/* =========================================
   1. 분석 미니 그리드 (카드 선택 UI)
   ========================================= */

.analysis-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 10px 0;
    margin-bottom: 25px;
}

.analysis-mini-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.analysis-mini-card {
    background: #ffffff;
    padding: 12px 10px;
    border-radius: 12px;
    transition: all 0.2s;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #f1f3f5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    cursor: pointer;
}

.analysis-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #fff;
    border-color: #dee2e6;
}

.analysis-mini-card.active {
    background: #fff;
    border: 2px solid var(--brown);
    box-shadow: 0 4px 15px rgba(87, 69, 65, 0.15);
    transform: translateY(-2px);
}

.analysis-mini-card.active .mini-card-icon {
    color: var(--brown);
    opacity: 1;
}

.analysis-mini-card.active .mini-card-title {
    color: var(--brown);
}

.mini-card-icon {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--brown);
    opacity: 0.8;
}

.mini-card-title {
    font-size: 17px;
    color: #333;
    margin-bottom: 0;
    letter-spacing: -0.02em;
    font-weight: 500;
}

/* 상태 도트 컬러 (base: components/badge.css) */
.mini-card-status-dot.status-optimal {
    background-color: #27ae60;
}

.mini-card-status-dot.status-warning {
    background-color: #f39c12;
}

.mini-card-status-dot.status-danger {
    background-color: #e74c3c;
}

.mini-card-status-dot.status-sunburn-safe {
    background-color: #27ae60;
}

.mini-card-status-dot.status-sunburn-caution {
    background-color: #f39c12;
}

.mini-card-status-dot.status-sunburn-danger {
    background-color: #e74c3c;
}

.mini-card-status-dot.status-dark,
.mini-card-status-dot.status-neutral {
    background-color: #adb5bd;
}

.mini-card-value {
    display: none;
}

.mini-card-value.optimal,
.mini-card-value.status-optimal,
.mini-card-value.good {
    background-color: transparent;
    color: #2b8a3e;
}

.mini-card-value.warning,
.mini-card-value.status-warning,
.mini-card-value.caution {
    background-color: transparent;
    color: #e8956d;
}

.mini-card-value.danger,
.mini-card-value.status-danger {
    background-color: transparent;
    color: #c92a2a;
}

.mini-card-value.neutral,
.mini-card-value.status-dark,
.mini-card-value.status-neutral {
    background-color: transparent;
    color: #495057;
}

.mini-card-sub {
    font-size: 14px;
    color: #999;
}

/* =========================================
   2. 분석 카드 상세 (기본 숨김, JS 제어)
   ========================================= */

.fert-analysis-card {
    background: #fff;
    margin-top: 20px;
    margin-bottom: 24px;
    display: none;
}

.fert-analysis-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fert-analysis-card__header--no-border {
    border-bottom: none !important;
    margin-bottom: 10px;
    padding-bottom: 0;
    justify-content: flex-end;
}

.fert-analysis-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── 닫기 버튼 ────────────────────────────────── */
.smart-close-btn {
    position: absolute;
    left: -5px;
    top: -15px;
    width: 28px;
    height: 28px;
    background: #adb5bd;
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 10;
}

.smart-close-btn:hover {
    background: #868e96;
    transform: scale(1.1);
}

.smart-close-btn i {
    font-size: 14px;
}

.smart-close-btn-global {
    background: none;
    border: none;
    color: #adb5bd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
    margin-right: 15px;
}

.smart-close-btn-global:hover {
    color: #868e96;
}

.smart-close-btn-global i {
    font-size: 16px;
}

/* ── 메트릭 그리드 ────────────────────────────── */
.fert-analysis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.fert-metric-item {
    text-align: center;
    padding: 10px 0;
}

.fert-metric-item__label {
    font-size: 17px;
    color: #333;
    margin-bottom: 5px;
    display: block;
    font-weight: normal;
}

.fert-metric-item__value {
    font-size: 17px;
    color: var(--brown);
    font-weight: 600;
}

.fert-metric-item__value--lg {
    font-size: 16px;
}

.fert-metric-item__sub {
    font-size: 15px;
    color: #f39c12;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.fert-metric-item__sub--highlight {
    color: #ff8c42;
    font-weight: 600;
}

/* =========================================
   3. 타임라인 공통
   ========================================= */



.fert-timeline-header {
    font-size: 17px;
    color: #888;
    margin-bottom: 25px;
}

.fert-timeline-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.fert-timeline-year {
    width: 40px;
    font-size: 13px;
    color: #868e96;
}

.fert-timeline-year--current {
    color: #e67e22;
    font-weight: 800;
}

.fert-timeline-bar-bg {
    flex: 1;
    height: 6px;
    background: #f1f3f5;
    margin: 0 15px;
    border-radius: 10px;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fert-timeline-bar-bg--current {
    background: #ffe8cc;
}

.fert-timeline-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.fert-timeline-dot--past {
    background: #adb5bd;
}

.fert-timeline-dot--current {
    background: #e67e22;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 8px rgba(230, 126, 34, 0.5);
}

.fert-timeline-dot--pulse {
    animation: timeline-pulse 2s infinite;
}

@keyframes timeline-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.fert-timeline-date {
    width: 60px;
    text-align: right;
    font-size: 13px;
    color: var(--brown-dark);
    font-weight: 600;
}

.fert-timeline-date--current {
    color: #ff8c42;
}

.fert-summary-box {
    text-align: center;
    margin-top: 15px;
    font-size: 15px;
    color: var(--brown-dark);
    background: #faf7f4;
    border-radius: 8px;
    padding: 8px;
}

.fert-summary-box--compact {
    margin-top: 10px;
    padding: 10px;
    background: #f1f3f5;
    border-radius: 8px;
    font-size: 13px;
    color: #495057;
}

.fert-summary-box--warm {
    margin-top: 10px;
    padding: 12px;
    background: #fdf6ee;
    border: 1px solid #f7ebdb;
    border-radius: 10px;
    font-size: 13px;
    color: #4e342e;
    line-height: 1.5;
}

.fert-summary-icon--check {
    color: #27ae60;
    margin-right: 5px;
}

/* ── 타임라인 스케일 ──────────────────────────── */
.fert-timeline-scale {
    display: flex;
    align-items: end;
    margin-bottom: 10px;
    color: #adb5bd;
    font-size: 13px;
    height: 20px;
}

.fert-timeline-scale__spacer-left {
    width: 40px;
}

.fert-timeline-scale__track {
    flex: 1;
    margin: 0 10px;
    position: relative;
    height: 100%;
}

.fert-timeline-scale__spacer-right {
    width: 60px;
}

.fert-timeline-tick {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

.fert-timeline-container--bordered {
    margin-top: 15px;
}

/* ── 타임라인 변형 ────────────────────────────── */
.fert-timeline-container--frost,
.fert-timeline-container--gdd,
.fert-timeline-container--fert,
.fert-timeline-container--bee {
    padding-top: 28px;
    border-bottom: 1px solid #eee;
}

.fert-timeline-container--bloom {
    padding-top: 28px;
    padding-bottom: 32px;
    border-bottom: 1px solid #eee;
}

.fert-timeline-container--history {
    padding-top: 28px !important;
    padding-bottom: 20px;
}

.fert-analysis-card--frost {
    margin-top: 40px !important;
}

.fert-divider {
    border-top: 1px solid #eee;
    margin: 10px 0;
}

/* ── Frost 전용 ───────────────────────────────── */
.fert-timeline-scale--frost {
    color: #adb5bd;
    font-size: 13px;
    display: flex;
    align-items: end;
}

.fert-timeline-date-group {
    flex: 1;
    margin: 0 auto;
    position: relative;
}

.fert-timeline-tick--rotated {
    position: absolute;
    transform: rotate(-45deg);
    transform-origin: left bottom;
    white-space: nowrap;
    font-size: 12px;
    color: #adb5bd;
    bottom: 2px;
}

.fert-timeline-header-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin: 0 auto;
}

.fert-timeline-header-icon--caution {
    background-color: #f8c64a;
}

.fert-timeline-header-icon--danger {
    background-color: #c079ce;
}

.fert-timeline-scale__track--frost {
    flex: 1;
    position: relative;
    height: 12px;
}

.fert-timeline-stat--lg {
    color: #495057;
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.fert-timeline-legend--frost {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 15px;
    color: #555;
    margin: 10px auto 0;
    width: fit-content;
    align-items: center;
}

.fert-timeline-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fert-timeline-legend__dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.fert-timeline-legend__dot--caution {
    background-color: rgba(255, 165, 0, 0.3);
}

.fert-timeline-legend__dot--danger {
    background-color: #c079ce;
}

/* ── Frost 도트 컬러 ──────────────────────────── */
.fert-timeline-dot--frost-danger {
    background-color: #c079ce !important;
}

.fert-timeline-dot--frost-caution {
    background-color: #f8c64a !important;
}

/* ── Timeline dot 상태색 ──────────────────────── */
.fert-timeline-dot.status-info {
    background-color: #3b82f6;
}

.fert-timeline-dot.status-warning {
    background-color: #fcc419;
}

.fert-timeline-dot.status-orange {
    background-color: #fd7e14;
}

.fert-timeline-dot.status-danger {
    background-color: #ef4444;
}

/* ───── Heatmap Matrix Styles (Renewal) ───── */
.heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 15px;
}

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

.heatmap-grid {
    flex: 1;
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 4px;
}

.heatmap-cell {
    flex: 1;
    height: 14px;
    background: #f1f3f5;
    border-radius: 1px;
    position: relative;
    cursor: default;
}

.heatmap-cell:hover {
    filter: brightness(0.95);
    z-index: 10;
}

.heatmap-cell--caution {
    background-color: rgba(255, 165, 0, 0.3) !important;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.heatmap-cell--danger {
    background-color: #c079ce !important;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.heatmap-cell--current {
    outline: 1.5px solid #e67e22;
    outline-offset: 1px;
}

/* Tooltip for cells */
.heatmap-cell[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 5px;
    pointer-events: none;
    z-index: 100;
}

/* =========================================
   병해충 방제 타임라인 (Pest Timeline)
   ========================================= */

/* 오늘 방제 가능 여부 차트 래퍼 */
.pest-chart-wrap {
    position: relative;
    height: 360px;
    width: 100%;
}

/* 날짜 눈금 스케일 행 */
.pest-timeline-scale {
    display: flex;
    align-items: flex-end;
    margin: 8px 0 4px;
    font-size: 11px;
    color: #aaa;
    border-bottom: 1px solid #eee;
}

.pest-timeline-scale--bottom {
    margin-top: 15px;
    margin-bottom: 15px;
    /* 공간 확보 */
    border-bottom: none;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.pest-timeline-label--left {
    width: 72px;
    flex-shrink: 0;
}

.pest-timeline-label--right {
    width: 36px;
    flex-shrink: 0;
}

.pest-timeline-track {
    flex: 1;
    position: relative;
    height: 18px;
    margin: 0 6px;
}

.pest-timeline-tick {
    position: absolute;
    transform: translateX(-50%);
    font-size: 13px;
    color: #bbb;
    white-space: nowrap;
    margin-left: -10px;
}

.pest-timeline-tick-text {
    transform: rotate(-45deg);
    transform-origin: top center;
    margin-top: 4px;
}

/* 연간 주의 구간 Gantt 행 */
.pest-history-row {
    display: flex;
    align-items: center;
    margin: 3px 0;
}

.pest-history-label {
    width: 72px;
    flex-shrink: 0;
    font-size: 13px;
    color: #555;
    text-align: right;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ★ 핵심 수정: position:relative + height 없으면 자식 absolute가 페이지 전체를 차지 */
.pest-history-track {
    flex: 1;
    position: relative;
    height: 20px;
    background: #f5f5f5;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 6px;
}

.pest-history-count {
    display: none;
}

/* =========================================
   4. 품종 토글
   ========================================= */

.variety-toggle-container {
    display: inline-flex;
    background: #f1f3f5;
    border-radius: 20px;
    padding: 3px;
    margin-left: 10px;
}

.variety-toggle-btn {
    border: none;
    background: none;
    padding: 4px 12px;
    border-radius: 17px;
    font-size: 11px;
    font-weight: 700;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.3s;
}

.variety-toggle-btn.active {
    background: #fff;
    color: var(--brown);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bloom-year-select,
.bee-type-select {
    font-size: 15px;
    color: #4e342e;
    /* 다크 브라운 */
    font-weight: 600;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.bloom-title-suffix {
    margin-left: 2px;
}

/* =========================================
   5. 꿀벌 활동 지수
   ========================================= */

.bee-deviation-info {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 10px;
}

.bee-comparison-section {
    margin-top: 20px;
    padding-top: 20px;
}

.bee-chart-group {
    margin-bottom: 24px;
}

.bee-chart-label {
    font-size: 17px;
    color: #888;
    margin-bottom: 10px;
}

.bee-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.bee-bar-container {
    flex: 1;
    height: 18px;
    background: #f1f3f5;
    border-radius: 9px;
    overflow: hidden;
    display: flex;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bee-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.bee-segment--optimal {
    background-color: #63e6be;
}

.bee-segment--good {
    background-color: #b2f2bb;
}

.bee-segment--limited {
    background-color: #ffec99;
}

.bee-segment--blocked {
    background-color: #f1a1a1;
}

.bee-bar-percent {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #495057;
    pointer-events: none;
}

.bee-year-label {
    width: 50px;
    font-size: 13px;
    color: #adb5bd;
    text-align: right;
}

.bee-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding: 6px 0;
}

.bee-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #495057;
}

.bee-comparison-year {
    margin-right: 8px;
    color: #666;
    width: 45px;
    flex-shrink: 0;
    font-size: 13px;
}

.bee-comparison-row-inner {
    display: flex;
    align-items: center;
    width: 100%;
}

.bee-comparison-bar-wrap {
    flex: 1;
    display: flex;
    height: 12px;
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
}

.bee-comparison-score {
    font-size: 13px;
    color: var(--brown);
    font-weight: 600;
    margin-left: 8px;
    min-width: 40px;
    text-align: right;
}

.bee-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}

.bee-summary-dot {
    margin-right: 4px;
    margin-top: -2px;
}

/* ── 꿀벌 방사 적기 범례 ──────────────────────── */
.bee-deploy-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
}

.bee-deploy-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #495057;
    font-weight: 500;
}

.bee-deploy-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── 꿀벌 추세 차트 ───────────────────────────── */
.bee-trend-summary {
    margin-bottom: 15px;
    padding: 0 5px;
    font-size: 17px;
    color: #888;
    line-height: 1.5;
}

.bee-summary-highlight {
    color: var(--brown);
    font-weight: bold;
}

.bee-chart-container {
    height: 320px;
    position: relative;
    margin-bottom: 10px;
}

.bee-stage-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bee-trend-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 15px;
    font-size: 15px;
    color: #495057;
    width: 100%;
    text-align: center;
}

.bee-trend-legend__group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.bee-trend-legend__group--secondary {
    gap: 10px;
}

.bee-trend-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bee-trend-legend__icon {
    display: inline-block;
    vertical-align: middle;
}

.bee-trend-legend__icon--line {
    width: 12px;
    height: 1.5px;
}

.bee-trend-legend__icon--dashed {
    width: 12px;
    height: 0;
    border-top: 1.5px dashed;
}

.bee-trend-legend__icon--rect {
    width: 10px;
    height: 6px;
    border-radius: 1px;
}

.bee-legend-footer {
    font-size: 11px;
    color: #bbb;
    margin-top: 5px;
    text-align: center;
}

.bee-analysis-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--brown);
}

/* =========================================
   6. GDD (성장도일)
   ========================================= */

.gdd-progress-container {
    margin: 8px 0 25px;
    background: #e9ecef;
    height: 12px;
    overflow: hidden;
    position: relative;
    border-radius: 6px;
}

.gdd-progress-bar {
    background: #fab005;
    height: 100%;
    transition: width 0.5s ease;
}

.gdd-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #868e96;
    margin-top: 25px;
}

.gdd-summary-box {
    background: #fff9db !important;
    color: #856404 !important;
    border: 1px solid #ffe066 !important;
    margin-top: 15px;
}

.gdd-timeline-scale-wrap {
    margin-bottom: 2px;
    height: 35px;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.gdd-timeline-scale-track {
    margin: 0 !important;
    position: relative;
    height: 100%;
}

.gdd-timeline-tick {
    position: absolute;
    bottom: 0;
    font-size: 13px;
    color: #868e96;
    transform: rotate(-45deg);
    transform-origin: left bottom;
    white-space: nowrap;
    margin-left: 12px;
    padding-bottom: 2px;
}

.gdd-bar-wrapper {
    display: flex;
    margin-bottom: 8px;
    align-items: center;
}

.gdd-year-label {
    width: 55px;
    font-size: 13px;
    color: #868e96;
    text-align: right;
    padding-right: 6px;
    flex-shrink: 0;
}

.gdd-bar-container {
    flex: 1;
    height: 18px;
    background: #f1f3f5;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin: 0;
}

.gdd-stage-segment {
    position: absolute;
    height: 100%;
    opacity: 0.85;
}

.gdd-today-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #f39c12;
    border-radius: 1px;
}

.gdd-legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px;
    margin-top: 12px;
    background: #fff;
}

/* =========================================
   7. 일소 피해 (Sunburn)
   ========================================= */

#smart-card-sunburn .a-chart-wrap {
    margin-top: 20px;
    padding-top: 5px;
}

.sunburn-comparison-section {
    border-top: 1px solid #eee;
}

.sunburn-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 80px;
    padding-bottom: 10px;
}

.sunburn-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.sunburn-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* =========================================
   8. 차트 & 범례 공통
   ========================================= */

.fert-chart-wrap {
    position: relative;
    width: 100%;
    height: 320px;
}

.fert-chart-wrap--hourly,
.fert-chart-wrap--weekly,
.fert-chart-wrap--bloom {
    height: 380px !important;
}

.fert-trend-container {
    margin-bottom: 25px;
}

.fert-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 15px;
    font-size: 15px;
    color: #555;
    margin-top: 35px;
}

.fert-legend__item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fert-legend-line {
    display: inline-block;
    width: 20px;
    vertical-align: middle;
}

.fert-legend-line--actual {
    height: 2px;
    background-color: var(--brown);
}

.fert-legend-line--predict {
    height: 0;
    border-bottom: 2px dashed var(--brown);
}

.fert-legend-line--root {
    height: 0;
    border-bottom: 2px dashed #f39c12;
}

.fert-legend-line--target {
    height: 2px;
    background-color: #e74c3c;
}

.fert-comparison-legend {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
    font-size: 15px;
    color: #777;
}

/* Chart Header */
.chart-header-title {
    font-size: 18px;
    color: #4e342e;
    font-weight: 700;
}

.chart-header-legend {
    display: flex;
    gap: 10px;
    font-size: 15px;
    color: #555;
    font-weight: normal;
}

.chart-header-legend__item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.chart-header-legend__dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.chart-header-legend__dot--caution {
    background: rgba(255, 165, 0, 0.5);
}

.chart-header-legend__dot--danger {
    background: rgba(128, 0, 128, 0.5);
}

.chart-header-legend__dot--good {
    background: #63e6be;
}

.chart-header-legend__dot--stopped {
    background: #dee2e6;
}

/* Analysis Legend */
.analysis-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 30px;
    font-size: 15px;
    color: #333;
}

.analysis-chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-line {
    display: inline-block;
    width: 18px;
    vertical-align: middle;
}

.legend-line.solid {
    height: 2px;
    background: var(--brown);
}

.legend-line.dashed {
    height: 0;
    border-top: 2px dashed var(--brown);
}

.legend-line.dashed-accent {
    height: 0;
    border-top: 2px dashed #ff8c42;
}

.custom-analysis-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #666;
    padding-bottom: 15px;
}

.custom-legend-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.custom-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
}

.custom-legend-indicator {
    display: inline-block;
    width: 16px;
}

.custom-legend-indicator--line {
    height: 2px;
}

.custom-legend-indicator--dashed {
    border-bottom: 2px dashed #339af0;
}

.custom-legend-indicator--box {
    height: 12px;
    border-radius: 2px;
}

.analysis-footer-disclaimer {
    text-align: center;
    font-size: 15px;
    color: #999;
    margin-top: 20px;
    margin-bottom: 5px;
    padding-right: 4px;
}

/* ── Q 조언 박스 변형 (v2) ─────────────────────── */
.card-advice.v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fdf6ee;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 10px;
}

.advice-badge-sq {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    background: var(--brown-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.advice-text-v2 {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.insight-body-v2 {
    padding-top: 5px;
}

/* ── 상태 색상 오버라이드 (파스텔톤, smart analysis 전용) */
.status-optimal {
    color: #4db89e !important;
}

.status-warning {
    color: #e5bf97 !important;
}

.status-orange {
    color: #9b8ec4 !important;
}

.status-danger {
    color: #e07b8a !important;
}

.status-neutral {
    color: #90a4b4 !important;
}

.status-dark {
    color: #c6ac91 !important;
}

.bg-status-optimal {
    background-color: #d8f3ec !important;
    border-radius: 4px;
    padding: 2px 6px;
}

.bg-status-warning {
    background-color: #daeef7 !important;
    border-radius: 4px;
    padding: 2px 6px;
}

.bg-status-danger {
    background-color: #f8dde1 !important;
    border-radius: 4px;
    padding: 2px 6px;
}

/* =========================================
   Smart Summary Cards (analysis_smart.css)
   ========================================= */

.sa-summary-list {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: space-between;
}

.sa-card {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.sa-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sa-card.active {
    box-shadow: 0 4px 12px rgba(87, 69, 65, 0.08);
}

.sa-card.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 4px;
    background: #ef4444;
    border-radius: 4px 4px 0 0;
}

.sa-card__icon {
    margin-bottom: 10px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-card__icon img {
    height: 38px;
    width: auto;
    object-fit: contain;
}

.sa-card__title {
    font-size: 15px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.sa-card__status {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.sa-card__meta {
    font-size: 13px;
    color: #999;
}

.sa-detail-container {
    margin-top: 24px;
    min-height: 50px;
}

.sa-detail-item {
    display: none;
    animation: fadeIn 0.3s ease;
}

.sa-detail-item.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .sa-summary-list {
        gap: 8px;
    }

    .sa-card {
        padding: 14px 10px;
    }

    .sa-card__title {
        font-size: 13px;
    }

    .sa-card__status {
        font-size: 17px;
    }

    .sa-card__meta {
        font-size: 12px;
    }

    .sa-card__icon img {
        height: 30px;
    }
}

/* =========================================
   6. Q알림 박스 (Q Alert Box)
   ========================================= */
.q-alert-box {
    background-color: #faf7f4;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 45px;
}

.q-alert-box__icon {
    background-color: #574541;
    /* 브라운 컬러 */
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.q-alert-box__message {
    color: #4e342e;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
}