:root {
    --seitek-ink: #152d39;
    --seitek-teal: #167c83;
    --seitek-teal-dark: #126970;
    --seitek-teal-soft: #e9f4f2;
    --seitek-muted: #647b7a;
    --seitek-paper: #f5f8f7;
    --seitek-line: #e5eeeb;
    --seitek-amber: #e5a82f;
    --seitek-shadow: 0 0.35rem 1.25rem rgba(21, 45, 57, 0.07);
    --bs-primary: var(--seitek-teal);
    --bs-primary-rgb: 22, 124, 131;
    --bs-link-color: var(--seitek-teal);
    --bs-link-hover-color: var(--seitek-teal-dark);
    --bs-body-color: var(--seitek-ink);
    --bs-body-bg: var(--seitek-paper);
    --bs-border-color: var(--seitek-line);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    color: var(--seitek-ink);
    background: var(--seitek-paper);
    font-size: 0.9375rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a,
button,
.btn {
    transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.nav-icon {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-icon .nav-icon,
.maia-avatar .nav-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.maia-large .nav-icon {
    width: 1.45rem;
    height: 1.45rem;
}

.topbar-mark .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.page-content {
    padding: 2rem clamp(1rem, 3vw, 2.5rem) 2.25rem;
}

.topbar {
    min-height: 4.5rem;
    height: auto;
    padding: 0 clamp(1rem, 3vw, 2.25rem);
}

.page-heading {
    margin: 1.75rem 0 1.5rem;
    align-items: flex-end;
}

.page-heading h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.page-heading {
    margin-top: 1.25rem;
}

.page-heading p,
.panel-header p,
.stat-description,
.form-text {
    color: var(--seitek-muted);
}

.page-heading p {
    max-width: 58rem;
    font-size: 0.9375rem;
}

.eyebrow,
.breadcrumbs,
.panel-label,
.stat-top {
    letter-spacing: 0.09em;
}

.panel,
.stat-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--seitek-shadow);
}

.panel-header {
    padding: 1.5rem 1.5rem 1.25rem;
}

.panel h2 {
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.panel-header p {
    font-size: 0.875rem;
}

.stat-card {
    padding: 1.35rem 1.4rem 0;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.table-responsive {
    border-radius: 0 0 1rem 1rem;
}

.table {
    --bs-table-hover-bg: #f1f7f5;
    margin-bottom: 0;
    color: var(--seitek-ink);
}

.table > :not(caption) > * > * {
    border-right: 0;
    border-left: 0;
}

.table thead th,
.table > tbody > tr:first-child > th,
.table > tr:first-child > th {
    padding: 0.9rem 1.125rem;
    background: #f4f8f7;
    color: #56706e;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.table tbody td,
.table > tr > td {
    padding: 0.9rem 1.125rem;
    vertical-align: middle;
    color: #354e4e;
}

.table tbody tr:not(:last-child) > * {
    border-bottom: 1px solid #edf2f0;
}

.table-hover > tbody > tr:hover > * {
    color: var(--seitek-ink);
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.form-label {
    margin-bottom: 0.45rem;
    color: #29434a;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-control,
.form-select {
    min-height: 2.75rem;
    border-color: #dce8e5;
    border-radius: 0.7rem;
    color: var(--seitek-ink);
}

textarea.form-control {
    min-height: 6rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #78b7b1;
    box-shadow: 0 0 0 0.22rem rgba(22, 124, 131, 0.13);
}

.btn {
    min-height: 2.5rem;
    padding: 0.55rem 0.95rem;
    border-radius: 0.7rem;
    font-weight: 600;
}

.btn-sm {
    min-height: 2.1rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.6rem;
    font-size: 0.8125rem;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--seitek-teal);
    --bs-btn-border-color: var(--seitek-teal);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--seitek-teal-dark);
    --bs-btn-hover-border-color: var(--seitek-teal-dark);
    --bs-btn-active-bg: #105b60;
    --bs-btn-active-border-color: #105b60;
}

.btn-outline-primary {
    --bs-btn-color: #176e73;
    --bs-btn-border-color: #9cc5c1;
    --bs-btn-hover-color: #125e63;
    --bs-btn-hover-bg: #e9f4f2;
    --bs-btn-hover-border-color: #7eb5b0;
    --bs-btn-active-color: #125e63;
    --bs-btn-active-bg: #deeeeb;
    --bs-btn-active-border-color: #7eb5b0;
}

.btn-outline-secondary {
    --bs-btn-color: #526865;
    --bs-btn-border-color: #d2dfdc;
    --bs-btn-hover-color: #263f42;
    --bs-btn-hover-bg: #eef4f2;
    --bs-btn-hover-border-color: #c3d5d1;
}

.nav-menu {
    gap: 0.3rem;
}

.nav-item {
    min-height: 2.75rem;
    height: auto;
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    border-radius: 0.7rem;
    font-size: 0.875rem;
    transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-item:not(.active):hover {
    color: #f1f7f6;
    background: rgba(255, 255, 255, 0.06);
}

.topbar-right {
    gap: 0.65rem;
    flex-wrap: wrap;
}

.mobile-brand,
.sidebar-user-tools-host {
    display: none;
}

.impersonation-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.impersonation-select {
    width: clamp(12rem, 18vw, 17rem);
    min-height: 2.25rem;
    font-size: 0.8rem;
}

.impersonation-chip {
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #fff2d6;
    color: #785614;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.impersonation-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 clamp(1rem, 3vw, 2.5rem) 0.5rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid #efdba8;
    border-radius: 0.85rem;
    background: #fff8e8;
    color: #674f20;
    font-size: 0.875rem;
}

.impersonation-banner-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    fill: none;
    stroke: #aa7716;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.impersonation-feedback {
    color: #9e3e36;
    font-size: 0.75rem;
}

.guide-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(13rem, 18rem);
    align-items: center;
    gap: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
}

.guide-card-icon {
    display: grid;
    width: 3.75rem;
    height: 3.75rem;
    place-items: center;
    border-radius: 1rem;
    background: var(--seitek-teal-soft);
    color: var(--seitek-teal);
}

.guide-card-icon svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.guide-card-copy h2 {
    margin: 0.75rem 0 0.5rem;
    color: var(--seitek-ink);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.guide-card-copy p {
    max-width: 52rem;
    color: var(--seitek-muted);
    font-size: 0.9375rem;
}

.guide-card-aside {
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    background: #f3f8f6;
    color: #395451;
    font-size: 0.875rem;
}

.guide-card-aside strong {
    color: var(--seitek-ink);
}

.guide-card-aside ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.65rem 0 0;
    padding-left: 1.15rem;
}

.guide-modal-dialog {
    max-width: 70rem;
}

.guide-pdf-frame {
    display: block;
    width: 100%;
    height: min(76vh, 54rem);
    min-height: 34rem;
    border: 0;
    background: #f3f6f5;
}

.alert {
    border: 0;
    border-radius: 0.85rem;
    box-shadow: 0 0.2rem 0.75rem rgba(21, 45, 57, 0.045);
}

:focus-visible {
    outline: 3px solid var(--seitek-amber);
    outline-offset: 3px;
}

/* Elenco progetti a schede, con un'azione per ogni progetto. */
.project-card-list {
    margin-bottom: 1.5rem;
}

table.project-list-grid,
table.project-list-grid > tbody,
table.project-list-grid > tbody > tr,
table.project-list-grid > tbody > tr > td {
    display: block;
    width: 100%;
}

table.project-list-grid {
    margin: 0;
}

table.project-list-grid > tbody > tr:not(:last-child) {
    margin-bottom: 1rem;
}

table.project-list-grid > tbody > tr > td {
    padding: 0 !important;
}

.project-card {
    margin: 0;
    overflow: hidden;
}

.project-card-content {
    display: grid;
    grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: stretch;
}

.project-card-preview {
    display: grid;
    place-items: center;
    align-self: center;
    aspect-ratio: 16 / 10;
    margin: 1.5rem 0 1.5rem 1.5rem;
    overflow: hidden;
    border: 1px solid #e5efeb;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, #eef7f3, #f4f7f5 60%, #e9f2ef);
    color: var(--seitek-muted);
    font-size: 0.8rem;
    text-align: center;
}

.project-card-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-preview img[hidden] {
    display: none;
}

.project-card-preview span {
    padding: 1rem;
}

.project-card-main {
    padding: 1.5rem 1.5rem 1.15rem;
}

.project-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.project-card-copy {
    min-width: 0;
}

.project-card-client {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--seitek-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.project-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.project-card-title {
    color: var(--seitek-ink);
    text-decoration: none;
}

.project-card-title:hover {
    color: var(--seitek-teal);
}

.project-card-description {
    max-width: 70rem;
    overflow-wrap: anywhere;
}

.project-status {
    flex: 0 0 auto;
    padding: 0.5rem 0.7rem;
    background: #e9f5ef;
    color: #3e806a;
    font-size: 0.75rem;
}

.project-site-links,
.project-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.project-card-actions {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--seitek-line);
}

.project-environments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 0.8rem;
}
.project-environment {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--seitek-line);
    border-radius: 0.95rem;
    background: #fbfdfc;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.project-environment:hover { transform: translateY(-1px); border-color: #c9ddd5; box-shadow: 0 0.35rem 0.9rem rgba(21, 45, 57, 0.08); }
.project-environment:focus-within { border-color: #70aa98; box-shadow: 0 0 0 0.2rem rgba(43, 126, 117, 0.13); }
.project-environment-link { position: absolute; z-index: 2; inset: -1px; overflow: hidden; border-radius: inherit; font-size: 0; text-indent: -9999px; white-space: nowrap; }
.project-environment-link:focus-visible { outline: 3px solid #287c72; outline-offset: 3px; }
.project-environment-development {
    background: linear-gradient(145deg, #f1f8f5, #fbfdfc 72%);
}
.project-environment-production {
    background: linear-gradient(145deg, #fbf7ed, #fffdfa 72%);
}
.project-environment-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0;
}
.project-environment-icon {
    display: grid;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 0.75rem;
    background: #e1f0ea;
    color: #237b69;
}
.project-environment-production .project-environment-icon {
    background: #f6ecd4;
    color: #996a16;
}
.project-environment-icon .nav-icon {
    width: 1.15rem;
    height: 1.15rem;
}
.project-environment-heading h3 {
    margin: 0;
    color: var(--seitek-ink);
    font-size: 0.98rem;
    font-weight: 700;
}
.project-environment-caption {
    color: var(--seitek-muted);
    font-size: 0.72rem;
}
.project-environment-updated-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.28rem;
    line-height: 1.25;
}
.project-environment-updated {
    color: var(--seitek-ink);
    font-size: 0.74rem;
    font-weight: 650;
}
.project-environment-url {
    display: block;
    width: 100%;
    min-height: 1.2rem;
    overflow-wrap: anywhere;
    color: var(--seitek-muted);
    font-size: 0.78rem;
}
.project-card-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.7rem;
    padding: 0.65rem 0.95rem;
    border-radius: 0.85rem;
    font-weight: 650;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.project-card-actions .btn:hover,
.project-card-actions .btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0.35rem 0.9rem rgba(21, 45, 57, 0.12);
}.project-card-actions .nav-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.35rem;
    vertical-align: -0.15rem;
}
.project-card-actions .action-edit { margin-left: auto; }

.project-empty {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.project-empty h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.project-create-form {
    border: 1px solid #d7eae5 !important;
    background: #f0f8f6;
}

.project-create-form .form-control,
.project-create-form .form-select {
    background-color: rgba(255, 255, 255, 0.82);
}

.project-url-manual {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2rem;
    margin-top: 0.5rem;
}

.project-url-manual input[type="checkbox"] {
    position: static;
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.project-url-manual label {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: var(--seitek-muted);
    cursor: pointer;
    font-size: 0.875rem;
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
    border-style: dashed;
    background-color: transparent !important;
    color: var(--seitek-muted);
    opacity: 0.9;
}

@media (max-width: 767.98px) {
    .project-card-heading {
        flex-direction: column;
        gap: 0.75rem;
    }

    .project-card-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .project-card-preview {
        width: auto;
        margin: 1rem 1rem 0;
    }

    .project-card-main {
        padding: 1.25rem 1.25rem 1rem;
    }

    .project-card-actions {
        padding: 1rem 1.25rem 1.25rem;
    }

    .project-empty {
        align-items: flex-start;
        padding: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 1.25rem 1rem 1.75rem;
    }

    .page-heading {
        margin: 1.25rem 0 1.25rem;
    }

    .panel-header {
        padding: 1.25rem 1.25rem 1rem;
    }

    .stat-card {
        padding: 1.05rem 1rem 0;
    }

    .table thead th,
    .table tbody td {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .nav-item {
        min-height: 2.5rem;
        height: auto;
    }

    .topbar-right {
        gap: 0.4rem;
    }

    .impersonation-select {
        width: min(13rem, 48vw);
    }

    .impersonation-banner {
        margin: 0 1rem 0.25rem;
        align-items: flex-start;
        font-size: 0.8125rem;
    }

    .guide-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 1rem;
    }

    .guide-card-aside {
        grid-column: 1 / -1;
    }

    .guide-pdf-frame {
        height: 68vh;
        min-height: 28rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Seitek Studio: contrasto, feedback tattile e animazioni leggere. */
.sidebar {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #102e3a;
    background-image: linear-gradient(180deg, rgba(13, 43, 54, .72), rgba(17, 54, 63, .82)), url("../images/seitek-sidebar-pattern.svg");
    background-position: center, right top;
    background-size: cover, cover;
}

.table-responsive {
    background: #fff;
}

.table {
    --bs-table-bg: #fff;
    --bs-table-hover-bg: #eef7f5;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    padding: 0.95rem 1.5rem;
    background: #e5f1ed;
    color: #355e58;
    border-bottom: 1px solid #d8e9e3;
}

.table tbody td {
    padding: 0.95rem 1.5rem;
    text-align: left;
}

.table th,
.table td {
    vertical-align: middle;
}

.table td .btn,
.table td .aspNetDisabled {
    margin: .15rem .28rem .15rem 0;
    white-space: nowrap;
}

.btn-seitek-accent {
    --bs-btn-color: #23363b;
    --bs-btn-bg: #f2b544;
    --bs-btn-border-color: #e5a52d;
    --bs-btn-hover-color: #1c3036;
    --bs-btn-hover-bg: #e9a92f;
    --bs-btn-hover-border-color: #d9961e;
    --bs-btn-active-color: #1c3036;
    --bs-btn-active-bg: #d9961e;
    --bs-btn-active-border-color: #cf8e18;
    --bs-btn-disabled-color: #47585b;
    --bs-btn-disabled-bg: #edd49f;
    --bs-btn-disabled-border-color: #e5d09f;
    box-shadow: 0 .25rem .75rem rgba(185, 126, 20, .2);
}

.btn-project-open {
    --bs-btn-color: #fff;
    --bs-btn-bg: #17776c;
    --bs-btn-border-color: #17776c;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #125f57;
    --bs-btn-hover-border-color: #125f57;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #104f49;
    --bs-btn-active-border-color: #104f49;
    font-weight: 650;
    box-shadow: 0 .25rem .7rem rgba(23, 119, 108, .17);
}

.btn-project-open .nav-icon {
    color: #fff;
    opacity: 1;
}

.btn-project-audit {
    --bs-btn-color: #594416;
    --bs-btn-bg: #fff2cf;
    --bs-btn-border-color: #efd48f;
    --bs-btn-hover-color: #46340f;
    --bs-btn-hover-bg: #ffe8b0;
    --bs-btn-hover-border-color: #e3bd61;
    --bs-btn-active-color: #46340f;
    --bs-btn-active-bg: #f8dca0;
    --bs-btn-active-border-color: #d4a84e;
    font-weight: 650;
    box-shadow: 0 .25rem .7rem rgba(143, 108, 37, .10);
}

.btn:active,
button:active {
    transform: translateY(1px) scale(.97);
    transition-duration: .08s;
}

.action-edit::before,
.action-delete::before,
.action-publish::before {
    content: "";
    display: inline-block;
    width: .95rem;
    height: .95rem;
    margin-right: .4rem;
    vertical-align: -.12rem;
    background-color: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.action-edit::before { mask-image: url("../icons/bootstrap/pencil-square.svg"); -webkit-mask-image: url("../icons/bootstrap/pencil-square.svg"); }
.action-delete::before { mask-image: url("../icons/bootstrap/trash3.svg"); -webkit-mask-image: url("../icons/bootstrap/trash3.svg"); }
.action-publish::before { mask-image: url("../icons/bootstrap/rocket-takeoff.svg"); -webkit-mask-image: url("../icons/bootstrap/rocket-takeoff.svg"); }

.page-content > .page-heading,
.page-content > .row,
.page-content > .panel,
.page-content > section,
.page-content > footer {
    animation: page-arrive .48s cubic-bezier(.2, .75, .25, 1) both;
}

.page-content > :nth-child(2) { animation-delay: .04s; }
.page-content > :nth-child(3) { animation-delay: .08s; }
.page-content > :nth-child(4) { animation-delay: .12s; }

@keyframes page-arrive {
    from { opacity: 0; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767.98px) {
    .topbar { align-items: center; min-height: 58px; height: 60px; padding: .45rem .75rem; }
    .topbar-left { min-width: 0; flex: 1 1 auto; align-items: center; gap: .65rem; }
    .topbar-mark,
    .topbar-page-title { display: none; }
    .mobile-brand { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; color: var(--seitek-ink); }
    .mobile-brand-circle { width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; object-fit: contain; }
    .mobile-brand .brand-wordmark { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
    .mobile-brand .brand-wordmark small { margin: 0 0 .18rem .05rem; color: #167c83; font-size: .43rem; letter-spacing: .18em; }
    .mobile-brand .brand-wordmark strong { color: #152d39; font-size: 1rem; letter-spacing: .025em; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1045; width: min(18rem, 86vw); height: 100vh; height: 100dvh; overflow-y: auto; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 1rem 0 2.5rem rgba(13, 43, 54, .22); }
    .app-shell.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1040; display: none; border: 0; background: rgba(13, 30, 38, .48); }
    .app-shell.sidebar-open .sidebar-backdrop { display: block; }
    .topbar > .topbar-right { display: none; }
    .sidebar-user-tools-host { display: block; width: auto; margin: 1.1rem 1rem 1rem; padding-top: 1rem; border-top: 1px solid #36535b; }
    .sidebar-user-tools-host .topbar-right { display: flex; flex-direction: column; align-items: stretch; gap: .65rem; }
    .sidebar-user-tools-host .user-name { min-width: 0; flex: 1 1 auto; }
    .sidebar-user-tools-host .user-name strong { color: #f1f7f6; }
    .sidebar-user-tools-host .user-name small { color: #a9c0c1; }
    .sidebar-user-tools-host .user-avatar { flex: 0 0 2.2rem; }
    .sidebar-user-tools-host .impersonation-control { width: 100%; max-width: 100%; flex-direction: column; align-items: stretch; flex-wrap: wrap; gap: .5rem; }
    .sidebar-user-tools-host .impersonation-select { width: 100%; max-width: 100%; }
    .sidebar-user-tools-host .topbar-right > .btn,
    .sidebar-user-tools-host .impersonation-control > .btn { width: 100%; }
    .table-responsive { max-width: 100%; }
    .table { min-width: 38rem; }
    .table td .btn { margin-right: .2rem; }
    .table thead th, .table tbody td { padding-right: 1rem; padding-left: 1rem; }
    .login-shell { padding: 1rem; }
    .login-card { padding: 1.5rem !important; }
}

.sidebar-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .27rem;
    border: 1px solid #d7e4e0;
    border-radius: .7rem;
    background: #fff;
    color: var(--seitek-ink);
}

.sidebar-toggle span {
    width: 1.05rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.sidebar-backdrop { display: none; }

.button-loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    border: 2px solid rgba(255, 255, 255, .42);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spin .9s cubic-bezier(.45, .08, .55, .92) infinite;
}
.is-loading { cursor: wait !important; }
.btn:not(input).is-loading { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; }
.button-loading-label { display: inline-block; }
.button-loading-wrap { position: relative; display: inline-flex; vertical-align: middle; max-width: 100%; }
.button-loading-wrap > input.is-loading { width: 100%; height: 100%; margin: 0; color: transparent !important; text-shadow: none !important; }
.button-loading-overlay { position: absolute; z-index: 2; inset: 0; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; margin: 0; color: inherit; pointer-events: none; }
@keyframes button-loading-spin { to { transform: rotate(360deg); } }

@media (max-width: 767.98px) {
    .sidebar-toggle { display: inline-flex; }
    body.sidebar-menu-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    .page-content > *, .login-card, .login-orbit, .login-node, .login-atmosphere::before, .button-loading-spinner { animation: none !important; }
    .btn:active, button:active { transform: none; }
}

/* Sidebar mobile: gerarchia verticale e contrasto uniforme. */
@media (max-width: 767.98px) {
    .sidebar { display: flex; flex-direction: column; align-items: stretch; }
    .sidebar .brand { flex: 0 0 auto; justify-content: flex-start; min-height: 5rem; margin: 0 .85rem .75rem; padding: .85rem; border-bottom: 1px solid rgba(216, 239, 234, .15); }
    .sidebar > form, .sidebar > div, .sidebar > nav, .sidebar > .sidebar-caption { width: 100%; }
    .sidebar .sidebar-caption { display: block; margin: 1rem 1.15rem .45rem; color: #b8d4d2; font-size: .68rem; letter-spacing: .12em; }
    .sidebar .nav-menu { display: flex; flex-direction: column; align-items: stretch; gap: .3rem; width: auto; overflow: visible; padding: 0 .8rem; }
    .sidebar .nav-item { display: flex; width: 100%; min-height: 2.85rem; justify-content: flex-start; white-space: normal; color: #e0efed; font-size: .88rem; }
    .sidebar .nav-item .nav-icon { width: 1.3rem; flex: 0 0 1.3rem; }
    .sidebar .nav-item.active { color: #fff; background: #1d5961; box-shadow: inset 3px 0 #48c5b4; }
    .sidebar .sidebar-bottom { display: flex; margin: auto 1rem .85rem; padding-top: .9rem; color: #edf7f5; }
    .sidebar .sidebar-bottom small, .sidebar .sidebar-status { color: #b5cecc; }
    .sidebar-user-tools-host .topbar-right { color: #f1f7f6; }
    .sidebar-user-tools-host .user-name strong { color: #f7fbfa; }
    .sidebar-user-tools-host .user-name small { color: #bed2d1; }
    .sidebar-user-tools-host .btn-outline-secondary { --bs-btn-color: #f2f8f7; --bs-btn-border-color: #8eaaa9; --bs-btn-hover-color: #152d39; --bs-btn-hover-bg: #d7e9e6; --bs-btn-hover-border-color: #d7e9e6; }
    .sidebar-user-tools-host .btn-outline-primary { --bs-btn-color: #e9fbf8; --bs-btn-border-color: #69bcb3; --bs-btn-hover-color: #102e3a; --bs-btn-hover-bg: #8cddd1; --bs-btn-hover-border-color: #8cddd1; }
    .sidebar-user-tools-host .form-select { color: #263f42; background-color: #f7fbfa; }
    .sidebar-user-tools-host .impersonation-chip { color: #523b0e; background: #f7d78c; }
}

body { font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif; }
.user-name { line-height: 1.12; }
.user-name small { margin-top: 0 !important; line-height: 1.15; }
.impersonation-select { color: #57451f; background-color: #fff9e7; border-color: #e8ce82; }
.impersonation-select:focus { border-color: #c89b36; box-shadow: 0 0 0 .2rem rgba(224, 178, 70, .22); }
.btn-impersonate { --bs-btn-color: #5b4515; --bs-btn-bg: #f6df9d; --bs-btn-border-color: #e6c56a; --bs-btn-hover-color: #44340f; --bs-btn-hover-bg: #efd17a; --bs-btn-hover-border-color: #d5ad4c; --bs-btn-active-color: #44340f; --bs-btn-active-bg: #e9c35d; --bs-btn-active-border-color: #c79c34; --bs-btn-disabled-color: #796b49; --bs-btn-disabled-bg: #f5edda; --bs-btn-disabled-border-color: #e6dcc2; font-weight: 650; }
.dashboard-client-list { padding: 0 .75rem .75rem; }
.dashboard-client-row { display: flex; align-items: center; gap: .8rem; padding: .8rem .7rem; color: var(--seitek-ink); text-decoration: none; border-bottom: 1px solid #edf2f0; border-radius: .7rem; }
.dashboard-client-row:last-child { border-bottom: 0; }
.dashboard-client-row:hover { background: #f5f9f8; }
.dashboard-client-avatar, .customer-project-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; color: #167c83; background: #e6f4f1; border-radius: .8rem; }
.dashboard-client-name { display: flex; min-width: 0; flex: 1 1 auto; flex-direction: column; gap: .18rem; }
.dashboard-client-name strong { overflow: hidden; color: #183943; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-client-name small { color: #748885; font-size: .74rem; }
.dashboard-client-credit { flex: 0 0 auto; color: #176b65; font-size: .82rem; font-variant-numeric: tabular-nums; }
.customer-dashboard-projects { display: grid; gap: .7rem; padding: 0 1.25rem 1.25rem; }
.tuning-pre { max-height: 28rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #314a4f; }
.tuning-run-card { background: #fff; }
.tuning-debug-accordion .accordion-button { font-size: .9rem; font-weight: 650; }
.tuning-debug-accordion .accordion-body { border-top: 1px solid #edf2f0; }
.customer-project-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid #e7efec; border-radius: 1rem; background: #fff; }
.customer-project-main { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.customer-project-main h3 { margin: 0 0 .25rem; color: #183943; font-size: .98rem; font-weight: 650; }
.customer-project-main p { margin: 0; color: #718480; font-size: .82rem; }
.customer-project-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; flex: 0 0 auto; }
.customer-project-status { display: inline-flex; align-items: center; min-height: 1.9rem; padding: .35rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.2; }
.customer-project-status.status-review, .customer-project-status.status-ready { color: #73540f; background: #fff3d6; }
.customer-project-status.status-progress { color: #216576; background: #e2f1f5; }
.customer-project-status.status-success { color: #22664b; background: #e4f4eb; }
.customer-project-status.status-attention { color: #7a3d28; background: #fdebe3; }
.customer-project-status.status-neutral { color: #4c6663; background: #edf4f2; }
@media (max-width: 767.98px) {
    .customer-dashboard-projects { padding: 0 1rem 1rem; }
    .customer-project-card { align-items: flex-start; flex-direction: column; padding: .9rem; }
    .customer-project-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .customer-project-status { max-width: 100%; }
}
