/* ===== Levia / Digitalhub Brand ===== */
:root {
  --dh-primary: #FF7415;       /* arancione brand */
  --dh-primary-hover: #E85F00;
  --dh-secondary: #374952;     /* blu scuro brand */
  --dh-accent: #FF8264;        /* arancione chiaro */
  --dh-bg-soft: #FFF2EF;       /* sfondo crema */
  --dh-bg-soft-2: #FFE5DE;
  --dh-bg-cool: #F5F8FB;       /* sfondo grigio-azzurro */
  --dh-text: #494E59;
  --dh-white: #FFFFFF;
  --dh-success: #16a34a;
  --dh-danger: #dc2626;
  --dh-warning: #f59e0b;
}

* {
  font-family: 'Montserrat', sans-serif;
}

body {
  color: var(--dh-text);
  background: var(--dh-bg-cool);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dh-secondary);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

/* Bottoni stile Levia */
.btn-primary {
  background-color: var(--dh-primary);
  color: var(--dh-white);
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  background-color: var(--dh-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 116, 21, 0.3);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--dh-secondary);
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 32px;
  border-radius: 100px;
  border: 2px solid var(--dh-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background-color: var(--dh-secondary);
  color: var(--dh-white);
}

.btn-ghost {
  background: transparent;
  color: var(--dh-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.btn-ghost:hover { text-decoration: underline; }

/* Card */
.dh-card {
  background: var(--dh-white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(55, 73, 82, 0.08);
  padding: 32px;
}

.dh-card-soft {
  background: var(--dh-bg-soft);
  border-radius: 16px;
  padding: 24px;
  border-left: 4px solid var(--dh-primary);
}

/* Hero gradient */
.dh-hero {
  background: linear-gradient(135deg, var(--dh-bg-soft) 0%, var(--dh-bg-cool) 100%);
}

/* Input */
.dh-input, .dh-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  background: var(--dh-white);
  transition: all 0.2s ease;
}
.dh-input:focus, .dh-select:focus {
  outline: none;
  border-color: var(--dh-primary);
  box-shadow: 0 0 0 3px rgba(255, 116, 21, 0.15);
}

.dh-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dh-secondary);
  margin-bottom: 6px;
}
.dh-label-hint {
  font-size: 12px;
  color: #6B7280;
  font-weight: 400;
  margin-top: 4px;
  display: block;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 5%;
  right: 5%;
  height: 3px;
  background: #E5E7EB;
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
}
.step.active .step-circle {
  background: var(--dh-primary);
  color: var(--dh-white);
  box-shadow: 0 4px 12px rgba(255, 116, 21, 0.4);
}
.step.completed .step-circle {
  background: var(--dh-success);
  color: var(--dh-white);
}
.step-label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.step.active .step-label, .step.completed .step-label {
  color: var(--dh-secondary);
}

/* KPI Cards */
.kpi-card {
  background: var(--dh-white);
  border-radius: 16px;
  padding: 24px;
  border-top: 4px solid var(--dh-primary);
  box-shadow: 0 4px 16px rgba(55, 73, 82, 0.06);
}
.kpi-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--dh-secondary);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
}
.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--dh-bg-soft);
  color: var(--dh-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 12px;
}

/* Tab */
.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
  color: var(--dh-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tab-btn.active {
  background: var(--dh-primary);
  color: var(--dh-white);
}
.tab-btn:not(.active):hover {
  background: var(--dh-bg-soft);
}

/* Badge sanzioni */
.badge-danger {
  background: #FEE2E2;
  color: #991B1B;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.badge-success {
  background: #DCFCE7;
  color: #166534;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.badge-info {
  background: var(--dh-bg-soft);
  color: var(--dh-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

/* Source citation */
.source-cite {
  font-size: 11px;
  color: #6B7280;
  font-style: italic;
  border-left: 2px solid var(--dh-accent);
  padding-left: 8px;
  margin-top: 8px;
}

/* Doc category cards */
.doc-cat-card {
  background: var(--dh-white);
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.doc-cat-card:hover {
  border-color: var(--dh-primary);
  background: var(--dh-bg-soft);
}
.doc-cat-card.active {
  border-color: var(--dh-primary);
  background: var(--dh-bg-soft);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

/* Print */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
}

/* Responsive */
@media (max-width: 768px) {
  .step-label { font-size: 10px; }
  .kpi-value { font-size: 24px; }
  .dh-card { padding: 20px; }
}
