/**
 * Mobil sol menü — site header drawer
 */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.mobile-nav--open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mobile-nav--open .mobile-nav__backdrop {
  opacity: 1;
}

.mobile-nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: min(304px, calc(100vw - 3rem));
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  background: #f8fafb;
  box-shadow:
    12px 0 48px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  transform: translateX(-105%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav--open .mobile-nav__panel {
  transform: translateX(0);
}

/* —— Header —— */
.mnav-header {
  flex-shrink: 0;
  padding:
    max(0.85rem, env(safe-area-inset-top, 0))
    1rem
    1.35rem;
  background: linear-gradient(145deg, #005a62 0%, #006d77 42%, #00838f 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.mnav-header::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -25%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.mnav-header::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.mnav-header__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mnav-header__brand {
  display: inline-flex;
  text-decoration: none;
}

.mnav-header__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 150px;
  filter: brightness(0) invert(1);
}

.mnav-header__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mnav-header__close:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.22);
}

.mnav-header__tagline {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.4;
}

/* —— Scrollable body —— */
.mnav-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.85rem 1rem;
}

/* —— User card —— */
.mnav-user {
  margin: -1.5rem 0 1rem;
  position: relative;
  z-index: 2;
}

.mnav-user__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--pk-border, #e5e7eb);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.mnav-user__avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pk-primary-light, #b2dfdb), var(--pk-primary, #006d77));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mnav-user__info {
  min-width: 0;
  flex: 1;
}

.mnav-user__name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--pk-text, #1f2937);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mnav-user__meta {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  color: var(--pk-muted, #6b7280);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.mnav-user__role {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--pk-primary-dark, #005a62);
}

.mnav-user__dot {
  flex-shrink: 0;
  opacity: 0.5;
}

.mnav-user__email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mnav-user__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  background: var(--pk-primary-soft, #e0f2f1);
  color: var(--pk-primary-dark, #005a62);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.mnav-user__cta:active {
  background: #cce8e5;
}

.mnav-user__cta-arrow {
  margin-left: auto;
  font-size: 1.15rem;
  opacity: 0.7;
}

/* —— Sections —— */
.mnav-section {
  margin-bottom: 1.15rem;
}

.mnav-section--compact {
  margin-bottom: 0.5rem;
}

.mnav-section__label {
  margin: 0 0 0.5rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pk-muted, #6b7280);
}

.mnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* —— Nav links —— */
.mnav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--pk-text, #1f2937);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.mnav-link:active {
  background: rgba(0, 109, 119, 0.08);
}

.mnav-link.is-active {
  background: #fff;
  color: var(--pk-primary-dark, #005a62);
  box-shadow: 0 2px 12px rgba(0, 109, 119, 0.12);
}

.mnav-link.is-active .mnav-link__icon {
  background: var(--pk-primary, #006d77);
  color: #fff;
}

.mnav-link--danger {
  color: #b91c1c;
}

.mnav-link--danger .mnav-link__icon {
  background: #fef2f2;
  color: #dc2626;
}

.mnav-link__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: #fff;
  color: var(--pk-primary, #006d77);
  font-size: 1.125rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, color 0.15s ease;
}

.mnav-link__icon--admin {
  background: #fef3c7;
  color: #b45309;
}

.mnav-link__text {
  flex: 1;
  min-width: 0;
}

.mnav-link__chevron {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--pk-muted, #9ca3af);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.mnav-link.is-active .mnav-link__chevron,
.mnav-link:active .mnav-link__chevron {
  opacity: 1;
  transform: translateX(0);
}

.mnav-logout-form {
  margin: 0;
}

/* —— Register cards (guest) —— */
.mnav-register {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mnav-register-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid var(--pk-border, #e5e7eb);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mnav-register-card:active {
  border-color: var(--pk-primary, #006d77);
  box-shadow: 0 4px 16px rgba(0, 109, 119, 0.12);
}

.mnav-register-card__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: var(--pk-primary-soft, #e0f2f1);
  color: var(--pk-primary, #006d77);
  font-size: 1.2rem;
}

.mnav-register-card__body {
  flex: 1;
  min-width: 0;
}

.mnav-register-card__body strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pk-text, #1f2937);
}

.mnav-register-card__body small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--pk-muted, #6b7280);
}

.mnav-register-card__arrow {
  flex-shrink: 0;
  color: var(--pk-muted, #9ca3af);
  font-size: 1.15rem;
}

.mnav-auth-row {
  margin-top: 0.75rem;
}

.mnav-auth-row__login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px dashed var(--pk-border, #d1d5db);
  background: #fff;
  color: var(--pk-text, #374151);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.mnav-auth-row__login:active {
  background: #f3f4f6;
}

/* —— Footer —— */
.mnav-footer {
  flex-shrink: 0;
  padding: 0.85rem 1rem max(1rem, env(safe-area-inset-bottom, 0));
  background: #fff;
  border-top: 1px solid var(--pk-border, #e5e7eb);
}

.mnav-footer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #006d77 0%, #005a62 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 109, 119, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mnav-footer__cta:active {
  transform: scale(0.98);
  box-shadow: 0 4px 16px rgba(0, 109, 119, 0.3);
}

.mnav-footer__cta i {
  font-size: 1.25rem;
}

.mnav-footer__note {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--pk-muted, #9ca3af);
}

body.mobile-nav-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav__panel,
  .mobile-nav__backdrop {
    transition: none;
  }
}
