/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
    --accent-color: #1e3a8a; /* blu notte */
    --accent-hover: #1d4ed8; /* blu più chiaro */
    --accent-200: #bfdbfe; /* blu chiaro, equivalente a blue-200 */
    --sidebar-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.accent {
    background-color: var(--accent-color);
}

.accent-hover:hover {
    background-color: var(--accent-hover);
}

.accent-text {
    color: var(--accent-color);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Centratura e aspetto pulito per le pagine auth (registrazione, password, ecc.) */
.login-container {
    max-width: 420px;
    width: 90%;
}

/* Split layout — pagina di login */
@keyframes auth-image-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}

@keyframes auth-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-split {
    display: flex;
    min-height: 100vh;
}

.auth-split__animate {
    animation: auth-fade-up 0.65s ease-out both;
}

.auth-split__brand {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 60%;
    overflow: hidden;
}

.auth-split__brand-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
}

.auth-split__brand-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: auth-image-zoom 22s ease-in-out infinite alternate;
}

.auth-split__brand-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 72%, transparent 100%);
    background:
        linear-gradient(
            90deg,
            color-mix(in srgb, var(--accent-color) 86%, #0c1929) 0%,
            color-mix(in srgb, var(--accent-color) 58%, transparent) 48%,
            color-mix(in srgb, var(--accent-color) 28%, transparent) 72%,
            transparent 100%
        ),
        linear-gradient(
            0deg,
            color-mix(in srgb, var(--accent-color) 72%, #000) 0%,
            color-mix(in srgb, var(--accent-color) 22%, transparent) 44%,
            color-mix(in srgb, var(--accent-color) 38%, transparent) 100%
        );
    box-shadow: inset 0 0 80px color-mix(in srgb, var(--accent-color) 20%, transparent);
}

.auth-split__brand-scrim::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(16vw, 14rem);
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in srgb, #f9fafb 45%, transparent) 55%,
        #f9fafb 100%
    );
}

.auth-split__brand-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 2.75rem 3rem;
    color: #fff;
}

.auth-split__brand-top,
.auth-split__brand-content {
    position: relative;
    z-index: 1;
}

.auth-split__brand-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    gap: 2.5rem;
    padding-bottom: 0.5rem;
}

.auth-split__brand-copy {
    max-width: 30rem;
    padding-left: 1.25rem;
    border-left: 3px solid color-mix(in srgb, var(--accent-200) 85%, white);
}

.auth-split__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-split__brand-top {
    padding-bottom: 1rem;
}

.auth-split__logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--accent-color);
    border: 1px solid color-mix(in srgb, var(--accent-color) 80%, white);
    border-radius: 0.625rem;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--accent-color) 35%, transparent);
}

.auth-split__logo-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.auth-split__eyebrow {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-200);
}

.auth-split__eyebrow-line {
    display: block;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1px;
    background: var(--accent-200);
}

.auth-split__headline {
    font-size: clamp(2.125rem, 3.4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.auth-split__highlight {
    color: var(--accent-200);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--accent-200) 45%, transparent);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 2px;
}

.auth-split__tagline {
    max-width: 26rem;
    margin-top: 1.125rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.auth-split__features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-split__feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: color-mix(in srgb, white 94%, var(--accent-200));
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--accent-color) 8%, transparent);
}

.auth-split__feature-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--accent-color);
    background: var(--accent-200);
    border-radius: 0.5rem;
}

.auth-split__feature-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

.auth-split__feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.auth-split__feature-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.auth-split__feature-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #6b7280;
}

.auth-split__form-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin-left: -5rem;
    padding: 2.5rem 3rem 2.5rem calc(3rem + 5rem);
    background: linear-gradient(
        90deg,
        color-mix(in srgb, #f9fafb 55%, transparent) 0%,
        #f9fafb 6rem
    );
}

.auth-split__form-panel--scroll {
    align-items: flex-start;
    overflow-y: auto;
}

@media (max-width: 1100px) {
    .auth-split__features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .auth-split__form-panel {
        width: 100%;
        margin-left: 0;
        padding: 1.5rem;
        background: #f9fafb;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-split__brand-image,
    .auth-split__animate {
        animation: none;
    }
}


.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 40;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    background-color: white;
}

.sidebar.active {
    transform: translateX(0);
}

@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.toggle-switch input:checked + .toggle-bg {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-bg .toggle-dot {
    transform: translateX(1.25rem);
}

/* Stile per i tab */
.tab-button.active {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: #f7f9fd; /* Un leggero sfondo per il tab attivo */
}

/* Nasconde la scrollbar mantenendo la funzionalità di scroll */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}