/* HBsolution HACCP System — Home (다원텍 Smart-MES mainhome.css · weather.css 값 그대로, .hb-home 안에서만 적용) */
.hb-home {
  --jini-primary: #405189; --jini-primary-dark: #334071; --jini-primary-rgb: 64, 81, 137; --jini-primary-10: rgba(64, 81, 137, 0.1);
  --jini-white: #fff; --jini-body-bg: #f3f3f9; --jini-body-color: #212529; --jini-heading-color: #495057;
  --jini-border-radius: 0.25rem; --jini-border-radius-lg: 0.3rem; --jini-border-radius-xl: 1rem; --jini-border-radius-pill: 50rem;
  --jini-box-shadow: 0 1px 2px rgba(56, 65, 74, 0.15); --jini-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); --jini-box-shadow-lg: 0 5px 10px rgba(30, 32, 37, 0.12);
  --jini-border-color: #e9ebec; --jini-border-width: 1px; --jini-secondary-color: #878a99;
  --jini-gray-100: #f3f6f9; --jini-gray-200: #eff2f7; --jini-gray-300: #e9ebec; --jini-gray-400: #ced4da; --jini-gray-500: #adb5bd; --jini-gray-600: #878a99;
  --jini-light: #f3f6f9; --jini-hover: #f5f6f8; --jini-info: #299cdb; --jini-danger: #a9413b; --jini-indigo: #405189; --jini-text: #344054;
  --jini-secondary-bg-subtle: #e1ebfd; --jini-light-bg-subtle: #f9fbfc; --jini-primary-text-emphasis: #364574;
  background: var(--jini-body-bg); color: var(--jini-body-color); font-size: 13px; line-height: 1.5; padding: 20px !important; overflow-y: auto;
}
.hb-home *, .hb-home *::before, .hb-home *::after { box-sizing: border-box; }
.hb-home p, .hb-home h2 { margin: 0; }
.hb-home .hb-spin { animation: hb-home-spin 2s linear infinite; }
@keyframes hb-home-spin { to { transform: rotate(360deg); } }

.hb-home .dashboard-container { max-width: 1600px; margin: 0 auto; }
.hb-home .top-section { display: grid; grid-template-columns: 2fr 3fr; gap: 20px; margin-bottom: 24px; }

/* 환영 카드 */
.hb-home .welcome-card { background: linear-gradient(90deg, #3d4d8c 0%, #3f5090 55%, #5b74ae 100%); border-radius: var(--jini-border-radius-lg); padding: 15px; color: #fff; box-shadow: var(--jini-box-shadow-lg); position: relative; overflow: hidden; }
.hb-home .welcome-content { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.hb-home .user-image-container { flex-shrink: 0; }
/* 사용자정보변경의 사진이 110×150 안에 잘리지 않고 모두 보이도록 (cover → contain) */
.hb-home #hbUserImg { display: block; width: 110px; height: 150px; object-fit: contain; background: #fff; border-radius: 5px; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.hb-home .text-content { flex: 1; min-width: 0; }
.hb-home .user-greeting { font-size: 16px; margin-bottom: 8px; opacity: 0.95; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-home .user-greeting strong { font-weight: 600; }
.hb-home .date-info { font-size: 14px; opacity: 0.85; display: flex; align-items: center; gap: 8px; }

/* 검색 카드 */
.hb-home .search-card { background: var(--jini-white); border-radius: var(--jini-border-radius-lg); padding: 24px; box-shadow: var(--jini-box-shadow); display: flex; flex-direction: column; justify-content: center; }
.hb-home .search-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 15px; font-weight: 600; color: var(--jini-heading-color); }
.hb-home .search-engine-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.hb-home .search-engine-badge-google { background: #4285f4; } .hb-home .search-engine-badge-naver { background: #03c75a; } .hb-home .search-engine-badge-daum { background: #3c7fe3; }
.hb-home .search-engine-badge-chatgpt { background: #10a37f; } .hb-home .search-engine-badge-claude { background: #d97706; } .hb-home .search-engine-badge-gemini { background: #4569e8; }
.hb-home .ai-search-hint { font-size: 11px; color: var(--jini-secondary-color); margin-top: 6px; padding: 0 4px; line-height: 1.5; }
.hb-home .engine-tab-row { display: flex; gap: 6px; margin-bottom: 12px; }
.hb-home .engine-tab { flex: 1; padding: 6px 0; border: 1px solid var(--jini-border-color); border-radius: var(--jini-border-radius); background: var(--jini-white); color: var(--jini-body-color); font: 500 13px inherit; font-family: inherit; cursor: pointer; transition: all 0.2s ease; min-width: 0; }
.hb-home .engine-tab:hover { border-color: var(--jini-primary); color: var(--jini-primary); }
.hb-home .engine-tab.active { background: var(--jini-primary); border-color: var(--jini-primary); color: #fff; }
.hb-home .search-input-wrapper { position: relative; }
.hb-home .search-input-wrapper input { width: 100%; height: 48px !important; padding: 0 56px 0 20px; border: 1px solid var(--jini-border-color); border-radius: var(--jini-border-radius-lg); font-size: 14px; transition: all 0.3s ease; outline: none; background: var(--jini-white); color: var(--jini-body-color); }
.hb-home .search-input-wrapper input:focus { border-color: var(--jini-primary); box-shadow: 0 0 0 3px var(--jini-primary-10); }
.hb-home .search-input-wrapper button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 36px; background: var(--jini-primary); border: none; border-radius: var(--jini-border-radius); color: #fff; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; min-width: 0; }
.hb-home .search-input-wrapper button:hover { background: var(--jini-primary-dark); transform: translateY(-50%) scale(1.05); }

/* 본문 그리드 (공지 4 · 일정 4 · 뉴스 3 / 일기예보 전체폭) */
.hb-home .main-content { display: grid; grid-template-columns: repeat(11, 1fr); gap: 20px; }
.hb-home .section-header { margin-bottom: 20px; }
.hb-home .section-title { display: flex; align-items: center; gap: 4px; flex-direction: row; }
.hb-home .notice-section, .hb-home .schedule-section { grid-column: span 4; }
.hb-home .news-section { grid-column: span 3; }
.hb-home .forecast-section { grid-column: 1 / -1; }

.hb-home .loading-state, .hb-home .empty-state { text-align: center; padding: 60px 20px; color: var(--jini-secondary-color); }
.hb-home .loading-state .fa { font-size: 32px; margin-bottom: 12px; color: var(--jini-primary); }
.hb-home .empty-state .fa { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.hb-home .loading-state p, .hb-home .empty-state p { font-size: 14px; }

/* 일정관리 */
.hb-home .schedule-section { background: var(--jini-white); border-radius: var(--jini-border-radius-lg); padding: 20px; box-shadow: var(--jini-box-shadow); display: flex; flex-direction: column; }
.hb-home .schedule-list { flex: 1; overflow-y: auto; margin-top: 10px; max-height: 360px; }
.hb-home #hbSchedDate { width: 130px; height: 30px !important; border: 1px solid #ced4da; border-radius: 4px; padding: 0 6px; font-size: 12px; }
.hb-home .day-group { border-bottom: 1px solid #eee; padding: 10px 0; }
.hb-home .day-header { font-weight: bold; color: #333; margin-bottom: 5px; font-size: 14px; }

/* 공지사항 */
.hb-home .notice-section { background: var(--jini-white); border-radius: var(--jini-border-radius-lg); padding: 20px 20px 0; box-shadow: var(--jini-box-shadow); display: flex; flex-direction: column; overflow: hidden; }
.hb-home .notice-list { flex: 1; overflow-y: auto; max-height: 360px; }
.hb-home .notice-item { padding: 10px 12px; border-bottom: 1px solid var(--jini-gray-200); border-left: 3px solid transparent; border-radius: var(--jini-border-radius); cursor: pointer; transition: all 0.2s ease; margin-bottom: 2px; }
.hb-home .notice-item:hover { background: var(--jini-hover); border-left-color: var(--jini-primary); }
.hb-home .notice-item .notice-title { display: flex; align-items: baseline; gap: 5px; font-size: 13px; font-weight: 600; color: var(--jini-heading-color); overflow: hidden; margin-bottom: 4px; }
.hb-home .notice-title-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-home .notice-new-badge { flex-shrink: 0; display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--jini-danger); border-radius: 3px; padding: 1px 4px; line-height: 1.4; }
.hb-home .notice-content { font-size: 12px; color: var(--jini-secondary-color); margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.hb-home .notice-info { font-size: 11px; color: var(--jini-secondary-color); display: flex; gap: 12px; }

/* News · 환율 */
.hb-home .news-section { background: var(--jini-white); border-radius: var(--jini-border-radius-lg); padding: 24px; box-shadow: var(--jini-box-shadow); display: flex; flex-direction: column; min-width: 0; }
.hb-home .news-list { flex: 1; overflow-y: auto; max-height: 360px; min-height: 360px; margin-top: 4px; }
.hb-home .news-item { padding: 8px 10px; border-bottom: 1px solid var(--jini-gray-200); border-left: 3px solid transparent; border-radius: var(--jini-border-radius); cursor: pointer; transition: all 0.2s ease; margin-bottom: 2px; text-decoration: none; display: block; color: inherit; }
.hb-home .news-item:hover { background: var(--jini-hover); border-left-color: var(--jini-info); }
.hb-home .news-title { font-size: 13px; font-weight: 500; color: var(--jini-heading-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.hb-home .news-item:hover .news-title { color: var(--jini-primary); }
.hb-home .news-date { font-size: 11px; color: var(--jini-secondary-color); }
.hb-home .notice-list::-webkit-scrollbar, .hb-home .news-list::-webkit-scrollbar, .hb-home .schedule-list::-webkit-scrollbar { width: 6px; }
.hb-home .notice-list::-webkit-scrollbar-track, .hb-home .news-list::-webkit-scrollbar-track, .hb-home .schedule-list::-webkit-scrollbar-track { background: var(--jini-light); border-radius: 10px; }
.hb-home .notice-list::-webkit-scrollbar-thumb, .hb-home .news-list::-webkit-scrollbar-thumb, .hb-home .schedule-list::-webkit-scrollbar-thumb { background: var(--jini-gray-400); border-radius: 10px; }

.hb-home .news-tab { padding: 6px 12px; font-size: 13px; font-weight: 600; font-family: inherit; border: 1px solid var(--jini-gray-300); border-radius: 12px; background: none; color: var(--jini-gray-600); cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background 0.15s, color 0.15s, border-color 0.15s; min-width: 0; }
.hb-home .news-tab:hover { color: var(--jini-primary); border-color: var(--jini-primary); }
.hb-home .news-tab.active { background: var(--jini-primary); color: #fff; border-color: var(--jini-primary); }
.hb-home .hb-home-action-btn { transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.hb-home .hb-home-action-btn:hover { transform: translateY(-1px); border-color: #2c3a66; box-shadow: 0 2px 8px rgba(var(--jini-primary-rgb), 0.45); }

.hb-home .exchange-rate-wrap { padding: 0 4px; }
.hb-home .exchange-rate-header { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--jini-heading-color); padding: 8px 6px; border-bottom: 2px solid var(--jini-primary); }
.hb-home .exchange-updated { font-size: 11px; font-weight: 400; color: var(--jini-secondary-color); }
.hb-home .exchange-rate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hb-home .exchange-rate-table thead tr { background: var(--jini-light); }
.hb-home .exchange-rate-table th { padding: 7px 10px; text-align: center; font-weight: 600; font-size: 12px; color: var(--jini-secondary-color); border-bottom: 1px solid var(--jini-gray-200); }
.hb-home .exchange-rate-table td { padding: 7px 10px; border-bottom: 1px solid var(--jini-gray-100); text-align: center; }
.hb-home .exchange-rate-table tbody tr:hover { background: var(--jini-hover); }
.hb-home .exchange-rate-table .er-no { color: var(--jini-secondary-color); font-size: 11px; width: 28px; }
.hb-home .exchange-rate-table .er-code { font-weight: 600; color: var(--jini-primary); font-size: 12px; }
.hb-home .exchange-rate-table .er-rate { font-weight: 700; text-align: right; color: var(--jini-heading-color); font-variant-numeric: tabular-nums; }

/* 일기 예보 */
.hb-home .forecast-section { background: var(--jini-white); border-radius: var(--jini-border-radius-lg); padding: 16px; box-shadow: var(--jini-box-shadow); border: 1px solid var(--jini-border-color); min-height: 200px; }
.hb-home .wx-section-header { margin-bottom: 20px; }
.hb-home .wx-section-header .section-title { gap: 8px; }
.hb-home .wx-section-header .section-title .fa { color: var(--jini-primary); font-size: 18px; }
.hb-home .wx-section-header h2 { font-size: 16px; font-weight: 600; color: var(--jini-heading-color); display: inline; }
.hb-home .current-weather-summary { display: flex; align-items: center; justify-content: space-between; padding: 24px; background: var(--jini-secondary-bg-subtle); border-radius: var(--jini-border-radius-xl); margin-bottom: 20px; gap: 24px; position: relative; z-index: 1; }
.hb-home .weather-summary-item { display: flex; align-items: center; gap: 16px; }
.hb-home .weather-icon-large { font-size: 64px; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; background: var(--jini-light-bg-subtle); border-radius: var(--jini-border-radius-xl); border: 1px solid var(--jini-border-color); box-shadow: var(--jini-box-shadow-sm); }
.hb-home .weather-icon-large .fa { font-size: 48px; }
.hb-home .weather-temp-large { font-size: 48px; font-weight: 700; color: var(--jini-heading-color); line-height: 1; }
.hb-home .weather-summary-details { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.hb-home .weather-location-info { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--jini-primary-text-emphasis); flex-wrap: wrap; }
.hb-home .weather-location-info > .fa { font-size: 14px; color: var(--jini-danger); }
.hb-home .weather-desc-info { font-size: 14px; color: var(--jini-secondary-color); margin-top: 4px; }
.hb-home .weather-mini-details { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.hb-home .weather-mini-details > span { display: flex; align-items: center; gap: 6px; font-size: 11px; background: var(--jini-white); padding: 6px 10px; border-radius: var(--jini-border-radius-pill); color: var(--jini-text); border: 1px solid var(--jini-border-color); white-space: nowrap; }
.hb-home .weather-mini-details .fa { font-size: 11px; color: var(--jini-primary); }
.hb-home .weather-mini-details strong { color: var(--jini-heading-color); }
.weather-chart-tooltip { z-index: 9999 !important; }

@media (max-width: 1200px) {
  .hb-home .top-section { grid-template-columns: 1fr 1.5fr; }
  .hb-home .current-weather-summary { padding: 20px; }
  .hb-home .weather-temp-large { font-size: 40px; }
}
@media (max-width: 960px) {
  .hb-home .top-section { grid-template-columns: 1fr; }
  .hb-home .main-content { grid-template-columns: repeat(6, 1fr); }
  .hb-home .schedule-section { grid-column: span 3; }
  .hb-home .notice-section { grid-column: span 3; }
  .hb-home .news-section { grid-column: span 6; padding: 16px; }
}
@media (max-width: 768px) {
  .hb-home { padding: 10px !important; }
  .hb-home .top-section { gap: 12px; margin-bottom: 14px; }
  .hb-home #hbUserImg { width: 56px; height: 78px; }
  .hb-home .main-content { grid-template-columns: 1fr; gap: 12px; }
  .hb-home .notice-section, .hb-home .schedule-section, .hb-home .news-section, .hb-home .forecast-section { grid-column: 1 / -1; }
  .hb-home .current-weather-summary { flex-direction: column; align-items: flex-start; padding: 16px; gap: 16px; }
  .hb-home #hbForecastChart { height: 280px !important; }
}
@media (max-width: 480px) {
  .hb-home .engine-tab-row { flex-wrap: wrap; }
  .hb-home .engine-tab { flex: 0 1 calc(33.33% - 4px); font-size: 11px; padding: 5px 2px; }
  .hb-home .user-image-container { display: none; }
}

.hb-home #hbUserImg:not([src="/logo.png"]){object-fit:cover;object-position:center}

/* 환영 카드: 사진 둘레 원형 게이지 + 오른쪽 막대 그래프 (무작위로 움직임, 2026-11-26) */
.hb-home .welcome-card .wc-gauge { position: relative; width: 124px; height: 124px; flex-shrink: 0; }
.hb-home .wc-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hb-home .wc-ring circle { fill: none; }
.hb-home .wc-track { stroke: #6474ad; stroke-width: 7; stroke-linecap: round; opacity: .75; }
.hb-home .wc-seg { stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray 1.4s ease-in-out, stroke-dashoffset 1.4s ease-in-out; }
.hb-home .wc-inner { stroke: #2a376c; stroke-width: 3; }
.hb-home .welcome-card #hbUserImg { position: absolute; left: 19px; top: 19px; width: 86px; height: 86px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: none; }
.hb-home .wc-bars { position: relative; margin-left: auto; width: 170px; height: 104px; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: space-around; padding: 0 6px; }
.hb-home .wc-bars i { position: absolute; left: 0; right: 0; height: 1px; background: #ffffff2b; }
.hb-home .wc-bars i:nth-child(1) { top: 0; } .hb-home .wc-bars i:nth-child(2) { top: 33.3%; } .hb-home .wc-bars i:nth-child(3) { top: 66.6%; } .hb-home .wc-bars i:nth-child(4) { bottom: 0; }
.hb-home .wc-group { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.hb-home .wc-bars b { display: block; width: 8px; height: 40%; border-radius: 3px 3px 0 0; transition: height 1.4s ease-in-out; }
.hb-home .wc-bars b.wc-navy { box-shadow: 0 0 0 1px #ffffff40; }
@media (max-width: 1100px) { .hb-home .wc-bars { display: none; } }
.hb-home .welcome-card { container-type: inline-size; }
.hb-home .welcome-card .text-content { min-width: 215px; }
.hb-home .wc-bars { width: clamp(110px, 26cqw, 160px); }
.hb-home .wc-group { gap: 5px; } .hb-home .wc-bars b { width: 7px; }
@media (max-width: 1100px) { .hb-home .wc-bars { display: flex; } }
@container (max-width: 470px) { .hb-home .wc-bars { display: none; } }
