/* ================================================================
   MANAGEMENT PAGE — dedicated stylesheet
   Loaded after styles.css so these rules override as needed.
================================================================ */

/* ── Hero ───────────────────────────────────────────────────── */

.mgmt-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  color: white;
}

.mgmt-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(147, 80, 255, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 123, 114, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 90%, rgba(46, 196, 182, 0.3) 0%, transparent 45%),
    linear-gradient(135deg, #1c1043 0%, #2f1c78 60%, #1c2143 100%);
  z-index: 0;
}

/* subtle animated grain overlay */
.mgmt-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
}

.mgmt-hero-inner {
  position: relative;
  z-index: 1;
}

.mgmt-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  transition: color 160ms ease;
}

.mgmt-back:hover {
  color: white;
}

.mgmt-hero .eyebrow {
  color: #ffb83e;
}

.mgmt-hero h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: white;
}

.mgmt-hero-sub {
  margin: 1.1rem 0 0;
  max-width: 580px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.7;
}

.mgmt-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mgmt-stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.mgmt-stat span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.58);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Board header ───────────────────────────────────────────── */

.board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.board-header-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.board-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(91, 64, 208, 0.15), rgba(255, 183, 62, 0.15));
  font-size: 1.5rem;
  flex-shrink: 0;
}

.board-header-label h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--primary-dark);
}

.board-header-label .eyebrow {
  margin-bottom: 0.25rem;
}

.board-desc {
  max-width: 360px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ── Profile cards (boards) ─────────────────────────────────── */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.profile-grid--centered {
  grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
  justify-content: start;
}

.profile-card {
  background: white;
  border-radius: 22px;
  padding: 1.75rem 1.25rem 1.5rem;
  border: 1px solid rgba(91, 64, 208, 0.1);
  box-shadow: 0 8px 32px rgba(91, 64, 208, 0.06);
  text-align: center;
  transition: transform 220ms ease, box-shadow 220ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 52px rgba(91, 64, 208, 0.14);
}

/* Avatar */
.profile-avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(91, 64, 208, 0.15);
  box-shadow: 0 6px 20px rgba(91, 64, 208, 0.14);
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #e8e0ff, #fde8e0);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(91, 64, 208, 0.12), rgba(255, 123, 114, 0.12));
  letter-spacing: 0.02em;
  position: absolute;
  inset: 0;
}

/* Role badge */
.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(91, 64, 208, 0.1);
  color: var(--primary);
}

.profile-badge--ketua {
  background: linear-gradient(135deg, rgba(91, 64, 208, 0.18), rgba(255, 123, 114, 0.14));
  color: var(--primary-dark);
}

.profile-badge--anggota {
  background: rgba(46, 196, 182, 0.12);
  color: #1a8c84;
}

.profile-badge--exec {
  background: linear-gradient(135deg, #5b40d0, #ff7b72);
  color: white;
}

.profile-name {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
  text-align: center;
}

/* ── Executive spotlight ────────────────────────────────────── */

.exec-spotlight {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(91, 64, 208, 0.07), rgba(255, 123, 114, 0.05));
  border: 1px solid rgba(91, 64, 208, 0.14);
  border-radius: 28px;
  padding: 2rem 2.5rem;
  box-shadow: 0 16px 48px rgba(91, 64, 208, 0.08);
}

.exec-avatar-wrap {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid rgba(91, 64, 208, 0.2);
  box-shadow: 0 8px 28px rgba(91, 64, 208, 0.18);
  position: relative;
  background: linear-gradient(135deg, #e8e0ff, #fde8e0);
}

.exec-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.exec-initials {
  font-size: 2rem;
}

.exec-name {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
  color: var(--primary-dark);
  line-height: 1.2;
}

.exec-bio {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
  max-width: 560px;
}

/* ── Division cards (new style) ─────────────────────────────── */

.division-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.division-card-new {
  background: white;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(91, 64, 208, 0.1);
  box-shadow: 0 8px 32px rgba(91, 64, 208, 0.06);
  transition: transform 220ms ease, box-shadow 220ms ease;
  display: flex;
  flex-direction: column;
}

.division-card-new:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 52px rgba(91, 64, 208, 0.12);
}

.division-accent {
  height: 5px;
  background: var(--div-color, var(--primary));
  flex-shrink: 0;
}

.division-body {
  padding: 1.5rem;
  flex: 1;
}

.division-name-new {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.division-members {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.div-member {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.div-avatar-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(91, 64, 208, 0.12);
  position: relative;
  background: linear-gradient(135deg, #e8e0ff, #fde8e0);
}

.div-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.div-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--div-color, var(--primary));
  background: color-mix(in srgb, var(--div-color, var(--primary)) 12%, white);
}

.div-member .division-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  background: rgba(91, 64, 208, 0.08);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.2rem;
}

.div-member-name {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.3;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
  .board-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .board-desc {
    max-width: 100%;
  }

  .exec-spotlight {
    flex-direction: column;
    text-align: center;
    padding: 1.75rem 1.5rem;
    align-items: center;
  }

  .exec-bio {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .mgmt-hero {
    padding: 3.5rem 0 3rem;
  }

  .mgmt-stats {
    gap: 1.25rem;
  }

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

  .profile-grid--centered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: unset;
  }

  .division-grid-new {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .mgmt-hero h1 {
    font-size: 1.9rem;
  }

  .profile-grid,
  .profile-grid--centered {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .profile-avatar-wrap {
    width: 72px;
    height: 72px;
  }

  .profile-name {
    font-size: 0.82rem;
  }

  .exec-spotlight {
    padding: 1.25rem;
  }

  .exec-avatar-wrap {
    width: 90px;
    height: 90px;
  }

  .exec-name {
    font-size: 1.2rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PHOTO POPUP MODAL
═══════════════════════════════════════════════════════════════ */

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: photoModalFadeIn 200ms ease;
}

.photo-modal[hidden] {
  display: none;
}

@keyframes photoModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.92);
  backdrop-filter: blur(8px);
}

.photo-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: min(90vw, 600px);
  max-height: 90dvh;
  animation: photoModalContentIn 220ms ease;
}

@keyframes photoModalContentIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.photo-modal-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  background: linear-gradient(135deg, #e8e0ff, #fde8e0);
  max-width: 100%;
  max-height: calc(90dvh - 100px);
}

.photo-modal-img {
  max-width: 100%;
  max-height: calc(90dvh - 100px);
  object-fit: contain;
  display: block;
}

.photo-modal-footer {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.photo-modal-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.photo-modal-role {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

.photo-modal-close {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  min-height: unset;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 160ms ease;
  z-index: 201;
}

.photo-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1);
}

/* ── Photo modal responsive ─────────────────────────────────── */

@media (max-width: 480px) {
  .photo-modal-content {
    max-width: 95vw;
  }

  .photo-modal-close {
    top: 0.65rem;
    right: 0.65rem;
    width: 40px;
    height: 40px;
  }

  .photo-modal-footer {
    padding: 0.75rem 1rem;
  }

  .photo-modal-name {
    font-size: 0.95rem;
  }

  .photo-modal-role {
    font-size: 0.75rem;
  }
}

/* ── Loading skeleton ───────────────────────────────────────── */

@keyframes skelShimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.mgmt-skeleton {
  padding: 2rem 0;
}

.skel-line,
.skel-card {
  background: linear-gradient(90deg,
    rgba(91, 64, 208, 0.07) 25%,
    rgba(91, 64, 208, 0.14) 50%,
    rgba(91, 64, 208, 0.07) 75%);
  background-size: 600px 100%;
  animation: skelShimmer 1.4s infinite linear;
  border-radius: 12px;
}

.skel-line {
  height: 28px;
  margin-bottom: 2rem;
}

.skel-line--wide { width: 60%; }

.skel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.skel-card {
  height: 200px;
  border-radius: 20px;
}
