/* ═══════════════════════════════════════════════════════════════
   GEO-SEO Web Platform — Extended Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Audit Console ────────────────────────────────────────────── */
.audit-console {
  max-width: 700px;
  margin: 0 auto;
}

.audit-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}

.audit-type-card {
  background: #161b22;
  border: 2px solid #30363d;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}

.audit-type-card:hover {
  border-color: var(--geo-accent);
  transform: translateY(-2px);
}

.audit-type-card.active {
  border-color: var(--geo-accent);
  background: rgba(233, 69, 96, 0.08);
}

.audit-type-card .icon {
  font-size: 1.6rem;
  margin-bottom: .4rem;
  display: block;
}

.audit-type-card .label {
  font-size: .82rem;
  font-weight: 600;
  color: #c9d1d9;
}

.audit-type-card .desc {
  font-size: .72rem;
  color: #8b949e;
  margin-top: .2rem;
}

/* Custom module checkboxes */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .6rem;
}

.module-check {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: .7rem .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  transition: border-color .2s;
}

.module-check:hover {
  border-color: #58a6ff;
}

.module-check input[type="checkbox"] {
  accent-color: var(--geo-accent);
  width: 16px;
  height: 16px;
}

.module-check .mod-label {
  font-size: .85rem;
  color: #c9d1d9;
}

/* ── Score Gauge (big circle) ───────────────────────────────── */
.score-gauge-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.score-gauge {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: conic-gradient(
    var(--gauge-color) calc(var(--score) * 3.6deg),
    #30363d 0deg
  );
}

.score-gauge::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #0d1117;
}

.score-gauge-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-gauge-inner .big {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gauge-color);
}

.score-gauge-inner .sub {
  font-size: .8rem;
  color: #8b949e;
  margin-top: .2rem;
}

.score-gauge-inner .label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: .3rem;
  color: var(--gauge-color);
  font-weight: 700;
}

/* ── Score Cards (6-dimension grid) ──────────────────────────── */
.dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.dim-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: border-color .2s;
}

.dim-card:hover {
  border-color: #484f58;
}

.dim-card .dim-icon {
  font-size: 1.4rem;
  margin-bottom: .5rem;
}

.dim-card .dim-score {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.dim-card .dim-name {
  font-size: .78rem;
  color: #8b949e;
  margin-top: .4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.dim-card .dim-bar {
  height: 6px;
  border-radius: 3px;
  background: #30363d;
  margin-top: .6rem;
  overflow: hidden;
}

.dim-card .dim-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

/* ── Crawler Matrix ──────────────────────────────────────────── */
.crawler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .6rem;
}

.crawler-item {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: .7rem .9rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.crawler-item .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crawler-item .status-allowed   { background: var(--geo-good); box-shadow: 0 0 6px var(--geo-good); }
.crawler-item .status-blocked   { background: var(--geo-critical); box-shadow: 0 0 6px var(--geo-critical); }
.crawler-item .status-unknown   { background: #8b949e; }

.crawler-item .crawler-name {
  font-size: .85rem;
  font-weight: 600;
  color: #c9d1d9;
}

.crawler-item .crawler-status {
  font-size: .75rem;
  color: #8b949e;
  margin-left: auto;
}

/* ── Issues List ─────────────────────────────────────────────── */
.issue-list {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.issue-item {
  background: #161b22;
  border: 1px solid #30363d;
  border-left: 4px solid;
  border-radius: 0 8px 8px 0;
  padding: .9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
}

.issue-item.critical { border-left-color: var(--geo-critical); }
.issue-item.high     { border-left-color: #e67e22; }
.issue-item.medium   { border-left-color: var(--geo-poor); }
.issue-item.low      { border-left-color: var(--geo-good); }

.issue-item .severity-badge {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: .15rem;
}

.issue-item.critical .severity-badge { background: rgba(214, 48, 49, 0.15); color: var(--geo-critical); }
.issue-item.high     .severity-badge { background: rgba(230, 126, 34, 0.15); color: #e67e22; }
.issue-item.medium   .severity-badge { background: rgba(253, 203, 110, 0.15); color: var(--geo-poor); }
.issue-item.low      .severity-badge { background: rgba(0, 184, 148, 0.15); color: var(--geo-good); }

.issue-item .issue-title {
  font-size: .9rem;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: .15rem;
}

.issue-item .issue-desc {
  font-size: .82rem;
  color: #8b949e;
  line-height: 1.4;
}

/* ── Recommendations ─────────────────────────────────────────── */
.rec-list {
  counter-reset: rec;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.rec-item {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: .8rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
}

.rec-item::before {
  counter-increment: rec;
  content: counter(rec);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--geo-blue);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: .1rem;
}

.rec-item .rec-priority {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: .1rem .4rem;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.rec-item .rec-text {
  font-size: .87rem;
  color: #c9d1d9;
  line-height: 1.4;
  flex: 1;
}

/* ── Report Header ───────────────────────────────────────────── */
.report-header {
  background: linear-gradient(135deg, var(--geo-navy) 0%, var(--geo-blue) 100%);
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.report-domain {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .3rem;
}

.report-meta {
  font-size: .85rem;
  color: #8b949e;
}

/* ── Section Card ────────────────────────────────────────────── */
.section-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  overflow: hidden;
}

.section-card .section-header {
  background: #1c2128;
  padding: .9rem 1.2rem;
  border-bottom: 1px solid #30363d;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-card .section-header h5 {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #c9d1d9;
  margin: 0;
}

.section-card .section-body {
  padding: 1.2rem;
}

/* ── History Table ───────────────────────────────────────────── */
.history-row {
  cursor: pointer;
  transition: background .15s;
}

.history-row:hover {
  background: #1c2128;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn .4s ease forwards;
}

/* ── Progress spinner ────────────────────────────────────────── */
.spinner-ring {
  display: inline-block;
  width: 20px;
  height: 20px;
}

.spinner-ring::after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #30363d;
  border-top-color: var(--geo-accent);
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 576px) {
  .score-gauge-wrap {
    width: 140px;
    height: 140px;
  }
  .score-gauge-inner .big {
    font-size: 2.2rem;
  }
  .dim-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
