/* ============================================================
   Alux Product 제안 목업 — 콘텐츠 컴포넌트 CSS
   ※ 반드시 app.css(운영 프로덕션 CSS 번들) 다음에 로드한다.
     - 디자인 토큰(:root/.dark/[data-accent])과 Tailwind 유틸리티,
       Geist 폰트는 전부 app.css가 제공한다.
     - 이 파일은 페이지 콘텐츠용 컴포넌트 클래스만 정의하며,
       모든 값은 운영 shadcn/ui 컴포넌트의 실측 값과 일치시킨다.
   ============================================================ */

/* 보조 시맨틱 토큰 (운영 status-badge tone: green/amber/red/blue/gray 와 동일 계열) */
:root {
  --success: oklch(50.8% .118 165.612);          /* emerald-700 */
  --success-bg: oklch(95% .052 163.051);          /* emerald-100 */
  --warning: oklch(55.5% .163 48.998);            /* amber-700 */
  --warning-bg: oklch(96.2% .059 95.617);         /* amber-100 */
  --info-bg: color-mix(in oklab, var(--primary) 10%, transparent);
}
.dark {
  --success: oklch(84.5% .143 164.978);
  --success-bg: oklch(69.6% .17 162.48 / .15);
  --warning: oklch(87.9% .169 91.605);
  --warning-bg: oklch(66.6% .179 58.318 / .18);
}

/* ---------- 카드 (운영 shadcn Card: rounded-xl border shadow-sm) ---------- */
.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: .75rem;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
}
.card h3 { margin: 0 0 .15rem; font-size: .95rem; font-weight: 600; }
.card .card-desc { color: var(--muted-foreground); font-size: .8rem; margin: 0 0 .75rem; }
.card-grid { display: grid; gap: 1rem; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

.stat-card .stat-label { font-size: .8rem; color: var(--muted-foreground); }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; margin: .15rem 0; color: var(--foreground); }
.stat-card .stat-hint { font-size: .75rem; color: var(--muted-foreground); }
.stat-card .stat-hint.up { color: var(--success); }
.stat-card .stat-hint.down { color: var(--destructive); }

/* ---------- 페이지 헤더 (운영 page-header 칩: text-2xl font-bold + mt-1 text-sm muted) ---------- */
.page-header { margin-bottom: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; margin: 0; color: var(--foreground); }
.page-header p { margin: .25rem 0 0; color: var(--muted-foreground); font-size: .875rem; }

/* ---------- 버튼 (운영 Button cva 실측: h-9 px-4 rounded-md text-sm font-medium) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  white-space: nowrap; border-radius: .375rem;
  font-size: .875rem; font-weight: 500; line-height: 1.25rem;
  height: 2.25rem; padding: .5rem 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-outline { background: var(--background); border-color: var(--input); color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-destructive { background: var(--destructive); color: #fff; }
.btn-destructive:hover { background: color-mix(in oklab, var(--destructive) 90%, transparent); }
.btn-success { background: oklch(59.6% .145 163.225); color: #fff; }
.btn-success:hover { background: oklch(59.6% .145 163.225 / .9); }
.btn-warning { background: oklch(66.6% .179 58.318); color: #fff; }
.btn-warning:hover { background: oklch(66.6% .179 58.318 / .9); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-sm { height: 2rem; padding: 0 .75rem; gap: .375rem; font-size: .8125rem; }
.btn-icon { width: 2.25rem; padding: 0; }

/* ---------- 뱃지 (운영 Badge/StatusBadge cva 실측: rounded-full px-2 py-0.5 text-xs) ---------- */
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
  border-radius: 999px; padding: .125rem .5rem; width: fit-content;
  font-size: .75rem; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-default { background: var(--primary); color: var(--primary-foreground); }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { border-color: var(--border); color: var(--foreground); background: transparent; }
/* 운영 status-badge tone 매핑: blue/green/amber/red/gray */
.badge-info { background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-destructive { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
.badge-muted { background: var(--muted); color: var(--muted-foreground); }

.badge-new {
  margin-left: auto; font-size: 10px; font-weight: 700; line-height: 1.6;
  background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary);
  border-radius: 999px; padding: 0 .375rem;
}

/* ---------- 제안 배너 ---------- */
.proposal-banner {
  display: flex; align-items: center; gap: .6rem;
  background: var(--info-bg); border: 1px dashed var(--ring);
  border-radius: .75rem; padding: .6rem .9rem;
  font-size: .8rem; margin-bottom: 1.25rem; color: var(--foreground);
}
.proposal-banner b { color: var(--primary); }

/* ---------- 탭 (운영 Tabs: bg-muted rounded-lg p-1, active=bg-background shadow) ---------- */
.tabs {
  display: inline-flex; gap: .25rem;
  background: var(--muted); border-radius: .5rem;
  padding: .25rem; margin-bottom: 1rem;
}
.tab {
  padding: .3rem .75rem; border-radius: .375rem;
  font-size: .875rem; color: var(--muted-foreground); border: none; background: transparent;
  cursor: pointer; font-family: inherit; font-weight: 500;
  display: inline-flex; align-items: center; gap: .4rem;
}
.tab.active { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* ---------- 테이블 (운영 Table 실측: text-sm, th=muted-foreground font-medium, hover:bg-muted/50) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th {
  text-align: left; font-weight: 500; color: var(--muted-foreground);
  padding: .5rem .75rem; border-bottom: 1px solid var(--border); font-size: .75rem;
}
table.data td { padding: .625rem .75rem; border-bottom: 1px solid var(--border); }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: color-mix(in oklab, var(--muted) 50%, transparent); }

/* ---------- 폼 (운영 Input 실측: h-9 rounded-md border-input shadow-xs) ---------- */
.input, .select, textarea.input {
  width: 100%; min-width: 0; background: transparent; color: var(--foreground);
  border: 1px solid var(--input); border-radius: .375rem;
  height: 2.25rem; padding: .25rem .75rem; font-size: .875rem; font-family: inherit;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);
  transition: color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: .5rem .75rem; }
.select { appearance: auto; }
.dark .input, .dark .select, .dark textarea.input { background: color-mix(in oklab, var(--input) 30%, transparent); }
.input::placeholder { color: var(--muted-foreground); }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
}
.field { margin-bottom: .9rem; }
.field label { display: block; font-size: .8125rem; font-weight: 500; margin-bottom: .375rem; color: var(--foreground); }
.field .hint { font-size: .75rem; color: var(--muted-foreground); margin-top: .25rem; }

.checkbox-row { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; }
.checkbox-row input[type=checkbox] { accent-color: var(--primary); width: 1rem; height: 1rem; margin-top: .125rem; }

/* 스위치 (운영 Switch 실측 근사) */
.switch { position: relative; display: inline-block; width: 2rem; height: 1.15rem; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: var(--input); transition: .15s; }
.switch .slider::before {
  content: ""; position: absolute; width: .9rem; height: .9rem;
  left: 2px; top: 2px; border-radius: 999px; background: var(--background);
  box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: .15s;
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(.85rem); }

/* ---------- 프로그레스 (운영 Progress: h-2 rounded-full bg-primary/20) ---------- */
.progress { height: .5rem; background: color-mix(in oklab, var(--primary) 20%, transparent); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------- 아바타 ---------- */
.avatar {
  width: 1.75rem; height: 1.75rem; border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 600; flex-shrink: 0;
}
.avatar.a2 { background: var(--success-bg); color: var(--success); }
.avatar.a3 { background: var(--warning-bg); color: var(--warning); }
.avatar.a4 { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
.avatar.sm { width: 1.5rem; height: 1.5rem; font-size: .62rem; }

/* ---------- 칸반 ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
.kanban-col { background: var(--muted); border-radius: .75rem; padding: .6rem; }
.kanban-col-header { display: flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 600; padding: .25rem .35rem .55rem; color: var(--foreground); }
.kanban-col-header .count { background: var(--background); border: 1px solid var(--border); border-radius: 999px; font-size: .7rem; padding: 0 .4rem; color: var(--muted-foreground); }
.kanban-card {
  background: var(--card); border: 1px solid var(--border); border-radius: .5rem;
  padding: .65rem .7rem; margin-bottom: .5rem; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
  cursor: grab;
}
.kanban-card .kc-title { font-size: .8125rem; font-weight: 600; margin-bottom: .35rem; color: var(--foreground); }
.kanban-card .kc-meta { display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: var(--muted-foreground); flex-wrap: wrap; }

/* ---------- 채팅 (Teams 시뮬레이터용) ---------- */
.chat { display: flex; flex-direction: column; gap: .7rem; background: var(--muted); border-radius: .75rem; padding: 1rem; }
.chat-msg { display: flex; gap: .55rem; max-width: 88%; }
.chat-msg.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble { background: var(--card); border: 1px solid var(--border); border-radius: .5rem; padding: .55rem .75rem; font-size: .8125rem; color: var(--foreground); }
.chat-msg.me .chat-bubble { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.chat-name { font-size: .7rem; color: var(--muted-foreground); margin-bottom: .2rem; }

.bot-card {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--primary); border-radius: .5rem;
  padding: .7rem .85rem; font-size: .8125rem; color: var(--foreground);
}
.bot-card .bc-title { font-weight: 700; margin-bottom: .35rem; }
.bot-card .bc-row { display: flex; gap: .5rem; margin: .15rem 0; }
.bot-card .bc-label { color: var(--muted-foreground); min-width: 56px; }
.bot-card .bc-actions { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }

/* ---------- 타임라인 ---------- */
.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.4rem; top: .25rem;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--background); border: 2px solid var(--primary);
}
.timeline-item.done::before { background: var(--primary); }
.timeline-item.warn::before { border-color: var(--warning); }
.timeline-item.danger::before { border-color: var(--destructive); }
.timeline-item .tl-time { font-size: .7rem; color: var(--muted-foreground); }
.timeline-item .tl-body { font-size: .8125rem; color: var(--foreground); }

/* ---------- 콜아웃 ---------- */
.callout {
  border-radius: .75rem; padding: .75rem 1rem; font-size: .8125rem;
  border: 1px solid var(--border); background: var(--muted);
  display: flex; gap: .6rem; align-items: flex-start; color: var(--foreground);
}
.callout.info { background: var(--info-bg); border-color: color-mix(in oklab, var(--ring) 40%, transparent); }
.callout.success { background: var(--success-bg); border-color: color-mix(in oklab, var(--success) 40%, transparent); }
.callout.warning { background: var(--warning-bg); border-color: color-mix(in oklab, var(--warning) 40%, transparent); }
.callout .co-icon { flex-shrink: 0; }
.callout b { display: block; margin-bottom: .15rem; }

/* ---------- 캘린더 ---------- */
.calendar { border: 1px solid var(--border); border-radius: .75rem; overflow: hidden; }
.calendar-head, .calendar-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-head div {
  padding: .4rem; text-align: center; font-size: .7rem; font-weight: 600;
  color: var(--muted-foreground); background: var(--muted); border-bottom: 1px solid var(--border);
}
.calendar-cell {
  min-height: 86px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: .3rem; font-size: .7rem;
}
.calendar-row .calendar-cell:last-child { border-right: none; }
.calendar-row:last-child .calendar-cell { border-bottom: none; }
.calendar-cell .day { color: var(--muted-foreground); margin-bottom: .2rem; }
.calendar-cell.today { background: var(--info-bg); }
.calendar-cell.today .day { color: var(--primary); font-weight: 700; }
.calendar-cell.dim { background: var(--muted); opacity: .55; }
.cal-event {
  border-radius: 4px; padding: .08rem .35rem; margin-bottom: .15rem;
  font-size: .65rem; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: var(--info-bg); color: var(--primary); border-left: 2px solid var(--primary);
  cursor: pointer;
}
.cal-event.green { background: var(--success-bg); color: var(--success); border-left-color: var(--success); }
.cal-event.amber { background: var(--warning-bg); color: var(--warning); border-left-color: var(--warning); }
.cal-event.red { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); border-left-color: var(--destructive); }

/* ---------- 보충 유틸리티 ----------
   운영 CSS 번들은 실 앱에서 "사용된" Tailwind 클래스만 포함한다.
   목업에서 쓰지만 번들에 없는 클래스는 여기서 동일 정의로 보충한다.
   (추가 전 반드시 app.css에 없는지 확인할 것) */
.hidden { display: none !important; }
.max-w-2xl { max-width: 42rem; }
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }

/* ---------- 기타 ---------- */
.muted { color: var(--muted-foreground); }
.section-title { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 .75rem; display: flex; align-items: center; gap: .5rem; color: var(--foreground); }
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; border: none; }

kbd {
  font-family: var(--font-mono); font-size: .7rem;
  background: var(--muted); border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; padding: .05rem .35rem; color: var(--foreground);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
