body {
  font-family: system-ui, -apple-system, Arial, sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: #222;
}

header {
  background: #1b3a57;
  color: #fff;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

header img {
  max-height: 70px;
  display: block;
  margin: 0 auto 6px auto;
}

header h1 {
  font-size: 1.1rem;
  margin: 0;
}

header .sub {
  font-size: 0.8rem;
  margin-top: 4px;
  opacity: 0.9;
}

.card {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

h3 {
  margin-top: 0;
  font-size: 1.0rem;
}

label {
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 10px;
  display: block;
}

input, select, textarea {
  width: 100%;
  padding: 9px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 3px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

textarea {
  min-height: 70px;
}

canvas {
  width: 100%;
  max-width: 350px;
  height: 150px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: block;
  margin-top: 5px;
}

button {
  background: #1b3a57;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1rem;
  width: 100%;
  border-radius: 30px;
  margin-top: 15px;
  cursor: pointer;
}

button:active {
  opacity: 0.85;
}

.btn-secondary {
  background: #e0e0e0;
  color: #333;
  border-radius: 20px;
  width: auto;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.hidden {
  display: none;
}

.small {
  font-size: 0.8rem;
  color: #666;
}

.filters {
  font-size: 0.85rem;
}

.filters-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.filters-row select {
  flex: 1;
}

.list-item {
  background: #fff;
  margin: 8px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  font-size: 0.85rem;
}

.badge {
  padding: 3px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #fff;
}

.badge-rif {
  background: #2980b9;
}

.badge-ok {
  background: #27ae60;
}

.badge-nok {
  background: #c0392b;
}

.warning {
  background:#fff3cd;
  color:#856404;
  border:1px solid #ffeeba;
  padding:10px;
  border-radius:8px;
  margin-top:8px;
}

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  z-index: 100;
}

.navbar button {
  flex: 1;
  background: #fff;
  border: none;
  padding: 6px 2px 8px 2px;
  font-size: 0.8rem;
  color: #444;
  border-radius: 0;
}

.navbar button span {
  display: block;
  font-size: 1.1rem;
}

.navbar button.active {
  color: #1b3a57;
  font-weight: 600;
}

@media (min-width: 768px) {
  body {
    max-width: 480px;
    margin: 0 auto;
    background: #e0e0e0;
  }
  header {
    border-radius: 0 0 16px 16px;
  }
}

/* DASHBOARD CARDS */
.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  font-size: 0.85rem;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.dash-card-header span.targa {
  font-weight: 700;
}

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  color: #fff;
}

.chip-ok {
  background: #27ae60;
}

.chip-warn {
  background: #e67e22;
}

.chip-bad {
  background: #c0392b;
}

.dash-section-title {
  font-weight: 600;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.chart-box {
    background: #fff;
    padding: 15px;
    margin: 15px 0;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.pharma-mini {
    background: rgba(16,185,129,0.25);
    border-color: rgba(16,185,129,0.8);
    color: #065f46;
}

.pharma-mini .icon {
    font-size: 14px;
}

.header-logo-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 18px;
    margin-bottom: 10px;
    border-radius: 22px;
    background: radial-gradient(circle at top, rgba(37,99,235,0.24), transparent 65%);
    background-color: rgba(15,23,42,0.85);
    box-shadow: 0 18px 40px rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.5);
    backdrop-filter: blur(14px);
}

.logo-glow-ring {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    background: conic-gradient(
        from 0deg,
        rgba(56,189,248,0.15),
        rgba(45,212,191,0.4),
        rgba(59,130,246,0.35),
        rgba(56,189,248,0.15)
    );
    filter: blur(6px);
    opacity: 0.9;
    animation: logoPulse 6s linear infinite;
}

.header-logo-hero img {
    width: 140px;
    height: auto;
    border-radius: 18px;
    position: relative;
    z-index: 1;
    box-shadow: 0 12px 30px rgba(0,0,0,0.85);
}

.logo-hero-text {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo-hero-text .brand {
    color: #f1f5f9;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.logo-hero-text .tagline {
    color: #cbd5e1;
    font-size: 14px;
    margin-top: 4px;
}

.logo-hero-text .mission {
    color: #a5f3fc;
    font-size: 12px;
    margin-top: 6px;
    letter-spacing: 0.02em;
}

/* Animazione glow */
@keyframes logoPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

@media(max-width:600px){
    .header-logo-hero {
        padding: 22px 14px;
    }
    .logo-glow-ring {
        width: 140px;
        height: 140px;
    }
    .header-logo-hero img {
        width: 115px;
    }
    .logo-hero-text .brand {
        font-size: 20px;
        letter-spacing: 0.12em;
    }
    .logo-hero-text .tagline {
        font-size: 12px;
    }
    .logo-hero-text .mission {
        font-size: 11px;
    }
}

.microtag {
    font-size: 10px;
    color: #38bdf8; /* azzurro pharma */
    opacity: 0.9;
    margin-top: 6px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 500;
}

@media(max-width:600px){
    .microtag {
        font-size: 9px;
        letter-spacing: 0.08em;
        opacity: 1;
    }
}

.gdp-label {
    font-size: 11px;
    color: #4ade80;
    margin-top: 4px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    display: none; /* viene acceso via JS se ci sono doc Pharma */
}
@media (max-width: 600px) {
    .gdp-label {
        font-size: 10px;
    }
}
