/* Hesap planı — premium panel ve uyarılar */

body.plan-premium .dashboard-body {
  --dash-accent: #d4a853;
  --dash-accent-soft: rgba(212, 168, 83, 0.18);
}

.dash--premium .dash-wrap {
  position: relative;
}

.dash--premium .dash-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #8b6914, #e8c56a, #8b6914);
  border-radius: 4px 4px 0 0;
  pointer-events: none;
  z-index: 2;
}

.dash--premium .dash-hero h1 {
  background: linear-gradient(120deg, #f5e6b8, #d4a853, #f0d78c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash--premium .metric-card {
  border-color: rgba(212, 168, 83, 0.35);
  box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.08);
}

.dash--premium .panel--tobacco-ai {
  border-color: rgba(212, 168, 83, 0.4);
}

.plan-expiry-banner {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(255, 120, 60, 0.12));
  border: 1px solid rgba(212, 168, 83, 0.45);
}

.plan-expiry-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.plan-expiry-banner__inner p {
  flex: 1 1 220px;
  margin: 0;
  color: #f5e6c8;
  line-height: 1.5;
  font-size: 0.92rem;
}

.ai-quota-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding: 0.4rem 0.75rem 0.5rem;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.35;
  background: rgba(78, 207, 143, 0.12);
  color: #b8e6d0;
  border: 1px solid rgba(78, 207, 143, 0.35);
  min-width: 200px;
  position: relative;
  z-index: 2;
}

.ai-quota-badge__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  line-height: 1.3;
}

.ai-quota-badge__sep {
  opacity: 0.55;
}

.ai-quota-badge__nums {
  font-weight: 700;
}

.ai-quota-badge__remain {
  opacity: 0.9;
}

.ai-quota-badge__bar {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.ai-quota-badge__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ecf8f, #2d9b63);
  transition: width 0.35s ease;
}

.ai-quota-badge--premium {
  background: rgba(212, 168, 83, 0.18);
  color: #f5e6b8;
  border-color: rgba(212, 168, 83, 0.5);
}

.ai-quota-badge--premium .ai-quota-badge__fill {
  background: linear-gradient(90deg, #e8c468, #c9a227);
}

.ai-quota-badge--promo {
  background: rgba(78, 207, 143, 0.14);
  color: #b8f0d4;
  border-color: rgba(78, 207, 143, 0.45);
}

.ai-quota-badge--promo .ai-quota-badge__fill {
  background: linear-gradient(90deg, #4ecf8f, #2d9b63);
}

.diag-history-modal__box {
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
}

.diag-history-mount {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  margin-top: 0.75rem;
  padding-right: 0.25rem;
}

.diag-history-modal__head {
  margin-bottom: 0.5rem;
  padding-right: 2.75rem;
}

.diag-history-back {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0;
  font-size: 0.85rem;
  color: #9ae6b4;
}

.diag-history-sync-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.diag-history-back.hidden {
  display: none;
}

.prof-diag-link-row {
  margin: 0.5rem 0;
}

.prof-diag-link-row .btn {
  width: 100%;
}

.prof-diag-hist--cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.prof-diag-hist__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(78, 207, 143, 0.28);
  background: rgba(8, 24, 18, 0.65);
}

.prof-diag-hist__card-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.prof-diag-hist__conf {
  color: #9ae6b4;
  font-weight: 600;
}

.btn-diag-detail {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

.diag-hist-detail {
  padding: 0.25rem 0;
}

.diag-hist-detail__meta {
  color: #8fb3a8;
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.diag-hist-detail__fields {
  margin: 0;
}

.diag-hist-detail__fields dt {
  color: #9ae6b4;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.65rem;
}

.diag-hist-detail__fields dd {
  margin: 0.25rem 0 0;
  color: #e8f4ef;
  line-height: 1.5;
}

.diag-hist-detail__meds {
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fef3c7;
}

.diag-hist-detail__note {
  margin-top: 0.75rem;
  color: #8fb3a8;
  font-size: 0.88rem;
}

.ai-quota-badge[role="button"] {
  cursor: pointer;
}

.ai-quota-badge[role="button"]:hover {
  filter: brightness(1.08);
}

.ai-quota-badge--full {
  background: rgba(255, 90, 90, 0.15);
  color: #ffc9c9;
  border-color: rgba(255, 90, 90, 0.4);
}

.prof-plan-box {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(78, 207, 143, 0.25);
  margin-bottom: 0.75rem;
}

.prof-plan-box--premium {
  border-color: rgba(212, 168, 83, 0.45);
  background: linear-gradient(145deg, rgba(212, 168, 83, 0.08), rgba(0, 0, 0, 0.25));
}

.prof-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .prof-plan-box {
    text-align: center;
    padding: 0.75rem 0.7rem;
    border-radius: 10px;
  }

  .prof-plan-box .hint,
  .prof-plan-box .sub {
    font-size: 0.78rem;
    line-height: 1.42;
    margin-top: 0.35rem !important;
  }

  .prof-plan-box strong {
    font-size: 0.92rem;
  }

  .prof-plan-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-top: 0.55rem;
  }

  .prof-plan-actions .btn {
    width: 100%;
    min-height: 2.35rem;
    font-size: 0.82rem;
    padding: 0.42rem 0.55rem;
    justify-content: center;
    text-align: center;
  }

  .prof-plan-actions .btn:last-child {
    grid-column: 1 / -1;
  }

  .ai-quota-badge {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    font-size: 0.74rem;
    padding: 0.32rem 0.55rem 0.38rem;
    margin-top: 0.3rem;
    align-self: flex-start;
  }

  .ai-quota-badge__row {
    justify-content: center;
    gap: 0.2rem 0.28rem;
  }

  .plan-expiry-banner {
    margin-bottom: 0.65rem;
    padding: 0.7rem 0.75rem;
  }

  .plan-expiry-banner__inner p {
    font-size: 0.82rem;
    line-height: 1.4;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .prof-plan-box {
    padding: 0.85rem 0.95rem;
  }

  .prof-plan-actions {
    gap: 0.45rem;
  }

  .prof-plan-actions .btn {
    min-width: 8.5rem;
    min-height: 2.3rem;
    font-size: 0.84rem;
    justify-content: center;
    text-align: center;
  }

  .ai-quota-badge {
    font-size: 0.76rem;
    min-width: 0;
  }
}

.upgrade-plan-features {
  text-align: left;
  margin: 1rem 0;
  padding-left: 1.25rem;
  color: #c8e6dc;
  line-height: 1.6;
}

.upgrade-plan-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
