/* assets/css/profile.css */

/* ========== KARTU PROFIL ========== */
.profile-card{
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.20);
  max-width: 720px;
  margin: 14px auto;
}

.profile-head{
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-head .avatar{
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #222;
  object-fit: cover;
  border: 1px solid var(--border);
}

.profile-head .title-wrap{ flex: 1; min-width: 0; }
.profile-head .title{ font-size: 18px; font-weight: 700; line-height: 1.2; }
.profile-head .sub{ font-size: 13px; color: var(--muted); }

.profile-head .mode-badge{
  font-size: 12px;
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--card);
  color: var(--text);
}

/* Grid info */
.profile-card .grid{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-card .pill{
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: var(--card);
}

.profile-card .pill.good{
  color: #16a34a;
  border-color: rgba(22,163,74,.35);
}

/* Actions */
.profile-card .actions{
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-card .btn{
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.profile-card .btn:hover{ filter: brightness(1.05); }
.profile-card .btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hint kecil */
.profile-card .hint{
  font-size: 12px;
  color: var(--muted);
}

/* ========== SKELETON SHIMMER ========== */
.sk{ position: relative; overflow: hidden; background: rgba(255,255,255,.06); }
html[data-theme="light"] .sk{ background: rgba(0,0,0,.06); }

.sk::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  animation: shimmer 1.2s infinite;
}
.line{ height: 12px; border-radius: 6px; }

.w150{ width: 150px; }
.w160{ width: 160px; }
.w120{ width: 120px; }
.w90{  width: 90px; }
.w60{  width: 60px; }

@keyframes shimmer{
  0%{ transform: translateX(-100%); }
  100%{ transform: translateX(100%); }
}

/* ========== PROMO LANGGANAN BEBAS IKLAN ========== */
.promo-card{
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  max-width: 720px;
  margin: 16px auto;
}

.promo-head{ margin-bottom: 12px; }
.promo-title{ font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.promo-sub{ font-size: 14px; color: var(--muted); }

.promo-benefits{
  margin: 10px 0 0;
  padding-left: 16px; /* biar emoji/bullet rapi */
}
.promo-benefits li{
  margin: 6px 0;
  line-height: 1.35;
}

/* Grid paket */
.plan-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}

.plan-card{
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.plan-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  border-color: rgba(255,255,255,.18);
}

.plan-card.highlight{
  border-color: rgba(34,197,94,.35); /* hijau */
  box-shadow: 0 8px 22px rgba(34,197,94,.15);
}

.plan-card .badge{
  position: absolute;
  top: 10px; left: 10px;
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.plan-card .badge.best{
  background: rgba(34,197,94,.15);
  border-color: rgba(34,197,94,.35);
  color: #34d399;
}

.plan-name{
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

.price{
  margin: 6px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price b{
  font-size: 20px;
  font-weight: 800;
}
.price span{
  font-size: 12px;
  color: var(--muted);
}

/* Tombol solid untuk promo */
.promo-card .btn{
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  font-weight: 700;
  text-align: center;
}

.promo-card .btn.solid{
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
}
.promo-card .btn.solid:hover{ filter: brightness(1.05); }
.promo-card .btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.promo-card .btn:disabled{ opacity: .6; cursor: not-allowed; }

.promo-note{
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ========== RESPONSIF ========== */
@media (max-width: 520px){
  .profile-card{ margin: 10px 12px; padding: 14px; }
  .profile-head .avatar{ width: 56px; height: 56px; }

  .promo-card{ margin: 12px 12px 16px; padding: 14px; }
  .plan-grid{ grid-template-columns: 1fr; }
}

/* ========== TEMA TERANG ========== */
html[data-theme="light"] .profile-card,
html[data-theme="light"] .promo-card{
  background: #ffffff;
  color: #0f172a;
  --muted: #6b7280;
  --border: rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

html[data-theme="light"] .profile-card .btn:hover{ background: rgba(0,0,0,.04); }
html[data-theme="light"] .promo-card .btn.solid{
  color: var(--on-accent);
  border-color: transparent;
}

/* ========== PREFERENSI MOTION ========== */
@media (prefers-reduced-motion: reduce){
  .promo-card,
  .plan-card,
  .profile-card .btn{
    transition: none !important;
  }
}
