:root {
    --zt-primary: #12325f;
    --zt-primary-dark: #0b1f3d;
    --zt-primary-soft: #eaf1fb;
    --zt-accent: #37b7a5;
    --zt-accent-soft: rgba(55, 183, 165, .18);
    --zt-sidebar: #0c2342;
    --zt-sidebar-2: #102f59;
    --zt-sidebar-text: #ffffff;
    --zt-sidebar-muted: #b9c8dc;
    --zt-body: #f4f7fb;
    --zt-border: #dfe7f1;
    --zt-card-shadow: 0 14px 35px rgba(15, 35, 64, .08);
}

html {
    font-size: 14px;
    min-height: 100%;
    position: relative;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background: var(--zt-body);
    color: #1f2937;
    min-height: 100vh;
}

body.zt-public-shell {
    margin-bottom: 60px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.form-select:focus {
    box-shadow: 0 0 0 .2rem rgba(55, 183, 165, .22);
    border-color: var(--zt-accent);
}

.bg-primary {
    background-color: var(--zt-primary) !important;
}

.btn-primary {
    background-color: var(--zt-primary);
    border-color: var(--zt-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--zt-primary-dark);
    border-color: var(--zt-primary-dark);
}

.zt-app-shell {
    display: flex;
    margin: 0;
    overflow-x: hidden;
}

.zt-sidebar {
    background: linear-gradient(180deg, var(--zt-sidebar) 0%, var(--zt-sidebar-2) 100%);
    box-shadow: 8px 0 28px rgba(5, 18, 38, .18);
    color: var(--zt-sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    left: 0;
    position: sticky;
    top: 0;
    width: 280px;
    z-index: 1030;
}

.zt-sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    display: flex;
    gap: .9rem;
    padding: 1.35rem 1.35rem 1.2rem;
}

.zt-brand-icon {
    align-items: center;
    background: var(--zt-accent-soft);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    color: #ffffff;
    display: flex;
    font-size: 1.45rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.zt-brand-title {
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.1;
}

.zt-brand-subtitle {
    color: var(--zt-sidebar-muted);
    font-size: .78rem;
    margin-top: .18rem;
}

.zt-sidebar-scroll {
    overflow-y: auto;
    padding: 1rem 1rem 1.4rem;
}

.zt-menu-section {
    color: #d8e4f4;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    margin: 1rem .75rem .55rem;
    text-transform: uppercase;
}

.zt-menu {
    display: grid;
    gap: .22rem;
}

.zt-menu-link,
.zt-submenu-link {
    align-items: center;
    border: 0;
    border-radius: 14px;
    color: #f8fbff;
    display: flex;
    font-weight: 650;
    gap: .75rem;
    min-height: 44px;
    padding: .72rem .85rem;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
    width: 100%;
}

.zt-menu-link {
    background: transparent;
    font-size: .95rem;
    text-align: left;
}

.zt-menu-link i:first-child {
    color: #e2ecfb;
    font-size: 1.1rem;
    min-width: 22px;
    text-align: center;
}

.zt-menu-link:hover,
.zt-menu-link:focus {
    background: rgba(255, 255, 255, .13);
    color: #ffffff;
    transform: translateX(2px);
}

.zt-menu-link.active {
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 4px 0 0 var(--zt-accent);
    color: #ffffff;
}

.zt-menu-toggle {
    cursor: pointer;
}

.zt-toggle-chevron {
    color: #d8e4f4;
    font-size: .9rem !important;
    margin-left: auto;
    min-width: auto !important;
    transition: transform .18s ease;
}

.zt-menu-toggle[aria-expanded="true"] .zt-toggle-chevron {
    transform: rotate(180deg);
}

.zt-submenu {
    border-left: 1px solid rgba(255, 255, 255, .2);
    margin: .2rem 0 .45rem 1.55rem;
    padding-left: .55rem;
}

.zt-submenu-link {
    color: #e9f1fb;
    font-size: .88rem;
    font-weight: 600;
    min-height: 38px;
    padding: .55rem .75rem;
}

.zt-submenu-link i {
    color: #d2e0f1;
    font-size: .95rem;
    min-width: 18px;
    text-align: center;
}

.zt-submenu-link:hover,
.zt-submenu-link:focus,
.zt-submenu-link.active {
    background: rgba(55, 183, 165, .22);
    color: #ffffff;
}

.zt-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.zt-topbar {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--zt-border);
    display: flex;
    justify-content: space-between;
    min-height: 82px;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.zt-page-kicker {
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.zt-page-title {
    color: #10213d;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    margin: .1rem 0 0;
}

.zt-user-box {
    align-items: center;
    display: flex;
    gap: .75rem;
}

.zt-user-avatar {
    align-items: center;
    background: var(--zt-primary-soft);
    border-radius: 999px;
    color: var(--zt-primary);
    display: flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.zt-user-name {
    color: #172033;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.1;
}

.zt-user-role {
    color: #64748b;
    font-size: .74rem;
}

.zt-content {
    padding: 1.5rem;
}

.card {
    border-color: var(--zt-border);
    border-radius: 18px;
    box-shadow: var(--zt-card-shadow);
}

.table {
    vertical-align: middle;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

@media (max-width: 991.98px) {
    .zt-app-shell {
        display: block;
    }

    .zt-sidebar {
        height: auto;
        position: relative;
        width: 100%;
    }

    .zt-sidebar-scroll {
        max-height: none;
    }

    .zt-topbar {
        position: static;
    }

    .zt-content {
        padding: 1rem;
    }
}

.zt-auth-shell {
    background: radial-gradient(circle at 15% 15%, rgba(55, 183, 165, .18), transparent 28%), linear-gradient(135deg, var(--zt-primary-dark) 0%, var(--zt-primary) 48%, #174675 100%);
    margin: 0;
    min-height: 100vh;
}

.zt-auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.zt-auth-card-wrap {
    background: rgba(255, 255, 255, .96);
    border-radius: 28px;
    box-shadow: 0 26px 70px rgba(4, 18, 38, .32);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    max-width: 980px;
    overflow: hidden;
    width: 100%;
}

.zt-auth-hero {
    align-items: center;
    background: linear-gradient(160deg, var(--zt-sidebar) 0%, var(--zt-sidebar-2) 100%);
    color: #ffffff;
    min-height: 520px;
    padding: 3rem;
}

.zt-auth-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 1.4rem 0 .75rem;
}

.zt-auth-hero p {
    color: #d8e4f4;
    font-size: 1.2rem;
    line-height: 1.55;
    margin: 0;
    max-width: 430px;
}

.zt-auth-logo {
    align-items: center;
    background: var(--zt-accent-soft);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 22px;
    display: flex;
    font-size: 2.1rem;
    height: 72px;
    justify-content: center;
    width: 72px;
}

.zt-auth-form {
    align-items: center;
    display: flex;
    padding: 2rem;
}

.zt-auth-form .card {
    box-shadow: none !important;
    width: 100%;
}

@media (max-width: 991.98px) {
    .zt-auth-card-wrap {
        display: block;
        max-width: 460px;
    }
}


.zt-kanban-board {
    align-items: flex-start;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    overflow-x: auto;
    padding-bottom: .5rem;
}

.zt-kanban-column {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--zt-border);
    border-radius: 18px;
    box-shadow: var(--zt-card-shadow);
    min-width: 250px;
    overflow: hidden;
}

.zt-kanban-column-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--zt-border);
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    padding: .9rem 1rem;
}

.zt-kanban-column-body {
    display: grid;
    gap: .75rem;
    min-height: 180px;
    padding: .85rem;
}

.zt-kanban-card {
    background: #ffffff;
    border: 1px solid rgba(18, 50, 95, .08);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 35, 64, .07);
    padding: .9rem;
}

.zt-kanban-card:hover {
    border-color: rgba(55, 183, 165, .45);
}

.zt-kanban-empty {
    align-items: center;
    border: 1px dashed var(--zt-border);
    border-radius: 14px;
    color: #6b7280;
    display: flex;
    font-size: .92rem;
    justify-content: center;
    min-height: 96px;
}

@media (max-width: 1199.98px) {
    .zt-kanban-board {
        grid-template-columns: repeat(4, 280px);
    }
}

.zt-calendar-table {
    min-width: 980px;
}

.zt-calendar-table th {
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.zt-calendar-table td {
    height: 132px;
    min-width: 140px;
    width: 14.285%;
}

.zt-calendar-today {
    box-shadow: inset 0 0 0 2px var(--zt-accent);
}

.zt-calendar-item {
    background: #ffffff;
    border: 1px solid var(--zt-border);
    border-radius: 10px;
    color: #1f2937;
    font-size: .78rem;
    line-height: 1.25;
    padding: .35rem .45rem;
}

.zt-calendar-item:hover,
.zt-calendar-item:focus {
    border-color: var(--zt-accent);
    color: var(--zt-primary);
}

.zt-calendar-selected {
    background: #f8fafc;
    box-shadow: inset 0 0 0 2px rgba(12, 32, 80, .28);
}

/* Step 36 - Ricerca globale */
.zt-topbar-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.zt-global-search {
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--zt-border);
    border-radius: 999px;
    color: #64748b;
    gap: .6rem;
    min-width: 300px;
    padding: .55rem .75rem .55rem 1rem;
}

.zt-global-search:focus-within {
    background: #fff;
    border-color: var(--zt-primary);
    box-shadow: 0 0 0 .2rem var(--zt-primary-soft);
}

.zt-global-search input {
    background: transparent;
    border: 0;
    color: #172033;
    flex: 1;
    min-width: 0;
    outline: 0;
}

.zt-global-search-hint {
    background: #fff;
    border: 1px solid var(--zt-border);
    border-radius: .4rem;
    font-size: .68rem;
    padding: .15rem .4rem;
}

.zt-search-result-icon {
    align-items: center;
    background: var(--zt-primary-soft);
    border-radius: .75rem;
    color: var(--zt-primary);
    display: flex;
    flex: 0 0 42px;
    height: 42px;
    justify-content: center;
}

.min-width-0 { min-width: 0; }

@media (max-width: 1200px) {
    .zt-global-search { min-width: 230px; }
}
