/**
 * ATS Match — Premium Report UI
 * Cyber gauge · Glass cards · SaaS analytics aesthetic
 */

/* ── Brand logo (transparent, no white box) ── */
.logo-mark {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.logo-img,
.report-logo,
.brand-logo {
  background: transparent !important;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.55))
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.report-logo-wrap {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ── Print root wrapper ── */
.report-print-root {
  width: 100%;
}

.report-page-footer {
  display: none;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding-top: 20px;
}

/* ═══════════════════════════════════════════════════
   CYBER GAUGE — Futuristic score ring
═══════════════════════════════════════════════════ */
.cyber-gauge {
  --gauge-size: 240px;
  --gauge-c1: #8b5cf6;
  --gauge-c2: #d946ef;
  --gauge-glow: rgba(139, 92, 246, 0.55);
  position: relative;
  width: var(--gauge-size);
  height: var(--gauge-size);
  margin: 0 auto 16px;
}

/* 0–50 */
.cyber-gauge--critical {
  --gauge-c1: #ef4444;
  --gauge-c2: #b91c1c;
  --gauge-glow: rgba(239, 68, 68, 0.55);
}

/* 50–60 */
.cyber-gauge--acceptable {
  --gauge-c1: #f97316;
  --gauge-c2: #ea580c;
  --gauge-glow: rgba(249, 115, 22, 0.5);
}

/* 60–79 */
.cyber-gauge--below-good {
  --gauge-c1: #8b5cf6;
  --gauge-c2: #22d3ee;
  --gauge-glow: rgba(139, 92, 246, 0.45);
}

/* 80–85 */
.cyber-gauge--good {
  --gauge-c1: #8b5cf6;
  --gauge-c2: #a855f7;
  --gauge-glow: rgba(139, 92, 246, 0.55);
}

/* 85–90 */
.cyber-gauge--very-good {
  --gauge-c1: #a855f7;
  --gauge-c2: #22d3ee;
  --gauge-glow: rgba(34, 211, 238, 0.45);
}

/* 90–100 */
.cyber-gauge--excellent {
  --gauge-c1: #22d3ee;
  --gauge-c2: #10b981;
  --gauge-glow: rgba(16, 185, 129, 0.5);
}

.cyber-gauge__halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gauge-glow) 0%, transparent 68%);
  animation: gauge-halo-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gauge-halo-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

.cyber-gauge__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cyber-gauge__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--gauge-c2);
  box-shadow: 0 0 8px var(--gauge-c2);
  transform: rotate(calc(var(--i) * 45deg)) translateY(-108px);
  animation: gauge-orbit 8s linear infinite;
  animation-delay: calc(var(--i) * -1s);
  opacity: 0.7;
}

@keyframes gauge-orbit {
  from { transform: rotate(calc(var(--i) * 45deg)) translateY(-108px); opacity: 0.3; }
  50% { opacity: 1; }
  to { transform: rotate(calc(var(--i) * 45deg + 360deg)) translateY(-108px); opacity: 0.3; }
}

.cyber-gauge__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 12px var(--gauge-glow));
}

.cyber-gauge__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}

.cyber-gauge__ring {
  fill: none;
  stroke: url(#gaugeGradDynamic);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: gauge-ring-glow 2.5s ease-in-out infinite;
}

@keyframes gauge-ring-glow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--gauge-glow)); }
  50% { filter: drop-shadow(0 0 16px var(--gauge-glow)); }
}

.cyber-gauge__ring-bg {
  fill: none;
  stroke: rgba(139, 92, 246, 0.12);
  stroke-width: 14;
}

.cyber-gauge__core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
  border-radius: 50%;
  margin: 18%;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 30px rgba(139, 92, 246, 0.15),
    0 0 40px rgba(0, 0, 0, 0.3);
}

.cyber-gauge__value {
  font-size: 3.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
  background: linear-gradient(180deg, #fff 0%, var(--gauge-c1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px var(--gauge-glow);
}

.cyber-gauge__label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cyber-gauge__status {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
}

.cyber-gauge__status.critical   { color: #f87171; text-shadow: 0 0 18px rgba(239, 68, 68, 0.55); }
.cyber-gauge__status.acceptable { color: #fb923c; text-shadow: 0 0 18px rgba(249, 115, 22, 0.5); }
.cyber-gauge__status.below-good { color: #c084fc; text-shadow: 0 0 18px rgba(139, 92, 246, 0.5), 0 0 22px rgba(34, 211, 238, 0.4); }
.cyber-gauge__status.good       { color: #c084fc; text-shadow: 0 0 18px rgba(192, 132, 252, 0.5); }
.cyber-gauge__status.very-good  { color: #22d3ee; text-shadow: 0 0 18px rgba(34, 211, 238, 0.5); }
.cyber-gauge__status.excellent  { color: #34d399; text-shadow: 0 0 18px rgba(52, 211, 153, 0.5); }

.cyber-gauge__tip {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 200px;
  margin: 0 auto;
}

/* ── Enhanced gauge panel ── */
.gauge-panel {
  padding: 36px 32px !important;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.6), transparent) !important;
  border-right: 1px solid var(--border) !important;
}

/* ── Premium score cards ── */
.score-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 16, 35, 0.9)) !important;
  border: 1px solid rgba(139, 92, 246, 0.18) !important;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(10px);
}

.score-card:hover {
  border-color: rgba(168, 85, 247, 0.4) !important;
  box-shadow:
    0 8px 32px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.score-card-value {
  text-shadow: 0 0 20px currentColor;
}

.score-bar-fill.critical   { background: linear-gradient(90deg, #ef4444, #b91c1c) !important; }
.score-bar-fill.acceptable { background: linear-gradient(90deg, #f97316, #ea580c) !important; }
.score-bar-fill.below-good { background: linear-gradient(90deg, #8b5cf6, #22d3ee) !important; }
.score-bar-fill.good       { background: linear-gradient(90deg, #8b5cf6, #a855f7) !important; }
.score-bar-fill.very-good  { background: linear-gradient(90deg, #a855f7, #22d3ee) !important; }
.score-bar-fill.excellent  { background: linear-gradient(90deg, #22d3ee, #10b981) !important; }

/* ── Premium report shell ── */
.report-print-root .report-header {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(11, 16, 35, 0.88));
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.report-print-root .score-dashboard {
  border: 1px solid rgba(139, 92, 246, 0.22);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.report-print-root .report-section {
  border: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.25);
}

.report-print-root .section-header {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
}

.report-print-root .ats-table thead tr {
  background: linear-gradient(90deg, rgba(109, 40, 217, 0.35), rgba(139, 92, 246, 0.2));
}

.report-print-root .ats-table th {
  color: #e9d5ff;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.report-print-root .check-card,
.report-print-root .tip-card,
.report-print-root .format-check-card {
  background: rgba(11, 16, 35, 0.7);
  border-color: rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(6px);
}

/* Cover page screen preview */
@media screen {
  .report-page {
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
    padding: 28px;
    background:
      radial-gradient(ellipse 100% 60% at 0% 0%, rgba(109, 40, 217, 0.15), transparent 50%),
      linear-gradient(180deg, var(--bg-surface), var(--bg-base));
    border: 1px solid var(--border);
  }

  .report-page--section {
    padding: 20px;
  }

  .report-page--section .report-section {
    margin: 0;
    border-radius: var(--radius-xl);
  }
}

@media (max-width: 900px) {
  .cyber-gauge {
    --gauge-size: 200px;
  }

  .cyber-gauge__value {
    font-size: 2.5rem;
  }
}
