.fullheight {
    flex: 1;
    background-color: #FFF;
}

@media print {
    .hidden-print {
        display: none !important;
    }
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: #FFF;
    background-image: linear-gradient(-60deg, #89cffe38 0%, #e4e5e666 100%);
}

body.pushable {
    background-color: #FFF;
    background-image: linear-gradient(-60deg, #89cffe38 0%, #e4e5e666 100%);
}

body.pushable>.pusher {
    background-color: transparent !important;
}

#pagewrapper {
    background: transparent;
}

.dashboard {
    padding: 0 1em;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline;
}

.htmx-request.htmx-indicator {
    display: inline;
}

.overflowing.pusher {
    display: flex;
    flex-direction: column;
}

.visually-hidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.branding.logo {
    display: block;
    width: 12.5%;
    min-height: 60px;
    background-image: url("../img/logo.svg");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    background-origin: content-box;
    padding: 5px;
}

@media screen and (max-width: 1200px) {
    .branding.logo {
        background-size: cover;
        min-height: 52px;
    }
}

@media screen and (max-width: 768px) {
    .branding.logo {
        min-height: 44px;
        background-position: center;
    }
}

@media screen and (min-width: 1500px) {
    .dashboard {
        margin-left: 285px;
        margin-right: 285px;
    }
}

.ui.blue.menu {
    min-height: 66px;
}

.right-padded {
    padding-right: 1.5em;
}

table.dataTable tbody td:first-child.left.aligned,
table.dataTable thead th:first-child.left.aligned,
table.dataTable tfoot th:first-child.left.aligned {
    text-align: left !important;
}


.account-menu__agent-form,
.account-menu__logout-form {
    width: 100%;
}

.account-menu__button {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    text-align: left;
    color: inherit;
    font: inherit;
}

.account-menu__button:hover,
.account-menu__button:focus {
    cursor: pointer;
    color: #4183c4;
}

.account-menu__submenu>.menu {
    right: 100%;
    left: auto;
    top: 0;
}

.account-menu__submenu-menu {
    right: 100% !important;
    left: auto !important;
    top: 0;
}

.account-menu__submenu>.menu .item {
    white-space: normal;
}

.customer-search__container {
    flex: 0 0 43.75% !important;
}

#menu-customer-search,
#menu-customer-search .input {
    width: 100%;
}

#menu-customer-search .prompt {
    text-align: left;
    border-color: cadetblue;
    width: 100%;
}

#menu-customer-search-results {
    width: 100%;
}

.right-floated {
    flex-basis: 100%;
    text-align: right;
}

.left-floated {
    flex-basis: 100%;
    text-align: left;
}

.left-floated .header {
    font-weight: bold;
    margin-bottom: 3px;
}

.left-floated .description {
    color: #666
}

.reports-sidebar .item.report-submenu {
    margin: 0 !important;
    margin-bottom: 5px !important;
    padding: 11px 13px !important;
    width: 100% !important;
}

.payment-method-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
}

.payment-method-form .fields,
.address-form .fields {
    align-items: flex-end;
}

.payment-method-actions .ui.buttons {
    align-self: flex-start;
    margin-bottom: 1px;
}

.reports-sidebar .item.report-submenu i.icon:not(.report-submenu__caret) {
    margin: 7px !important;
}

.reports-sidebar .report-submenu__header {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.5rem;
}

.reports-sidebar.ui.vertical.menu .item>i.icon {
    float: left;
    margin-right: 0.5rem;
}

.reports-sidebar .report-submenu__caret {
    margin-left: auto !important;
    transition: transform 0.2s ease;
}

.reports-sidebar .report-submenu.expanded .report-submenu__caret {
    transform: rotate(180deg);
}

.reports-sidebar .report-submenu__content {
    padding-left: 0.75rem;
}

.reports-sidebar .report-submenu__content.hidden {
    display: none;
}

.reports-sidebar .report-submenu__content .item {
    border: none;
    display: inline-block;
    clear: left;
    vertical-align: middle;
}

.reports-sidebar .report-link .htmx-indicator {
    float: right;
}

.reports-sidebar .report-submenu.expanded .report-submenu__content {
    padding: 0 !important;
    margin: .5rem 0 !important;
}

.reports-sidebar.ui.vertical.menu .menu .item {
    color: rgb(0, 0, 0) !important;
    line-height: 2.2;
}

.reports-sidebar.ui.vertical.menu .menu .item:hover {
    color: rgba(0, 0, 0, .95) !important;
    background-color: rgba(0, 0, 0, .05) !important;
}

table.dataTable.ui.table thead th.dt-type-date,
table.dataTable.ui.table tr td.dt-type-date {
    text-align: left;
}

.nascosta {
    display: none !important;
}

#grafico {
    width: 100%;
    min-height: 400px
}

.cella-quantita {
    background-color: #EFEFFF;
}

.input-quantita {
    width: 6em;
}

.input-quantita input {
    text-align: right !important;
    appearance: textfield;
    border: none !important;
    background: transparent !important;
}

.cella-ricerca {
    background-color: #FFFFDD;
}

.input-ricerca {
    width: 6em;
}

.input-ricerca input {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
}

.icona-sovraimposta-agenda {
    padding-top: 1px !important;
}

.ui.secondary.vertical.menu {
    margin-left: 10px !important;
}

.ui.secondary.vertical.menu>.header.submenu.item {
    margin-top: 15px;
    border-bottom: 1px solid #ccc;
    border-radius: 0 !important;
    color: #000;
    padding-left: 05px !important;
}

.ui.secondary.vertical.menu>.item {
    padding-left: 0 !important;
}

.select-info {
    display: none;
}

@media (max-width: 1079px) {
    .agenda-button .agenda-button-text {
        display: none;
    }
}

@media (min-width: 1080px) {
    .agenda-button .agenda-button-text {
        display: inline;
    }
}

#widget-board-filiale-name {
    display: inline;
}

/* ──────────────────────────────────────────────
   TD-040  Inline-style migration classes
   ────────────────────────────────────────────── */

/* Initially hidden elements toggled by JS (no !important — JS can override) */
.initially-hidden {
    display: none;
}

/* DataTables date-filter .fields wrapper: remove default margin */
.dt-date-filter-fields {
    margin: 0;
}

/* Scrollable modal/flyout content */
.modal-scrollable-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
}

.ui.flyout #flyout-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ui.flyout #flyout-info > .ui.segments,
.ui.flyout #flyout-info > .ui.padded.basic.segments {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.ui.flyout #flyout-info .ui.scrolling.segment.modal-scrollable-content {
    max-height: none;
}

/* Formset DELETE widget: hidden but present in DOM */
.formset-delete-hidden {
    display: none;
}

/* Formset action button alignment */
.formset-action-btn {
    bottom: 0;
}

/* Order create: item-code search input width */
.item-code-search-input {
    width: 10em;
}

/* Order create: search results dropdown width */
.item-code-search-results {
    width: 30em;
}

/* Order create: discount hint font size */
.discount-hint {
    font-size: 0.85em;
}

/* Order create: <style> block migration */
td.cella-ricerca.item-code-invalid {
    background-color: #ffe6e6;
}

td.cella-ricerca.item-code-invalid .ui.input > input {
    border-color: #db2828;
}

.order-section {
    position: relative;
}

.order-section.is-disabled .disabled-overlay {
    display: block;
}

.disabled-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.25rem;
    z-index: 2;
}

.list-price.is-discounted {
    text-decoration: line-through;
    opacity: 0.7;
}

.net-discount-percent {
    display: block;
    font-size: 0.75em;
    opacity: 0.7;
}

/* Statistiche widget styles */
.dashboard-statistiche-link {
    display: flex !important;
    align-items: center;
}

.dashboard-statistiche-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-statistiche-chevron {
    flex: 0 0 auto;
    padding-left: 1.75rem;
}

.dashboard-statistiche-value {
    flex: 0 0 auto;
    margin-left: 1rem;
    text-align: right;
    white-space: nowrap;
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
}

/* User settings: password form container */
#password-form-container .helptext {
    display: none;
}

#password-form-container label {
    padding-right: 1em;
}

/* Payment schedule table (order_status) */
.payment-schedule-table {
    margin-top: 0.4rem;
    margin-bottom: 0;
}

/* Discount column header (elenco_clienti) */
.col-discount-header {
    width: 11em;
    text-align: right;
}

/* tfoot summary label: right-aligned text */
.tfoot-summary-label {
    text-align: right;
}

/* Search helper text hidden for DataTables search */
.dt-search-helper {
    display: none;
}
