/* ── GLOBALE ── */
*, body, html {
    font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif;
    font-weight: 300;
    box-sizing: border-box;
}
b, strong { font-weight: bold; }
i, em     { font-style: italic; }

/* ── LAYOUT ── */
.PageWidth {
    width: 1200px;
    margin: 10px auto;
    padding: 0 10px;
}
.PageWidth.login-page {
    width: 800px;
    margin: 50px auto;
}
.Content { padding: 0; }
table.sfondo { width: 100%; background-color: white; }

/* ── LOGIN ── */
.home-30pt { font-size: 20pt; color: #444; font-weight: normal; }

@keyframes cav-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.login-container {
    position: relative;
}
.login-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 600px;
    height: 500px;
    background: url('/IMG/filigrana.jpg') no-repeat center top;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}
.login-container > * {
    position: relative;
    z-index: 1;
}

.cav-input {
    font-size: 18px;
    padding: 6px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    outline: none;
}
.cav-input:focus { border-color: #95C11F; box-shadow: 0 0 0 2px #d6f07a44; }

.btn-accedi-moderno {
    color: white;
    font-size: 18px;
    font-weight: bold;
    background-color: #95C11F;
    border: 2px solid #95C11F;
    border-radius: 10px;
    margin: 4px;
    padding: 8px 24px;
    cursor: pointer;
}
.btn-accedi-moderno:hover  { background-color: #b3e825; border-color: #b3e825; }
.btn-accedi-moderno:active { background-color: #4b6110; border-color: #4b6110; }
.btn-accedi-moderno:focus  { outline: none; box-shadow: none; }

.SU { background-color: aquamarine; padding: 14px; }

.btn-link-style {
    background: none; border: none; padding: 0; margin: 0;
    color: #1a6fba; text-decoration: underline; cursor: pointer;
    font-size: inherit; font-family: inherit; line-height: inherit;
}
.btn-link-style:hover { color: #0a4080; }

/* ── MENU VERDE ── */
.cav-nav {
    display: flex;
    background-color: #95C11F;
    width: 100%;
    margin-bottom: 8px;
    position: relative;
    z-index: 1000;
}
.cav-nav-item { position: relative; }
.cav-nav-link {
    display: block;
    color: white;
    font-weight: bold;
    font-size: 20px;
    padding: 9px 15px;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}
.cav-nav-link:hover { background-color: #b3e825; }
.cav-nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 2px 4px 10px rgba(0,0,0,.2);
    min-width: 220px;
    z-index: 2000;
}
.cav-nav-subitem {
    padding: 6px 13px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
.cav-nav-subitem:hover { background-color: #e8f5c0; }

/* ── BOTTONI AZIONE ── */
.btn-cav {
    color: white;
    background-color: #95C11F;
    border: 1px solid #7a9e18;
    border-radius: 6px;
    padding: 6px 18px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}
.btn-cav:hover    { background-color: #b3e825; }
.btn-cav:disabled { background-color: #ccc; border-color: #bbb; cursor: default; }
.btn-cav-secondary {
    background-color: #ffffff;
    border: 1px solid #95C11F;
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 18px;
    color: #808080;
    cursor: pointer;
}
.btn-cav-secondary:hover { background-color: #e8f5c0; }

/* ── GRIGLIA ── */
.cav-grid-wrapper { position: relative; font-size: 10px; font-family: Calibri, Arial, sans-serif; }
.cav-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 13px;
    font-family: Calibri, Arial, sans-serif;
}
.cav-grid-th {
    background: linear-gradient(to bottom, #ffffff 0%, #d8d8d8 100%);
    color: #333;
    font-weight: bold;
    font-size: 14px;
    padding: 4px;
    border-top: 1px solid #bbb;
    border-right: 1px solid #bbb;
    border-bottom: none;
    border-left: none;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}
.cav-grid-th:first-child { border-left: 1px solid #bbb; border-top-left-radius: 6px; }
.cav-grid-th:last-child  { border-top-right-radius: 6px; }
.cav-grid-th:hover { background: linear-gradient(to bottom, #f0f0f0 0%, #c8c8c8 100%); }
.cav-grid-filter-th {
    background-color: #d8d8d8;
    padding: 4px;
    border-top: none;
    border-right: 1px solid #bbb;
    border-bottom: 1px solid #bbb;
    border-left: none;
}
.cav-grid-filter-th:first-child { border-left: 1px solid #bbb; }
.cav-filter-input {
    width: 100%;
    height: 26px;
    font-size: 13px;
    padding: 3px 4px;
    border: 1px solid #aaa;
    border-radius: 2px;
    box-sizing: border-box;
}
.cav-grid-td {
    padding: 3px 6px;
    border: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cav-grid-row:nth-child(odd)  { background-color: #fff; }
.cav-grid-row:nth-child(even) { background-color: #f5f5f5; }
.cav-grid-row:hover           { background-color: #e8f5c0 !important; cursor: pointer; }
.cav-grid-row-selected td     { background-color: #c6e68a !important; }

/* ── PAGINATORE ── */
.cav-pager {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
}
.cav-pager-btn {
    padding: 2px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
}
.cav-pager-btn:hover:not([disabled]) { background: #e8f5c0; }
.cav-pager-btn[disabled]             { color: #aaa; cursor: default; }
.cav-pager-info { color: #555; }

.btn-pager-size {
    padding: 2px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}
.btn-pager-size:hover  { background: #e8f5c0; }
.btn-pager-size.active { background: #95c11f; color: white; border-color: #7aaa10; font-weight: bold; }

/* ── CONTEXT MENU ── */
.cav-ctx-menu {
    position: fixed;
    z-index: 9999;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 3px 4px 12px rgba(0,0,0,.25);
    min-width: 200px;
    padding: 4px 0;
}
.cav-ctx-item {
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.cav-ctx-item:hover     { background-color: #e8f5c0; }
.cav-ctx-sep {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
}

/* ── SCHEDA ASSISTITA ── */
.sa-row {
    display: flex;
    gap: 0;
    width: 100%;
    padding: 6px 0;
}
.sa-col {
    flex: 1;
    padding: 4px 8px;
}
.grav-info-wrap { padding-right: 130px; }
.grav-info-wrap .sa-row { gap: 64px; padding: 10px 0; }
.grav-info-wrap .calc-hint { padding-top: 2px; }

/* ── TAB CHROME-STYLE ── */
.cav-tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #95C11F;
    margin-bottom: 16px;
}
.cav-tab {
    padding: 7px 22px;
    border: 1px solid #bbb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
    color: #808080;
    font-size: 16px;
    cursor: pointer;
    margin-right: 3px;
    position: relative;
    bottom: -2px;
}
.cav-tab:hover { background: #e8f5c0; color: #333; }
.cav-tab-active {
    background: #95C11F;
    color: #ffffff;
    border-color: #95C11F;
    font-weight: bold;
}
.sa-sep {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 4px 0;
}
.sa-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 3000;
    background: white;
    border: 1px solid #bbb;
    box-shadow: 2px 4px 8px rgba(0,0,0,.15);
    max-height: 220px;
    overflow-y: auto;
    width: 80%;
    min-width: 200px;
}
.sa-autocomplete-item {
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.sa-autocomplete-item:hover { background-color: #e8f5c0; }

/* ── INTESTAZIONI TABELLE INLINE ── */
table thead td, table thead th { font-size: 14px; }

/* ── CLASSI FORM LEGACY ── */
.etichette-campi { font-size: 18px; font-weight: bold; color: #333; margin-top: 0.8em; display: block; }
.corpo-campi     { font-size: 18px; color: #333; }
.mess-err        { color: red; font-weight: bold; }

/* ── TITOLO SCHEDA ── */
.titolo-scheda {
    font-family: "Segoe UI", sans-serif;
    font-weight: 300;
    font-size: 28px;
    color: black;
    padding-left: 16px;
}
