/* =====================================================
   대시보드 스타일 v1.0
   ===================================================== */

/* ── 페이지 ── */
.dashboard-page { padding: 0; }

/* ── 섹션 간격 ── */
.dash-section { margin-bottom: 20px; }

.dash-group-label {
  font-size: 11px; font-weight: 700; color: #9ca3af;
  letter-spacing: 0.06em;
  padding: 0 2px;
  margin-bottom: 6px;
  margin-top: 16px;
}
.dash-group-label:first-child { margin-top: 0; }

/* ── 주간 날씨 ── */
.dash-weekly-weather {
  display: flex; gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto; padding-bottom: 2px;
}
.dash-wday {
  flex: 1; min-width: 52px; text-align: center;
  border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 8px 4px; background: #fff;
  font-size: 11px; line-height: 1.6;
}
.dash-wday.is-today  { border-color: #6366f1; background: #eef2ff; }
.dash-wday.is-rain   { border-color: #93c5fd; background: #eff6ff; }
.dash-wday.is-snow   { border-color: #a5b4fc; background: #f5f3ff; }
.dash-wday-name { font-weight: 700; color: #374151; }
.dash-wday-icon { font-size: 18px; display: block; margin: 3px 0; }
.dash-wday-max  { font-weight: 700; color: #dc2626; }
.dash-wday-min  { color: #3b82f6; }

/* ── 실무 지휘판 카드 그리드 ── */
.dash-biz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}
#dashboard-money-row    { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#dashboard-project-row  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#dashboard-quotation-row{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dash-biz-card {
  border: var(--ui-border); border-radius: 12px;
  padding: 14px 16px; background: #fff;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-biz-card:hover       { transform: translateY(-1px); box-shadow: var(--ui-shadow); }
.dash-biz-card.is-alert    { background: #fff7f7; border-color: #fca5a5; }
.dash-biz-card.is-ok       { background: #f0fdf4; border-color: #86efac; }
a.dash-biz-card--link      { text-decoration: none; color: inherit; }
a.dash-biz-card--link:hover{ transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.10); }

.dash-biz-label   { font-size: 10px; font-weight: 700; color: #9ca3af; }
.dash-biz-value   { font-size: 22px; font-weight: 900; color: #111827; line-height: 1.2; }
.dash-biz-value.is-alert { color: #dc2626; }
.dash-biz-value.is-ok    { color: #16a34a; }
.dash-biz-sub     { font-size: 11px; color: #6b7280; }
.dash-biz-loading { font-size: 12px; color: #9ca3af; padding: 16px 0; text-align: center; }

/* ── KPI 카드 ── */
.dash-grid-3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.dash-kpi-card {
  cursor: pointer; user-select: none;
  border: var(--ui-border); border-radius: 10px;
  padding: 14px 16px; background: var(--ui-bg);
}
.dash-kpi-card:hover { box-shadow: var(--ui-shadow); }
.dash-money         { font-weight: 800; }
.dash-money .num    { font-weight: 800; }
.dash-money .unit   { margin-left: 2px; opacity: .8; }

/* ── 차트 카드 ── */
.dash-chart-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 10px;
}
.dash-card {
  border: var(--ui-border); border-radius: 10px;
  padding: 14px 16px; background: var(--ui-bg);
}
.dash-card-title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.dash-slot  { position: relative; width: 100%; }
.dash-h320  { height: 180px; }
.dash-h260  { height: 150px; }
.dash-h200  { height: 120px; }
.dash-span-all { grid-column: 1 / -1; }
canvas[data-chart] { display: block !important; width: 100% !important; height: 100% !important; }

/* ── 기타 ── */
.dash-mod-badge {
  display: inline-block; margin-left: 6px; padding: 2px 6px;
  border-radius: 999px; border: 1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.12); color: #ffd0d0; font-size: 10px; line-height: 1;
}
.mod-off-preview { opacity: .58; filter: grayscale(1); }
.dash-off-note {
  border: 1px dashed #fecaca; border-radius: var(--ui-radius); padding: 8px;
  color: var(--ui-danger); font-size: 12px; background: #fff7f7;
}
.dash-kpi-fold {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 8px 0;
}
.dash-kpi-fold-copy { font-size: 11px; color: #6b7280; }
.dash-kpi-fold-btn {
  border: 1px solid #d1d5db; background: #fff; color: #111827;
  border-radius: 999px; padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ── 반응형 ── */
@media (max-width: 980px) {
  #dashboard-money-row     { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid-3             { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-chart-grid         { grid-template-columns: 1fr; }
  .dash-biz-grid           { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #dashboard-money-row     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid-3             { grid-template-columns: 1fr; }
  .dash-biz-grid           { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-biz-card           { padding: 12px; }
  .dash-kpi-card           { padding: 12px; }
  .dash-card               { padding: 12px; }
}
