/* frontend/styles/dashboard.css — 원본 dash.css + approve.css 의 대시보드 전용 규칙 이식
   (공유 레이아웃/카드는 dash-base.css) */
@import "./dash-base.css";

/* ---------- 히어로 ---------- */
.hero {
  background:
    radial-gradient(95% 105% at 0% 0%, rgba(231, 128, 82, 0.22), transparent 56%),
    radial-gradient(130% 130% at 100% 0%, rgba(255, 255, 255, 0.42), transparent 50%),
    var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow), var(--glass-hi);
  color: var(--ink);
}
.hero .ch h3 {
  color: var(--ink);
}
.hero-spark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--coral);
  border: 1px solid transparent;
  padding: 5px 12px;
  border-radius: 999px;
  align-self: flex-start;
  box-shadow: 0 5px 14px -5px var(--coral);
  white-space: nowrap;
}
.hero-spark .ic {
  width: 14px;
  height: 14px;
}
.hero p.brief {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  letter-spacing: -0.02em;
  margin: 16px 0 18px;
  color: var(--ink);
  max-width: 40ch;
}
.hero p.brief b {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid color-mix(in oklab, var(--coral) 60%, transparent);
  padding-bottom: 1px;
}
.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: 15px;
  padding: 7px 7px 7px 16px;
  margin-top: auto;
}
.cmd > svg:first-child {
  color: var(--ink-2);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.cmd input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 14.5px;
}
.cmd input::placeholder {
  color: var(--faint);
}
.cmd .send {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--fill);
  color: var(--on-fill);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: filter 0.14s;
}
.cmd .send .ic {
  width: 18px;
  height: 18px;
}
.cmd .send:hover {
  filter: brightness(1.05);
}
.cmd .send:disabled {
  opacity: 0.4;
  cursor: default;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.14s;
}
.chip .ic {
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.chip:hover {
  background: var(--card-2);
}

/* ---------- 요약 카드 (approve.css mini-*) ---------- */
.appr .ico.lime {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: color-mix(in oklab, var(--lime-ink) 12%, transparent);
}
.appr .count.warm {
  color: #fff;
  background: var(--coral);
  border-color: transparent;
}
.mini-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.mini-row:first-child {
  border-top: none;
  padding-top: 2px;
}
.mini-ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--tone, var(--blue)) 13%, transparent);
  color: var(--tone, var(--blue));
}
.mini-ic .ic {
  width: 13px;
  height: 13px;
}
.mini-text {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-sub {
  font-size: 10.5px;
  color: var(--faint);
  flex-shrink: 0;
  white-space: nowrap;
}
.mini-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  border-radius: 13px;
  background: var(--fill);
  color: var(--on-fill);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: filter 0.14s;
}
.mini-cta .ic {
  width: 14px;
  height: 14px;
}
.mini-cta:hover {
  filter: brightness(1.12);
}
.appr-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  background: linear-gradient(
      100deg,
      color-mix(in oklab, var(--green) 10%, transparent),
      transparent 70%
    ),
    var(--glass-2);
  border: 1px solid color-mix(in oklab, var(--green) 28%, var(--glass-brd));
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 12px;
}
.ae-tick {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
}
.ae-tick .ic {
  width: 12px;
  height: 12px;
}

/* ---------- 오늘 일정 ---------- */
.sched {
  display: flex;
  flex-direction: column;
}
.ev {
  display: flex;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.ev:first-of-type {
  border-top: none;
  padding-top: 4px;
}
.ev-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  width: 42px;
  flex-shrink: 0;
  padding-top: 1px;
}
.ev-body {
  flex: 1;
  min-width: 0;
  position: relative;
  padding-left: 15px;
}
.ev-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent, var(--blue));
}
.ev-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ev-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.ev-meta .dur {
  color: var(--faint);
}
.ev .soon {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--coral);
  padding: 1px 7px;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 1px;
  flex-shrink: 0;
}
.sched-note {
  margin-top: 12px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.4;
}
.sched-note .ic {
  width: 15px;
  height: 15px;
  color: var(--coral);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- 할 일 ---------- */
.tasks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-brd);
  background: var(--glass-2);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.14s, border-color 0.14s;
}
.task:hover {
  background: var(--card-2);
}
.task .box {
  width: 21px;
  height: 21px;
  border-radius: 7px;
  border: 2px solid var(--line-2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: transparent;
  transition: all 0.14s;
}
.task .box .ic {
  width: 13px;
  height: 13px;
}
.task-body {
  flex: 1;
  min-width: 0;
}
.task-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.task-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.task .prio {
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
}
.prio.high {
  color: var(--coral);
  background: color-mix(in oklab, var(--coral) 14%, transparent);
}
.prio.mid {
  color: var(--amber);
  background: color-mix(in oklab, var(--amber) 16%, transparent);
}
.prio.low {
  color: var(--muted);
  background: var(--card-2);
}
.task.focus {
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--coral) 13%, transparent), transparent 58%),
    var(--glass);
  border-color: color-mix(in oklab, var(--coral) 38%, var(--glass-brd));
  box-shadow: var(--shadow-sm), inset 3px 0 0 0 var(--coral);
}
.task.focus .task-title {
  color: var(--ink);
  font-weight: 700;
}
.task.focus .box {
  border-color: var(--coral);
  background: color-mix(in oklab, var(--coral) 14%, transparent);
}
.task.focus .focus-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--coral);
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ---------- 목표 ---------- */
.goals {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.goal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
}
.goal-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.goal-pct {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.goal-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
}
.goal-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.goal-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 5px;
}

/* ---------- 진입 애니메이션 ---------- */
.entered .card {
  animation: cardin 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes cardin {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 로딩 스켈레톤 ---------- */
.skel {
  background: var(--card-2);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-100%);
  animation: dash-shimmer 1.4s infinite;
}
@keyframes dash-shimmer {
  to {
    transform: translateX(100%);
  }
}
.skel-title {
  height: 40px;
  width: 60%;
  margin-top: 8px;
}
.skel-eyebrow {
  height: 14px;
  width: 180px;
}
.skel-head {
  height: 20px;
  width: 50%;
  margin-bottom: 16px;
}
.skel-line {
  height: 14px;
  margin: 8px 0;
}
.skel-line.short {
  width: 60%;
}
.skel-block {
  height: 160px;
}

/* ---------- 에러 ---------- */
.dash-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  margin-top: 24px;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--coral) 7%, var(--card));
  border: 1px solid color-mix(in oklab, var(--coral) 24%, transparent);
  color: var(--ink-2);
  text-align: center;
}
.dash-error .mini-cta {
  margin-top: 0;
  padding: 10px 18px;
}

@media (prefers-reduced-motion: reduce) {
  .entered .card,
  .skel::after {
    animation: none !important;
  }
}

/* ==================== phase-14: 능동 배너 (대시보드 상단) ==================== */
.proactive {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.pc {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 15px;
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid color-mix(in oklab, var(--tone) 30%, var(--glass-brd));
}
.pc-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--tone) 14%, transparent);
  color: var(--tone);
}
.pc-ic .ic {
  width: 17px;
  height: 17px;
}
.pc-body {
  min-width: 0;
}
.pc-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pc-why {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.pc-acts {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pc-ok {
  font-weight: 700;
  color: var(--lime-ink);
  background: var(--lime);
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
  transition: background 0.13s;
}
.pc-ok:hover {
  background: var(--lime-hi);
}
.pc-x {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.13s, color 0.13s;
}
.pc-x:hover {
  background: var(--card-2);
  color: var(--ink);
}
.pc-x .ic {
  width: 15px;
  height: 15px;
}

/* ==================== phase-14: 주간 리뷰 카드 (대시보드 보드) ==================== */
.weekly.card {
  grid-column: span 2;
}
.weekly .wr-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.weekly .wr-stat {
  background: var(--glass-2);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
}
.weekly .wr-n {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.weekly .wr-u {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 2px;
}
.weekly .wr-l {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.weekly .wr-pattern {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--violet) 7%, transparent);
  border: 1px solid color-mix(in oklab, var(--violet) 22%, transparent);
}
.weekly .wr-pattern-text {
  min-width: 0;
}
.weekly .wr-pattern-title {
  font-size: 12.5px;
  font-weight: 700;
}
.weekly .wr-pattern-suggest {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.weekly .wr-apply {
  margin-left: auto;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 12px;
  color: var(--lime-ink);
  background: var(--lime);
  border-radius: 999px;
  padding: 6px 13px;
  transition: background 0.13s;
}
.weekly .wr-apply:hover {
  background: var(--lime-hi);
}
.weekly .wr-note {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 12px;
  word-break: keep-all;
}
