/* ═══════════════════════════════════════════
   DiplomaStudy Admin - Layout
   ═══════════════════════════════════════════ */

/* ─── Loading Page (index.html) ─── */
.loader-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E3A8A 0%, #0F172A 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.loader-page::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.loader-page::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loader-logo {
  width: 80px;
  height: 80px;
  border-radius: 22px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  color: var(--admin-primary);
  margin-bottom: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  letter-spacing: -0.5px;
}

.loader-title {
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.loader-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  font-weight: 500;
}

.loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: adminSpin 0.8s linear infinite;
  margin-bottom: 16px;
}

.loader-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   ADMIN PAGE LAYOUT
   ═══════════════════════════════════════════ */
.admin-page {
  display: flex;
  min-height: 100vh;
  background-color: var(--admin-bg);
  color: var(--admin-text);
}

/* ─── Sidebar ─── */
.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: linear-gradient(180deg, #1E3A8A 0%, #172554 100%);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.08);
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* ─── Main Content ─── */
.admin-main {
  flex: 1;
  margin-left: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: var(--admin-bg);
}

/* ─── Header ─── */
.admin-header {
  height: var(--admin-header-height);
  background-color: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

/* ─── Content ─── */
.admin-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ─── Sidebar Overlay (Mobile) ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.2);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 16px;
  }
  
  .admin-header {
    padding: 0 16px;
    gap: 12px;
  }
}