/* dashboard-executive-v21
   목업 기반 종합 대시보드: 히어로(마스코트) + 통계4 + 알림 + 목표/주간그래프 2단 + 바로가기4
   dz- 네임스페이스. 본문 중앙 1320px. 맨 마지막 로드. */

:root{
  --dz-primary:#7c5cfc;
  --dz-primary-deep:#6b4ef0;
  --dz-lilac:#efe9ff;
  --dz-lilac-soft:#f6f3ff;
  --dz-ink:#2c2550;
  --dz-sub:#8b85a8;
  --dz-line:#ece7fb;
  --dz-card:#ffffff;
  --dz-shadow:0 10px 30px rgba(108,78,240,.07);
  --dz-shadow-hover:0 16px 36px rgba(108,78,240,.14);
  --dz-up:#16a34a;
  --dz-down:#e5484d;
  --dz-warn-bg:#fff8e8;
  --dz-warn-line:#ffe4a8;
  --dz-warn-ink:#9a6b00;
}

.dashboard-page.dashboard-executive{
  max-width:1320px!important;
  margin:0 auto!important;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:16px!important;
}

/* ========== BLOCK 1 · 히어로 ========== */
.dz-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(220px,26%,320px);
  align-items:center;
  gap:20px;
  padding:26px 34px;
  border-radius:26px;
  background:linear-gradient(120deg,#efe9ff 0%,#f3eeff 48%,#e9e4ff 100%);
  overflow:hidden;
}
.dz-hero-body{min-width:0;z-index:1;}
.dz-hero-title{
  margin:0 0 13px;
  color:var(--dz-ink);
  font-size:clamp(22px,2.4vw,30px);
  font-weight:990;
  letter-spacing:-.04em;
  line-height:1.28;
}
.dz-hero-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 18px;
  margin-bottom:18px;
}
.dz-hero-recent, .dz-hero-accuracy{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:var(--dz-sub);
  font-size:0.9375rem;
  font-weight:800;
}
.dz-hero-meta b{color:var(--dz-ink);font-weight:900;}
.dz-hero-ico{font-size:1rem;filter:saturate(1.1);}
.dz-hero-accuracy{position:relative;padding-left:19px;}
.dz-hero-accuracy::before{
  content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:1px;height:15px;background:#d6cef2;
}
.dz-hero-actions{display:flex;flex-wrap:wrap;gap:12px;}
.dz-hero-btn{
  display:inline-flex;align-items:center;gap:8px;
  height:50px;padding:0 26px;border-radius:15px;
  font-size:0.9375rem;font-weight:900;text-decoration:none;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease;
}
.dz-hero-btn.primary{
  background:linear-gradient(135deg,#7c5cfc,#6b4ef0);
  color:#fff;box-shadow:0 12px 24px rgba(108,78,240,.28);
}
.dz-hero-btn.primary:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(108,78,240,.36);}
.dz-hero-btn.ghost{
  background:rgba(255,255,255,.72);color:var(--dz-primary-deep);
  border:1.5px solid #d9cffb;
}
.dz-hero-btn.ghost:hover{background:#fff;transform:translateY(-2px);}
.dz-hero-btn span{font-size:0.8em;}

.dz-hero-mascot{
  position:relative;z-index:1;
  display:flex;align-items:flex-end;justify-content:center;
  align-self:stretch;min-height:135px;
}
.dz-hero-mascot img{
  width:auto;height:100%;max-height:200px;object-fit:contain;
  filter:drop-shadow(0 12px 18px rgba(108,78,240,.16));
}
.dz-hero-bubble{
  position:absolute;top:6px;right:2px;z-index:2;
  padding:6px 13px;border-radius:14px 14px 14px 3px;
  background:#fff;color:var(--dz-primary-deep);
  font-size:0.8125rem;font-weight:900;
  box-shadow:0 6px 14px rgba(108,78,240,.16);
}
/* 히어로 우상단 장식 반짝이 */
.dz-hero::before, .dz-hero::after{
  content:"✦";position:absolute;color:#c9bcf7;opacity:.7;pointer-events:none;
}
.dz-hero::before{top:24px;left:50%;font-size:14px;}
.dz-hero::after{bottom:30px;right:34%;font-size:10px;}

/* ========== BLOCK 2 · 통계 4카드 ========== */
.dz-stat-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;
}
.dz-stat-card{
  position:relative;
  display:flex;align-items:center;gap:14px;
  padding:18px 20px;border-radius:18px;
  background:var(--dz-card);border:1px solid var(--dz-line);
  box-shadow:var(--dz-shadow);text-decoration:none;
  transition:transform .15s ease,box-shadow .15s ease;
}
.dz-stat-card:hover{transform:translateY(-3px);box-shadow:var(--dz-shadow-hover);}
.dz-stat-ico{
  flex:0 0 auto;width:46px;height:46px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;font-size:1.35rem;
}
.dz-stat-ico.ico-time{background:#efe9ff;}
.dz-stat-ico.ico-mission{background:#fff3d6;}
.dz-stat-ico.ico-accuracy{background:#dcf7ec;}
.dz-stat-ico.ico-streak{background:#ffe6db;}
.dz-stat-body{display:flex;flex-direction:column;gap:2px;min-width:0;padding-right:4px;}
.dz-stat-label{color:var(--dz-sub);font-size:0.8125rem;font-weight:800;}
.dz-stat-card b{color:var(--dz-ink);font-size:1.6rem;font-weight:990;letter-spacing:-.03em;line-height:1.1;}
/* 어제 대비 추이 — 카드 우측 하단에 작게 */
.dz-stat-sub{
  position:absolute;right:16px;bottom:12px;
  color:var(--dz-sub);font-size:0.6875rem;font-weight:800;
  text-align:right;letter-spacing:-.01em;
}
.dz-stat-sub:empty{display:none;}
.dz-stat-sub-trend.up{color:var(--dz-up);}
.dz-stat-sub-trend.down{color:var(--dz-down);}

/* ========== BLOCK 3 · 알림 (카드형 2단) ========== */
.dz-alerts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.dz-alerts.single{grid-template-columns:1fr;}
.dz-alert-card{
  position:relative;display:flex;align-items:center;gap:16px;
  padding:20px 22px;border-radius:18px;text-decoration:none;
  border:1px solid var(--dz-line);background:var(--dz-card);
  box-shadow:var(--dz-shadow);
  transition:transform .15s ease,box-shadow .15s ease;
}
.dz-alert-card:hover{transform:translateY(-2px);box-shadow:var(--dz-shadow-hover);}
.dz-alert-card.tone-unlock{background:linear-gradient(120deg,#f3efff,#ece5ff);border-color:#ddd0fb;}
.dz-alert-card.tone-typo{background:linear-gradient(120deg,#fff6ea,#fff0dc);border-color:#ffe0ad;}
.dz-alert-card.tone-feedback{background:linear-gradient(120deg,#eafaf2,#dff5ea);border-color:#b6e6cd;}
.dz-alert-ico{
  flex:0 0 auto;width:52px;height:52px;border-radius:15px;
  display:flex;align-items:center;justify-content:center;font-size:1.5rem;
  background:rgba(255,255,255,.75);
}
.dz-alert-main{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0;}
.dz-alert-title{color:var(--dz-ink);font-size:1rem;font-weight:950;letter-spacing:-.02em;}
.dz-alert-card.tone-unlock .dz-alert-title{color:var(--dz-primary-deep);}
.dz-alert-card.tone-typo .dz-alert-title{color:#b5730a;}
.dz-alert-card.tone-feedback .dz-alert-title{color:#128a52;}
.dz-alert-desc{color:var(--dz-sub);font-size:0.8125rem;font-weight:700;line-height:1.4;}
.dz-alert-badge{
  align-self:flex-start;margin-top:5px;padding:3px 10px;border-radius:999px;
  background:rgba(255,255,255,.85);color:var(--dz-ink);
  font-size:0.75rem;font-weight:900;
}
.dz-alert-card.tone-typo .dz-alert-badge{color:#b5730a;}
.dz-alert-cta{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;
  padding:10px 16px;border-radius:12px;background:#fff;
  color:var(--dz-primary-deep);border:1.5px solid #e2d8fb;
  font-size:0.8125rem;font-weight:900;white-space:nowrap;
  transition:background .14s ease,transform .14s ease;
}
.dz-alert-card.tone-typo .dz-alert-cta{color:#b5730a;border-color:#f2d199;}
.dz-alert-card.tone-feedback .dz-alert-cta{color:#128a52;border-color:#a5ddc0;}
.dz-alert-cta em{font-style:normal;font-size:1.05em;}
.dz-alert-card:hover .dz-alert-cta{transform:translateX(2px);}

/* ========== BLOCK 4 · 목표 / 주간그래프 2단 ========== */
.dz-duo{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch;}
.dz-duo>.dz-panel{display:flex;flex-direction:column;}
.dz-panel{
  padding:22px 24px!important;border-radius:20px!important;
  background:var(--dz-card);border:1px solid var(--dz-line)!important;
  box-shadow:var(--dz-shadow)!important;min-height:0!important;
}
.dz-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.dz-panel-head h2{margin:0;color:var(--dz-ink);font-size:1.0625rem;font-weight:950;letter-spacing:-.02em;}
.dz-panel-more{color:var(--dz-sub);font-size:0.8125rem;font-weight:800;text-decoration:none;}
.dz-panel-more:hover{color:var(--dz-primary-deep);}
.dz-panel-unit{color:var(--dz-sub);font-size:0.75rem;font-weight:700;}
/* 헤더 우측 액션 (초기화 / 목표설정) */
.dz-goal-reset{margin:0;font-size:0.8125rem;padding:5px 12px;border-radius:9px;border:1px solid var(--dz-line);background:#fff;color:var(--dz-sub);font-weight:850;cursor:pointer;transition:background .14s ease,color .14s ease;}
.dz-goal-reset:hover{background:var(--dz-lilac-soft);color:var(--dz-primary-deep);}
.dz-week-head-right{display:flex;align-items:center;gap:10px;}
.dz-week-goal-btn{font-size:0.8125rem;padding:5px 12px;border-radius:9px;border:1px solid var(--dz-line);background:#fff;color:var(--dz-primary-deep);font-weight:850;cursor:pointer;transition:background .14s ease;}
.dz-week-goal-btn:hover{background:var(--dz-lilac-soft);}

/* 오늘 공부 목표 — 한 줄 가로 배치, 카드 세로를 균등 분배로 꽉 채움 */
.dashboard-goal-card .dashboard-goal-list{display:flex;flex-direction:column;flex:1;justify-content:space-between;gap:4px;}
.dashboard-goal-card .dashboard-goal-item{
  display:grid!important;
  grid-template-columns:32px minmax(52px,auto) minmax(44px,auto) minmax(60px,1fr) auto auto!important;
  grid-template-rows:auto!important;
  align-items:center;gap:10px;
  padding:7px 10px!important;border:0!important;border-radius:12px!important;
  background:transparent!important;box-shadow:none!important;transition:background .14s ease!important;
}
.dashboard-goal-card .dashboard-goal-item:hover{transform:none!important;background:#f8f6ff!important;}
.dashboard-goal-card .dashboard-goal-item.done{background:transparent!important;}
.dashboard-goal-card .dashboard-goal-icon{width:32px;height:32px;font-size:1.05rem;border-radius:10px;}
.dashboard-goal-card .dashboard-goal-label{color:var(--dz-ink);font-size:0.875rem;font-weight:900;white-space:nowrap;}
.dashboard-goal-card .dashboard-goal-count{color:var(--dz-sub);font-size:0.8125rem;font-weight:850;}
.dashboard-goal-card .dashboard-goal-bar{height:8px!important;margin:0!important;border-radius:999px;background:#f0ecfb;overflow:hidden;}
.dashboard-goal-card .dashboard-goal-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#7c5cfc,#6b4ef0);}
.dashboard-goal-card .dashboard-goal-state{
  font-size:0.6875rem;font-weight:900;padding:3px 8px;border-radius:999px;
  background:#f0ecfb;color:var(--dz-sub);white-space:nowrap;
}
.dashboard-goal-card .dashboard-goal-item.done .dashboard-goal-state{background:#ecfdf3;color:#067647;}
.dashboard-goal-card .dashboard-goal-controls{display:flex;align-items:center;gap:5px;color:var(--dz-sub);font-size:0.6875rem;font-weight:850;white-space:nowrap;}
.dashboard-goal-card .dashboard-goal-controls button{width:22px;height:22px;border-radius:7px;border:1px solid #e1dcf5;background:#fff;color:var(--dz-primary-deep);font-weight:950;cursor:pointer;font-size:0.8rem;line-height:1;}
.dashboard-goal-card .dashboard-goal-controls button:hover{background:#f3f0ff;}
.dashboard-goal-card .dashboard-goal-summary{margin-bottom:6px;}
/* 주간 카드: 차트가 카드 세로를 꽉 채우도록 flex 확장 */
.dashboard-week-card{justify-content:flex-start;}

/* 주간 그래프 — flex:1로 카드 높이에 맞춰 세로 확장 */
.dz-week-chart{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;flex:1;min-height:170px;padding:8px 0 0;}
.dz-wk-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;}
.dz-wk-val{color:var(--dz-sub);font-size:0.75rem;font-weight:800;height:14px;}
.dz-wk-bar-track{flex:1;width:100%;max-width:48px;display:flex;align-items:flex-end;justify-content:center;}
.dz-wk-bar{width:100%;border-radius:8px 8px 4px 4px;background:#d9cffb;min-height:4px;transition:height .4s ease;}
.dz-wk-bar.today{background:linear-gradient(180deg,#7c5cfc,#6b4ef0);}
.dz-wk-label{color:var(--dz-sub);font-size:0.8125rem;font-weight:800;}
.dz-wk-label.today{color:var(--dz-primary-deep);font-weight:950;}
.dz-week-foot{
  display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;
  margin-top:16px;padding:12px;border-radius:13px;background:var(--dz-lilac-soft);
  color:var(--dz-sub);font-size:0.875rem;font-weight:800;
}
.dz-week-foot b{color:var(--dz-ink);font-weight:950;}
.dz-week-foot b.dz-wk-rate{color:var(--dz-primary-deep);}
.dz-week-foot i{width:1px;height:13px;background:#d6cef2;display:inline-block;}

/* ========== BLOCK 5 · 바로가기 4카드 ========== */
.dz-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;}
.dz-link-card{
  position:relative;display:flex;align-items:flex-start;gap:14px;
  padding:20px;border-radius:18px;
  background:var(--dz-card);border:1px solid var(--dz-line);
  box-shadow:var(--dz-shadow);text-decoration:none;
  transition:transform .15s ease,box-shadow .15s ease;
}
.dz-link-card:hover{transform:translateY(-3px);box-shadow:var(--dz-shadow-hover);}
.dz-link-ico{
  flex:0 0 auto;width:44px;height:44px;border-radius:13px;
  display:flex;align-items:center;justify-content:center;font-size:1.3rem;
}
.dz-link-ico.ico-village{background:#efe9ff;}
.dz-link-ico.ico-academy{background:#e5edff;}
.dz-link-ico.ico-league{background:#fff3d6;}
.dz-link-ico.ico-king{background:#dcf7ec;}
.dz-link-ico.ico-heatmap{background:#ffe6db;}
.dz-link-ico.ico-mission{background:#fff3d6;}
.dz-link-ico.ico-ai{background:#dcf7ec;}
.dz-link-ico.ico-report{background:#e5edff;}
.dz-link-text{display:flex;flex-direction:column;gap:4px;min-width:0;}
.dz-link-text b{color:var(--dz-ink);font-size:0.9375rem;font-weight:950;}
.dz-link-text small{color:var(--dz-sub);font-size:0.8125rem;font-weight:700;line-height:1.45;}
.dz-link-arrow{
  position:absolute;right:18px;bottom:16px;
  color:#c3b8ef;font-size:1.1rem;font-weight:900;
  transition:transform .15s ease,color .15s ease;
}
.dz-link-card:hover .dz-link-arrow{transform:translateX(4px);color:var(--dz-primary-deep);}

/* ========== 반응형 ========== */
@media (max-width:1280px){
  .dz-links{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:1080px){
  .dz-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dz-links{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dz-duo{grid-template-columns:1fr;}
  .dz-alerts{grid-template-columns:1fr;}
}
@media (max-width:760px){
  .dz-hero{grid-template-columns:1fr;padding:24px 22px;}
  .dz-hero-mascot{display:none;}
  .dz-hero-actions .dz-hero-btn{flex:1;justify-content:center;}
  .dz-stat-card b{font-size:1.4rem;}
  .dz-alert-card{flex-wrap:wrap;}
}
@media (prefers-reduced-motion:reduce){
  .dz-stat-card,.dz-link-card,.dz-hero-btn,.dz-wk-bar,.dz-alert-card{transition:none;}
}
