* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center; 
  align-items: center;     
  background: #e0e5ec;
  padding: 30px 15px;           
  position: relative;
  overflow-x: hidden;
}

/* BACKGROUND AMBIENT GLOWS */
.bg-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
  animation: float 12s infinite alternate ease-in-out;
}
.bg-glow.top-left { background: #5a2eff; top: -50px; left: -50px; }
.bg-glow.bottom-right { background: #ff7a3d; bottom: -50px; right: -50px; }

@keyframes float {
  to { transform: translateY(-30px) scale(1.05); }
}

/* PROFILE CONTAINER CARD */
.profile-card {
  position: relative;
  z-index: 1;
  width: 100%; 
  max-width: 460px;
  padding: 35px 25px;
  border-radius: 32px;
  background: #e0e5ec;
  box-shadow: 20px 20px 40px #b8bec7, -20px -20px 40px #ffffff;
  text-align: center;
}

/* AVATAR BADGE & PHOTO ACTIONS */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  cursor: pointer;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50% !important;
  background: #e0e5ec;
  box-shadow: 8px 8px 16px #b8bec7, -8px -8px 16px #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #5a2eff;
  overflow: hidden !important;
  text-transform: uppercase;
  position: relative;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block;
}

.avatar-edit-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  background: #5a2eff;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(90, 46, 255, 0.4);
  border: 2px solid #e0e5ec;
  transition: transform 0.2s;
}

/* PROFILE PROGRESS BADGE UNDER PHOTO */
.profile-progress-badge {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a202c;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 2px solid #e0e5ec;
  z-index: 5;
  transition: all 0.3s ease;
  min-width: 48px;
  text-align: center;
}

.profile-progress-badge.completed {
  background: linear-gradient(135deg, #ffb703, #fb8500);
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 0 15px rgba(251, 133, 0, 0.6);
}

.avatar-wrapper:hover .avatar-edit-badge {
  transform: scale(1.1);
}

#avatarFileInputCamera, #avatarFileInputGallery { display: none; }

h1 { font-size: 22px; color: #2d3748; margin-bottom: 6px; font-weight: 700; word-break: break-all; }

p.role-badge { 
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 12px; 
  color: #5a2eff; 
  background: #e0e5ec;
  box-shadow: inset 3px 3px 6px #b8bec7, inset -3px -3px 6px #ffffff;
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.5px;
  margin-bottom: 20px; 
}

/* FORM SECTIONS */
.section-title {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #718096;
  text-transform: uppercase;
  margin: 18px 0 10px;
  letter-spacing: 0.8px;
  border-bottom: 1px dashed #cbd5e0;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title.danger-title {
  color: #e53e3e;
  border-bottom-color: rgba(229, 62, 62, 0.3);
}

.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4a5568;
  font-weight: 600;
  margin-bottom: 6px;
  margin-left: 4px;
}

.input-box {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 14px;
  background: #e0e5ec;
  box-shadow: inset 5px 5px 10px #b8bec7, inset -5px -5px 10px #ffffff;
  outline: none;
  font-size: 14px;
  color: #2d3748;
  transition: all 0.2s ease;
}

.input-box:focus {
  box-shadow: inset 7px 7px 12px #b8bec7, inset -7px -7px 12px #ffffff;
  color: #5a2eff;
}

select.input-box { cursor: pointer; }

/* PHONE DUAL INPUT */
.phone-wrapper { display: flex; gap: 8px; }
.phone-wrapper select { width: 38%; }
.phone-wrapper input { width: 62%; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* BUTTONS */
.btn-group {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

button.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #e0e5ec;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button.btn-save { color: #20c997; }
button.btn-admin { 
  color: #5a2eff; 
  background: #e0e5ec;
  border: 1px solid rgba(90, 46, 255, 0.2);
  box-shadow: 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff, 0 0 12px rgba(90, 46, 255, 0.2);
}

button.btn-explore { 
  background: linear-gradient(135deg, #00c6ff, #0072ff) !important;
  color: #ffffff !important;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(0, 198, 255, 0.45), 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff;
  animation: exploreShake 2.5s infinite ease-in-out, pulseGlow 2s infinite alternate ease-in-out;
  position: relative;
  overflow: hidden;
}

button.btn-explore:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 198, 255, 0.65), 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff;
}

@keyframes exploreShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  10%, 30%, 50% { transform: rotate(-3deg) scale(1.02); }
  20%, 40% { transform: rotate(3deg) scale(1.02); }
  60% { transform: rotate(0deg) scale(1); }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 4px 15px rgba(0, 198, 255, 0.35), 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff; }
  100% { box-shadow: 0 8px 28px rgba(0, 198, 255, 0.75), 0 0 12px rgba(0, 114, 255, 0.6), 6px 6px 14px #b8bec7, -6px -6px 14px #ffffff; }
}

button.btn-logout { color: #4a5568; }

button.btn-danger {
  color: #e53e3e;
  border: 1px solid rgba(229, 62, 62, 0.25);
}

button.btn:active {
  box-shadow: inset 4px 4px 8px #b8bec7, inset -4px -4px 8px #ffffff;
  transform: scale(0.98);
}

.status-msg {
  font-size: 13px;
  margin-top: 10px;
  font-weight: 600;
  display: none;
}
.status-msg.success { color: #20c997; display: block; }
.status-msg.error { color: #e53e3e; display: block; }

.info-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: #e0e5ec;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a2eff;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 4px 4px 8px #b8bec7, -4px -4px 8px #ffffff;
  transition: all 0.2s ease;
  z-index: 10;
}

/* BOTTOM SHEET MODAL STYLES */
.sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sheet-card {
  width: 100%;
  background: #2a2e37;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 16px 20px 30px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: 0 -5px 25px rgba(0,0,0,0.3);
}

.sheet-overlay.active .sheet-card {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: left;
}

.sheet-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-btn {
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 8px;
  width: 100%;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s;
}

.sheet-btn:hover { background: rgba(255,255,255,0.05); }
.sheet-btn.text-danger { color: #fc8181; }

/* AVATAR GRID STYLES */
.avatar-grid {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
}

.avatar-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 65px;
  text-align: center;
}

.avatar-option-item {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
  overflow: hidden;
  background: #1a1d24;
}

.avatar-option-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-card-item:hover .avatar-option-item {
  transform: scale(1.1);
  border-color: #5a2eff;
}

.avatar-label {
  color: #a0aec0;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.2;
  word-break: break-word;
}
.avatar-card-item:hover .avatar-label {
  color: #fff;
}

/* CROPPER & CONFIRMATION MODAL POPUP */
.crop-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 15px;
}

.crop-modal-card {
  width: 100%;
  max-width: 400px;
  background: #e0e5ec;
  padding: 24px 20px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}

.cropper-img-container {
  width: 100%;
  max-height: 280px;
  margin: 15px 0;
  overflow: hidden;
  border-radius: 16px;
  background: #cbd5e0;
}

.cropper-img-container img { max-width: 100%; }
.cropper-view-box, .cropper-face { border-radius: 50% !important; }
