/* ==============================================================================
   KORVENIUM — HESABIM PANELİ (account.css)
   Yalnız /hesabim ve /account sayfalarında yüklenir; style.css'in değişkenlerini kullanır.
   ============================================================================== */

.account-page {
  padding: 56px 0 80px;
}

.account-page h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.acc-intro {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

.acc-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.acc-dynamic {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.acc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.acc-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.acc-lead {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.acc-muted {
  color: var(--text-muted);
  font-size: 14px;
}

.acc-small {
  font-size: 12.5px;
  margin-top: 10px;
}

.acc-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
}

.acc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.acc-actions .btn-primary-action,
.acc-actions .btn-quiet-action,
.acc-actions .btn-login {
  white-space: nowrap;
  font-size: 14px;
}

.acc-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Profil bilgileri */
.acc-facts {
  display: grid;
  gap: 12px;
}

.acc-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.acc-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.acc-facts dt {
  color: var(--text-muted);
}

/* Abonelikler */
.acc-subs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acc-sub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-page);
}

.acc-sub-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.acc-sub-main strong {
  font-size: 15px;
}

.acc-sub-note {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--text-muted);
}

.acc-empty {
  padding: 16px;
  border: 1px dashed var(--border-focus);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.acc-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.acc-badge--ok { background: #E2EEDF; color: #2D5A27; }
.acc-badge--warn { background: #F6EBD3; color: #7A5410; }
.acc-badge--bad { background: #F8E3DC; color: #A3261B; }
.acc-badge--off { background: var(--bg-subtle); color: var(--text-muted); }

.acc-status:empty {
  display: none;
}

.acc-status {
  margin-bottom: 4px;
}

.acc-notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #E2EEDF;
  color: #2D5A27;
  font-size: 14px;
}

.acc-error {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #F8E3DC;
  color: #A3261B;
  font-size: 13px;
}

.acc-signed-out .acc-actions {
  margin-top: 4px;
}

.acc-help {
  margin-top: 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.acc-help a {
  color: var(--accent);
}

@media (max-width: 820px) {
  .acc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .account-page {
    padding: 36px 0 56px;
  }

  .acc-card {
    padding: 20px 18px;
  }

  .acc-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Giriş/çıkışta kartlar sırayla belirir (account.js .acc-enter ekler) */
.acc-enter > .acc-card {
  animation: acc-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.acc-enter > .acc-card:nth-child(2) {
  animation-delay: 80ms;
}

@keyframes acc-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .acc-enter > .acc-card {
    animation: none;
  }
}

/* İskelet: oturum ve abonelikler gelene kadar kartın yerini tutar */
.acc-skel-title,
.acc-skel > span {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-subtle) 0%, var(--bg-hover) 50%, var(--bg-subtle) 100%);
  background-size: 200% 100%;
  animation: acc-shimmer 1.4s ease-in-out infinite;
}

.acc-skel-title {
  width: 38%;
  height: 20px;
  margin-bottom: 18px;
}

.acc-skel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acc-skel > span {
  height: 14px;
}

.acc-skel > span:nth-child(2) { width: 82%; }
.acc-skel > span:nth-child(3) { width: 64%; }

@keyframes acc-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* Tahmin doğru çıktığında gerçek kartlar iskeletin yerine sessizce oturur */
.acc-settle > .acc-card,
.acc-subs,
.acc-empty {
  animation: acc-fade 0.3s ease-out both;
}

@keyframes acc-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .acc-skel-title,
  .acc-skel > span,
  .acc-settle > .acc-card,
  .acc-subs,
  .acc-empty {
    animation: none;
  }
}
