/* ========================================== */
/* ACCOUNT DOCTOR (HOME) STYLES               */
/* ========================================== */

/* Container */
.doctor-report-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 2. Overview Card */
.doctor-overview-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}
.doc-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.doc-th-container {
  position: relative;
  width: 80px;
  flex-shrink: 0;
}
.doc-th-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}
.doc-player-identity {
  flex-grow: 1;
}
.doc-clan-name {
  color: var(--text-muted);
  font-size: 0.9em;
  margin: 2px 0;
}
.doc-player-tag {
  color: var(--text-secondary);
  font-size: 0.8em;
  opacity: 0.7;
}

/* Village Progress Circular Ring — Fix #8: Larger ring */
.doc-big-stat-container {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  position: relative;
}
.village-progress-ring {
  width: 100%;
  height: 100%;
  position: relative;
}
.doc-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.doc-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}
.doc-ring-fill {
  fill: none;
  stroke: var(--gold-primary);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-out;
}
.doc-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.doc-ring-val {
  font-family: 'Clash-Regular', sans-serif;
  font-size: 1.3em;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  line-height: 1;
}
.doc-ring-label {
  font-size: 0.55em;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  line-height: 1.1;
}

/* 4 Key Stats Grid */
.account-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.doc-stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc-stat-label {
  color: var(--text-muted);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.doc-stat-val {
  font-family: 'Clash-Regular', sans-serif;
  color: white;
  font-size: 1.1em;
}
.spike-text {
  color: #4CAF50;
  font-size: 0.8em;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

/* 3. Account Health Panel */
.doc-health-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}
.health-bars-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.health-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.h-label {
  width: 70px;
  font-size: 0.9em;
  color: var(--text-secondary);
}
.h-track {
  flex-grow: 1;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}
.h-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), #FFD700);
  border-radius: 4px;
  transition: width 1s ease-out;
}
.h-pct {
  width: 35px;
  text-align: right;
  font-family: monospace;
  font-size: 0.9em;
  color: white;
}
.disabled-row {
  opacity: 0.5;
}
.disabled-row .h-fill {
  background: rgba(255, 255, 255, 0.1);
}

/* 4. Rush Analysis Card — Fix #3: Add gauge bar */
.doc-rush-card {
  padding: 24px;
  border-left: 4px solid var(--gold-primary);
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
}
.rush-risk-header {
  margin: 12px 0 8px 0;
}
.rush-risk-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.4);
  font-family: 'Clash-Regular', sans-serif;
  border: 1px solid var(--gold-primary);
}
.rush-gauge-track {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  margin: 12px 0 8px 0;
  overflow: hidden;
}
.rush-gauge-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease-out;
}
.rush-risk-desc {
  color: var(--text-secondary);
  font-size: 0.95em;
  line-height: 1.4;
}

/* 5. Upgrade Priority Cards (v2) — Fix #1: Equal sizing */
.priority-card-v2 {
  position: relative;
  flex: 1 1 0;
  min-width: 140px;
  max-width: 200px;
}
/* Fix #12: Badge position + parent overflow */
#priority-grid-v2 {
  overflow: visible;
  padding-top: 10px;
}
.power-impact-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  background: #4CAF50;
  color: white;
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: 'Clash-Regular', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  z-index: 2;
}

/* 6. Time To Max */
.time-to-max-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.time-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.time-box.gold-pass {
  border-color: rgba(255, 215, 0, 0.3);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.05) 0%, rgba(0,0,0,0.2) 100%);
}
.time-box.gems {
  border-color: rgba(76, 175, 80, 0.3);
}
.time-label {
  font-size: 0.8em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.time-val {
  font-family: 'Clash-Regular', sans-serif;
  font-size: 1.25em;
  color: white;
}

/* 7. Remaining Upgrades */
.remaining-flex {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}
.remaining-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.95em;
}
.rem-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}
.rem-row.total {
  font-family: 'Clash-Regular', sans-serif;
  color: white;
  font-size: 1.1em;
}
.action-full-btn {
  width: 100%;
  font-size: 1.1em;
  padding: 14px;
}

/* 8. Quick Actions */
.quick-action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.quick-action-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}
.qa-icon {
  font-size: 1.8em;
}
.qa-label {
  font-size: 0.85em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Mobile Adjustments — Fix #6, #7, #10 */
@media (max-width: 600px) {
  /* Fix #6: Keep 2-col stats on mobile */
  .account-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Fix #10: Keep 3-col time grid on mobile with smaller sizing */
  .time-to-max-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .time-box {
    padding: 10px 8px;
  }
  .time-val {
    font-size: 1em;
  }
  .doc-profile-header {
    flex-direction: column;
    text-align: center;
  }
  /* Fix #7: Keep 3-col quick actions on mobile */
  .quick-action-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .quick-action-btn {
    padding: 12px 4px;
  }
  .qa-icon {
    font-size: 1.4em;
  }
  .qa-label {
    font-size: 0.75em;
  }
}
