/* toponomastica/gestione_civici.css — Rev.42
 * Pagina di smistamento "Gestione civici"
 * Design system: coerente con ConsultaPA (Titillium Web 16px base,
 * palette blu #1F4E79 / ciano #2E75B6, card con ombra leggera)
 */

.gc-container {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  font-family: 'Titillium Web', system-ui, -apple-system, sans-serif;
  color: #2c3e50;
}

/* -- Header + triangolo di stato -- */
.gc-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.gc-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1F4E79;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.gc-sub {
  font-size: 1rem;
  color: #555;
  max-width: 620px;
  line-height: 1.5;
  margin: 0;
}

.gc-status-widget {
  background: linear-gradient(135deg, #1F4E79 0%, #2E75B6 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 14px rgba(31,78,121,0.15);
  min-width: 360px;
}

.gc-status-ente {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 0.75rem;
  margin-bottom: 0.9rem;
}

.gc-status-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.gc-status-value {
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1;
}

.gc-status-code {
  font-family: 'Consolas', monospace;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.15);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.gc-status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gc-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.gc-kpi-num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.gc-kpi-num.gc-kpi-small {
  font-size: 1rem;
  font-weight: 600;
}

.gc-kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.gc-kpi-sub {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

.gc-kpi-ok { color: #86efac; font-weight: 600; }
.gc-kpi-warn { color: #fcd34d; font-weight: 600; }

/* -- Griglia card -- */
.gc-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .gc-cards { grid-template-columns: 1fr; }
  .gc-header { flex-direction: column; }
  .gc-status-widget { width: 100%; min-width: 0; }
}

.gc-card {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 32px;
  gap: 1.25rem;
  align-items: start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-family: inherit;
  color: inherit;
}

.gc-card:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31,78,121,0.12);
  border-color: #2E75B6;
}

.gc-card:focus-visible {
  outline: 3px solid #2E75B6;
  outline-offset: 2px;
}

.gc-card:disabled, .gc-card-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

/* Card primaria (Nuovo civico): bordo colorato */
.gc-card-primary {
  border-left: 5px solid #2E75B6;
}

.gc-card-primary:hover:not(:disabled) {
  border-left-color: #1F4E79;
}

/* Card aiuto */
.gc-card-help {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #FCD34D;
}

.gc-card-icon {
  width: 80px;
  height: 80px;
  background: #EFF6FF;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1F4E79;
}

.gc-card-primary .gc-card-icon {
  background: #1F4E79;
  color: #fff;
}

.gc-card-help .gc-card-icon {
  background: #FEF3C7;
  color: #92400e;
}

.gc-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1F4E79;
  margin: 0;
  line-height: 1.3;
}

.gc-card-text {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
  margin: 0.2rem 0 0.6rem 0;
}

.gc-card-meta {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.gc-card-meta-soon { color: #92400e; }

.gc-card-arrow {
  font-size: 1.75rem;
  color: #9ca3af;
  align-self: center;
  transition: transform 0.18s ease, color 0.18s ease;
}

.gc-card:hover:not(:disabled) .gc-card-arrow {
  transform: translateX(4px);
  color: #2E75B6;
}

.gc-card-locked {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  background: #fee2e2;
  color: #991b1b;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.gc-card[data-action="massivo"] .gc-card-locked {
  background: #e0e7ff;
  color: #3730a3;
}

/* -- Link secondari -- */
.gc-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.gc-link {
  color: #2E75B6;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.18s;
}

.gc-link:hover { color: #1F4E79; text-decoration: underline; }

/* -- Overlay wizard -- */
.gc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
  backdrop-filter: blur(2px);
}

.gc-overlay[hidden] { display: none; }

.gc-overlay-inner {
  background: #fff;
  border-radius: 14px;
  max-width: 1100px;
  width: 100%;
  margin: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  max-height: calc(100vh - 4rem);
}

.gc-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to right, #1F4E79, #2E75B6);
  color: #fff;
  border-radius: 14px 14px 0 0;
}

.gc-overlay-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.gc-overlay-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.gc-overlay-close:hover { background: rgba(255,255,255,0.28); }

.gc-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.75rem;
}

/* Rev.49.2b — modale 95vw solo quando gc-overlay ha classe gc-overlay-wide
   (applicata dinamicamente sullo Step 2 del wizard Nuovo) */
.gc-overlay.gc-overlay-wide .gc-overlay-inner {
  max-width: 95vw;
  min-height: 80vh;
  max-height: calc(100vh - 2rem);
}
