/* =========================
   PROFIL PAGE (Produksi)
========================= */
:root {
  --radius-sm:   10px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   22px;
  --radius-2xl:  24px;
  --radius-pill: 50px;
  --radius-full: 9999px;

  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s;
}

.profil-page {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── HERO ── */
.profil-hero {
  height: 250px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.profil-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}
.profil-hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 20px 20px;
}
.profil-hero-shape {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

/* ── COVER EDIT ── */
.cover-edit-wrap {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}
.cover-edit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.cover-edit-btn:active {
  transform: scale(0.95);
  background: rgba(0, 0, 0, 0.55);
}
.cover-edit-btn i { font-size: 12px; }

.cover-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: dropdownIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.cover-dropdown.open { display: block; }

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cover-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}
.cover-dropdown-item:active { background: var(--bg-hover); }
.cover-dropdown-item i { font-size: 14px; color: var(--text-muted); width: 18px; text-align: center; }
.cover-dropdown-sep { height: 1px; background: var(--border-color); margin: 0 12px; }
.cover-dropdown-danger { color: var(--danger); }
.cover-dropdown-danger i { color: var(--danger); }

/* =====================
   CROP MODAL
===================== */
.crop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.crop-overlay.open { display: flex; }

.crop-modal {
  background: #1a1a1a;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  animation: cropIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes cropIn {
  from { opacity: 0; transform: scale(0.90) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.crop-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.crop-modal-title { display: block; font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.crop-modal-hint { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.38); }
.crop-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.crop-modal-close:active { background: rgba(255, 255, 255, 0.15); color: #fff; }

.crop-workspace {
  position: relative;
  width: 100%;
  height: 300px;
  background: #000;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: crosshair;
}
#cropImg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%; max-height: 100%;
  pointer-events: none;
  -webkit-user-drag: none;
  display: block;
}
.crop-box {
  position: absolute;
  border: 2px solid var(--accent-light);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.52);
  cursor: move;
  box-sizing: border-box;
  min-width: 40px; min-height: 40px;
}
.crop-grid { position: absolute; inset: 0; pointer-events: none; }
.cg-line   { position: absolute; background: rgba(255, 255, 255, 0.16); }
.cg-h1 { width: 100%; height: 1px; top: 33.33%; }
.cg-h2 { width: 100%; height: 1px; top: 66.66%; }
.cg-v1 { height: 100%; width: 1px; left: 33.33%; }
.cg-v2 { height: 100%; width: 1px; left: 66.66%; }

.crop-handle {
  position: absolute;
  width: 16px; height: 16px;
  background: var(--accent-light);
  border-radius: 4px;
  border: 2px solid #fff;
  z-index: 10;
}
.ch-tl { top: -8px;    left: -8px;   cursor: nw-resize; }
.ch-tr { top: -8px;    right: -8px;  cursor: ne-resize; }
.ch-bl { bottom: -8px; left: -8px;   cursor: sw-resize; }
.ch-br { bottom: -8px; right: -8px;  cursor: se-resize; }

.crop-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  gap: 12px;
}
.crop-size-info { font-size: 11.5px; color: rgba(255, 255, 255, 0.30); font-variant-numeric: tabular-nums; }
.crop-foot-btns { display: flex; gap: 10px; align-items: center; }
.crop-btn-cancel {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.crop-btn-cancel:active { background: rgba(255, 255, 255, 0.12); }
.crop-btn-confirm {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.crop-btn-confirm:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* ── BODY ── */
.profil-body {
  flex: 1;
  background: var(--bg-primary);
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  margin-top: -70px;
  padding: 0 16px 100px;
  position: relative;
  box-shadow: 0 -5px var(--shadow-color);
  z-index: 2;
}

/* ── AVATAR SECTION ── */
.profil-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -50px;
  padding-bottom: 20px;
}
.profil-avatar-wrap { position: relative; margin-bottom: 14px; }
.profil-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), var(--accent-light));
  border: 4px solid var(--bg-card);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700;
  box-shadow: 0 12px 32px var(--shadow-color), 0 2px 8px var(--shadow-color);
}
.profil-avatar-status {
  position: absolute; bottom: 5px; right: 5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--success);
  border: 2.5px solid var(--bg-card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ── IDENTITY ── */
.profil-identity { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profil-hero-name { font-size: 21px; font-weight: 700; color: var(--text-primary); }
.profil-hero-email { font-size: 13px; color: var(--text-secondary); }

/* ── SECTION LABEL ── */
.profil-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin: 20px 4px 8px;
}

/* ── CARD ── */
.profil-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 4px 16px;
  box-shadow: 0 2px 12px var(--shadow-color);
}
.profil-card-sep { height: 1px; background: var(--border-color); margin: 0 0 0 50px; }
.profil-card-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; }

/* ── ICON (disatukan pakai --accent, tema Produksi single-accent) ── */
.profil-card-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--bg-hover);
  color: var(--accent);
}
.profil-card-icon.brown,
.profil-card-icon.blue,
.profil-card-icon.purple,
.profil-card-icon.green,
.profil-card-icon.gray {
  background: var(--bg-hover);
  color: var(--accent);
}
.profil-card-icon.orange {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ── AVATAR EDIT BTN ── */
.profil-avatar-edit-btn {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.profil-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ── EDIT PROFIL BOTTOM SHEET ── */
.edit-profil-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.edit-profil-overlay.active { opacity: 1; pointer-events: auto; }
.edit-profil-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  border-radius: 24px 24px 0 0;
  padding: 10px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.32,1,.4,1);
  max-height: 85vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.edit-profil-overlay.active .edit-profil-sheet { transform: translateY(0); }
.edit-profil-handle {
  width: 36px; height: 4px;
  border-radius: 999px;
  background: var(--border-color);
  margin: 0 auto 16px;
}
.edit-profil-title {
  font-size: 16px; font-weight: 800;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 20px;
}
.edit-profil-foto-section {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin-bottom: 20px;
}
.edit-profil-foto-wrap { width: 80px; height: 80px; }
.edit-profil-foto {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 2px solid var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.edit-profil-foto-img { width: 100%; height: 100%; object-fit: cover; }
.edit-profil-foto-initial { font-size: 28px; font-weight: 800; color: var(--accent); }
.edit-profil-foto-actions { display: flex; gap: 8px; }
.edit-profil-foto-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  background: none;
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.edit-profil-foto-btn.danger { border-color: var(--danger); color: var(--danger); }

.edit-profil-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.edit-profil-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.edit-profil-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.edit-profil-textarea:focus { border-color: var(--accent); }
.edit-profil-simpan {
  width: 100%; height: 46px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

/* ── CARD INFO ── */
.profil-card-info { flex: 1; min-width: 0; }
.profil-card-label {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
  font-weight: 500;
}
.profil-card-value {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── MENU ── */
.profil-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.profil-menu-item:active { opacity: 0.55; }
.profil-menu-left {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
}
.profil-menu-arrow { font-size: 11px; color: var(--text-muted); }

/* ── LOGOUT ── */
.profil-logout-btn {
  width: 100%; height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  margin-top: 20px;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.profil-logout-btn:active { transform: scale(0.97); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

.logout-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  opacity: 0; visibility: hidden;
  transition: var(--transition-normal);
}
.logout-modal-overlay.open { opacity: 1; visibility: visible; }
.logout-modal {
  width: 90%; max-width: 340px;
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: 24px;
  text-align: center;
  transform: translateY(12px);
  transition: var(--transition-normal);
}
.logout-modal-overlay.open .logout-modal { transform: translateY(0); }
.logout-modal-icon {
  width: 64px; height: 64px;
  margin: auto;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.logout-modal-title { margin-top: 16px; font-size: 18px; font-weight: 700; color: var(--text-heading); }
.logout-modal-text { margin-top: 8px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.logout-modal-actions { margin-top: 20px; display: flex; gap: 10px; }
.logout-btn-cancel,
.logout-btn-confirm {
  flex: 1; height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.logout-btn-cancel { background: var(--bg-hover); color: var(--text-primary); }
.logout-btn-confirm { background: var(--danger); color: #fff; }

/* ── VERSION ── */
.profil-version {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  padding-bottom: 20px;
}