@import 'tokens.css';
@import 'modale.css';
@import 'compform.css';
@import 'messaggi.css';
@import 'box.css';
@import 'lisa.css';
@import 'dropfile.css';

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg-body);
}

h1, h2, h3, h4, h5, h6,
.titolo-lisa-result,
.h-modale,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: var(--text);
}

.hiddenLog {
    display: none;
    position: absolute;
    z-index: 9999;
    width: 80%;
    height: 80vh;
    left: 10%;
    overflow: auto;
    top: 10vh;
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.patina-pagina {
    position: fixed;
    z-index: -1;
    background-color: rgba(0, 0, 0, 0.55);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.testo-grande {
    font-size: 1.5rem;
    width: 100px;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
}

.table-cont {
    width: 100%;
    font-size: 0.875rem;
    border-radius: var(--radius);
    color: var(--text);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.table-cont table {
    width: 100%;
    border-collapse: collapse;
}

.table-cont table tr td,
.table-cont table th {
    padding: 0.75rem;
}

.table-cont table th {
    background-color: var(--color-secondary);
    color: var(--text-inverse);
    border-bottom: 1px solid var(--border);
}

.table-cont table tr:nth-child(odd) {
    background-color: var(--bg-elevated);
}

.paginatore {
    width: 50%;
    margin-left: 50%;
    padding: 0.75rem;
    background-color: var(--color-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    border-radius: var(--radius-sm);
}

.paginatore button {
    background-color: transparent;
    color: var(--text);
    appearance: none;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.paginatore button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.contenitore {
    background: var(--color-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    width: calc(70% - 40px);
    height: calc(80% - 40px);
    left: 50%;
    margin-left: calc((35% - 20px) * -1);
    top: 10%;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.h-contenitore-chat {
    background: var(--color-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    z-index: 20;
}

.left-hcc {
    width: 50%;
    padding: 10px;
}

.status-label-h {
    width: 50%;
    text-align: right;
    padding: 10px;
}

.testo-generico {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input-pers {
    width: 60%;
    height: 120px;
    appearance: none;
    background-color: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-pers:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.livello-audio {
    width: 100%;
    display: flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.25rem;
}

.status-label {
    width: 60%;
    padding: 1.25rem;
    border: 1px solid var(--primary-light);
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--text);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

#tickBar {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    gap: 2px;
}

.tick {
    flex: 1;
    max-width: 6%;
    height: 10px;
    background: var(--color-border);
    border-radius: 2px;
}

.tick:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.tick:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.tick.on {
    background: var(--primary);
}

.loader-pers {
    display: flex;
    align-content: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: fixed;
    background: rgba(247, 248, 250, 0.85);
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    top: -15px;
    color: var(--text);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --- Header --- */
.header {
    width: 100%;
    position: fixed;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--shadow-soft);
    z-index: 30;
}

.cont-h {
    width: min(100%, 1200px);
    margin: 0 auto;
    height: var(--header-height);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header .logo img,
.header-logo {
    max-height: 21px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.menu {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.cloudia-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 28px;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-on-header-muted);
    white-space: nowrap;
    user-select: none;
}

.cloudia-chip__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.45);
}

.cloudia-chip--on {
    border-color: rgba(76, 175, 80, 0.55);
    color: #d7f5d8;
}

.cloudia-chip--on .cloudia-chip__dot {
    background: var(--color-success);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.25), 0 0 8px rgba(76, 175, 80, 0.55);
}

.cloudia-chip--off {
    border-color: rgba(228, 87, 87, 0.45);
    color: #ffd6d6;
}

.cloudia-chip--off .cloudia-chip__dot {
    background: var(--color-danger);
    box-shadow: 0 0 0 2px rgba(228, 87, 87, 0.2);
}

.header .btn-menu {
    height: 32px;
    min-width: auto;
    padding: 0 0.75rem;
    appearance: none;
    background-color: transparent;
    font-size: 0.75rem;
    color: var(--text-on-header-muted);
    font-family: var(--font-body);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.header .btn-menu:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.header .btn-menu-special {
    background: var(--primary);
    color: var(--text-inverse) !important;
    border-color: transparent;
    font-weight: 600;
}

.header .btn-menu-special:hover {
    background: var(--primary-dark);
    color: var(--text-inverse) !important;
}

.btn-menu {
    height: 32px;
    min-width: auto;
    padding: 0 0.75rem;
    appearance: none;
    background-color: transparent;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.btn-menu:hover {
    color: var(--text);
    background: var(--bg-elevated);
    border-color: var(--border);
}

.btn-menu-special {
    background: var(--primary);
    color: var(--text-inverse) !important;
    font-weight: 600;
}

.btn-menu-special:hover {
    background: var(--primary-dark);
    color: var(--text-inverse) !important;
}

.btn-chat {
    height: 32px;
    min-width: 100px;
    appearance: none;
    background: var(--primary);
    font-size: 0.875rem;
    color: var(--text-inverse);
    font-family: var(--font-body);
    border: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.btn-chat:hover {
    background: var(--primary-dark);
}

.left-m {
    position: fixed;
    top: var(--header-height);
    right: -240px;
    width: 240px;
    height: calc(100% - var(--header-height));
    background: var(--color-card);
    border-left: 1px solid var(--border);
    padding-top: 1.5rem;
    transition: right 0.3s ease;
    z-index: 30;
    box-shadow: var(--shadow-soft);
}

.left-m .btn-menu {
    width: 86%;
    margin-left: 7%;
    margin-bottom: 0.75rem;
    text-align: left;
    justify-content: flex-start;
}

.btn-menu .material-symbols-outlined {
    font-size: 1rem;
}

.btn-menu-ico {
    width: 36px;
    padding: 0;
}

.header .btn-operatore {
    max-width: 180px;
    border-left: 1px solid var(--header-border);
    border-radius: 0;
    color: var(--text-on-header);
}

.left-m hr {
    border: none;
    border-bottom: 1px solid var(--border);
    margin: 0.75rem 7%;
}

#vuOuter {
    height: 10px;
    border-radius: 8px;
    background: var(--color-border);
    overflow: hidden;
}

#vuInner {
    height: 10px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 8px;
    transition: width 0.08s linear;
}

.small-muted {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cont-box-white {
    color: var(--text);
    font-size: 0.75rem;
}

.box-100 {
    width: 100%;
}

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

.badge-premium {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ico-box .material-symbols-outlined {
    font-size: 2.5rem;
}

.text-box {
    width: calc(100% - 150px);
}

.h-box {
    width: 100%;
    background: var(--color-secondary);
    color: var(--text-inverse);
    padding: 0.5rem;
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
    border-bottom: none;
}

.text-box table {
    width: 100%;
}

.text-box table td {
    padding: 0.625rem;
}

.text-box table tr:nth-child(odd) {
    background-color: var(--bg-elevated);
}

.btn-sm {
    font-size: 0.625rem;
    border: 1px solid var(--border-strong);
    min-width: 100px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
}

.spinner-border {
    height: 15px;
    width: 15px;
    border-width: 2px;
    margin-right: 10px;
}

.spinner-border.color-spin {
    animation: spinner-border 0.75s linear infinite, color-spin 2s linear infinite;
}

.titolo-lisa-result {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    width: 100%;
    text-transform: uppercase;
    color: var(--text);
}

.info-righe-lisa-result {
    color: var(--text-muted);
    font-size: 0.75rem;
}

@keyframes color-spin {
    0%   { color: var(--primary-light); }
    33%  { color: var(--primary); }
    66%  { color: var(--accent); }
    100% { color: var(--primary-light); }
}

.check-chat {
    transform: scale(1.35);
    accent-color: var(--primary);
}

/* Login */
.patina-login {
    background: transparent !important;
}

.logo-brand {
    display: block;
    width: min(100%, 180px);
    height: auto;
    margin: 0 auto 1rem;
}

#form-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

#form-login .input-pers-text {
    width: min(100%, 280px);
    margin: 0;
}

/* Index hero */
.cont-box-hero {
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    top: var(--header-height);
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
}

.lisarch-hero-logo {
    position: relative;
    z-index: 2;
    width: min(520px, 70vw);
    filter: drop-shadow(0 8px 24px rgba(29, 53, 87, 0.2));
    margin-left: 1.25rem;
}

@media screen and (max-width: 768px) {
    .cont-box-hero {
        justify-content: center;
    }

    .cont-box-hero .lisarch-hero-logo {
        margin-left: 0;
    }

    .box {
        width: 100%;
    }

    .btn-pc {
        display: none;
    }

    .contenitore {
        position: absolute;
        width: calc(96% - 40px);
        margin-left: calc((48% - 20px) * -1);
        display: block;
        height: auto;
        overflow-y: scroll;
        text-align: center;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .input-pers {
        width: 96%;
    }

    #vuOuter {
        width: 100%;
    }

    .status-label {
        width: 100%;
        padding: 0.75rem;
    }

    .btn-operatore {
        max-width: none;
        flex: 1;
        border-left: none;
    }

    .logo {
        width: 40%;
    }

    .menu {
        width: 60%;
    }

    .left-m {
        right: -100%;
        width: 100%;
    }
}
