/* =========================================================
   EVIDEX ACADEMY ADMIN
   PREMIUM RESPONSIVE ADMIN LAYOUT
========================================================= */

:root {
  --academy-blue: #2563eb;
  --academy-blue-dark: #1d4ed8;
  --academy-text: #172033;
  --academy-muted: #718096;
  --academy-border: #e8edf3;
  --academy-bg: #f7f9fc;
  --academy-white: #ffffff;
  --academy-sidebar: #ffffff;
  --academy-sidebar-width: 265px;
}

/* =========================================================
   BODY
========================================================= */

.academy-admin-body {
  margin: 0;
  background: var(--academy-bg);
  color: var(--academy-text);
  font-family: "DM Sans", sans-serif;
}

body.sidebar-active {
  overflow: hidden;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.academy-admin-layout {
  min-height: 100vh;
  display: flex;
}

/* =========================================================
   SIDEBAR
========================================================= */

.academy-sidebar {
  position: fixed;
  inset: 0 auto 0 0;

  width: var(--academy-sidebar-width);

  height: 100vh;

  background: var(--academy-sidebar);

  border-right: 1px solid var(--academy-border);

  display: flex;
  flex-direction: column;

  z-index: 1000;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* =========================================================
   SIDEBAR BRAND
========================================================= */

.sidebar-brand {
  min-height: 92px;

  padding: 20px 20px;

  display: flex;
  align-items: center;

  border-bottom: 1px solid var(--academy-border);

  position: relative;
}

.sidebar-brand-logo {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-right: 11px;
}

.sidebar-brand-logo img {
  width: 46px;
  height: 46px;

  object-fit: contain;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;

  line-height: 1;
}

.sidebar-brand-text strong {
  font-size: 15px;
  font-weight: 800;

  letter-spacing: 0.08em;

  color: #172033;
}

.sidebar-brand-text span {
  margin-top: 5px;

  font-size: 10px;
  font-weight: 700;

  letter-spacing: 0.18em;

  color: var(--academy-blue);
}

/* =========================================================
   CLOSE BUTTON
========================================================= */

.sidebar-close-btn {
  display: none;

  margin-left: auto;

  width: 34px;
  height: 34px;

  border: 1px solid var(--academy-border);

  background: #f8fafc;

  color: #64748b;

  border-radius: 8px;

  align-items: center;
  justify-content: center;
}

/* =========================================================
   ADMIN PROFILE
========================================================= */

.sidebar-admin {
  margin: 20px 16px 10px;

  padding: 13px;

  border: 1px solid var(--academy-border);

  border-radius: 12px;

  display: flex;
  align-items: center;

  position: relative;

  background: #fbfcfe;
}

.admin-avatar {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #eff6ff;

  color: var(--academy-blue);

  border-radius: 10px;

  font-size: 14px;
}

.admin-info {
  min-width: 0;

  margin-left: 10px;

  display: flex;
  flex-direction: column;
}

.admin-info strong {
  font-size: 12px;
  font-weight: 700;

  color: #263247;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-info span {
  margin-top: 3px;

  font-size: 10px;

  color: var(--academy-muted);
}

.admin-status {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #22c55e;

  margin-left: auto;
}

/* =========================================================
   SIDEBAR NAVIGATION
========================================================= */

.sidebar-navigation {
  flex: 1;

  padding: 15px 13px;

  overflow-y: auto;
}

.sidebar-section-title {
  display: block;

  padding: 13px 11px 8px;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.13em;

  color: #9aa6b5;
}

.sidebar-menu {
  list-style: none;

  margin: 0;
  padding: 0;
}

.sidebar-menu li {
  margin-bottom: 3px;
}

.sidebar-menu a {
  min-height: 44px;

  padding: 0 11px;

  display: flex;
  align-items: center;

  border-radius: 9px;

  color: #596579;

  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.sidebar-menu a:hover {
  background: #f5f8fc;
  color: #263b61;
}

.sidebar-menu a.active {
  background: #eff6ff;

  color: var(--academy-blue);
}

.menu-icon {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  font-size: 13px;

  color: #8290a3;

  transition: 0.2s ease;
}

.sidebar-menu a.active .menu-icon {
  background: #dbeafe;
  color: var(--academy-blue);
}

.sidebar-menu a:hover .menu-icon {
  color: var(--academy-blue);
}

.menu-text {
  margin-left: 7px;
}

/* =========================================================
   SIDEBAR FOOTER
========================================================= */

.sidebar-footer {
  padding: 15px 20px 20px;

  display: flex;
  flex-direction: column;
}

.sidebar-footer-line {
  height: 1px;

  background: var(--academy-border);

  margin-bottom: 14px;
}

.sidebar-footer small {
  font-size: 10px;
  font-weight: 700;

  color: #718096;
}

.sidebar-footer span {
  margin-top: 3px;

  font-size: 9px;

  color: #a0aabb;
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.academy-main {
  width: calc(100% - var(--academy-sidebar-width));

  margin-left: var(--academy-sidebar-width);

  min-height: 100vh;
}

/* =========================================================
   CONTENT
========================================================= */

.academy-content {
  width: 100%;

  max-width: 1500px;

  margin: 0 auto;

  padding: 48px 48px 60px;
}

/* =========================================================
   MOBILE HEADER
========================================================= */

.mobile-admin-header {
  display: none;
}

/* =========================================================
   DASHBOARD HEADER
========================================================= */

.dashboard-header {
  margin-bottom: 35px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  margin-bottom: 10px;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.14em;

  color: var(--academy-blue);
}

.page-eyebrow span {
  width: 22px;
  height: 2px;

  background: var(--academy-blue);

  border-radius: 10px;
}

.dashboard-header h1 {
  margin: 0;

  font-size: clamp(26px, 3vw, 36px);

  font-weight: 800;

  letter-spacing: -0.035em;

  color: #172033;
}

.dashboard-header p {
  margin: 9px 0 0;

  max-width: 600px;

  font-size: 13px;

  line-height: 1.7;

  color: var(--academy-muted);
}

/* =========================================================
   STAT GRID
========================================================= */

.academy-stats-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 17px;
}

/* =========================================================
   STAT CARD
========================================================= */

.academy-stat-card {
  min-width: 0;

  padding: 21px;

  background: #ffffff;

  border: 1px solid var(--academy-border);

  border-radius: 14px;

  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.academy-stat-card:hover {
  transform: translateY(-3px);

  border-color: #dbe3ed;

  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

/* =========================================================
   STAT TOP
========================================================= */

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 43px;
  height: 43px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 11px;

  font-size: 15px;
}

.stat-icon-primary {
  color: #2563eb;
  background: #eff6ff;
}

.stat-icon-blue {
  color: #0284c7;
  background: #f0f9ff;
}

.stat-icon-purple {
  color: #7c3aed;
  background: #f5f3ff;
}

.stat-icon-orange {
  color: #ea580c;
  background: #fff7ed;
}

.stat-label {
  font-size: 8px;

  font-weight: 800;

  letter-spacing: 0.12em;

  color: #a0aabb;
}

/* =========================================================
   STAT BOTTOM
========================================================= */

.stat-card-bottom {
  margin-top: 25px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.stat-title {
  display: block;

  font-size: 12px;

  font-weight: 600;

  color: #718096;
}

.stat-card-bottom h2 {
  margin: 5px 0 0;

  font-size: 29px;

  font-weight: 800;

  letter-spacing: -0.04em;

  color: #172033;
}

.stat-arrow {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #f8fafc;

  color: #94a3b8;

  font-size: 10px;
}

/* =========================================================
   OVERVIEW
========================================================= */

.dashboard-overview {
  margin-top: 22px;
}

.overview-card {
  min-height: 220px;

  position: relative;

  overflow: hidden;

  padding: 35px;

  border-radius: 16px;

  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);

  border: 1px solid var(--academy-border);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.overview-content {
  position: relative;

  z-index: 2;

  max-width: 650px;
}

.overview-eyebrow {
  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.15em;

  color: var(--academy-blue);
}

.overview-content h3 {
  margin: 10px 0 8px;

  font-size: clamp(20px, 2vw, 27px);

  font-weight: 800;

  letter-spacing: -0.025em;

  color: #172033;
}

.overview-content p {
  max-width: 600px;

  margin: 0 0 22px;

  font-size: 12px;

  line-height: 1.7;

  color: #718096;
}

.overview-button {
  display: inline-flex;

  align-items: center;

  gap: 9px;

  padding: 10px 16px;

  border-radius: 8px;

  background: var(--academy-blue);

  color: #ffffff;

  text-decoration: none;

  font-size: 11px;

  font-weight: 700;

  box-shadow: 0 7px 16px rgba(37, 99, 235, 0.18);

  transition: 0.2s ease;
}

.overview-button:hover {
  background: var(--academy-blue-dark);

  color: #ffffff;

  transform: translateY(-1px);
}

.overview-decoration {
  width: 180px;
  height: 180px;

  flex: 0 0 180px;

  margin-right: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #eff6ff;

  color: #bfdbfe;

  font-size: 65px;

  position: relative;
}

.overview-decoration::before {
  content: "";

  position: absolute;

  width: 125px;
  height: 125px;

  border: 1px solid #dbeafe;

  border-radius: 50%;
}

/* =========================================================
   MOBILE OVERLAY
========================================================= */

.sidebar-overlay {
  display: none;

  position: fixed;

  inset: 0;

  background: rgba(15, 23, 42, 0.35);

  backdrop-filter: blur(2px);

  z-index: 999;
}

.overlay-visible {
  display: block;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {
  :root {
    --academy-sidebar-width: 235px;
  }

  .academy-content {
    padding: 38px 30px 50px;
  }

  .academy-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .academy-sidebar {
    width: min(285px, 85vw);

    transform: translateX(-100%);

    box-shadow: none;
  }

  .academy-sidebar.sidebar-open {
    transform: translateX(0);

    box-shadow: 15px 0 40px rgba(15, 23, 42, 0.12);
  }

  .sidebar-close-btn {
    display: flex;
  }

  .academy-main {
    width: 100%;

    margin-left: 0;
  }

  .mobile-admin-header {
    height: 68px;

    padding: 0 18px;

    background: #ffffff;

    border-bottom: 1px solid var(--academy-border);

    display: flex;
    align-items: center;

    position: sticky;

    top: 0;

    z-index: 900;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;

    border: 1px solid var(--academy-border);

    background: #ffffff;

    color: #475569;

    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
  }

  .mobile-brand {
    margin-left: 12px;

    display: flex;
    align-items: center;
  }

  .mobile-brand img {
    width: 35px;
    height: 35px;

    object-fit: contain;
  }

  .mobile-brand div {
    margin-left: 8px;

    display: flex;
    flex-direction: column;

    line-height: 1;
  }

  .mobile-brand strong {
    font-size: 12px;

    letter-spacing: 0.08em;
  }

  .mobile-brand span {
    margin-top: 4px;

    font-size: 8px;

    letter-spacing: 0.15em;

    color: var(--academy-blue);
  }

  .academy-content {
    padding: 28px 18px 45px;
  }

  .dashboard-header {
    margin-bottom: 26px;
  }

  .dashboard-header h1 {
    font-size: 27px;
  }

  .dashboard-header p {
    font-size: 12px;
  }

  .academy-stats-grid {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  .academy-stat-card {
    padding: 18px;
  }

  .stat-card-bottom {
    margin-top: 20px;
  }

  .overview-card {
    min-height: auto;

    padding: 25px;

    align-items: flex-start;
  }

  .overview-decoration {
    display: none;
  }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 420px) {
  .academy-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dashboard-header h1 {
    font-size: 24px;
  }

  .dashboard-header p {
    font-size: 11px;
  }

  .academy-stat-card {
    padding: 16px;
  }

  .stat-card-bottom h2 {
    font-size: 26px;
  }

  .overview-card {
    padding: 21px;
  }

  .overview-content h3 {
    font-size: 20px;
  }
}
