@import '../shared.css';

/* ────────────────────────────────────────────────────────────
 * SCR-HOME 메인 홈 — 12컬럼 컴팩트, 대형 공백 금지(밀도 원칙).
 * 라이트/다크 토큰 CSS 변수만 사용(하드코딩 hex 금지). 이모지 금지·선 SVG.
 * ──────────────────────────────────────────────────────────── */
.kx-home {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5); /* 섹션 간 24px 표준(32px 상한) */
  background: var(--color-neutral-050);
}

/* 공통 섹션 헤더 */
.kx-home__section-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.kx-home__section-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0;
}
.kx-home__section-link {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--color-primary-600);
  font-size: var(--fs-body);
  cursor: pointer;
  padding: 4px 6px;
}
.kx-home__section-link:hover {
  text-decoration: underline;
}

/* ── ① 인사 + KPI ── */
.kx-home__hero-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.kx-home__greeting {
  min-width: 220px;
}
.kx-home__hello {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0 0 4px;
}
.kx-home__submeta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-neutral-500);
  font-size: var(--fs-body);
  margin: 0;
}
.kx-home__kpis {
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}
.kx-kpitile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: var(--border-card);
  border-left: 4px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  min-height: 66px;
}
.kx-kpitile:hover {
  box-shadow: var(--shadow-level2);
}
.kx-kpitile.is-normal {
  border-left-color: var(--color-primary-600);
}
.kx-kpitile.is-warning {
  border-left-color: var(--color-warning);
}
.kx-kpitile.is-overdue {
  border-left-color: var(--color-error);
}
.kx-kpitile--error {
  grid-column: 1 / -1;
  cursor: default;
}
.kx-kpitile__label {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-kpitile__value {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
}
/* Stitch 정합: 임박/경과 타일 값 강조색 */
.kx-kpitile.is-warning .kx-kpitile__value {
  color: var(--color-warning);
}
.kx-kpitile.is-overdue .kx-kpitile__value {
  color: var(--color-error);
}

/* ── ② 배너 캐러셀 (220~260px) ── */
.kx-home__banner {
  position: relative;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-card);
  background: var(--color-neutral-100);
}
.kx-home__banner-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.kx-home__banner-slide.is-active {
  opacity: 1;
}
.kx-home__banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 24, 40, 0.72) 0%, rgba(16, 24, 40, 0.24) 60%, transparent 100%);
}
.kx-home__banner-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--space-8);
  background: linear-gradient(120deg, var(--color-primary-600), var(--color-ai-accent));
}
.kx-home__banner-text h2 {
  color: var(--color-on-accent);
  font-size: var(--fs-h1);
  margin: 0 0 8px;
}
.kx-home__banner-text p {
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--fs-body);
  margin: 0;
}
.kx-home__banner-body {
  position: absolute;
  left: var(--space-8);
  bottom: var(--space-6);
  right: 30%;
  color: var(--color-on-accent);
}
.kx-home__banner-title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  margin: 0 0 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.kx-home__banner-sub {
  font-size: var(--fs-body);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}
.kx-home__banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-neutral-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.kx-home__banner-nav:hover {
  background: #fff;
}
.kx-home__banner-nav.is-prev {
  left: 12px;
}
.kx-home__banner-nav.is-next {
  right: 12px;
}
.kx-home__banner-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
/* Stitch 정합: 대시(bar)형 인디케이터 */
.kx-home__banner-dot {
  width: 22px;
  height: 3px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}
.kx-home__banner-dot.is-active {
  background: #fff;
}

/* ── ③ 쇼케이스 포스터 레일 ── */
.kx-home__rail-wrap {
  position: relative;
}
.kx-home__rail {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.kx-home__rail-arrow {
  position: absolute;
  top: 120px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-card);
  background: var(--color-white);
  color: var(--color-neutral-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-level2);
  z-index: 2;
}
.kx-home__rail-arrow.is-prev {
  left: -8px;
}
.kx-home__rail-arrow.is-next {
  right: -8px;
}
.kx-poster {
  flex: 0 0 220px;
  width: 220px;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.kx-poster:hover {
  box-shadow: var(--shadow-level2);
}
.kx-poster__img {
  display: block;
  width: 100%;
  height: 264px; /* Stitch 정합: 포스터 세로 비율(약 2:3) 고정 높이 */
  background-size: cover;
  background-position: center;
  background-color: var(--color-neutral-100);
}
.kx-poster__img--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: linear-gradient(140deg, var(--color-primary-600), var(--color-ai-accent));
}
.kx-poster__fallback-text {
  color: var(--color-on-accent);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  text-align: center;
  line-height: 1.35;
}
.kx-poster__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px 12px;
  border-left: 4px solid var(--color-neutral-200); /* Stitch 정합: 상태색 좌측 액센트 */
}
.kx-poster__body.is-ongoing {
  border-left-color: var(--color-success);
}
.kx-poster__body.is-upcoming {
  border-left-color: var(--color-primary-600);
}
.kx-poster__body.is-ended {
  border-left-color: var(--color-neutral-500);
}
.kx-poster__hall {
  font-size: var(--fs-nano);
  font-weight: var(--fw-bold);
  color: var(--color-primary-600);
  margin-bottom: 1px;
}
.kx-poster__body.is-ongoing .kx-poster__hall {
  color: var(--color-success);
}
.kx-poster__body.is-ended .kx-poster__hall {
  color: var(--color-neutral-500);
}
.kx-poster__name {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kx-poster__meta {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-poster__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

/* 상태 칩(진행/예정) */
.kx-home__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
}
.kx-home__chip.is-ongoing {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.kx-home__chip.is-upcoming {
  background: var(--color-primary-050);
  color: var(--color-primary-600);
}
.kx-home__chip.is-ended {
  background: var(--color-neutral-100);
  color: var(--color-neutral-500);
}

/* ── ④ 본문 2열 그리드 ── 좌우 컬럼 하단 정렬(stretch): 최근 활동↔진행 중 전시 높이 일치 ── */
.kx-home__body {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: var(--space-5);
  align-items: stretch;
}
.kx-home__col-main,
.kx-home__col-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* 각 컬럼 마지막 카드가 남은 높이를 채워 양 컬럼 하단선을 맞춘다(공백 없는 반응형). */
.kx-home__col-main > :last-child,
.kx-home__col-side > :last-child {
  flex: 1 1 auto;
}

/* 캘린더 */
.kx-home__cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.kx-home__cal-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.kx-home__cal-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  min-width: 120px;
  text-align: center;
}
.kx-home__cal-nav,
.kx-home__cal-today {
  border: var(--border-card);
  background: var(--color-white);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  color: var(--color-neutral-700);
  display: inline-flex;
  align-items: center;
}
.kx-home__cal-today {
  font-size: var(--fs-caption);
}
.kx-home__cal-seg {
  flex-wrap: wrap;
}
.kx-home__cal-legend {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-home__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.kx-home__legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.kx-home__legend-dot.is-ongoing {
  background: var(--color-success);
}
.kx-home__legend-dot.is-upcoming {
  background: var(--color-primary-600);
}
.kx-home__legend-dot.is-ended {
  background: var(--color-neutral-500);
}

.kx-home__cal-grid {
  border: var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.kx-home__cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--color-neutral-050);
  border-bottom: var(--border-card);
}
.kx-home__cal-wd {
  padding: 6px 0;
  text-align: center;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--color-neutral-500);
}
.kx-home__cal-wd.is-sun {
  color: var(--color-error);
}
.kx-home__cal-wd.is-sat {
  color: var(--color-primary-600);
}
.kx-home__cal-week {
  position: relative;
  border-bottom: 1px solid var(--color-neutral-100);
}
.kx-home__cal-week:last-child {
  border-bottom: none;
}
.kx-home__cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.kx-home__cal-cell {
  min-height: 84px;
  border-right: 1px solid var(--color-neutral-100);
  padding: 4px 6px;
  text-align: left;
  background: var(--color-white);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.kx-home__cal-cell:last-child {
  border-right: none;
}
.kx-home__cal-cell:hover {
  background: var(--color-neutral-050);
}
.kx-home__cal-cell.is-out {
  background: var(--color-neutral-050);
}
.kx-home__cal-cell.is-out .kx-home__cal-daynum {
  color: var(--color-neutral-200);
}
.kx-home__cal-daynum {
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
}
.kx-home__cal-cell.is-sun .kx-home__cal-daynum {
  color: var(--color-error);
}
.kx-home__cal-cell.is-sat .kx-home__cal-daynum {
  color: var(--color-primary-600);
}
.kx-home__cal-cell.is-holiday .kx-home__cal-daynum {
  color: var(--color-error);
  font-weight: var(--fw-bold);
}
.kx-home__cal-holiday-name {
  font-size: var(--fs-nano);
  font-weight: var(--fw-semibold);
  color: var(--color-error);
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kx-home__cal-cell.is-today .kx-home__cal-daynum {
  background: var(--color-primary-600);
  color: var(--color-on-accent);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-weight: var(--fw-bold);
}
.kx-home__cal-more {
  margin-top: auto;
  font-size: var(--fs-nano);
  color: var(--color-neutral-500);
}
/* spanning bar 레인 — 셀 위에 절대배치(요일 헤더 아래 24px 오프셋) */
.kx-home__cal-lanes {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  pointer-events: none;
}
.kx-home__cal-bar {
  position: absolute;
  height: 18px;
  line-height: 18px;
  border-radius: 3px;
  font-size: var(--fs-micro);
  padding: 0 6px;
  color: var(--color-on-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kx-home__cal-bar.is-ongoing {
  background: var(--color-success);
}
.kx-home__cal-bar.is-upcoming {
  background: var(--color-primary-600);
}
.kx-home__cal-bar.is-ended {
  background: var(--color-neutral-500);
}
.kx-home__cal-bar.is-cont-l {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.kx-home__cal-bar.is-cont-r {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.kx-home__cal-list {
  margin-top: var(--space-4);
}
.kx-home__cal-list-title {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0 0 var(--space-2);
}
.kx-home__cal-list-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2); /* Stitch 정합: 카드형 행(간격 있는 박스) */
}
.kx-home__cal-list-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border: var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--color-neutral-050);
  cursor: pointer;
  text-align: left;
}
.kx-home__cal-list-row:hover {
  background: var(--color-white);
  border-color: var(--color-primary-600);
}
.kx-home__cal-list-name {
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  font-weight: var(--fw-medium);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kx-home__cal-list-hall {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-home__cal-list-period {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}

/* 일자 팝업 */
.kx-home__cal-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.kx-home__cal-popup {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: var(--border-card);
  width: 320px;
  max-width: 90vw;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-level2);
}
.kx-home__cal-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-card);
}
.kx-home__cal-popup-close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--color-neutral-500);
  font-size: var(--fs-body);
}
.kx-home__cal-popup-list {
  list-style: none;
  margin: 0;
  padding: var(--space-2);
}
.kx-home__cal-popup-list button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius-sm);
  color: var(--color-neutral-900);
  font-size: var(--fs-body);
}
.kx-home__cal-popup-list button:hover {
  background: var(--color-neutral-050);
}
.kx-home__cal-popup-empty {
  padding: var(--space-5);
  text-align: center;
  color: var(--color-neutral-500);
  font-size: var(--fs-body);
}

/* ── ④-우 위젯 공통 ── */
.kx-home__widget {
  display: flex;
  flex-direction: column;
}
.kx-home__widget-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.kx-home__widget-head h2 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0;
}
.kx-home__count-badge {
  background: var(--color-primary-600);
  color: var(--color-on-accent);
  border-radius: var(--radius-pill);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kx-home__widget-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kx-home__widget-more {
  margin-top: var(--space-2);
  align-self: flex-start;
  border: none;
  background: none;
  color: var(--color-primary-600);
  font-size: var(--fs-body);
  cursor: pointer;
  padding: 4px 0;
}
.kx-home__widget-more:hover {
  text-decoration: underline;
}

/* 내 할 일 */
.kx-home__todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kx-home__todo-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 4px;
  border: none;
  background: none;
  border-bottom: var(--border-card);
  cursor: pointer;
  text-align: left;
}
.kx-home__todo-row:hover {
  background: var(--color-neutral-050);
}
.kx-home__todo-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.kx-home__todo-title {
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.kx-home__todo-tag {
  flex-shrink: 0;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  line-height: 1.5;
  color: var(--color-neutral-700);
  background: var(--color-neutral-100);
  border: var(--border-card);
}
.kx-home__todo-tag.is-checkin,
.kx-home__todo-tag.is-lead {
  color: var(--color-primary-700);
  background: var(--color-primary-050);
  border-color: var(--color-primary-100);
}
.kx-home__todo-target {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kx-home__todo-due {
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}
.kx-home__todo-due.is-normal {
  color: var(--color-neutral-500);
}
.kx-home__todo-due.is-warning {
  color: var(--color-warning);
}
.kx-home__todo-due.is-overdue {
  color: var(--color-error);
}
.kx-home__todo-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-5) var(--space-4);
  text-align: center;
}
.kx-home__todo-done-icon {
  color: var(--color-success);
}
.kx-home__todo-done-title {
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0;
}
.kx-home__todo-done-desc {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  margin: 0 0 6px;
}

/* 공지 */
.kx-home__notice-list,
.kx-home__activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kx-home__notice-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 4px;
  border: none;
  background: none;
  border-bottom: var(--border-card);
  cursor: pointer;
  text-align: left;
}
.kx-home__notice-row:hover {
  background: var(--color-neutral-050);
}
.kx-home__pin {
  color: var(--color-primary-600);
  font-size: 8px;
}
.kx-home__notice-title {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kx-home__new {
  background: var(--color-error);
  color: var(--color-on-accent);
  font-size: var(--fs-nano);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}
.kx-home__notice-date {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  flex-shrink: 0;
}

/* 빠른 작업 */
.kx-home__quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.kx-home__quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-3) 6px;
  border: var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  cursor: pointer;
  color: var(--color-neutral-700);
}
.kx-home__quick-btn:hover {
  border-color: var(--color-primary-600);
  color: var(--color-primary-600);
}
.kx-home__quick-icon {
  color: inherit;
}
.kx-home__quick-label {
  font-size: var(--fs-caption);
  text-align: center;
  color: var(--color-neutral-700);
}

/* 최근 활동 */
.kx-home__activity-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 4px;
  border: none;
  background: none;
  border-bottom: var(--border-card);
  cursor: pointer;
  text-align: left;
}
.kx-home__activity-row:hover {
  background: var(--color-neutral-050);
}
.kx-home__activity-text {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-body);
  color: var(--color-neutral-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kx-home__activity-time {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  flex-shrink: 0;
}

/* ── ⑤ 워크스페이스 ── */
.kx-home__ws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
.kx-home__ws-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4);
  border: var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  cursor: pointer;
  text-align: left;
}
.kx-home__ws-card:hover {
  box-shadow: var(--shadow-level2);
  border-color: var(--color-primary-600);
}
.kx-home__ws-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kx-home__ws-card-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 4px 0 0;
}
.kx-home__ws-card-meta,
.kx-home__ws-card-hall {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  margin: 0;
}
.kx-home__ws-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.kx-home__ws-empty-title {
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  margin: 0 0 4px;
}
.kx-home__ws-empty-desc {
  font-size: var(--fs-body);
  color: var(--color-neutral-500);
  margin: 0;
}
.kx-home__ws-invite {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}
.kx-home__ws-code {
  height: 40px;
  padding: 0 var(--space-3);
  border: var(--border-card);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-neutral-900);
  font-size: var(--fs-body);
  min-width: 180px;
}
.kx-home__ws-code:focus {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 1px;
}

/* prefers-reduced-motion — 배너 전환 즉시 */
@media (prefers-reduced-motion: reduce) {
  .kx-home__banner-slide {
    transition: none;
  }
  .kx-home__rail {
    scroll-behavior: auto;
  }
}

/* ── 반응형 (1100 / 720 브레이크) ── */
@media (max-width: 1100px) {
  .kx-home__body {
    grid-template-columns: 1fr;
  }
  .kx-home__kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .kx-home__hero-row {
    flex-direction: column;
    align-items: stretch;
  }
  .kx-home__kpis {
    margin-left: 0;
  }
  .kx-home__quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── ①-b 요약 차트 (Recharts, KPI 아래) ── */
.kx-home__charts {
  padding: var(--space-4);
}
.kx-home__charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.kx-home__chart {
  margin: 0;
  min-width: 0;
  border: var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
}
.kx-home__chart-cap {
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-700);
  margin-bottom: var(--space-2);
}
.kx-home__chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-home__chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-2);
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
}
.kx-home__chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.kx-home__chart-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.kx-home__chart-legend-item b {
  color: var(--color-neutral-900);
  font-weight: var(--fw-bold);
}

@media (max-width: 1100px) {
  .kx-home__charts-grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 1101px) and (max-width: 1280px) {
  .kx-home__charts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ────────────────────────────────────────────────────────────
 * ①-c KINTEX AI 어시스턴트 허브 (AI 홍보 스트립) — 밀도 원칙: 높이 과대 금지(~160px)
 *   보라 계열 AI 서피스 배경 + 5개 도구 카드(실 라우트) + 자연어 퀵 입력.
 * ──────────────────────────────────────────────────────────── */
.kx-home__aihub {
  border: 1px solid var(--color-ai-accent);
  border-left: var(--accent-ai);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-ai-accent) 12%, var(--color-ai-surface)) 0%,
      var(--color-ai-surface) 62%
    );
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.kx-home__aihub-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.kx-home__aihub-badgeicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-ai-accent);
  color: var(--color-on-accent);
  flex: 0 0 auto;
}
.kx-home__aihub-heading {
  min-width: 0;
  flex: 1 1 auto;
}
.kx-home__aihub-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--color-ai-accent-strong);
  letter-spacing: -0.01em;
}
.kx-home__aihub-sub {
  margin: 2px 0 0;
  font-size: var(--fs-caption);
  color: var(--color-neutral-700);
}
.kx-home__aihub-ask {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
}
.kx-home__aihub-input {
  width: 260px;
  max-width: 42vw;
  height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-ai-accent);
  border-radius: var(--radius-pill);
  background: var(--color-white);
  color: var(--color-neutral-900);
  font-size: var(--fs-caption);
}
.kx-home__aihub-input::placeholder {
  color: var(--color-neutral-500);
}
.kx-home__aihub-input:focus-visible {
  outline: 2px solid var(--color-ai-accent-strong);
  outline-offset: 1px;
}

.kx-home__aihub-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}
.kx-home__aihub-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  text-align: left;
  padding: var(--space-3);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.kx-home__aihub-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-ai-accent);
  box-shadow: var(--shadow-level2);
}
.kx-home__aihub-card:focus-visible {
  outline: 2px solid var(--color-ai-accent-strong);
  outline-offset: 2px;
}
.kx-home__aihub-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--color-ai-surface);
  color: var(--color-ai-accent-strong);
  flex: 0 0 auto;
}
.kx-home__aihub-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kx-home__aihub-card-title {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--color-neutral-900);
  line-height: 1.25;
}
.kx-home__aihub-card-tag {
  flex: 0 0 auto;
  font-size: var(--fs-nano);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
  background: var(--color-ai-accent);
  color: var(--color-on-accent);
}
.kx-home__aihub-card-desc {
  font-size: var(--fs-caption);
  color: var(--color-neutral-500);
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .kx-home__aihub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .kx-home__aihub-ask {
    flex: 1 1 100%;
  }
  .kx-home__aihub-input {
    flex: 1 1 auto;
    max-width: none;
    width: auto;
  }
}
@media (min-width: 1101px) and (max-width: 1280px) {
  .kx-home__aihub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
