/* ============================================
   Halaman Tambah Anggota — modern & responsif
   ============================================ */

.page-tambah-anggota {
  padding-bottom: 2rem;
}

.tambah-page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--card-header-gradient);
  color: var(--header-text);
  box-shadow: var(--shadow-md);
}

.tambah-page-hero > :not(.header-ornament) {
  position: relative;
  z-index: 1;
}

.tambah-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.2);
}

.tambah-hero-title {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.tambah-hero-sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--header-text-muted);
}

.tambah-icon-anim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.45rem;
  flex-shrink: 0;
  animation: tambah-icon-float 3s ease-in-out infinite;
}

@keyframes tambah-icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.tambah-form-wrap {
  max-width: 960px;
  margin: 0 auto;
}

.tambah-form-alert {
  max-width: 960px;
  margin: 0 auto 1rem;
}

.tambah-form-card {
  background: color-mix(in srgb, var(--surface) 25%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.tambah-form-card:hover {
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 25%, transparent);
}

.tambah-form-card-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
  background: color-mix(in srgb, var(--primary-light) 35%, transparent);
}

.tambah-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-size: 1.05rem;
  flex-shrink: 0;
  animation: tambah-icon-float 3.4s ease-in-out infinite;
}

.tambah-section-icon-delay {
  animation-delay: -0.6s;
}

.tambah-section-icon-delay2 {
  animation-delay: -1.2s;
}

.tambah-form-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.tambah-form-card-body {
  padding: 1.15rem 1.15rem 1.25rem;
}

.tambah-form-card .form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.tambah-form-card .form-control,
.tambah-form-card .form-select {
  border-radius: var(--radius);
  border-color: color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  font-size: 0.92rem;
}

.tambah-form-card .form-control:focus,
.tambah-form-card .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}

.tambah-form-card .form-control-lg,
.tambah-form-card .form-select-lg {
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
}

.tambah-map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  box-shadow: var(--shadow-sm);
}

.tambah-map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 220px;
  border: 0;
}

.tambah-form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.tambah-foto-preview {
  display: block;
  margin-top: 0.55rem;
  max-width: 100%;
  width: auto;
  max-height: 140px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: color-mix(in srgb, var(--bg) 40%, transparent);
}

.tambah-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem 1rem 0.5rem;
}

.tambah-form-actions .btn {
  min-width: 8.5rem;
  font-weight: 700;
}

.tambah-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.tambah-back-link:hover {
  color: var(--primary-dark, var(--primary));
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .tambah-page-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .tambah-hero-title {
    font-size: 1.15rem;
  }

  .tambah-form-card-head {
    padding: 0.75rem 1rem;
  }

  .tambah-form-card-body {
    padding: 1rem;
  }

  .tambah-form-actions {
    flex-direction: column;
  }

  .tambah-form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .tambah-form-card .row > [class*="col-"] {
    margin-bottom: 0.15rem;
  }
}

/* ============================================
   Halaman Profil Anggota — tampilan read-only
   ============================================ */

.page-profile-anggota .profile-identity-card {
  margin-bottom: 1.15rem;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.profile-identity-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-identity-photo {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 1.15rem;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: var(--shadow-md);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.profile-status-badge {
  position: absolute;
  bottom: -0.35rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.profile-status-hidup {
  background: #dcfce7;
  color: #166534;
}

.profile-status-almarhum {
  background: #e2e8f0;
  color: #475569;
}

.profile-identity-meta {
  flex: 1;
  min-width: 12rem;
}

.profile-identity-name {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
}

.profile-identity-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-identity-sub span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

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

.profile-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-detail-item-wide {
  grid-column: 1 / -1;
}

.profile-detail-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.profile-detail-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.profile-detail-empty {
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}

.profile-relasi-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.profile-relasi-link:hover {
  text-decoration: underline;
}

.profile-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #15803d;
  text-decoration: none;
  font-weight: 700;
}

.profile-wa-link:hover {
  text-decoration: underline;
}

.profile-nav-map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}

.profile-nav-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
  background: color-mix(in srgb, var(--primary-light) 28%, transparent);
}

.profile-nav-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.profile-nav-mode {
  width: auto;
  min-width: 7.5rem;
  max-width: 100%;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.profile-nav-btn {
  font-weight: 700;
  white-space: nowrap;
}

.profile-nav-map-canvas {
  width: 100%;
  height: 22rem;
  min-height: 220px;
  background: #e8eef3;
  z-index: 0;
}

.profile-nav-status {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}

.profile-nav-status.is-success {
  color: #166534;
  background: #ecfdf5;
}

.profile-nav-status.is-error {
  color: #b91c1c;
  background: #fef2f2;
}

.profile-nav-status.is-loading {
  color: #1d4ed8;
  background: #eff6ff;
}

.profile-nav-route-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  background: color-mix(in srgb, var(--primary-light) 22%, transparent);
}

.profile-nav-route-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.profile-nav-route-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.profile-nav-route-stat strong {
  font-size: 1rem;
  color: var(--text);
}

.profile-nav-empty {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px dashed color-mix(in srgb, var(--border) 70%, transparent);
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}

.profile-nav-empty i {
  font-size: 2rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.65rem;
}

.profile-nav-empty p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
}

.profile-map-marker {
  background: transparent;
  border: 0;
}

.profile-map-marker span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.28);
  border: 3px solid #fff;
}

.profile-map-marker-dest span {
  background: linear-gradient(135deg, #0d9488, #0f766e);
}

.profile-map-marker-user span {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.leaflet-control-zoom a {
  border-radius: 0.45rem !important;
}

@media (max-width: 575.98px) {
  .profile-identity {
    flex-direction: column;
    text-align: center;
  }

  .profile-identity-sub {
    justify-content: center;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-nav-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-nav-mode,
  .profile-nav-toolbar-row .btn,
  .profile-nav-toolbar-row a.btn {
    width: 100%;
  }

  .profile-nav-map-canvas {
    height: 18rem;
  }

  .profile-nav-route-info {
    grid-template-columns: 1fr;
  }
}
