/* Admin Overview Specific Styles */

/* Topbar styles (unscoped to work outside #adminOverviewRoot) */
.admin-overview-top-search {
  width: 280px !important;
  transition: width 0.2s;
}
.admin-overview-top-search:focus-within {
  width: 340px !important;
  border-color: #d8b66a !important;
}

.profile-dropdown button.nav-button:hover {
  background: #f7f5f0;
}

/* Overview Layout (Scoped) */
#adminOverviewRoot .admin-overview-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: rise 0.4s ease both;
  min-width: 0;
}

/* Hero */
#adminOverviewRoot .overview-hero {
  background: #09172e;
  border-radius: 14px;
  padding: 36px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  min-height: 200px;
}

#adminOverviewRoot .overview-hero::before {
  content: "";
  position: absolute;
  right: -50px;
  top: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(216, 182, 106, 0.1);
  box-shadow: 0 0 0 40px rgba(216, 182, 106, 0.02), 0 0 0 80px rgba(216, 182, 106, 0.02);
  pointer-events: none;
}

#adminOverviewRoot .hero-left-column {
  position: relative;
  z-index: 2;
  flex: 1;
  min-width: 0;
}

#adminOverviewRoot .hero-content {
  max-width: 450px;
}

#adminOverviewRoot .hero-kicker {
  color: #d8b66a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

#adminOverviewRoot .hero-content h1 {
  font-size: 40px;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.1;
}

#adminOverviewRoot .hero-content h1 span {
  color: #d8b66a;
}

#adminOverviewRoot .hero-content p {
  font-size: 13px;
  color: #95a4ba;
  margin: 0;
  line-height: 1.5;
}

#adminOverviewRoot .hero-right-region {
  display: flex;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 2;
}

#adminOverviewRoot .hero-handwriting {
  color: #d8b66a;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 26px;
  line-height: 1.2;
  transform: rotate(-6deg);
  opacity: 0.9;
  text-align: center;
  margin-right: -10px;
}

#adminOverviewRoot .hero-art-image {
  width: 268px;
  height: 126px;
  background-image: url('/academy-assets/hero-art.png');
  background-position: -565px -45px;
  background-repeat: no-repeat;
  flex-shrink: 0;
  mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 60%, transparent 100%);
}

#adminOverviewRoot .hero-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 140px;
}

#adminOverviewRoot .hero-link-btn {
  background: transparent;
  border: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 550;
  padding: 6px 0;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  text-align: left;
}

#adminOverviewRoot .hero-link-btn:hover {
  opacity: 0.8;
  transform: translateX(3px);
}
#adminOverviewRoot .hero-link-btn .icon {
  color: #a4b3cc;
  width: 18px;
  height: 18px;
}

/* Metrics Cards */
#adminOverviewRoot .overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

#adminOverviewRoot .metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 0;
}

#adminOverviewRoot .metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#adminOverviewRoot .metric-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
}

#adminOverviewRoot .metric-info {
  display: flex;
  gap: 12px;
  min-width: 0;
}

#adminOverviewRoot .metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
#adminOverviewRoot .metric-icon.blue { background: #eaf0fa; color: #4a82d6; }
#adminOverviewRoot .metric-icon.gold { background: #fdf6e7; color: #c49a45; }
#adminOverviewRoot .metric-icon.purple { background: #f4ecfb; color: #9c66cc; }
#adminOverviewRoot .metric-icon.green { background: #e9f5ef; color: #2d8062; }

#adminOverviewRoot .metric-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminOverviewRoot .metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

#adminOverviewRoot .metric-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}

#adminOverviewRoot .metric-delta {
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
#adminOverviewRoot .metric-delta.pos { color: #2d8062; }
#adminOverviewRoot .metric-delta.neg { color: #af3535; }

#adminOverviewRoot .metric-chart {
  margin-top: 2px;
  flex-shrink: 0;
}

#adminOverviewRoot .metric-footer {
  font-size: 10px;
  color: #95a4ba;
  margin-top: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Three Panels */
#adminOverviewRoot .overview-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

#adminOverviewRoot .overview-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#adminOverviewRoot .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

#adminOverviewRoot .panel-header h3 {
  margin: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
  white-space: nowrap;
}
#adminOverviewRoot .panel-header h3 .icon {
  color: #c49a45;
  width: 18px;
  height: 18px;
}

#adminOverviewRoot .panel-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 24px 4px 8px;
  font-size: 10px;
  color: var(--muted);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23777b83'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 6px center;
  background-size: 12px;
  appearance: none;
  flex-shrink: 0;
  max-width: 110px;
}

#adminOverviewRoot .activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

#adminOverviewRoot .activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#adminOverviewRoot .activity-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f7f8f9;
  color: #8c93a1;
  flex-shrink: 0;
}
#adminOverviewRoot .activity-item-icon.enrollment { color: #2d8062; background: #e9f5ef; }
#adminOverviewRoot .activity-item-icon.course { color: #c49a45; background: #fdf6e7; }
#adminOverviewRoot .activity-item-icon.payment { color: #4a82d6; background: #eaf0fa; }

#adminOverviewRoot .activity-item-content {
  flex: 1;
  min-width: 0;
}

#adminOverviewRoot .activity-item-msg {
  font-size: 11px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminOverviewRoot .activity-item-time {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bar Chart */
#adminOverviewRoot .bar-chart-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  min-height: 160px;
  min-width: 0;
}

#adminOverviewRoot .bar-chart {
  flex: 1;
  display: flex;
  gap: 12px;
  position: relative;
  padding-bottom: 24px;
  min-width: 0;
}

#adminOverviewRoot .bar-chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  color: #a4abb8;
  font-size: 9px;
  width: 24px;
  padding-bottom: 1px;
  flex-shrink: 0;
}

#adminOverviewRoot .bar-chart-bars {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid #e8e8e5;
  position: relative;
  min-width: 0;
  gap: 4px;
}

#adminOverviewRoot .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  min-width: 0;
}

#adminOverviewRoot .bar-track {
  width: 100%;
  max-width: 32px;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#adminOverviewRoot .bar-fill {
  width: 100%;
  background: #4a82d6;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease-out;
}

#adminOverviewRoot .bar-fill:hover {
  background: #396bc0;
}

#adminOverviewRoot .bar-label {
  position: absolute;
  bottom: -20px;
  font-size: 9px;
  color: #95a4ba;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

#adminOverviewRoot .enrollment-stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  gap: 10px;
  min-width: 0;
}

#adminOverviewRoot .enroll-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#adminOverviewRoot .enroll-stat-val {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: block;
}
#adminOverviewRoot .enroll-stat-val.pos { color: #2d8062; }
#adminOverviewRoot .enroll-stat-val.neg { color: #af3535; }

#adminOverviewRoot .enroll-stat-lbl {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminOverviewRoot .enroll-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
#adminOverviewRoot .enroll-icon.blue { background: #eaf0fa; color: #4a82d6; }
#adminOverviewRoot .enroll-icon.gold { background: #fdf6e7; color: #c49a45; }

/* Top Courses */
#adminOverviewRoot .top-courses-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

#adminOverviewRoot .top-course-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s;
  min-width: 0;
}

#adminOverviewRoot .top-course-item:hover {
  background: #f7f8f9;
}

#adminOverviewRoot .top-course-rank {
  font-size: 11px;
  font-weight: 700;
  color: #a4abb8;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

#adminOverviewRoot .top-course-thumb {
  width: 40px;
  height: 30px;
  border-radius: 6px;
  background-color: #f0f2f5;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: #c0c6d1;
  flex-shrink: 0;
}

#adminOverviewRoot .top-course-info {
  flex: 1;
  min-width: 0;
}

#adminOverviewRoot .top-course-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

#adminOverviewRoot .top-course-students {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminOverviewRoot .top-course-delta {
  font-size: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
#adminOverviewRoot .top-course-delta.pos { color: #2d8062; }
#adminOverviewRoot .top-course-delta.neg { color: #af3535; }

/* Footer */
#adminOverviewRoot .overview-footer {
  background: linear-gradient(90deg, #fbf4e8, #fdf8ef);
  border-radius: 12px;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

#adminOverviewRoot .footer-icon-rocket {
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #c49a45;
  box-shadow: 0 4px 12px rgba(196, 154, 69, 0.1);
  flex-shrink: 0;
}

#adminOverviewRoot .footer-text {
  flex: 1;
  min-width: 0;
}

#adminOverviewRoot .footer-text strong {
  display: block;
  font-size: 14px;
  color: #4a3e26;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#adminOverviewRoot .footer-text span {
  font-size: 11px;
  color: #8c7e65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

#adminOverviewRoot .footer-brand {
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #312b1d;
  line-height: 1.2;
  flex-shrink: 0;
}

#adminOverviewRoot .footer-brand span {
  color: #c49a45;
}

#adminOverviewRoot .footer-brand small {
  display: block;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #a49881;
}

#adminOverviewRoot .empty-list {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 11px;
}

@media(max-width: 1200px) {
  #adminOverviewRoot .overview-panels {
    grid-template-columns: minmax(0, 1fr);
  }
  #adminOverviewRoot .overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #adminOverviewRoot .hero-art-image {
    display: none;
  }
}

@media(max-width: 768px) {
  #adminOverviewRoot .overview-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  #adminOverviewRoot .overview-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
  #adminOverviewRoot .hero-content {
    max-width: 100%;
  }
  #adminOverviewRoot .hero-handwriting {
    display: none;
  }
  #adminOverviewRoot .hero-right-region {
    margin-top: 20px;
    width: 100%;
  }
  #adminOverviewRoot .overview-footer {
    flex-direction: column;
    text-align: center;
  }
  #adminOverviewRoot .footer-brand {
    text-align: center;
  }
}
