/* -------------------------------------------------------------------
 * software:   Futureverse - FuturEnergy Management System
 * version:    2.0.0
 * content:    Foglio di stile base applicazione
 * author:     Donato Poggi, 2026
 * license:    Proprietary - All rights reserved
 * owner:      © FuturEnergy Rinnovabile s.r.l.
 * framework:  © Aetheros PHP Framework by Donato Poggi
 * ------------------------------------------------------------------- */

:root {
    --fv-bg-main: #07111f;
    --fv-bg-secondary: #0c1830;
    --fv-bg-panel: rgba(13, 26, 52, 0.88);

    --fv-border-soft: rgba(126, 160, 255, 0.18);

    --fv-text-main: #f4f8ff;
    --fv-text-soft: #9fb3d9;
    --fv-text-muted: #6e84ad;

    --fv-blue: #2f80ff;
    --fv-cyan: #5dd6ff;
    --fv-violet: #7b4dff;

    --fv-radius-xl: 28px;
    --fv-radius-lg: 22px;
    --fv-radius-md: 16px;

    --fv-shadow-main: 0 18px 50px rgba(0, 0, 0, 0.30);
    --fv-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.18);

    --fv-shell-max-width: 1880px;
    --fv-sidebar-width: 300px;
    --fv-gap: 22px;

    --fv-font-main: "Work Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--fv-font-main);
    color: var(--fv-text-main);
    background:
        radial-gradient(circle at top left, rgba(47, 128, 255, 0.14), transparent 26%),
        radial-gradient(circle at top right, rgba(123, 77, 255, 0.18), transparent 28%),
        radial-gradient(circle at bottom left, rgba(93, 214, 255, 0.08), transparent 22%),
        linear-gradient(180deg, #091427 0%, #07111f 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.32;
}

body::before {
    width: 320px;
    height: 320px;
    top: 90px;
    left: -60px;
    background: rgba(93, 214, 255, 0.20);
}

body::after {
    width: 420px;
    height: 420px;
    right: -100px;
    bottom: -60px;
    background: rgba(123, 77, 255, 0.22);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.fv-app-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--fv-sidebar-width) 1fr;
    align-items: start;
    gap: var(--fv-gap);
    width: min(calc(100% - 32px), var(--fv-shell-max-width));
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 14px;
    border: 1px solid rgba(93, 214, 255, 0.14);
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(8, 18, 38, 0.92) 0%, rgba(9, 17, 35, 0.92) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 0 40px rgba(93, 214, 255, 0.05),
        0 0 60px rgba(123, 77, 255, 0.06),
        var(--fv-shadow-main);
    backdrop-filter: blur(12px);
}

.fv-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fv-dashboard {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
}

.fv-card {
    background: linear-gradient(180deg, rgba(16, 28, 58, 0.94) 0%, rgba(12, 23, 48, 0.96) 100%);
    border: 1px solid var(--fv-border-soft);
    border-radius: var(--fv-radius-lg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        var(--fv-shadow-soft);
}

.fv-missing-block {
    padding: 22px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--fv-radius-md);
    background: rgba(255, 255, 255, 0.02);
    color: var(--fv-text-soft);
}

/* =========================================================
   FOOTER
========================================================= */
.fv-footer {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 32px), var(--fv-shell-max-width));
    margin: 0 auto 18px auto;
}

.fv-footer-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 18px 2px 18px;
}

/* frase centrata PERFETTAMENTE */
.fv-footer-quote {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    letter-spacing: 0.02em;

    opacity: 0.82;
    filter: drop-shadow(0 0 6px rgba(93, 214, 255, 0.18));
    animation: fv-footer-pulse 2.8s ease-in-out infinite;
}

@keyframes fv-footer-pulse {
    0%, 100% {
        opacity: 0.78;
        filter: drop-shadow(0 0 4px rgba(93, 214, 255, 0.12));
    }
    50% {
        opacity: 1;
        filter:
            drop-shadow(0 0 8px rgba(93, 214, 255, 0.28))
            drop-shadow(0 0 14px rgba(93, 214, 255, 0.16));
    }
}

/* credits a destra */
.fv-footer-meta {
    font-size: 0.85rem;
    color: var(--fv-text-muted);
    text-align: right;
    white-space: nowrap;
}

/* =========================================================
   LOGIN
========================================================= */
.fv-login-body {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    box-shadow: inset 0 0 120px rgba(0,0,0,0.55);
    background:
        radial-gradient(circle at 20% 25%, rgba(93, 214, 255, 0.10), transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(123, 77, 255, 0.12), transparent 32%),
        radial-gradient(circle at 70% 75%, rgba(47, 128, 255, 0.08), transparent 28%),
        linear-gradient(135deg, #061425 0%, #07192d 40%, #081a30 100%);
}

.fv-login-body::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;

    opacity: 0.25;

    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

    background-size: 80px 80px;
}

.fv-login-body::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;

    background:
        radial-gradient(circle at 10% 20%, rgba(93,214,255,0.20), transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(123,77,255,0.22), transparent 35%);
}

.fv-login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.fv-login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.55) 0 1px, transparent 2px),
        radial-gradient(circle at 24% 72%, rgba(93,214,255,0.35) 0 1px, transparent 2px),
        radial-gradient(circle at 78% 22%, rgba(255,255,255,0.40) 0 1px, transparent 2px),
        radial-gradient(circle at 84% 64%, rgba(123,77,255,0.30) 0 1px, transparent 2px),
        radial-gradient(circle at 60% 14%, rgba(255,255,255,0.28) 0 1px, transparent 2px),
        radial-gradient(circle at 68% 84%, rgba(93,214,255,0.24) 0 1px, transparent 2px);
}
.fv-login-page::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle, rgba(93, 214, 255, 0.10) 0%, rgba(123, 77, 255, 0.08) 42%, transparent 72%);
    filter: blur(28px);
}

.fv-login-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(10, 22, 45, 0.96) 0%, rgba(12, 26, 54, 0.96) 100%);
    border: 1px solid rgba(93, 214, 255, 0.12);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 18px 50px rgba(0, 0, 0, 0.28);
}

.fv-login-border-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.fv-login-border-track {
    fill: none;
    stroke: rgba(93, 214, 255, 0.10);
    stroke-width: 1.2;
}

.fv-login-border-run {
    fill: none;
    stroke: url(#fvLoginBorderGradient);
    stroke-width: 2.2;
    stroke-linecap: round;

    stroke-dasharray: 95 3000;
    stroke-dashoffset: 0;

    filter:
        drop-shadow(0 0 6px rgba(93, 214, 255, 0.32))
        drop-shadow(0 0 12px rgba(123, 77, 255, 0.18));

    animation: fv-login-border-orbit 8s linear infinite;
}

@keyframes fv-login-border-orbit {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -3000;
    }
}

.fv-login-card > *:not(.fv-login-border-svg) {
    position: relative;
    z-index: 2;
}

.fv-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 24px;
    text-align: center;
}

.fv-login-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.fv-logout-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.fv-login-brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.fv-login-brand-text h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1;
}

.fv-login-brand-signature {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.fv-login-brand-signature span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    text-align: center;
}

.fv-login-line {
    display: inline-block;
    flex: 0 0 34px;
    height: 2px;
    border-radius: 999px;
}

.fv-login-line-left {
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, #27c46b 100%);
}

.fv-login-line-right {
    background: linear-gradient(90deg, #ff3b57 0%, rgba(0,0,0,0) 100%);
}

.fv-login-kicker {
    display: table;
    margin: 0 auto 12px auto;
    padding: 7px 14px;
    border: 1px solid rgba(93, 214, 255, 0.16);
    border-radius: 999px;
    background: rgba(93, 214, 255, 0.06);
    color: var(--fv-cyan);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
}

.fv-login-title {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.fv-login-subtitle {
    margin: 0 0 24px 0;
    color: var(--fv-text-soft);
    line-height: 1.55;
}

.fv-login-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 107, 129, 0.10);
    border: 1px solid rgba(255, 107, 129, 0.16);
    color: #ffd2d9;
    font-size: 0.92rem;
}

.fv-login-intro {
    text-align: center;
    margin-bottom: 36px;
}

.fv-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fv-login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fv-login-field label {
    font-size: 0.90rem;
    color: var(--fv-text-soft);
}

.fv-login-field input {
    height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 162, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    outline: none;
}

.fv-login-field input:focus {
    border-color: rgba(93, 214, 255, 0.30);
    box-shadow: 0 0 0 3px rgba(93, 214, 255, 0.08);
}

.fv-login-button {
    height: 56px;
    border: 0;
    border-radius: 16px;
    margin-top: 30px;
    background: linear-gradient(
        135deg,
        rgba(47, 128, 255, 0.95) 0%,
        rgba(65, 118, 255, 0.95) 28%,
        rgba(96, 96, 255, 0.95) 48%,
        rgba(123, 77, 255, 0.95) 100%
    );
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.20s ease, box-shadow 0.20s ease;

}

.fv-login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47, 128, 255, 0.18);
}

.fv-login-note {
    position: relative;
    margin-top: 24px;
    font-size: 0.85rem;
    color: var(--fv-text-muted);
    text-align: center;
    overflow: hidden;
}


.fv-logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    margin-top: 4px;
    border-radius: 16px;
    border: 1px solid rgba(148, 162, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--fv-text-soft);
    transition: all 0.20s ease;
}

.fv-logout-link:hover {
    color: #ffffff;
    border-color: rgba(93, 214, 255, 0.20);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================================
   LOGOUT
========================================================= */
.fv-logout-card {
    max-width: 980px;
    padding: 0;
    overflow: hidden;
}

.fv-logout-layout {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    min-height: 360px;
}

.fv-logout-brand-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 34px;
    border-right: 1px solid rgba(93, 214, 255, 0.08);
    background:
        radial-gradient(circle at 30% 30%, rgba(93, 214, 255, 0.08), transparent 38%),
        linear-gradient(180deg, rgba(10, 24, 48, 0.34) 0%, rgba(12, 26, 54, 0.12) 100%);
}

.fv-logout-brand-side .fv-login-brand {
    margin-bottom: 0;
}

.fv-logout-brand-side {
    flex-direction: column;
    gap: 12px;
}

.fv-logout-content-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 46px;
    align-items: center;
    text-align: center;
}

.fv-logout-content-side .fv-login-kicker {
    margin: 0 0 16px 0;
}

.fv-logout-title {
    margin: 0 0 12px 0;
    font-size: 2.45rem;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.02;
    color: #ffffff;
}

.fv-logout-subtitle {
    margin: 0 0 10px 0;
    font-size: 1.06rem;
    line-height: 1.6;
    color: var(--fv-text-main);
}

.fv-logout-note {
    margin: 0 0 26px 0;
    font-size: 0.94rem;
    line-height: 1.55;
    color: var(--fv-text-soft);
}

.fv-logout-button {
    margin-top:40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    text-decoration: none;
}

.fv-logout-kicker {
    margin-top: 18px;
    text-align: center;
}

/* =========================================================
   LOGOUT RESPONSIVE
========================================================= */
@media (max-width: 900px) {
    .fv-logout-card {
        max-width: 560px;
    }

    .fv-logout-layout {
        grid-template-columns: 1fr;
    }

    .fv-logout-brand-side {
        padding: 34px 28px 14px 28px;
        border-right: 0;
        border-bottom: 1px solid rgba(93, 214, 255, 0.08);
    }

    .fv-logout-content-side {
        align-items: center;
        text-align: center;
        padding: 30px 28px 34px 28px;
    }

    .fv-logout-title {
        font-size: 2rem;
    }

    .fv-logout-button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 1400px) {
    :root {
        --fv-sidebar-width: 270px;
        --fv-gap: 18px;
    }
}

@media (max-width: 1180px) {
    .fv-app-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .fv-footer-inner {
        justify-content: center;
    }

    .fv-footer-quote {
        position: static;
        transform: none;
        text-align: center;
        margin-bottom: 4px;
    }

    .fv-footer-meta {
        text-align: center;
    }
}
