
:root {
    --danfoss-red:        #da2321;
    --danfoss-red-dark:   #b51c1a;
    --danfoss-red-darker: #7c1312;
    --danfoss-red-soft:   rgba(218, 35, 33, .10);

    --site-black:       #1a1a1a; 
    --site-gray-900:    #2b2b2b;
    --site-gray-700:    #58595b;
    --site-gray-500:    #9a9a9a;
    --site-gray-300:    #d9d9d9;
    --site-gray-200:    #ececec;
    --site-gray-100:    #f4f4f4;
    --site-gray-50:     #fafafa;
    --site-line:        #e0e0e0;
    --site-line-2:      #eeeeee;

    --ink-0: #141414;
    --ink-1: #2a2a2a;
    --ink-2: #545454;
    --ink-3: #8a8a8a;
}

* { transition: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--site-gray-100); }
::-webkit-scrollbar-thumb {
    background: var(--site-gray-300);
    border: 2px solid var(--site-gray-100);
}
* { scrollbar-width: thin; scrollbar-color: var(--site-gray-300) var(--site-gray-100); }

html, body { height: 100%; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Selawik", "Segoe UI", sans-serif;
    font-size: 14px;
    color: var(--ink-1);
    background-color: #f2f2f2;
    -webkit-font-smoothing: antialiased;
}

input, select, textarea, button {
    font-family: "Selawik", "Segoe UI", sans-serif;
}
:root { --bs-body-font-family: "Selawik", "Segoe UI", sans-serif; }

#app {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 100vh;
    min-height: 100dvh;  
}

.family-card.disabledCard {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

main {
    flex: 1 1 auto;
    min-height: 0;
}

.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.fs-eyebrow {
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-3);
    font-weight: 600;
}

.bg-primary { background-color: var(--danfoss-red) !important; }
.text-primary { color: var(--danfoss-red-dark) !important; }
.border-primary { border-color: var(--danfoss-red) !important; }


input[type="checkbox"] {
    accent-color:var(--danfoss-red);
}

.fc-arrow.hidden {
    visibility: hidden;
}

.btn {
    border-radius: 2px;
    font-weight: 600;
    letter-spacing: .01em;
}

.btn-primary {
    --bs-btn-bg: var(--danfoss-red);
    --bs-btn-border-color: var(--danfoss-red);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--danfoss-red);
    --bs-btn-hover-border-color: var(--danfoss-red);
    --bs-btn-hover-color: #fff;
    --bs-btn-focus-bg: var(--danfoss-red);
    --bs-btn-focus-border-color: var(--danfoss-red);
    --bs-btn-focus-color: #fff;
    --bs-btn-active-bg: var(--danfoss-red-dark);
    --bs-btn-active-border-color: var(--danfoss-red-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--danfoss-red);
    --bs-btn-disabled-border-color: var(--danfoss-red);
    --bs-btn-disabled-color: #fff;
    --bs-btn-focus-shadow-rgb: 218, 35, 33;
}

.btn-outline-primary {
    --bs-btn-color: var(--danfoss-red-dark);
    --bs-btn-border-color: var(--danfoss-red);
    --bs-btn-bg: transparent;
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: var(--danfoss-red);
    --bs-btn-hover-color: var(--danfoss-red-dark);
    --bs-btn-focus-bg: transparent;
    --bs-btn-focus-border-color: var(--danfoss-red);
    --bs-btn-focus-color: var(--danfoss-red-dark);
    --bs-btn-active-bg: var(--danfoss-red);
    --bs-btn-active-border-color: var(--danfoss-red);
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 218, 35, 33;
}

.form-check-input:checked {
    background-color: var(--danfoss-red);
    border-color: var(--danfoss-red);
}
.form-check-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--danfoss-red);
    box-shadow: 0 0 0 .15rem var(--danfoss-red-soft);
}

.navbar.bg-dark {
    min-height: 64px;
    padding-top: .5rem;
    padding-bottom: .5rem;
    background-color: #fff !important;
    border-bottom: 3px solid var(--danfoss-red);
}
.navbar .navbar-brand {
    padding: 0;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
}
.navbar .navbar-brand .brand-logo {
    display: block;
    height: 46px;
    width: auto;
}

.navbar-menu-btn {
    border: 0;
    color: #000;
    background: transparent;
    padding: .35rem .6rem;
    font-size: 1.7rem;
    line-height: 1;
    border-radius: 0;
    cursor: pointer;
}
.navbar-menu-btn[aria-expanded="true"] {
    color: #000;
    background: var(--site-gray-100);
}

.navbar .dropdown-menu {
    border-radius: 0;
    border: 0;
    border-top: 3px solid var(--danfoss-red);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12);
    margin-top: .5rem !important;
    min-width: 220px;
    padding: .25rem 0;
}
.navbar .dropdown-menu .dropdown-item {
    padding: .7rem 1rem;
    font-weight: 500;
    color: var(--site-black);
}
.navbar .dropdown-menu .dropdown-item .bi {
    color: var(--danfoss-red-dark);
    margin-right: .25rem;
}
.modal-content {
    border-radius: 2px;
    border: 0;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .25);
}
.modal-header {
    background-color: #fff;
    color: var(--danfoss-red);
    border-radius: 0;
    border: 0;
    border-bottom: 3px solid var(--danfoss-red);
    padding: .9rem 1.25rem;
}
.modal-header .modal-title {
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--danfoss-red);
}
.modal-header .modal-title .bi {
    color: var(--danfoss-red);
}
.modal-header .btn-close {
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23da2321'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    filter: none;
    opacity: 1;
}
.modal-header .btn-close:focus {
    box-shadow: 0 0 0 .15rem var(--danfoss-red-soft);
}
.modal-body { padding: 1.25rem; }
.modal-footer {
    border-top: 1px solid var(--site-gray-300);
    padding: .75rem 1.25rem;
}
.dRed {
    color: #b51c1a !important
}

pre code { color: #212529; }

.home-layout {
    --section-a-width: 33%;

    --res-rows: 5;         
    --res-row-h: 37px;     
    --res-head-h: 35px;    
    --res-hscroll-h: 10px; 
    --res-headbar-h: 44px; 
    --res-section-h: calc(
        var(--res-headbar-h)
        + var(--res-head-h)
        + (var(--res-rows) * var(--res-row-h))
        + var(--res-hscroll-h)
        + 2px
    );

    display: grid;
    grid-template-columns: var(--section-a-width) 1fr;
    grid-template-rows: var(--res-section-h) 1fr;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    background-color: var(--site-gray-100);
}

.home-layout > section {
    background: #fff;
    border: 0;
    border-right: 1px solid var(--site-gray-300);
    border-bottom: 1px solid var(--site-gray-300);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    box-shadow: none;
}

.home-layout > .home-b,
.home-layout > .home-c { border-right: 0; }
.home-layout > .home-a,
.home-layout > .home-c { border-bottom: 0; }

.home-layout > .home-b {
    border-bottom: 2px solid var(--danfoss-red);
}

.home-a { grid-column: 1; grid-row: 1 / span 2; }
.home-b { grid-column: 2; grid-row: 1; }
.home-c { grid-column: 2; grid-row: 2; }

.home-layout.b-collapsed {
    --res-rows: 1;
}
.home-layout > .home-a > .card-header .section-toggle {
    margin-left: auto;
}
.section-toggle {
    background: transparent;
    border: 0;
    color: #fff;
    padding: 0 .4rem;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.section-toggle .bi { color: #fff; font-size: inherit; display: inline-block; }
.section-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, .6);
    outline-offset: 2px;
}

.home-layout.a-collapsed {
    grid-template-columns: 44px 1fr;
}
.home-layout.a-collapsed > .home-a > .card-header {
    padding: 0;
    justify-content: center;
}
.home-layout.a-collapsed > .home-a > .card-header > .a-head {
    display: none;
}
.home-layout.a-collapsed > .home-a > .card-header .section-toggle {
    margin-left: 0;
}
.home-layout.a-collapsed > .home-a > .card-body {
    display: none;
}

.home-layout > section > .card-header {
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 44px;
    display: flex;
    align-items: center;
    background: #fff;
    color: var(--ink-1);
    border: 0;
    border-bottom: 1px solid var(--site-line);
    padding: 0 16px;
    font-weight: 500;
    font-size: 14px;
}

.home-layout > .home-b > .card-header .t,
.home-layout > .home-a > .card-header .a-head.t {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    color: var(--ink-1);
}
.home-layout > .home-a > .card-header .reset-icon {
    background: transparent;
    border: 0;
    color: var(--danfoss-red);
    padding: 2px 6px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}
.home-layout > .home-a > .card-header .reset-icon .bi {
    color: var(--danfoss-red);
    font-size: inherit;
    display: inline-block;
}
.home-layout > .home-a > .card-header .reset-icon:focus {
    outline: 2px solid var(--danfoss-red-soft);
    outline-offset: 2px;
}
.home-layout > .home-a > .card-header .section-toggle,
.home-layout > .home-a > .card-header .section-toggle .bi,
.home-layout > .home-b > .card-header .section-toggle,
.home-layout > .home-b > .card-header .section-toggle .bi {
    color: var(--ink-2);
}
.home-layout > .home-a > .card-header .section-toggle:focus,
.home-layout > .home-b > .card-header .section-toggle:focus {
    outline: 2px solid var(--danfoss-red-soft);
    outline-offset: 2px;
}
.home-layout > .home-a > .card-header { padding-right: .35rem; }
.home-layout > .home-b > .card-header { padding-right: .35rem; }

.section-toggle:disabled {
    opacity: .35;
    cursor: default;
}

.home-layout > section > .card-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 0;
    background: #fff;
}

.home-layout > .home-a .accordion-body.row {
    margin-left: 0;
    margin-right: 0;
}
.home-layout > .home-a .accordion-body.row > .col-8 { padding-left: 0; }
.home-layout > .home-a .accordion-body.row > .col-4 { padding-right: 0; }

.home-layout > .home-a {
    --calc-btn-height: 56px;   
}
.home-layout > .home-a > .home-a-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    border-top: 1px solid var(--site-line);
}
.home-layout > .home-a .home-a-calculate {
    flex: 1 1 auto;
    height: var(--calc-btn-height);
    border: 0;
    background: var(--danfoss-red);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s ease;
}
.home-layout > .home-a .home-a-calculate:hover {
    background: var(--danfoss-red-dark, #b51a18);
}
.home-layout > .home-a .home-a-calculate:focus {
    outline: 2px solid var(--danfoss-red-soft);
    outline-offset: -3px;
}
.home-layout > .home-a .home-a-calculate:active {
    filter: brightness(.92);
}
.home-layout > .home-a .home-a-reset {
    display: none;
    flex: 0 0 var(--calc-btn-height);
    width: var(--calc-btn-height);
    height: var(--calc-btn-height);
    border: 0;
    border-right: 1px solid var(--site-line);
    background: #fff;
    color: var(--danfoss-red-dark);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color .15s ease;
}
.home-layout > .home-a .home-a-reset:hover { background: var(--site-gray-50); }
.home-layout > .home-a .home-a-reset:active { filter: brightness(.95); }
.home-layout.a-collapsed > .home-a > .home-a-actions {
    display: none;
}

.home-c > .home-c-header {
    flex: 0 0 auto;
    background: #fff;
}

.home-c > .home-c-header > .home-c-title {
    box-sizing: border-box;
    min-height: 64px;
    display: flex;
    align-items: center;
    background-color: #fafafa;
    color: var(--ink-0);
    padding: 16px 20px;
    border: 0;
    border-bottom: 1px solid var(--site-line);
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    font-size: 14px;
    gap: 16px;
    flex-wrap: wrap;
}
.home-c > .home-c-header > .home-c-title .machine-code {
    font-size: 22px;
    color: var(--danfoss-red-dark);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.home-c > .home-c-header > .home-c-title .machine-desc {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-0);
    line-height: 1.2;
}

.home-c .detail-tabs {
    background: #cfcfcf;
    padding: 8px 16px 0;
    border-bottom: 0;
    border-radius: 0;
    gap: 4px;
    margin: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
}
.home-c .detail-tabs::-webkit-scrollbar { display: none; }
.home-c .detail-tabs .nav-link {
    padding: 10px 18px;
    background: #e8e8e8;
    border: 1px solid #b8b8b8;
    border-bottom: 0;
    color: var(--ink-2);
    font-weight: 500;
    font-size: 12.5px;
    white-space: nowrap;
    border-radius: 3px 3px 0 0;
    margin-bottom: -1px;
    position: relative;
}
.home-c .detail-tabs .nav-link.active {
    background: #fff;
    color: var(--ink-0);
    font-weight: 600;
    border-color: var(--site-line);
    border-top: 2px solid var(--danfoss-red);
    padding-top: 9px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 0 #fff;
}

.home-c .detail-tabs .detail-tab-icon { display: none; }
.detail-pane-title { display: none; }

.home-c-content {
    flex: 1 1 auto;
    overflow: hidden;
    min-height: 0;
    padding: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--site-line);
}

.home-c-content > .pane-inner,
.home-c-content > .tab-perf-grid,
.home-c-content > .codes-layout,
.home-c-content > .report-layout,
.home-c-content > .c-empty-state {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.c-empty-state {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    text-align: center;
    padding: 1.5rem 1rem;
    overflow: auto !important;
}
.c-empty-icon {
    font-size: 3rem;
    color: var(--site-gray-300);
    line-height: 1;
    margin-bottom: .85rem;
}
.c-empty-state h4 {
    color: var(--site-gray-900);
    font-weight: 700;
    letter-spacing: .03em;
    margin-bottom: .4rem;
    font-size: 1.05rem;
}
.c-empty-state p {
    color: var(--site-gray-700);
    max-width: 440px;
    margin: 0 auto;
    font-size: .9rem;
    line-height: 1.4;
}
.c-empty-state strong { color: var(--danfoss-red-dark); }

.filters {
    background: #fff;
    height: 100%;
    padding: 0;
}
.filters .filter-top {
    padding: 12px 16px;
    border-bottom: 1px solid var(--site-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}
.filters .filter-top .t {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    color: var(--ink-1);
}
.filters .filter-top .reset {
    font-size: 11px;
    color: var(--danfoss-red);
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
    font-weight: 600;
    letter-spacing: .02em;
}

.filters .accordion-item {
    border: 0;
    border-bottom: 1px solid var(--site-line-2);
    background: transparent;
}
.filters .accordion-button {
    padding: 12px 16px;
    background: #fff;
    color: var(--ink-1);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    box-shadow: none;
}
.filters .accordion-button:not(.collapsed) {
    color: var(--ink-0);
    background: #fff;
    box-shadow: none;
}
.filters .accordion-button:focus { box-shadow: none; border-color: transparent; }
.filters .accordion-button::after {
    filter: grayscale(1) brightness(.6);
}
.filters .accordion-button:not(.collapsed)::after {
    filter: none;
}

.filters .accordion-body {
    padding: 0 16px 0px;
}

.filters .form-label-sm {
    font-size: 11px;
    color: var(--ink-2);
    font-weight: 500;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filters .form-label-sm .u {
    color: var(--ink-3);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}
.filters .form-select-sm,
.filters .form-control-sm {
    font-size: 12px;
    border-radius: 2px;
    padding: 6px 8px;
}
.filters .form-check-label { font-size: 12.5px; color: var(--ink-1); }
.filters .form-check-input {
    border-color: var(--ink-3);
    border-radius: 2px;
}
.filters .form-check-input:checked {
    background-color: var(--danfoss-red);
    border-color: var(--danfoss-red);
}

@media (min-width: 992px) {
    .filters .accordion-body:not(.row) > .mb-2 {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }
    .filters .accordion-body:not(.row) > .mb-2 > .form-label-sm {
        margin-bottom: 0;
        flex: 0 0 35%;
        min-width: 0;
        white-space: nowrap;
    }
    .filters .accordion-body:not(.row) > .mb-2 > .form-select-sm,
    .filters .accordion-body:not(.row) > .mb-2 > .form-control-sm {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .filters .accordion-body.row {
        --half1: 70%;  
        --half2: 30%;  
        --lbl1: 50%;   
        --lbl2: 15%;   
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 6px;
        gap: 0;   
        flex-wrap: nowrap;
        align-items: center;  
    }
    .filters .accordion-body.row .mb-2 { margin-bottom: 0 !important; }
    .filters .accordion-body.row > .col-8 {
        flex: 0 0 var(--half1);
        width: var(--half1);
        max-width: var(--half1);
        min-width: 0;
        padding: 0;
    }
    .filters .accordion-body.row > .col-4 {
        flex: 0 0 var(--half2);
        width: var(--half2);
        max-width: var(--half2);
        min-width: 0;
        padding: 0 0 0 8px;
    }
    .filters .accordion-body.row .mb-2:not(.col-4) {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .filters .accordion-body.row > .col-8 > .form-label-sm {
        margin-bottom: 0;
        flex: 0 0 var(--lbl1);
        min-width: 0;
        display: block;
        white-space: normal;
        line-height: 1.15;
    }
    .filters .accordion-body.row > .col-4 > .mb-2 > .form-label-sm {
        margin-bottom: 0;
        flex: 0 0 var(--lbl2);
        min-width: 0;
        white-space: nowrap;
        justify-content: center;
        text-align: center;
    }
    .filters .accordion-body.row .mb-2:not(.col-4) > .form-select-sm,
    .filters .accordion-body.row .mb-2:not(.col-4) > .form-control-sm {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
}

/* input1 delle doppie coppie (il select in .col-8), DESKTOP + MOBILE: tronca il
   testo lungo con "..." lasciando spazio (30px) per la freccetta. Fuori da ogni
   media query, quindi vale a tutte le larghezze. */
.filters .accordion-body.row > .col-8 > .form-select-sm {
    padding-right: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.results-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}
.results-table {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
}
table.res {
    min-width: 1200px;
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    background: #fff;
}
table.res thead th {
    position: sticky;
    top: 0;
    background: #fafafa;
    text-align: left;
    padding: 10px 12px;
    font-size: 10px;
    line-height: 14px;   
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-3);
    border-bottom: 1px solid var(--site-line);
    font-weight: 600;
    white-space: nowrap;
}
table.res thead th .u {
    color: var(--ink-3);
    font-weight: 400;
    text-transform: none;
    font-size: 10px;
}
table.res tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--site-line-2);
    font-size: 12px;
    line-height: 16px;   
    color: var(--ink-1);
    white-space: nowrap;
}
table.res tbody td.code {
    color: var(--danfoss-red-dark);
    font-weight: 600;
}
table.res tbody tr { cursor: pointer; }
table.res tbody tr.selected {
    background: var(--danfoss-red-soft);
}
table.res tbody tr.selected td { color: var(--danfoss-red-dark); }
table.res tbody tr.selected td:first-child {
    box-shadow: inset 3px 0 0 var(--danfoss-red);
}

.badge-match {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 1px;
    letter-spacing: .04em;
    display: inline-block;
}
.badge-ok   { background: #e3f3ea; color: #1f6f43; }
.badge-warn { background: #fbefd9; color: #8a6d1f; }
.badge-off  { background: #eceff4; color: var(--ink-3); }

.products-page {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 1.5rem;
    min-height: 0;
    overflow-y: auto;
    background: #f2f2f2;
}
.products-page > .row {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.family-card {
    background: #fff;
    border: 1px solid var(--site-line);
    border-top: 4px solid var(--danfoss-red);
    min-height: 360px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;                 /* clippa il cerchio decorativo e rispetta i bordi arrotondati */
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

/* ---- Parte SUPERIORE: area media su sfondo grigio, a tutta larghezza ---- */
.family-card .fc-media {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eaecee;              /* sfondo grigetto */
    padding: 28px;
}
/* Cerchio grigio piu' scuro nell'angolo in basso a sinistra (parzialmente tagliato). */
.family-card .fc-media::before {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -60px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: #d8dbde;
    z-index: 0;
}
/* Immagine prodotto: centrata e scalata per stare dentro senza deformarsi ne' scrollare. */
.family-card .fc-media img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
/* Pulsante BIANCO con la freccia, in alto a destra, appoggiato sul grigio. */
.family-card .fc-arrow-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.family-card .fc-arrow-btn .bi {
    font-size: 20px;
    line-height: 1;
    color: var(--danfoss-red);
}
.family-card .fc-arrow-btn.hidden { display: none; }

/* ---- Parte INFERIORE: testo su sfondo bianco ---- */
.family-card .fc-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px 24px;
    background: #fff;
}
.family-card h3 {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--ink-0);
    line-height: 1;
    margin: 0;
}
.family-card .sub {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    /* Tronca la descrizione a 2 righe con "..." (cambia il numero per piu'/meno righe). */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Riserva SEMPRE lo spazio di 2 righe (2 x line-height 1.5 = 3em), cosi' le card
       con 0, 1 o 2 righe di descrizione restano tutte alte uguale.
       Se cambi -webkit-line-clamp, aggiorna anche questo (N righe = N x 1.5em). */
    min-height: 3em;
}

.pane-inner {
    padding: 22px 24px;
    overflow: auto;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}
.pane-inner h4,
.pane-head h4 {
    margin: 0 0 10px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ink-3);
    font-weight: 600;
}
.pane-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

table.kv-table {
    width: 100%;
    max-width: none;
    border-collapse: collapse;
    font-size: 12.5px;
    background: #fff;
}
    table.kv-table thead th {
        background: #fafafa;
        text-align: left;
        padding: 9px 12px;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--ink-3);
        border-bottom: 1px solid var(--site-line);
        font-weight: 600;
    }
table.kv-table thead th:last-child {
    text-align: right;
    color: var(--ink-0);
    letter-spacing: .02em;
    font-size: 12px;
    text-transform: none;
}
table.kv-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--site-line-2);
    color: var(--ink-1);
}
table.kv-table tbody td:first-child {
    color: var(--ink-2);
    width: 55%;
}
table.kv-table tbody td:last-child {
    color: var(--ink-0);
    text-align: right;
}
table.kv-table tbody td .u {
    color: var(--ink-3);
    font-size: 11px;
}
table.kv-table tbody tr:last-child td { border-bottom: 0; }

table.acc-table {
    table-layout: fixed;
}
table.acc-table thead th,
table.acc-table thead th:last-child {
    text-align: left;
    color: var(--ink-0);
    letter-spacing: .02em;
    font-size: 12px;
    text-transform: none;
    font-weight: 600;
}
table.acc-table thead th:first-child,
table.acc-table tbody td:first-child {
    width: 40px;   
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}
table.acc-table tbody td:last-child {
    text-align: left;
}
/* Centra verticalmente il contenuto delle celle (checkbox incluso) anche quando
   la riga e' piu' alta per via di descrizioni su piu' righe. */
table.acc-table tbody td {
    vertical-align: middle;
}
table.acc-table tbody td:first-child input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

.kv-note {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--ink-3);
    font-style: italic;
}

.perf-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    column-gap: 32px;
}
.perf-cols > table.kv-table {
    width: 100%;
}
@media (max-width: 991.98px) {
    .perf-cols {
        grid-template-columns: minmax(0, 1fr);
    }
}

.envelope-pane .legend {
    display: flex;
    gap: 16px;
    font-size: 11.5px;
    color: var(--ink-2);
    flex-wrap: wrap;
}
.envelope-pane .legend .lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.envelope-pane .legend .lg i {
    width: 14px;
    height: 3px;
    display: inline-block;
    border-radius: 1px;
    font-style: normal;
}
.envelope-pane .legend .lg i.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b5651d;
}

.chart {
    position: relative;
    overflow: hidden;
}
.chart svg { width: 100%; height: 100%; display: block; }
.chart-tall { min-height: 380px; max-height: 420px; }

.envelope-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.home-c-content > .envelope-pane {
    overflow: hidden;
}
.envelope-pane .chart {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;  
    max-width: 100%;
    position: relative; 
}
.envelope-pane .chart img {
    position: absolute;
    inset: 0;
    margin: auto;      
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.env-notes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.env-notes .note {
    border: 1px solid var(--site-line);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fafbfd;
}
.env-notes .note b {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-3);
    font-weight: 600;
}
.env-notes .note span {
    font-size: 12px;
    color: var(--ink-0);
    font-variant-numeric: tabular-nums;
}

.tab-perf-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
    min-width: 0;
}
.det-specs {
    padding: 18px 20px;
    overflow: auto;
    border-right: 1px solid var(--site-line);
}
.det-specs.op-points {
    border-right: 1px solid var(--site-line);
    padding: 20px 24px;
}
.det-specs.op-points h4 { margin: 0 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; }
.op-intro {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.5;
    max-width: 680px;
}
.op-massflow {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 12px;
    color: var(--ink-1);
    padding: 6px 0 10px;
}
.op-massflow .mono { color: var(--ink-0); font-weight: 600; }

.op-table-wrap {
    border: 1px solid var(--site-line);
    overflow: auto;
}
.op-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
}
    .op-table thead th {
        background: #fafafa;
        color: var(--ink-1);
        font-weight: 600;
        text-align: right;
        padding: 7px 10px;
        border-bottom: 1px solid var(--site-line);
        border-right: 1px solid var(--site-line);
        white-space: nowrap;
        line-height: 1.2;
        vertical-align: bottom;
    }
.op-table thead th:last-child { border-right: 0; }
.op-table thead th.num,
.op-table thead th.desc { text-align: left; }
.op-table thead th .u {
    font-weight: 400;
    color: var(--ink-3);
    font-size: 11px;
}
.op-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--site-line-2);
    border-right: 1px solid var(--site-line-2);
    color: var(--ink-0);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.op-table tbody td:last-child { border-right: 0; }
.op-table tbody tr:last-child td { border-bottom: 0; }
.op-table tbody td.num {
    text-align: left;
    color: var(--ink-1);
    font-weight: 600;
    width: 44px;
}
.op-table tbody td.desc {
    text-align: left;
    color: var(--ink-0);
    font-variant-numeric: normal;
}
.op-table tbody td.hl {
    outline: 2px solid var(--danfoss-red);
    outline-offset: -2px;
    background: #fff7f7;
}

.det-perf {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    min-height: 0;
}
.det-perf h4 { margin: 0 0 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 600; }
.det-perf .chart {
    flex: 1;
    min-height: 180px;
}
.det-perf-figure {
    flex: 1 1 auto;
    min-height: 260px;
    position: relative;
}
.det-perf-figure img {
    position: absolute;
    inset: 0;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

@media (max-width: 1024px) {
    .tab-perf-grid { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: auto; }
    .det-specs.op-points { border-right: 0; border-bottom: 1px solid var(--site-line); }
}

.codes-layout {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    overflow: hidden;
    min-height: 0;
}
.codes-header {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
    flex-shrink: 0;
}
.code-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 48px;
}
.cs-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.cs-k {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-3);
    font-weight: 600;
    line-height: 1;
}
.cs-v {
    font-size: 16px;
    color: var(--ink-0);
    font-weight: 600;
    line-height: 1.1;
}

.codes-actions {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.codes-actions .btn {
    min-width: 220px;
    justify-content: flex-start;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 16px;
    white-space: nowrap;
    border-color: var(--danfoss-red) !important;
    color: var(--ink-0);
    background: #fff;
}
.codes-actions .btn i {
    font-size: 15px;
    color: var(--danfoss-red);
}

.codes-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    background: #fafafa;
    overflow: hidden;
}
.codes-side-tabs {
    background: #fafafa;
    padding: 0 0 14px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: unset;
    min-height: 0;
}
.codes-side-tab {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-weight: 600;
    color: var(--ink-1);
    background: transparent;
    border: 1px solid transparent;
    border-right: none;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    line-height: 1.3;
    position: relative;
    margin-right: -1px;
}
.codes-side-tab i {
    color: var(--danfoss-red);
    font-size: 14px;
    flex-shrink: 0;
}
.codes-side-tab.active {
    background: #fff;
    border: 0;
    border-top: 1px solid var(--site-line);
    border-bottom: 1px solid var(--site-line);
    border-left: 3px solid var(--danfoss-red);
    padding-left: 11px;
    color: var(--ink-0);
    z-index: 2;
}

.codes-side-panels {
    min-height: 0;
    overflow: auto;
    background: #fff;
    border-top: 1px solid var(--site-line);
    margin: 0;
    padding: 10px 24px 20px 24px
}
.codes-section { background: transparent; border: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.codes-section-title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-1);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--site-line-2);
}
.codes-section-title .bi { color: var(--danfoss-red); font-size: 14px; }

.spec-list {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}
.spec-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--site-line-2);
    align-items: baseline;
}
.spec-list dt {
    font-size: 12px;
    color: var(--ink-2);
    font-weight: 400;
    margin: 0;
    min-width: 0;
}
.spec-list dd {
    font-size: 12.5px;
    color: var(--ink-0);
    font-weight: 500;
    margin: 0;
    text-align: right;
    min-width: 0;
}

.spec-list dt,
.spec-list dd {
    overflow-wrap: anywhere;
}
.codes-side-panels::-webkit-scrollbar:horizontal { display: none; }

@media (max-width: 1100px) {
    .spec-list { grid-template-columns: 1fr; }
}

.report-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fafafa;
    overflow: hidden;
    min-height: 0;
}
.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.rpt-file {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.rpt-file > i {
    font-size: 28px;
    color: var(--danfoss-red);
    flex-shrink: 0;
}
.rpt-filename {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-0);
}
.rpt-meta {
    font-size: 11px;
    color: var(--ink-3);
}
.rpt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rpt-pager {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-1);
}
.rpt-zoom {
    font-size: 12px;
    color: var(--ink-2);
    padding: 0 8px;
}

.report-viewport {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #e5e5e5;
    padding: 24px;
    display: flex;
    justify-content: center;
}
.pdf-page {
    background: #fff;
    width: 100%;
    max-width: 820px;
    min-height: 1100px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
    padding: 40px 48px;
    color: var(--ink-0);
    font-size: 12px;
    line-height: 1.45;
}
.pdf-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--danfoss-red);
    margin-bottom: 20px;
}
.pdf-brand { display: flex; align-items: center; gap: 12px; }
.pdf-logo {
    width: 48px;
    height: 20px;
    background: var(--danfoss-red);
    display: block;
}
.pdf-brand-name {
    font-weight: 800;
    font-size: 18px;
    color: var(--ink-0);
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1;
}
.pdf-brand-tag {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: .05em;
}
.pdf-head-right {
    text-align: right;
    font-size: 11px;
    color: var(--ink-2);
    line-height: 1.5;
}
.pdf-h1 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-3);
    font-weight: 600;
    margin: 0 0 6px;
}
.pdf-selected {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--site-line);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pdf-code {
    font-size: 26px;
    color: var(--danfoss-red-dark);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1;
}
.pdf-subtitle {
    font-size: 13px;
    color: var(--ink-2);
    margin-top: 4px;
}
.pdf-kv {
    display: flex;
    gap: 32px;
    font-size: 11px;
    color: var(--ink-2);
    flex-wrap: wrap;
}
.pdf-kv > div { display: flex; flex-direction: column; gap: 2px; }
.pdf-kv span { text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-size: 10px; }
.pdf-kv b { color: var(--ink-0); font-size: 12px; }

.pdf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 22px;
}
.pdf-h2 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-3);
    font-weight: 600;
    margin: 0 0 8px;
}
.pdf-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.pdf-table td {
    padding: 5px 0;
    border-bottom: 1px dashed var(--site-line-2);
}
.pdf-table td:first-child { color: var(--ink-2); }
.pdf-table td:last-child { text-align: right; color: var(--ink-0); font-variant-numeric: tabular-nums; }

.pdf-curve { margin-bottom: 22px; }
.pdf-chart {
    border: 1px solid var(--site-line);
    padding: 8px;
    background: #fafbfd;
}
.pdf-cond {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--site-line);
    border-bottom: 1px solid var(--site-line);
    margin-bottom: 18px;
}
.pdf-cond > div { display: flex; flex-direction: column; gap: 2px; font-size: 11px; }
.pdf-cond span { text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-size: 10px; }
.pdf-cond b { color: var(--ink-0); font-size: 12px; }
.pdf-foot {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--ink-3);
    padding-top: 14px;
    border-top: 1px solid var(--site-line);
}

@media print {
    body * { visibility: hidden !important; }
    .report-print-area, .report-print-area * { visibility: visible !important; }
    .report-print-area {
        position: absolute !important;
        top: 0; left: 0;
        width: 100%;
        padding: 0;
        box-shadow: none;
        background: #fff;
    }
    @page { size: A4; margin: 15mm; }
}

.home-layout > section.is-disabled {
    pointer-events: none;
    user-select: none;
}
.home-layout > section.is-disabled > .card-header,
.home-layout > section.is-disabled > .home-c-header > .home-c-title {
    background-color: var(--site-gray-700);
    border-color: var(--site-gray-500);
}
.home-layout > section.is-disabled > .card-header .bi,
.home-layout > section.is-disabled > .home-c-header > .home-c-title .bi {
    color: var(--site-gray-300);
}
.home-layout > section.is-disabled > .home-c-header > .nav-tabs {
    background: var(--site-gray-100);
    opacity: .55;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}
.loading-overlay .loading-panel {
    background: #fff;
    border-top: 4px solid var(--danfoss-red);
    padding: 1.25rem 1.5rem;
    width: 320px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .15);
    overflow: hidden;
}
.loading-overlay .loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--site-gray-200);
    border-top-color: var(--danfoss-red);
    border-radius: 50%;
    animation: loading-spin .75s linear infinite;
}
.loading-overlay .loading-text {
    color: var(--site-gray-700);
    font-size: .9rem;
    text-align: center;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Popup di errore calcolo: riusa la grafica del loading (.loading-overlay /
   .loading-panel) ma con la X per chiudere, l'icona d'errore e il messaggio
   completo (scrollabile se lungo). */
.calc-error-overlay .calc-error-panel {
    position: relative;
    height: auto;
    min-height: 180px;
    max-height: 70vh;
    max-width: min(420px, 92vw);
    padding-top: 2.5rem;   /* spazio per la X in alto a destra */
}
.calc-error-overlay .calc-error-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--ink-2);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
}
.calc-error-overlay .calc-error-close:hover { background: var(--site-gray-200, #e9e9e9); }
.calc-error-overlay .calc-error-icon {
    font-size: 40px;
    line-height: 1;
    color: var(--danfoss-red);
}
.calc-error-overlay .calc-error-text {
    /* annulla il -webkit-box/line-clamp del .loading-text: l'errore va mostrato intero */
    display: block;
    overflow: auto;
    max-height: calc(70vh - 8rem);
    white-space: pre-line;   /* rispetta gli a-capo del messaggio */
    color: var(--ink-1);
}
@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

.login-page {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 0;
    background:
        radial-gradient(ellipse 600px 400px at 50% 0%, rgba(218, 35, 33, .08), transparent 60%),
        radial-gradient(ellipse 600px 400px at 50% 100%, rgba(218, 35, 33, .06), transparent 60%),
        var(--site-gray-100);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-top: 4px solid var(--danfoss-red);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .08);
}
.login-card-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--site-gray-200);
}
.login-card-header .login-icon .bi {
    font-size: 3rem;
    color: var(--danfoss-red);
    line-height: 1;
}
.login-card-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-top: .5rem;
    margin-bottom: .25rem;
}
.login-card-body {
    padding: 1.5rem 2rem 2rem;
}
.brand-word {
    font-weight: 800;
    letter-spacing: .08em;
}
.brand-word .brand-e { color: var(--danfoss-red-dark); }

.mobile-section-tabs { display: none; }

@media (max-width: 991.98px) {
    .home-layout {
        display: flex;
        flex-direction: column;
    }
    .mobile-section-tabs {
        display: flex;
        flex: 0 0 auto;
        background: #fff;
        border-bottom: 1px solid var(--site-line);
    }
    .mobile-section-tab {
        flex: 1 1 0;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 6px;
        border: 0;
        border-bottom: 3px solid transparent;
        margin-bottom: -1px;   
        background: transparent;
        color: var(--ink-2);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        cursor: pointer;
    }
    .mobile-section-tab .bi { font-size: 1.15rem; line-height: 1; }
    .mobile-section-tab.active {
        color: var(--danfoss-red-dark);
        border-bottom-color: var(--danfoss-red);
    }
    .mobile-section-tab:disabled {
        color: var(--site-gray-300);
        cursor: default;
    }

    .home-layout > .home-a,
    .home-layout > .home-b,
    .home-layout > .home-c { display: none; }
    .home-layout.mobile-pane-controls > .home-a,
    .home-layout.mobile-pane-results  > .home-b,
    .home-layout.mobile-pane-details  > .home-c {
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        border: 0;
    }

    .home-layout > .home-a > .card-header,
    .home-layout > .home-b > .card-header { display: none !important; }

    .home-layout > .home-a .home-a-reset { display: flex; }

    .home-layout > .home-a > .home-a-actions { border-top: 2px solid rgba(218, 35, 33, .45); }

    .home-layout.mobile-pane-results > .home-b > .results-body {
        flex: 1 1 auto;
        min-height: 0;
    }

    .home-c > .home-c-header { order: 0; }
    .home-c > .detail-tabs {
        order: 1;
        flex: 0 0 auto;
        margin: 0;
    }
    .home-c > .detail-tabs .nav-item { flex: 1 1 0; min-width: 0; }
    .home-c > .detail-tabs .nav-link {
        width: 100%;
        text-align: center;
        padding-left: 4px;
        padding-right: 4px;
        margin-bottom: 0;
    }
    .home-c > .detail-tabs .nav-link.active { box-shadow: none; margin-bottom: 0; }
    .home-c .detail-tabs .detail-tab-icon { display: inline-block; font-size: 1.15rem; line-height: 1; }
    .home-c .detail-tabs .detail-tab-label { display: none; }

    .detail-pane-title {
        display: block;
        flex: 0 0 auto;
        padding: 9px 16px;
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--ink-2);
        background: #fafafa;
        border-bottom: 1px solid var(--site-line);
    }

    .home-c > .home-c-content { order: 2; }

    .codes-body {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
    }
    .codes-side-panels { grid-row: 1; }
    .codes-side-tabs {
        grid-row: 2;
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding: 0;   
        border-top: 1px solid var(--site-line);
        border-bottom: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .codes-side-tabs::-webkit-scrollbar { display: none; }
    .codes-side-tab { white-space: nowrap; flex-shrink: 0; padding: 14px 12px; }
    .codes-side-tab.active { border-top: 2px solid var(--danfoss-red); border-left: 0; }

    .home-c-content > .tab-perf-grid { overflow: hidden; }
    .tab-perf-grid {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    }
    .tab-perf-grid > .det-specs.op-points {
        overflow: auto;
        min-height: 0;
    }
    .det-perf-figure { min-height: 0; }

    .home-c > .home-c-header > .home-c-title { justify-content: center; }
    .home-c > .home-c-header > .home-c-title .code-summary { justify-content: center; }

    .env-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .navbar.bg-dark { min-height: 58px; }
    .navbar .navbar-brand .brand-logo { height: 40px; }
    .navbar-menu-btn { font-size: 1.5rem; }

    .products-page { padding: 2rem 1rem; }
    .products-hero { margin-bottom: 1.75rem; }
    .products-hero h1 { font-size: 28px; }
    .family-card { min-height: 300px; }
    .family-card h3 { font-size: 36px; }

    .home-layout > section > .card-header,
    .home-c > .home-c-header > .home-c-title {
        padding: .7rem 1rem;
        font-size: .85rem;
    }

    .codes-actions .btn { min-width: auto; width: 100%; font-size: 12px; }
    .codes-side-tab { font-size: 10px; }
    .codes-side-panels { margin: 0; padding: 16px; }

    .env-notes { grid-template-columns: 1fr; }

    .pdf-page { padding: 24px 20px; min-height: auto; }
    .pdf-grid { grid-template-columns: 1fr; }
    .pdf-cond { grid-template-columns: repeat(2, 1fr); }

    .detail-tabs .nav-link { padding: 8px 12px; font-size: 11.5px; }

    .login-card-header { padding: 1.5rem 1.5rem 1rem; }
    .login-card-body { padding: 1rem 1.5rem 1.5rem; }
    .login-card-header h1 { font-size: 1.25rem; }

    .modal-body { padding: 1rem; }
    .modal-header { padding: .75rem 1rem; }
}
