.megabird-dashboard-page {
  padding-bottom: 24px;
}

@keyframes mbDashIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mb-dashboard-ani {
  animation: mbDashIn 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.mb-dashboard-summary > .mb-dashboard-ani:nth-child(1) { animation-delay: 0.04s; }
.mb-dashboard-summary > .mb-dashboard-ani:nth-child(2) { animation-delay: 0.10s; }
.mb-dashboard-summary > .mb-dashboard-ani:nth-child(3) { animation-delay: 0.16s; }
.mb-dashboard-summary > .mb-dashboard-ani:nth-child(4) { animation-delay: 0.22s; }

.mb-dashboard > .mb-dashboard-ani:not(.mb-dashboard-recent) {
  animation-delay: 0.28s;
}

.mb-dashboard-main-row > .mb-dashboard-ani:nth-child(1) { animation-delay: 0.34s; }
.mb-dashboard-main-row > .mb-dashboard-ani:nth-child(2) { animation-delay: 0.40s; }

.mb-dashboard-recent.mb-dashboard-ani {
  animation-delay: 0.48s;
}

.mb-dashboard-table tbody tr {
  animation: mbDashIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.mb-dashboard-table tbody tr:nth-child(1) { animation-delay: 0.56s; }
.mb-dashboard-table tbody tr:nth-child(2) { animation-delay: 0.62s; }
.mb-dashboard-table tbody tr:nth-child(3) { animation-delay: 0.68s; }
.mb-dashboard-table tbody tr:nth-child(4) { animation-delay: 0.74s; }
.mb-dashboard-table tbody tr:nth-child(5) { animation-delay: 0.80s; }

.mb-dashboard-stat-card,
.mb-dashboard-panel-kakao,
.mb-dashboard-panel-chart,
.mb-dashboard-recent {
  transition: box-shadow 0.25s ease;
}

.mb-dashboard-stat-card:hover,
.mb-dashboard-panel-kakao:hover,
.mb-dashboard-panel-chart:hover,
.mb-dashboard-recent:hover {
  box-shadow: 0 12px 24px rgba(47, 99, 255, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .mb-dashboard-ani,
  .mb-dashboard-table tbody tr {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .mb-dashboard-stat-card,
  .mb-dashboard-panel-kakao,
  .mb-dashboard-panel-chart,
  .mb-dashboard-recent {
    transition: none;
  }

  .mb-dashboard-stat-card:hover,
  .mb-dashboard-panel-kakao:hover,
  .mb-dashboard-panel-chart:hover,
  .mb-dashboard-recent:hover {
    box-shadow: none;
  }
}

.mb-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mb-dashboard-summary {
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.mb-dashboard-profile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f63ff 0%, #5b84ff 55%, #7b61ff 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 99, 255, 0.18);
}

.mb-dashboard-profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mb-dashboard-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
}

.mb-dashboard-profile-name {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.mb-dashboard-profile-role {
  margin: 0;
  font-size: 14px;
  opacity: 0.88;
}

.mb-dashboard-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.mb-dashboard-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.mb-dashboard-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 168px;
  padding: 22px 20px;
  border: 1px solid var(--color-ddd);
  border-radius: 16px;
  background: #fff;
}

.mb-dashboard-stat-card.is-violet {
  background: linear-gradient(180deg, #f7f3ff 0%, #fff 100%);
}

.mb-dashboard-stat-card.is-blue {
  background: linear-gradient(180deg, #f3f7ff 0%, #fff 100%);
}

.mb-dashboard-stat-card.is-sky {
  background: linear-gradient(180deg, #f2faff 0%, #fff 100%);
}

.mb-dashboard-stat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mb-dashboard-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(47, 99, 255, 0.1);
  color: #2f63ff;
  font-size: 24px;
  flex-shrink: 0;
}

.mb-dashboard-stat-card.is-violet .mb-dashboard-stat-icon {
  background: rgba(123, 97, 255, 0.12);
  color: #7b61ff;
}

.mb-dashboard-stat-card.is-sky .mb-dashboard-stat-icon {
  background: rgba(56, 189, 248, 0.14);
  color: #0ea5e9;
}

.mb-dashboard-stat-label {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-333);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.mb-dashboard-stat-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  padding-left: 60px;
}

.mb-dashboard-stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  line-height: 1;
}

.mb-dashboard-stat-value b {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-333);
  line-height: 1;
  letter-spacing: -0.03em;
}

.mb-dashboard-stat-value .unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-500);
}

.mb-dashboard-stat-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  list-style: none;
}

.mb-dashboard-stat-detail li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--color-gray-500);
}

.mb-dashboard-stat-detail .label {
  flex-shrink: 0;
  font-weight: 500;
}

.mb-dashboard-stat-detail b {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-333);
  text-align: right;
}

.mb-dashboard-stat-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.mb-dashboard-stat-badge.is-active {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.mb-dashboard-stat-badge.is-inactive {
  background: #f1f5f9;
  color: var(--color-gray-500);
}

.mb-dashboard-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.mb-dashboard-panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-ddd);
  border-radius: 16px;
  background: #fff;
}

.mb-dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.mb-dashboard-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-333);
}

.mb-dashboard-panel-title i {
  color: #2f63ff;
}

.mb-dashboard-panel-meta {
  margin: 0;
  font-size: 14px;
  color: var(--color-gray-500);
}

.mb-dashboard-type-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mb-dashboard-type-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fafc;
}

.mb-dashboard-type-item .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-500);
}

.mb-dashboard-type-item strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-333);
}

.mb-dashboard-chart {
  flex: 1;
  width: 100%;
  min-height: 220px;
}

.mb-dashboard-pie-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  flex: 1;
}

.mb-dashboard-pie {
  width: 100%;
  height: 220px;
}

.mb-dashboard-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mb-dashboard-pie-legend li:nth-child(1) .dot { background: #7b61ff; }
.mb-dashboard-pie-legend li:nth-child(2) .dot { background: #22c55e; }

.mb-dashboard-pie-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mb-dashboard-pie-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-555);
}

.mb-dashboard-pie-legend b {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-333);
}

.mb-dashboard-table .mb-dashboard-cell-content {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-dashboard-empty-cell {
  padding: 48px 16px !important;
  text-align: center;
  color: var(--color-gray-500);
}

.mb-dashboard-stat-badge.is-warn {
  background: #fff7ed;
  color: #c2410c;
}

.mb-dashboard-stat-badge.is-warn b {
  color: #9a3412;
}

@media (max-width: 1280px) {
  .mb-dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mb-dashboard-profile {
    grid-column: 1 / -1;
  }

  .mb-dashboard-main-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .mb-dashboard-summary {
    grid-template-columns: 1fr;
  }
}
