/**
 * Intellia — tema backoffice
 * Palette e glass UI dalla demo, sfondo statico (no Vanta).
 */

:root {
    --font-body: "Montserrat", system-ui, -apple-system, sans-serif;
    --font-heading: "Good Times", "Montserrat", sans-serif;
    --intellia-accent: #1e6bb8;
    --intellia-accent-soft: rgba(30, 107, 184, 0.22);
    --intellia-accent-glow: rgba(30, 107, 184, 0.35);
    --intellia-bg-0: #080c18;
    --intellia-bg-1: #0d1528;
    --intellia-bg-2: #111d33;
    --intellia-surface: rgba(26, 31, 46, 0.92);
    --intellia-surface-elevated: rgba(32, 40, 58, 0.96);
    --intellia-border: rgba(255, 255, 255, 0.1);
    --intellia-border-strong: rgba(255, 255, 255, 0.16);
    --intellia-text: #f0f4f8;
    --intellia-text-muted: rgba(240, 244, 248, 0.68);
    --intellia-radius: 0.65rem;
    --intellia-radius-lg: 1rem;
    --intellia-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

/* Sfondo statico — niente Vanta */
body {
    font-family: var(--font-body);
    color: var(--intellia-text);
    background:
        radial-gradient(ellipse 120% 80% at 10% -20%, rgba(30, 107, 184, 0.18), transparent 55%),
        radial-gradient(ellipse 90% 60% at 100% 0%, rgba(94, 179, 255, 0.08), transparent 50%),
        linear-gradient(165deg, var(--intellia-bg-0) 0%, var(--intellia-bg-1) 45%, var(--intellia-bg-2) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Header top bar */
.header {
    background: rgba(8, 12, 24, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--intellia-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.header .material-icons,
.left-h .material-icons {
    color: var(--intellia-text-muted);
    transition: color 0.2s ease;
}

.left-h .material-icons:hover {
    color: var(--intellia-accent);
}

.right-h {
    color: var(--intellia-text-muted);
    font-size: 0.8125rem;
}

.account-h {
    background: linear-gradient(135deg, var(--intellia-accent), #3d8fd4);
    box-shadow: 0 0 0 2px rgba(30, 107, 184, 0.25);
    font-weight: 600;
}

/* Sidebar */
.menu {
    background: rgba(10, 14, 26, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--intellia-border);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.25);
}

.top-menu {
    border-bottom: 1px solid var(--intellia-border);
    background: rgba(255, 255, 255, 0.02);
}

.top-menu > img {
    width: 70%;
    height: 70%;
    max-height: 56px;
    object-fit: contain;
}

.label-menu {
    color: var(--intellia-text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}

.link-menu {
    color: var(--intellia-text-muted);
    border-radius: var(--intellia-radius);
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.55rem 0.65rem;
}

.link-menu .material-icons {
    color: inherit;
    font-size: 1.25rem;
}

.link-menu:hover {
    background: rgba(30, 107, 184, 0.12);
    color: var(--intellia-text);
    border-color: rgba(30, 107, 184, 0.2);
}

.link-menu-sel {
    background: linear-gradient(135deg, rgba(30, 107, 184, 0.35), rgba(30, 107, 184, 0.18));
    color: #fff;
    border-color: rgba(30, 107, 184, 0.45);
    box-shadow: 0 0 20px var(--intellia-accent-glow);
}

/* Pagina */
.pagina {
    margin-top: 1rem;
}

.titolo-pagina,
.intellia-box-title,
.h-box {
    font-family: var(--font-heading);
    letter-spacing: 0.06em;
    color: var(--intellia-text);
}

.titolo-pagina {
    font-size: 1.15rem;
    font-weight: 400;
    text-transform: uppercase;
}

.intellia-box-title {
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 0 1rem;
    padding-right: 3.5rem;
    color: var(--intellia-accent);
}

.bread-pagina {
    color: var(--intellia-text-muted);
}

/* Card / box */
.box {
    background: var(--intellia-surface);
    border: 1px solid var(--intellia-border);
    border-radius: var(--intellia-radius-lg);
    box-shadow: var(--intellia-shadow);
    color: var(--intellia-text);
}

.box-link:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(30, 107, 184, 0.25);
    margin-top: -4px;
    border-color: rgba(30, 107, 184, 0.3);
}

.h-box {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--intellia-border);
    color: var(--intellia-text);
}

.label-h-box {
    background: var(--intellia-accent-soft);
    color: var(--intellia-accent);
}

.f-box {
    border-top-color: var(--intellia-border);
}

.numero-box {
    color: var(--intellia-text);
}

.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    top: 1.1rem;
    right: 1.1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--intellia-border);
}

.icon-box .material-icons {
    font-size: 1.25rem !important;
    color: var(--intellia-text-muted);
}

.icon-box-blu {
    background: var(--intellia-accent-soft);
}

.icon-box-blu .material-icons {
    color: var(--intellia-accent);
}

.icon-box-yellow {
    background: rgba(251, 188, 8, 0.15);
}

.icon-box-yellow .material-icons {
    color: #fbbc08;
}

.icon-box-pink {
    background: rgba(236, 98, 148, 0.15);
}

.icon-box-pink .material-icons {
    color: #ec6294;
}

.cont-table .material-icons,
.icon-table-action {
    font-size: 1.125rem !important;
    vertical-align: middle;
    color: var(--intellia-text-muted);
}

.cont-table .material-icons:hover,
.icon-table-action:hover {
    color: var(--intellia-accent);
}

/* Toolbar */
.toolbar {
    background: rgba(8, 12, 24, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--intellia-border);
    color: var(--intellia-text-muted);
}

/* Tabelle */
.cont-table {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--intellia-border);
    border-radius: var(--intellia-radius-lg);
}

.cont-table table {
    color: var(--intellia-text);
}

.cont-table thead {
    border-bottom: 1px solid var(--intellia-border-strong);
}

.cont-table thead th {
    color: var(--intellia-accent);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.6875rem;
}

.cont-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.cont-table tbody tr:hover {
    background: rgba(30, 107, 184, 0.08);
}

.cont-table tbody tr td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Bottoni */
.btn-pers {
    background: linear-gradient(135deg, var(--intellia-accent), #2a7ec9);
    border-color: rgba(30, 107, 184, 0.6);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px var(--intellia-accent-glow);
    transition: filter 0.2s ease, transform 0.15s ease;
}

.btn-pers:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-pers-invertito {
    background: linear-gradient(135deg, #ec6294, #d94f82);
    border-color: rgba(236, 98, 148, 0.6);
}

.btn-pers-green {
    background: linear-gradient(135deg, #1f9d55, #178f4c);
    border-color: rgba(31, 157, 85, 0.6);
}

/* Input */
.input-pers,
.input-pers-piccolo,
.input-src {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--intellia-border-strong);
    color: var(--intellia-text);
}

.input-pers::placeholder,
.input-pers-piccolo::placeholder,
.input-src::placeholder {
    color: var(--intellia-text-muted);
}

.input-pers:focus,
.input-pers-piccolo:focus,
.input-src:focus {
    outline: none;
    border-color: rgba(30, 107, 184, 0.55);
    box-shadow: 0 0 0 3px rgba(30, 107, 184, 0.15);
}

.label-input,
.riga-elenco-palla {
    color: var(--intellia-text-muted);
}

/* Dropdown */
.dropdown-menu {
    background: var(--intellia-surface-elevated);
    border: 1px solid var(--intellia-border);
    box-shadow: var(--intellia-shadow);
}

.dropdown-item {
    color: var(--intellia-text);
}

.dropdown-item:hover {
    background: rgba(30, 107, 184, 0.15);
    color: #fff;
}

.dropdown-item .material-icons {
    color: var(--intellia-accent);
}

/* Login */
.patina {
    background: rgba(8, 12, 24, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.box-login {
    background: var(--intellia-surface-elevated);
    border: 1px solid var(--intellia-border);
    border-radius: var(--intellia-radius-lg);
    box-shadow: var(--intellia-shadow);
    color: var(--intellia-text);
    width: min(92%, 26rem);
}

.box-login-alert {
    border-color: rgba(220, 60, 60, 0.4);
}

.intellia-login-box {
    text-align: center;
}

.intellia-login-avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 0.75rem;
    object-fit: cover;
    object-position: center top;
    background: #000;
    border: 2px solid color-mix(in srgb, var(--intellia-accent) 45%, transparent);
    margin: 0 auto 0.75rem;
    display: block;
}

.intellia-login-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--intellia-accent);
    margin-bottom: 0.25rem;
}

.intellia-login-tagline {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--intellia-text-muted);
    margin-bottom: 1.25rem;
}

.intellia-login-lead {
    font-size: 0.875rem;
    color: var(--intellia-text-muted);
    margin-bottom: 1rem;
    text-align: left;
}

.intellia-login-box form {
    text-align: left;
}

/* Chat / notifiche */
.box-chat-utente {
    background: rgba(30, 107, 184, 0.15);
    color: var(--intellia-text);
}

.notifica {
    background: var(--intellia-surface-elevated);
    border-color: var(--intellia-border);
    color: var(--intellia-text);
    box-shadow: var(--intellia-shadow);
}

/* Bootstrap override minimi */
.table {
    color: var(--intellia-text);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
    color: var(--intellia-text);
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--intellia-border-strong);
    color: var(--intellia-text);
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(30, 107, 184, 0.55);
    color: var(--intellia-text);
    box-shadow: 0 0 0 3px rgba(30, 107, 184, 0.15);
}

.modal-content {
    background: var(--intellia-surface-elevated);
    border: 1px solid var(--intellia-border);
    color: var(--intellia-text);
}

.modal-header,
.modal-footer {
    border-color: var(--intellia-border);
}

.alert {
    border-radius: var(--intellia-radius);
}

/* Scrollbar sottile */
.menu::-webkit-scrollbar,
.box-login::-webkit-scrollbar {
    width: 6px;
}

.menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}
