/* NS HRM 프로토타입 — 대시보드 (홈). 색 토큰·카드·뱃지·상태 표시는 app.css 의 것을 그대로 쓴다 */

.dash-date { font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.dash-card { padding: 16px 18px 18px; min-width: 0; }
.dash-week { margin-bottom: 18px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-height: 32px; margin-bottom: 14px; }
.dash-head h3 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.dash-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-link { font-size: 14px; font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
.dash-link:hover { text-decoration: underline; }
.dash-empty { padding: 28px 0; text-align: center; color: var(--text-3); font-size: 14px; }
.dash-more { width: 100%; margin-top: 10px; }
.dash-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-scope { font-size: 13px; font-weight: 600; color: var(--text-2); }
.dash-note { display: flex; align-items: center; gap: 6px; margin: -6px 0 10px; font-size: 13px; color: var(--text-2); }
.dash-note svg { width: 14px; height: 14px; flex: none; }
.dash-empty-sm { padding: 14px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dash-empty-sm svg { width: 16px; height: 16px; color: var(--success); }

/* ========== 승인 대기 — 승인 관리 카드(app.css .appr-card)를 좁은 칸으로 ========== */
.dash-appr-list { gap: 8px; }
.appr-card.is-compact { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.appr-card.is-compact .appr-main { grid-column: 1 / -1; }
.appr-card.is-compact .appr-items { margin-bottom: 6px; }
.appr-card.is-compact .appr-meta { font-size: 13px; gap: 2px 12px; }
.appr-card.is-compact .appr-actions { grid-column: 2; grid-row: 1; align-self: start; }
.appr-card.is-compact .appr-actions .btn:disabled { cursor: not-allowed; }

/* ========== 이번 주 휴가 ========== */
.wk-nav { display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.wk-nav h3 { min-width: 112px; text-align: center; }
.wk-range { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wk-lg { display: inline-block; width: 16px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.wk-lg-pending { background: repeating-linear-gradient(-45deg, var(--pending-weak) 0 3px, var(--surface) 3px 6px); box-shadow: inset 0 0 0 1px var(--pending); }

.wk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.wk-day { display: flex; flex-direction: column; min-width: 0; min-height: 156px; }
.wk-day + .wk-day { border-left: 1px solid var(--border); }
.wk-dh { display: flex; align-items: baseline; gap: 5px; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.wk-dh b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wk-dow { font-size: 13px; font-weight: 600; color: var(--text-2); }
.wk-n { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text-2); }
.wk-hol { margin-left: auto; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--sun); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-day.is-today { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.wk-day.is-today .wk-dh { background: var(--primary); border-bottom-color: var(--primary); }
.wk-day.is-today .wk-dh b, .wk-day.is-today .wk-dh span { color: #fff; }
.wk-day.is-off { background: var(--surface-2); }
.wk-day.is-off .wk-dh b { color: var(--sun); }
.wk-day.is-past .wk-list { opacity: .6; }

.wk-list { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.wk-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; min-width: 0; padding: 6px 8px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.wk-name { min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-item.is-me .wk-name { color: var(--primary); font-weight: 800; }
.wk-tags { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
/* 승인 대기중: 휴가 신청 달력의 대기 블록처럼 빗금 + 점선 */
.wk-item.st-pending { border-style: dashed; border-color: color-mix(in srgb, var(--pending) 55%, transparent); background: repeating-linear-gradient(-45deg, var(--pending-weak) 0 6px, transparent 6px 12px), var(--surface); }
.wk-empty { padding: 12px; font-size: 13px; color: var(--text-3); }

/* ========== 나의 최근 활동 ========== */
.act-group + .act-group { margin-top: 10px; }
.act-day { padding: 2px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.act-list { display: flex; flex-direction: column; }
.act-item { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; padding: 7px 0; }
.act-item:not(:last-child)::before { content: ''; position: absolute; left: 13.5px; top: 39px; bottom: -5px; width: 1px; background: var(--border); }
.act-ic { --c: var(--text-2); --w: var(--surface-3); width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--w); color: var(--c); }
.act-ic svg { width: 14px; height: 14px; }
.act-ic.k-apply { --c: var(--primary); --w: var(--primary-weak); }
.act-ic.k-ok { --c: var(--success); --w: var(--success-weak); }
.act-ic.k-no { --c: var(--danger); --w: var(--danger-weak); }
.act-ic.k-report { --c: var(--pending); --w: var(--pending-weak); }
.act-ic.k-grant { --c: var(--half); --w: var(--half-weak); }
.act-ic.k-eval { --c: var(--t-family); --w: color-mix(in srgb, var(--t-family) 14%, var(--surface)); }
.act-body { min-width: 0; padding-top: 3px; }
.act-title { font-size: 14px; font-weight: 600; }
.act-title b { font-weight: 800; }
.act-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.act-note { max-width: 100%; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-note::before { content: '“'; }
.act-note::after { content: '”'; }
.act-time { padding-top: 4px; font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ========== 팀원 분포 ==========
   한 계열 가로 막대: 두께 14px, 기준선 쪽은 각지고 끝만 4px 둥글게, 값은 막대 끝에. 팀 색은 이름 옆 점으로만 */
.dist-meta { margin: -6px 0 10px; font-size: 13px; color: var(--text-2); }
.dist-list { display: flex; flex-direction: column; gap: 2px; }
.dist-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; }
.dist-row:hover { background: var(--surface-2); }
.dist-label { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dist-row.is-none .dist-label { color: var(--text-2); }
.dist-track { position: relative; height: 16px; margin-right: 30px; }
.dist-track::before { content: ''; position: absolute; left: 0; top: -5px; bottom: -5px; width: 1px; background: var(--border); }
.dist-track i { position: absolute; left: 0; top: 1px; bottom: 1px; width: calc(var(--p) * 1%); border-radius: 0 4px 4px 0; background: var(--primary); transform-origin: left center; }
.dist-row.is-none .dist-track i { background: var(--text-3); }
.dist-track b { position: absolute; top: 50%; left: calc(var(--p) * 1% + 6px); transform: translateY(-50%); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-animate .dist-track i { animation: distGrow .7s cubic-bezier(.2, .8, .2, 1) calc(var(--i, 0) * 45ms) both; }
.dash-animate .dist-track b { animation: distFade .3s calc(var(--i, 0) * 45ms + .4s) both; }
@keyframes distGrow { from { transform: scaleX(0); } }
@keyframes distFade { from { opacity: 0; } }
/* 내 휴가 막대처럼 '움직임 줄이기'에서도 막대는 자란다 (app.css 의 전역 규칙보다 구체적이라 이긴다) */
@media (prefers-reduced-motion: reduce) {
    .dash-animate .dist-track i { animation-duration: .7s !important; }
}

.dash-tip { position: fixed; z-index: 60; max-width: 260px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.5; pointer-events: none; }
.dash-tip[hidden] { display: none; }
.tip-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.tip-head b { font-size: 14px; }
.tip-head span { color: var(--text-2); font-weight: 600; }
.tip-line { display: flex; align-items: center; gap: 4px; }
.tip-names { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-faint); color: var(--text-2); }
.tip-names small { margin-left: 3px; font-size: 11.5px; font-weight: 700; color: var(--primary); }

/* ========== 반응형 ========== */
@media (max-width: 1080px) {
    .dash-grid { grid-template-columns: 1fr; }
}
/* 좁은 화면: 요일 칸을 세로로 쌓고 날짜는 왼쪽 열에 */
@media (max-width: 760px) {
    .wk-grid { grid-template-columns: 1fr; }
    .wk-day { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: 0; }
    .wk-day + .wk-day { border-left: 0; border-top: 1px solid var(--border); }
    .wk-dh { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 10px; border-bottom: 0; border-right: 1px solid var(--border); }
    .wk-day.is-today .wk-dh { border-right-color: var(--primary); }
    .wk-n, .wk-hol { margin-left: 0; max-width: 100%; }
    .wk-empty { align-self: center; }
}
@media (max-width: 640px) {
    .dash-card { padding: 14px; }
    .dash-date { display: none; }
    .dash-tools { margin-left: 0; }
}
