/* E-ABSENSI v1.1.4 — Mobile Admin Drawer
   Tambahan khusus layar < 1024px. Sidebar desktop dan bottom navigation lama tetap utuh. */

.mobile-admin-menu-trigger,
.mobile-admin-drawer { display: none; }

@media (max-width: 1023px) {
  body.mobile-admin-menu-open { overflow: hidden; }

  .mobile-admin-menu-trigger {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }
  .mobile-admin-menu-trigger:active,
  .mobile-admin-menu-trigger:hover { background: rgba(255,255,255,.22); }

  .mobile-admin-drawer {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: block;
    pointer-events: none;
    visibility: hidden;
  }
  .mobile-admin-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
  }
  .mobile-admin-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(8, 22, 15, .52);
    opacity: 0;
    transition: opacity .2s ease;
  }
  .mobile-admin-drawer.is-open .mobile-admin-drawer-backdrop { opacity: 1; }

  .mobile-admin-drawer-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(86vw, 350px);
    display: flex;
    flex-direction: column;
    background: var(--navy);
    color: #fff;
    box-shadow: 18px 0 48px rgba(0,0,0,.25);
    transform: translateX(-102%);
    transition: transform .22s ease;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .mobile-admin-drawer.is-open .mobile-admin-drawer-panel { transform: translateX(0); }

  .mobile-admin-drawer-head {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .mobile-admin-drawer-brand {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 11px;
  }
  .mobile-admin-drawer-logo {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 4px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
  }
  .mobile-admin-drawer-brand strong,
  .mobile-admin-drawer-brand small { display: block; }
  .mobile-admin-drawer-brand strong { font-size: 15px; }
  .mobile-admin-drawer-brand small { margin-top: 2px; color: rgba(255,255,255,.68); font-size: 11px; }
  .mobile-admin-drawer-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.10);
    color: #fff;
    font-size: 28px;
    line-height: 1;
  }

  .mobile-admin-drawer-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    background: rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  .mobile-admin-drawer-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--primary);
  }
  .mobile-admin-drawer-avatar .person-icon { width: 100%; height: 100%; }
  .mobile-admin-drawer-avatar .person-icon svg { width: 72%; height: 72%; }
  .mobile-admin-drawer-user-copy { min-width: 0; }
  .mobile-admin-drawer-user-copy strong,
  .mobile-admin-drawer-user-copy span,
  .mobile-admin-drawer-user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-admin-drawer-user-copy strong { font-size: 14px; }
  .mobile-admin-drawer-user-copy span { margin-top: 2px; color: rgba(255,255,255,.75); font-size: 11px; }
  .mobile-admin-drawer-user-copy small { margin-top: 3px; color: rgba(255,255,255,.48); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

  .mobile-admin-drawer-nav {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 10px calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-admin-drawer-label {
    padding: 11px 12px 7px;
    color: rgba(255,255,255,.48);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
  }
  .mobile-admin-drawer-link,
  .mobile-admin-drawer-logout {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: 11px;
    color: rgba(255,255,255,.86);
    background: transparent;
    text-decoration: none;
    text-align: left;
    font-size: 13px;
    font-weight: 750;
  }
  .mobile-admin-drawer-link:hover,
  .mobile-admin-drawer-link:active,
  .mobile-admin-drawer-link.is-active { color: #fff; background: rgba(255,255,255,.12); }
  .mobile-admin-drawer-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    font-size: 19px;
  }
  .mobile-admin-drawer-divider { height: 1px; margin: 9px 8px; background: rgba(255,255,255,.11); }
  .mobile-admin-drawer-logout { color: #ffd9dc; }
  .mobile-admin-drawer-logout:hover,
  .mobile-admin-drawer-logout:active { background: rgba(200,74,82,.20); color: #fff; }
}

@media (min-width: 1024px) {
  .mobile-admin-menu-trigger,
  .mobile-admin-drawer { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-admin-drawer-backdrop,
  .mobile-admin-drawer-panel { transition: none !important; }
}
