/**
 * Stile unico Poletti Industries.
 *
 * Direzione grafica:
 * - nero industriale;
 * - giallo elettrico #ffd400 come unico accento;
 * - sinapsi animate coerenti con la dashboard aziendale;
 * - ordine rigoroso, card allineate e responsive.
 */

:root {
    --bg: #050709;
    --bg-soft: #0a0e12;
    --panel: rgba(12, 17, 22, 0.88);
    --panel-solid: #0d1217;
    --panel-light: #121920;
    --yellow: #ffd400;
    --yellow-soft: #ffe36a;
    --yellow-line: rgba(255, 212, 0, 0.42);
    --yellow-glow: rgba(255, 212, 0, 0.28);
    --white: #f7f8f9;
    --muted: #9ca6ae;
    --line: rgba(255, 255, 255, 0.13);
    --danger: #ff6464;
    --success: #ffd400;
    --header-height: 88px;
    --shell: min(1480px, calc(100vw - 80px));
    --transition: 220ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--white);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 80% 5%, rgba(255, 212, 0, 0.035), transparent 30%),
        linear-gradient(180deg, #040608 0%, #070a0d 100%);
    -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: var(--shell); margin-inline: auto; }

/* Sfondo sinaptico, posizionato dietro a tutte le pagine. */
.neural-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}
.neural-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, transparent 0 25%, rgba(5, 7, 9, 0.18) 48%, rgba(5, 7, 9, 0.88) 100%),
        radial-gradient(circle at 12% 18%, rgba(255, 212, 0, 0.04), transparent 25%),
        radial-gradient(circle at 90% 75%, rgba(255, 212, 0, 0.035), transparent 28%);
}
.synapse-link {
    position: absolute;
    height: 1px;
    transform-origin: 0 50%;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.52), rgba(255, 255, 255, 0.16), rgba(255, 212, 0, 0.48), transparent);
    box-shadow: 0 0 10px rgba(255, 212, 0, 0.2);
}
.synapse-link .spark {
    position: absolute;
    top: 50%;
    left: 0;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 20%, #ffe879 28% 58%, rgba(255, 212, 0, 0.45) 64% 100%);
    box-shadow: 0 0 8px rgba(255, 244, 180, 0.9), 0 0 18px rgba(255, 212, 0, 0.72);
    animation: synapseTravel var(--duration, 4s) linear infinite;
    animation-delay: var(--delay, 0s);
}
.synapse-node {
    position: absolute;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0 22%, #ffe879 28% 60%, rgba(255, 212, 0, 0.3) 68% 100%);
    box-shadow: 0 0 7px rgba(255, 245, 190, 0.75), 0 0 17px rgba(255, 212, 0, 0.42);
    animation: nodePulse var(--pulse, 3.5s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}
.synapse-node::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1px solid rgba(255, 212, 0, 0.18);
    border-radius: 50%;
    animation: nodeRing var(--pulse, 3.5s) ease-out infinite;
    animation-delay: var(--delay, 0s);
}

/* Header pubblico. */
.site-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding: 0 34px;
    display: grid;
    grid-template-columns: minmax(250px, 360px) 1fr auto;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(3, 5, 7, 0.96), rgba(3, 5, 7, 0.68));
    backdrop-filter: blur(18px);
    transition: height var(--transition), background var(--transition);
}
.site-header.is-scrolled { height: 72px; background: rgba(4, 6, 8, 0.97); }
.brand { display: flex; align-items: center; width: min(350px, 100%); }
.brand img { width: 100%; height: 66px; object-fit: contain; object-position: left center; }
.main-navigation { display: flex; align-items: center; justify-content: center; gap: clamp(15px, 1.65vw, 30px); }
.main-navigation a {
    position: relative;
    padding: 11px 0;
    color: #e7eaec;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
.main-navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 2px;
    background: var(--yellow);
    box-shadow: 0 0 12px var(--yellow-glow);
    transition: right var(--transition);
}
.main-navigation a:hover::after, .main-navigation a.is-active::after { right: 0; }
.main-navigation a:hover, .main-navigation a.is-active { color: var(--yellow); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.sound-toggle, .reserved-link {
    min-height: 39px;
    border: 1px solid rgba(255, 212, 0, 0.34);
    background: rgba(9, 13, 17, 0.75);
    color: var(--yellow);
    padding: 8px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}
.sound-toggle { display: inline-flex; gap: 6px; align-items: center; }
.sound-toggle:hover, .reserved-link:hover { border-color: var(--yellow); box-shadow: 0 0 18px var(--yellow-glow); }
.menu-toggle { display: none; width: 44px; height: 42px; border: 1px solid var(--yellow-line); background: #080b0e; padding: 10px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--yellow); }

/* Componenti testuali e pulsanti condivisi. */
.eyebrow { margin: 0 0 13px; color: var(--yellow); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.24em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid var(--yellow-line);
    color: var(--white);
    background: rgba(7, 10, 13, 0.74);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), color var(--transition), background var(--transition);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 0 22px var(--yellow-glow); }
.button-primary { color: #090b0d; background: var(--yellow); border-color: var(--yellow); }
.button-primary:hover { background: #ffe052; }
.button-secondary:hover { color: var(--yellow); border-color: var(--yellow); }
.button-svg { width: 21px; height: 21px; }
.text-link { color: var(--yellow); font-weight: 800; letter-spacing: 0.03em; }
.text-link:hover { text-shadow: 0 0 14px var(--yellow-glow); }

/* Hero homepage. */
.hero {
    position: relative;
    min-height: 790px;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 212, 0, 0.22);
}
.hero-background { position: absolute; inset: 0; z-index: -3; }
.hero-background img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; filter: saturate(0.92) contrast(1.08) brightness(0.82); }
.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(3, 6, 8, 0.98) 0%, rgba(3, 6, 8, 0.88) 28%, rgba(3, 6, 8, 0.18) 58%, rgba(3, 6, 8, 0.16) 100%),
        linear-gradient(180deg, rgba(3, 6, 8, 0.12) 45%, rgba(3, 6, 8, 0.9) 100%);
}
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.18;
    background-image: linear-gradient(rgba(255, 212, 0, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 212, 0, 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent 8%, #000 45%, transparent 92%);
}
.hero-content { position: relative; z-index: 2; flex: 1; display: flex; align-items: center; padding-top: 42px; padding-bottom: 170px; }
.hero-copy { max-width: 670px; }
.hero-copy h1 { margin: 0 0 22px; max-width: 670px; font-size: clamp(3rem, 5.4vw, 6.2rem); line-height: 0.94; letter-spacing: -0.045em; text-transform: uppercase; }
.hero-description { max-width: 650px; margin: 0; color: #d2d8dc; font-size: clamp(1rem, 1.4vw, 1.22rem); line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 31px; }

/* Quattro valori chiave: perfettamente allineati sulla stessa riga. */
.key-metrics {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid rgba(255, 212, 0, 0.28);
    background: rgba(5, 8, 11, 0.9);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}
.metric-card { min-height: 116px; padding: 19px 22px; display: flex; align-items: center; gap: 16px; border-right: 1px solid var(--line); }
.metric-card:last-child { border-right: 0; }
.metric-icon { flex: 0 0 44px; color: var(--yellow); }
.metric-card strong { display: block; margin-bottom: 6px; color: var(--white); font-size: 1rem; letter-spacing: 0.04em; }
.metric-card small { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.35; }

/* Riga delle sei competenze. */
.feature-navigation { position: relative; z-index: 3; padding: 30px 0 50px; background: rgba(5, 8, 11, 0.98); }
.feature-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); }
.feature-card { position: relative; min-height: 178px; padding: 24px 18px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(15, 21, 27, 0.88), rgba(6, 9, 12, 0.94)); transition: background var(--transition), transform var(--transition), box-shadow var(--transition); }
.feature-card:last-child { border-right: 0; }
.feature-card::before { content: ""; position: absolute; left: 16px; right: calc(100% - 48px); bottom: 0; height: 2px; background: var(--yellow); transition: right var(--transition); }
.feature-card:hover { z-index: 2; transform: translateY(-4px); background: linear-gradient(180deg, rgba(27, 31, 28, 0.98), rgba(9, 11, 12, 0.98)); box-shadow: 0 0 30px rgba(255, 212, 0, 0.11); }
.feature-card:hover::before { right: 16px; }
.feature-icon { width: 45px; height: 45px; margin-bottom: 20px; color: var(--yellow); }
.feature-copy strong { display: block; margin-bottom: 8px; font-size: 0.93rem; letter-spacing: 0.04em; text-transform: uppercase; }
.feature-copy small { display: block; color: var(--muted); font-size: 0.77rem; line-height: 1.45; }
.feature-arrow { position: absolute; right: 16px; bottom: 13px; color: var(--yellow); }

/* Sezioni contenuto. */
.approach-section, .sectors-section, .quality-callout, .future-section, .certifications-section, .quality-principles { position: relative; z-index: 2; padding: 96px 0; }
.approach-section { background: linear-gradient(180deg, #090d11, #070a0d); }
.approach-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 9vw; align-items: start; }
.section-heading h2, .section-topline h2, .quality-callout h2, .future-card h2 { margin-bottom: 0; font-size: clamp(2rem, 3.3vw, 4rem); line-height: 1.03; letter-spacing: -0.035em; }
.approach-copy p { margin: 0 0 20px; color: #c1c9ce; font-size: 1.08rem; line-height: 1.75; }
.section-topline { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 38px; }
.sectors-section { background: #05080a; }
.sector-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.sector-card { position: relative; min-height: 190px; padding: 25px 20px; border: 1px solid var(--line); background: rgba(12, 17, 22, 0.78); overflow: hidden; transition: border-color var(--transition), transform var(--transition); }
.sector-card:hover { transform: translateY(-4px); border-color: var(--yellow-line); }
.sector-icon { width: 48px; height: 48px; color: var(--yellow); }
.sector-card h3 { margin: 38px 0 0; font-size: 1rem; text-transform: uppercase; }
.sector-line { position: absolute; left: 20px; bottom: 20px; width: 28px; height: 2px; background: var(--yellow); transition: width var(--transition); }
.sector-card:hover .sector-line { width: calc(100% - 40px); }
.quality-callout { padding: 72px 0; border-block: 1px solid rgba(255, 212, 0, 0.18); background: radial-gradient(circle at 76% 40%, rgba(255, 212, 0, 0.08), transparent 30%), #0b1014; }
.quality-callout-grid { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: center; }
.quality-callout p:not(.eyebrow) { max-width: 760px; color: var(--muted); line-height: 1.65; }
.future-section { background: #050709; }
.future-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.future-card { min-height: 320px; padding: 42px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(16, 22, 28, 0.92), rgba(7, 10, 13, 0.96)); }
.future-card-accent { border-color: rgba(255, 212, 0, 0.36); }
.future-card p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }

/* Pagina interna Qualita. */
.inner-page { position: relative; z-index: 1; padding-top: var(--header-height); }
.inner-hero { padding: 105px 0 90px; border-bottom: 1px solid rgba(255, 212, 0, 0.2); background: radial-gradient(circle at 76% 45%, rgba(255, 212, 0, 0.08), transparent 31%), linear-gradient(135deg, rgba(11, 16, 21, 0.94), rgba(4, 7, 9, 0.97)); }
.inner-hero-grid { display: grid; grid-template-columns: 1fr 360px; align-items: center; gap: 80px; }
.inner-hero h1 { max-width: 850px; margin-bottom: 24px; font-size: clamp(3rem, 5.6vw, 6.3rem); line-height: 0.96; letter-spacing: -0.05em; text-transform: uppercase; }
.inner-hero p:not(.eyebrow) { max-width: 750px; color: #c2cbd0; font-size: 1.1rem; line-height: 1.7; }
.quality-orbit { position: relative; width: 300px; aspect-ratio: 1; margin-inline: auto; display: grid; place-content: center; text-align: center; }
.quality-orbit-ring { position: absolute; inset: 0; border: 1px solid rgba(255, 212, 0, 0.38); border-radius: 50%; box-shadow: inset 0 0 28px rgba(255, 212, 0, 0.08), 0 0 24px rgba(255, 212, 0, 0.08); animation: orbitSpin 14s linear infinite; }
.quality-orbit-ring::before, .quality-orbit-ring::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 16px var(--yellow); }
.quality-orbit-ring::before { top: 18px; left: 72px; }
.quality-orbit-ring::after { right: 12px; bottom: 88px; }
.quality-orbit-ring-two { inset: 40px; animation-direction: reverse; animation-duration: 9s; }
.quality-orbit-icon { width: 65px; margin: 0 auto 10px; color: var(--yellow); }
.quality-orbit strong { font-size: 1.7rem; }
.quality-orbit small { color: var(--yellow); letter-spacing: 0.12em; }
.document-counter { color: var(--yellow); font-weight: 800; text-transform: uppercase; }
.certification-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.certificate-card { position: relative; min-height: 460px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17, 23, 29, 0.96), rgba(7, 10, 13, 0.98)); overflow: hidden; }
.certificate-card::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 38%; background: var(--yellow); box-shadow: 0 0 18px var(--yellow-glow); }
.certificate-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.certificate-icon { width: 46px; color: var(--yellow); }
.certificate-standard { color: var(--yellow); font-size: 0.74rem; font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }
.certificate-card h3 { margin: 35px 0 16px; font-size: 1.65rem; line-height: 1.1; }
.certificate-description { color: var(--muted); line-height: 1.55; }
.certificate-data { margin: 24px 0; border-top: 1px solid var(--line); }
.certificate-data div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.certificate-data dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; }
.certificate-data dd { margin: 0; font-size: 0.9rem; }
.certificate-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 0.76rem; }
.certificate-footer .button { min-height: 44px; padding-inline: 16px; }
.empty-state { padding: 75px 30px; border: 1px dashed var(--yellow-line); text-align: center; background: rgba(11, 15, 19, 0.72); }
.empty-icon { width: 62px; margin: 0 auto 20px; color: var(--yellow); }
.empty-state p { color: var(--muted); }
.quality-principles { padding-top: 0; }
.quality-principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quality-principles article { padding: 30px; border: 1px solid var(--line); background: rgba(11, 16, 21, 0.82); }
.quality-principles article > span { width: 46px; color: var(--yellow); }
.quality-principles h3 { margin: 24px 0 10px; }
.quality-principles p { color: var(--muted); line-height: 1.55; }

/* Footer. */
.site-footer { position: relative; z-index: 2; padding: 70px 0 20px; border-top: 1px solid rgba(255, 212, 0, 0.2); background: #030506; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 0.8fr 1fr 1fr; gap: 42px; }
.footer-kicker { margin-bottom: 13px; color: var(--yellow); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.site-footer h2 { margin-bottom: 14px; }
.site-footer p, .site-footer a { display: block; margin: 7px 0; color: var(--muted); line-height: 1.5; }
.site-footer a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 48px; padding-top: 18px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #6f7980; font-size: 0.75rem; }

/* Banner cookie. */
.cookie-banner { position: fixed; z-index: 1500; left: 24px; right: 24px; bottom: 24px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--yellow-line); background: rgba(7, 10, 13, 0.97); box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 5px 0 0; color: var(--muted); }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Animazioni di ingresso. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Pannello amministrativo. */
.admin-body { min-height: 100vh; background: #050709; }
.admin-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.admin-login-card { width: min(520px, 100%); padding: 42px; border: 1px solid var(--yellow-line); background: rgba(10, 14, 18, 0.96); box-shadow: 0 0 80px rgba(0, 0, 0, 0.62), 0 0 32px rgba(255, 212, 0, 0.08); }
.admin-logo { width: 360px; max-width: 100%; margin-bottom: 34px; }
.admin-login-card h1 { margin-bottom: 12px; font-size: 2.4rem; }
.admin-login-intro { color: var(--muted); line-height: 1.55; }
.admin-form { display: grid; gap: 16px; }
.admin-form label { display: grid; gap: 7px; }
.admin-form label > span { color: #c4cbd0; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.admin-form input, .admin-form textarea {
    width: 100%;
    border: 1px solid #343c43;
    background: #070a0d;
    color: var(--white);
    padding: 12px 13px;
    outline: none;
}
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--yellow); box-shadow: 0 0 15px rgba(255, 212, 0, 0.1); }
.admin-back-link { display: inline-block; margin-top: 25px; color: var(--muted); }
.admin-back-link:hover { color: var(--yellow); }
.admin-alert { margin: 18px 0; padding: 13px 15px; border: 1px solid; }
.admin-alert-success { border-color: var(--yellow-line); color: var(--yellow); background: rgba(255, 212, 0, 0.06); }
.admin-alert-error { border-color: rgba(255, 100, 100, 0.48); color: #ffaaaa; background: rgba(255, 70, 70, 0.07); }
.admin-header { position: sticky; top: 0; z-index: 100; min-height: 78px; padding: 12px 34px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--yellow-line); background: rgba(5, 7, 9, 0.96); backdrop-filter: blur(16px); }
.admin-header img { width: 290px; max-height: 52px; object-fit: contain; object-position: left; }
.admin-header nav { display: flex; gap: 20px; align-items: center; }
.admin-header nav a { color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.admin-header nav a:hover, .admin-header nav a.is-active { color: var(--yellow); }
.admin-page { padding: 55px 0 80px; }
.admin-title-row { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.admin-title-row h1 { margin-bottom: 8px; font-size: clamp(2.5rem, 4vw, 4.6rem); }
.admin-title-row p { color: var(--muted); }
.admin-user-chip { padding: 10px 14px; border: 1px solid var(--yellow-line); color: var(--yellow); font-size: 0.75rem; }
.admin-layout { display: grid; grid-template-columns: minmax(360px, 0.85fr) minmax(500px, 1.15fr); gap: 20px; align-items: start; }
.admin-panel { border: 1px solid var(--line); background: rgba(11, 16, 21, 0.94); }
.admin-editor-panel { padding: 25px; }
.admin-list-panel { padding: 25px; }
.admin-panel-heading { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.admin-panel-heading h2 { margin: 0; }
.admin-panel-heading a, .admin-panel-heading span { color: var(--yellow); font-size: 0.76rem; }
.admin-form-grid { grid-template-columns: 1fr 1fr; }
.field-full { grid-column: 1 / -1; }
.upload-field { padding: 14px; border: 1px dashed var(--yellow-line); }
.upload-field small { color: var(--muted); }
.admin-checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; justify-content: start; color: #d2d7da; }
.admin-checkbox input { width: auto; }
.admin-form-actions { display: flex; justify-content: flex-end; }
.admin-certificate-list { display: grid; gap: 10px; }
.admin-certificate-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid rgba(255, 255, 255, 0.09); background: #080c0f; }
.admin-certificate-symbol { color: var(--yellow); }
.admin-certificate-main strong, .admin-certificate-main span, .admin-certificate-main small { display: block; }
.admin-certificate-main span, .admin-certificate-main small { margin-top: 4px; color: var(--muted); font-size: 0.76rem; }
.status-badge { padding: 6px 9px; border: 1px solid; font-size: 0.66rem; font-weight: 900; text-transform: uppercase; }
.status-badge.is-published { color: var(--yellow); border-color: var(--yellow-line); }
.status-badge.is-hidden { color: #9099a0; border-color: #41484e; }
.admin-row-actions { grid-column: 2 / -1; display: flex; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.admin-row-actions form { margin: 0; }
.mini-button { display: inline-flex; min-height: 32px; align-items: center; padding: 0 10px; border: 1px solid #3c454c; background: #10161b; color: #e5e8ea; font-size: 0.69rem; cursor: pointer; }
.mini-button:hover { border-color: var(--yellow); color: var(--yellow); }
.mini-button-danger:hover { border-color: var(--danger); color: #ff9999; }
.admin-empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

/* Animazioni. */
@keyframes synapseTravel { 0% { transform: translateX(0) scale(0.5); opacity: 0; } 10% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(calc(var(--length, 180px) - 8px)) scale(1.1); opacity: 0; } }
@keyframes nodePulse { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.18); } }
@keyframes nodeRing { 0% { transform: scale(0.2); opacity: 0; } 14% { opacity: 0.6; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* Tablet. */
@media (max-width: 1180px) {
    :root { --shell: min(100% - 44px, 1200px); }
    .site-header { grid-template-columns: 270px auto 1fr; }
    .menu-toggle { display: block; justify-self: end; }
    .main-navigation { position: fixed; top: 72px; right: 18px; left: 18px; padding: 22px; display: none; flex-direction: column; align-items: stretch; background: rgba(6, 9, 12, 0.98); border: 1px solid var(--yellow-line); }
    .main-navigation.is-open { display: flex; }
    .main-navigation a { border-bottom: 1px solid var(--line); }
    .header-tools { justify-self: end; }
    .key-metrics { grid-template-columns: repeat(2, 1fr); }
    .metric-card:nth-child(2) { border-right: 0; }
    .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
    .feature-card:nth-child(3n) { border-right: 0; }
    .feature-card:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .sector-grid { grid-template-columns: repeat(3, 1fr); }
    .certification-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { grid-template-columns: 1fr; }
}

/* Smartphone. */
@media (max-width: 760px) {
    :root { --shell: calc(100vw - 30px); --header-height: 74px; }
    .site-header { height: 74px; padding: 0 15px; grid-template-columns: minmax(160px, 1fr) auto; gap: 12px; }
    .brand { width: min(230px, 62vw); }
    .brand img { height: 54px; }
    .header-tools { display: none; }
    .menu-toggle { grid-column: 2; }
    .main-navigation { top: 70px; }
    .hero { min-height: 940px; }
    .hero-background img { object-position: 66% center; }
    .hero-shade { background: linear-gradient(180deg, rgba(3, 6, 8, 0.55), rgba(3, 6, 8, 0.97) 58%, #050709 100%); }
    .hero-content { align-items: flex-start; padding-top: 100px; padding-bottom: 390px; }
    .hero-copy h1 { font-size: clamp(2.55rem, 13vw, 4.6rem); }
    .hero-description { font-size: 0.98rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .key-metrics { bottom: 20px; grid-template-columns: 1fr; }
    .metric-card { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--line) !important; padding: 12px 16px; }
    .metric-card:last-child { border-bottom: 0 !important; }
    .metric-icon { flex-basis: 35px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 128px; border-right: 0; border-bottom: 1px solid var(--line) !important; }
    .feature-card:last-child { border-bottom: 0 !important; }
    .approach-section, .sectors-section, .future-section, .certifications-section, .quality-principles { padding: 68px 0; }
    .approach-grid, .quality-callout-grid, .future-grid, .inner-hero-grid { grid-template-columns: 1fr; gap: 35px; }
    .section-topline { align-items: flex-start; flex-direction: column; }
    .sector-grid, .certification-grid, .quality-principles-grid { grid-template-columns: 1fr; }
    .quality-callout-grid .button { width: 100%; }
    .inner-hero { padding: 75px 0 65px; }
    .inner-hero h1 { font-size: clamp(2.7rem, 14vw, 4.6rem); }
    .quality-orbit { width: 240px; }
    .certificate-footer { align-items: stretch; flex-direction: column; }
    .certificate-footer .button { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: stretch; }
    .cookie-actions { flex-direction: column; }
    .admin-header { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
    .admin-header img { width: 250px; }
    .admin-header nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .admin-page { padding-top: 35px; }
    .admin-title-row { align-items: flex-start; flex-direction: column; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .admin-certificate-row { grid-template-columns: 40px 1fr; }
    .status-badge { grid-column: 2; justify-self: start; }
    .admin-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .admin-login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Dashboard amministrativa e controllo del modulo Poletti Workflow.
   ------------------------------------------------------------------------- */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.admin-dashboard-card {
    min-height: 330px;
    padding: 30px;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    gap: 24px;
    border: 1px solid var(--line);
    background: rgba(10, 15, 20, 0.94);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.admin-dashboard-card:hover {
    transform: translateY(-4px);
    border-color: var(--yellow);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 212, 0, 0.08);
}

.admin-dashboard-icon {
    color: var(--yellow);
}

.admin-dashboard-card h2 {
    margin: 10px 0 13px;
    font-size: 2rem;
}

.admin-dashboard-card p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.65;
}

.admin-dashboard-stats {
    grid-column: 1 / -1;
    padding-top: 20px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    border-top: 1px solid var(--line);
}

.admin-dashboard-stats strong {
    color: var(--yellow);
    font-size: 2rem;
}

.admin-dashboard-stats span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
    gap: 20px;
    align-items: start;
}

.admin-workflow-preview-panel {
    padding: 25px;
}

.admin-workflow-preview {
    overflow: hidden;
    border: 1px solid rgba(255, 212, 0, 0.22);
    background: #020405;
}

.admin-workflow-preview img {
    width: 100%;
    height: auto;
}

.admin-workflow-facts {
    margin: 18px 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
}

.admin-workflow-facts span {
    padding: 16px;
    color: var(--muted);
    border-right: 1px solid var(--line);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.admin-workflow-facts span:last-child {
    border-right: 0;
}

.admin-workflow-facts strong {
    display: block;
    margin-bottom: 4px;
    color: var(--yellow);
    font-size: 1.5rem;
}

.admin-workflow-checkbox {
    padding: 17px;
    border: 1px solid var(--yellow-line);
    background: rgba(255, 212, 0, 0.04);
}

.admin-help-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.admin-workflow-notes {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.admin-workflow-notes h3 {
    margin-top: 0;
}

.admin-workflow-notes ol {
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.8;
}

@media (max-width: 980px) {
    .admin-dashboard-grid,
    .admin-workflow-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .admin-dashboard-card {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 22px;
    }

    .admin-workflow-facts {
        grid-template-columns: 1fr;
    }

    .admin-workflow-facts span {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .admin-workflow-facts span:last-child {
        border-bottom: 0;
    }
}
