/* ===== Apple-style 대시보드 ===== */

.dashboard-wrapper {
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ── 공지사항 / 교육 / 2-column 그리드 ── */
.dash-content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 992px) {
  .dash-content-row { grid-template-columns: 1fr; }
}

.dash-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.dash-panel:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.dash-panel-header {
  padding: 16px 20px 14px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}
.dash-panel-title i {
  font-size: 16px;
  opacity: 0.8;
}
.dash-panel-title .title-icon-system { color: #007aff; }
.dash-panel-title .title-icon-edu { color: #ff375f; }

.dash-panel-badge {
  background: #007aff;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.dash-panel-badge.badge-edu { background: #ff375f; }

.dash-panel-body {
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
}
.dash-panel-body::-webkit-scrollbar { width: 0; }

/* ── 공지 아이템 ── */
.dash-notice-item {
  padding: 12px 20px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-notice-item:last-child { border-bottom: none; }
.dash-notice-item:hover { background: rgba(0, 122, 255, 0.04); }

.dash-notice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #007aff;
  flex-shrink: 0;
}
.dash-notice-dot.dot-edu { background: #ff375f; }
.dash-notice-dot.dot-new { animation: dotPulse 2s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.dash-notice-content {
  flex: 1;
  min-width: 0;
}
.dash-notice-title {
  font-size: 13px;
  color: #1d1d1f;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.dash-notice-date {
  font-size: 11px;
  color: #86868b;
  margin-top: 1px;
}

/* ── 계정 상태 카드 ── */
.dash-account-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 20px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}
.dash-account-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
@media (max-width: 768px) {
  .dash-account-row { flex-direction: column; align-items: stretch; }
}

.dash-account-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 14px;
  transition: background 0.2s ease;
}
.dash-account-item:hover { background: rgba(0, 0, 0, 0.04); }

.dash-account-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.dash-account-icon.icon-total { background: rgba(52, 199, 89, 0.12); color: #34c759; }
.dash-account-icon.icon-expire { background: rgba(255, 55, 95, 0.12); color: #ff375f; }
.dash-account-icon.icon-role { background: rgba(0, 122, 255, 0.12); color: #007aff; }

.dash-account-info { flex: 1; }
.dash-account-label {
  font-size: 11px;
  color: #86868b;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.dash-account-value {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

/* ── 통계 카드 행 ── */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 992px) { .dash-stats-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .dash-stats-row { grid-template-columns: 1fr; } }

.dash-stat-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 20px 22px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.dash-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.05);
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 18px 18px 0 0;
}
.dash-stat-card.card-coudae::before { background: #007aff; }
.dash-stat-card.card-amazon::before { background: #ff9f0a; }
.dash-stat-card.card-premium::before { background: #5856d6; }
.dash-stat-card.card-global::before { background: #34c759; }

.dash-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dash-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.card-coudae .dash-stat-icon { background: rgba(0, 122, 255, 0.1); color: #007aff; }
.card-amazon .dash-stat-icon { background: rgba(255, 159, 10, 0.1); color: #ff9f0a; }
.card-premium .dash-stat-icon { background: rgba(88, 86, 214, 0.1); color: #5856d6; }
.card-global .dash-stat-icon { background: rgba(52, 199, 89, 0.1); color: #34c759; }

.dash-stat-label {
  font-size: 12px;
  color: #86868b;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
}
.dash-stat-value {
  font-size: 30px;
  font-weight: 700;
  color: #1d1d1f;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}
.dash-stat-desc {
  font-size: 12px;
  color: #86868b;
}

/* ── 차트 컨테이너 ── */
.dash-chart-container {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 20px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}
.dash-chart-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}
.dash-chart-title i { opacity: 0.7; }


/* ── 테이블 (TOP 10 등) ── */
.dash-exchange-full { width: 100%; }
.dash-exchange-full table {
  width: 100%;
  border-collapse: collapse;
}
.dash-exchange-full th {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  text-align: left;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.dash-exchange-full td {
  padding: 11px 20px;
  font-size: 13px;
  color: #1d1d1f;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.04);
}
.dash-exchange-full tr:last-child td { border-bottom: none; }
.dash-exchange-full tr:hover td { background: rgba(0, 122, 255, 0.03); }

/* ── 빈 상태 ── */
.dash-empty {
  padding: 40px 20px;
  text-align: center;
  color: #86868b;
  font-size: 13px;
}
.dash-empty i {
  font-size: 28px;
  margin-bottom: 10px;
  display: block;
  opacity: 0.5;
}

/* ── 로딩 ── */
.dash-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.dash-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(0, 0, 0, 0.08);
  border-top: 2.5px solid #007aff;
  border-radius: 50%;
  animation: dashSpin 0.7s linear infinite;
}
@keyframes dashSpin { to { transform: rotate(360deg); } }
