/* Responsive visibility overrides shared by the MVC layouts. */
html {
    min-width: 0;
}

body {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.app-main {
    width: 100%;
    max-width: 100%;
}

body:not(.app-shell) > .container {
    width: 100%;
    max-width: 100%;
}

.login-wrap,
#loginCard {
    width: min(100%, 520px) !important;
    max-width: calc(100vw - 24px);
}

.login-card {
    max-width: 100%;
}

#cardsRow {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)) !important;
}

.dx-popup-normal,
.dx-overlay-content {
    max-width: calc(100vw - 24px);
}

.dx-datagrid,
.dx-datagrid-container,
.dx-scrollable,
.dx-scrollable-container {
    max-width: 100%;
}

.opf-page,
#interventionSummaryPage,
.vct-page,
.cpt-page {
    height: auto !important;
    max-height: none !important;
    min-height: calc(100dvh - 36px) !important;
    overflow: visible !important;
}

.opf-grid-shell,
.ris-grid-shell,
.vct-grid-shell,
.cpt-grid-shell {
    min-height: clamp(420px, 58dvh, 760px);
}

#opfGrid,
#risGrid,
#vctGrid,
#cptGrid {
    min-height: clamp(360px, 52dvh, 720px) !important;
    width: 100%;
    max-width: 100%;
}

#opfGrid .dx-datagrid,
#risGrid .dx-datagrid,
#vctGrid .dx-datagrid,
#cptGrid .dx-datagrid {
    min-height: inherit;
}

body.app-shell.shell-page-agenda,
.app-main.shell-page-agenda {
    height: auto !important;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.agenda-page-shell {
    height: auto !important;
    min-height: calc(100dvh - 36px) !important;
}

#mainCard.agenda-card {
    height: auto !important;
    min-height: calc(100dvh - 64px);
}

#schedulerWrap.scheduler-wrap {
    min-height: clamp(560px, 70dvh, 820px);
}

.oc-page,
.oc-shell,
.oc-body,
.oc-right,
.oc-grid-wrap {
    max-width: 100%;
}

.oc-page {
    height: auto !important;
    overflow: visible !important;
}

.oc-shell,
.oc-body,
.oc-right {
    height: auto !important;
    overflow: visible !important;
}

.oc-grid-wrap {
    min-height: clamp(520px, 66dvh, 900px) !important;
    overflow: visible !important;
}

#tabOpenApi,
#tabDb,
#resultsGrid,
#dbResultsGrid {
    min-height: clamp(420px, 58dvh, 780px) !important;
}

#resultsGrid,
#dbResultsGrid {
    height: 100% !important;
}

.cr-page,
.cr-hero,
.cr-box,
.ysi-page,
.ysi-card,
.ysi-topbar {
    max-width: 100%;
}

@media (max-width: 1240px) {
    .oc-hero-grid,
    .oc-body,
    .cr-hero-head,
    .cr-layout {
        grid-template-columns: 1fr !important;
    }

    .oc-left {
        position: static !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .oc-grid-wrap {
        min-height: 560px !important;
    }

    #tabOpenApi,
    #tabDb,
    #resultsGrid,
    #dbResultsGrid {
        min-height: 500px !important;
    }

    .opf-hero,
    .vct-hero {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 992px) {
    .app-main {
        padding: 12px;
    }

    .opf-page,
    #interventionSummaryPage,
    .vct-page,
    .cpt-page {
        min-height: 0 !important;
    }

    .opf-grid-head,
    .vct-grid-head,
    .cpt-toolbar,
    .ysi-topbar,
    .ysi-card-header {
        flex-direction: column;
        align-items: stretch !important;
    }

    .opf-grid-head-right,
    .opf-grid-actions,
    .vct-grid-head-actions,
    .cpt-toolbar-actions,
    .ysi-topbar-actions,
    .ysi-card-actions-inline {
        width: 100%;
        justify-content: flex-start !important;
    }

    .ysi-workflow-grid,
    .ysi-form-grid,
    .ysi-step-strip,
    .ysi-summary-grid,
    .cr-hero-metrics,
    .cr-hero-fact-grid {
        grid-template-columns: 1fr !important;
    }

    .ysi-topbar-actions {
        min-width: 0 !important;
    }
}

@media (max-width: 768px) {
    .app-main {
        padding: 10px;
    }

    .opf-hero,
    .opf-grid-shell,
    .vct-hero,
    .vct-grid-shell,
    .cpt-toolbar,
    .cpt-grid-shell,
    .oc-hero,
    .oc-grid-wrap,
    .ysi-card,
    .ysi-topbar,
    .cr-hero,
    .cr-box {
        padding: 12px !important;
    }

    .opf-filter-grid,
    #interventionSummaryPage .ris-filter-grid,
    .oc-summary-grid,
    .oc-status-strip,
    .ysi-step-strip,
    .ysi-result-summary,
    .ysi-mini-stats {
        grid-template-columns: 1fr !important;
    }

    .opf-inline-actions-row {
        grid-template-columns: 1fr !important;
    }

    .opf-title,
    .vct-title,
    .cpt-title,
    .oc-h1,
    .cr-title,
    .ysi-title,
    .login-title {
        font-size: 22px !important;
        line-height: 1.18;
    }

    .dx-toolbar-items-container {
        height: auto !important;
    }

    .dx-toolbar-before,
    .dx-toolbar-after,
    .dx-toolbar-center {
        position: static !important;
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .app-main {
        padding: 8px;
    }

    .oc-page {
        padding: 8px !important;
    }

    .dx-popup-normal,
    .dx-overlay-content {
        max-width: calc(100vw - 12px);
    }

    #opfGrid,
    #risGrid,
    #vctGrid,
    #cptGrid,
    #tabOpenApi,
    #tabDb,
    #resultsGrid,
    #dbResultsGrid {
        min-height: 420px !important;
    }
}

/* OpenAPI must fit the viewport without whole-page scrolling. */
html.shell-page-openapi,
body.app-shell.shell-page-openapi {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .app-main {
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-page {
    display: flex;
    flex-direction: column;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-shell {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    gap: 8px !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-hero {
    max-height: 30dvh;
    min-height: 0 !important;
    overflow: auto !important;
    border-radius: 14px !important;
}

body.app-shell.shell-page-openapi .oc-hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(180px, 260px) minmax(230px, 320px) !important;
    gap: 10px !important;
    padding: 8px 12px 6px !important;
}

body.app-shell.shell-page-openapi .oc-hero-main {
    padding-top: 0 !important;
}

body.app-shell.shell-page-openapi .oc-kicker {
    padding: 3px 8px !important;
    font-size: 10px !important;
}

body.app-shell.shell-page-openapi .oc-h1 {
    max-width: none !important;
    margin-top: 4px !important;
    font-size: 22px !important;
    line-height: 1.08 !important;
}

body.app-shell.shell-page-openapi .oc-sub {
    margin-top: 4px !important;
    font-size: 11px !important;
    line-height: 1.28 !important;
}

body.app-shell.shell-page-openapi .oc-tip-list {
    margin-top: 6px !important;
    gap: 6px !important;
}

body.app-shell.shell-page-openapi .oc-tip {
    padding: 4px 7px !important;
    font-size: 10px !important;
}

body.app-shell.shell-page-openapi .oc-hero-actions-card {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding: 8px !important;
}

body.app-shell.shell-page-openapi .oc-utility-label {
    font-size: 10px !important;
}

body.app-shell.shell-page-openapi #ocToolbar {
    padding: 6px !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-items-container {
    height: auto !important;
    max-height: 82px;
    overflow: auto;
}

body.app-shell.shell-page-openapi .oc-hero-preview {
    margin: 0 12px 8px !important;
}

body.app-shell.shell-page-openapi .oc-preview,
body.app-shell.shell-page-openapi .oc-preview-inline {
    max-height: 42px !important;
    min-height: 0 !important;
    padding: 6px 8px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    overflow: auto !important;
}

body.app-shell.shell-page-openapi .oc-body {
    height: 100% !important;
    min-height: 0 !important;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 8px !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-left,
body.app-shell.shell-page-openapi .oc-right {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
}

body.app-shell.shell-page-openapi .oc-left {
    position: static !important;
    max-width: none !important;
    overflow: auto !important;
    padding-right: 4px !important;
}

body.app-shell.shell-page-openapi .oc-right {
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    gap: 6px !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-left .oc-box {
    padding: 8px !important;
    border-radius: 12px !important;
}

body.app-shell.shell-page-openapi .oc-box-title {
    font-size: 13px !important;
}

body.app-shell.shell-page-openapi .oc-box-caption,
body.app-shell.shell-page-openapi .oc-control-label,
body.app-shell.shell-page-openapi .oc-left .dx-field-item-help-text {
    font-size: 10px !important;
    line-height: 1.25 !important;
}

body.app-shell.shell-page-openapi .oc-top-controls {
    gap: 6px !important;
    margin-bottom: 8px !important;
}

body.app-shell.shell-page-openapi .oc-filters-scroll,
body.app-shell.shell-page-openapi .oc-filters-box .oc-filters-scroll {
    max-height: 24dvh !important;
    overflow: auto !important;
}

body.app-shell.shell-page-openapi .oc-summary-grid {
    grid-template-columns: repeat(5, minmax(108px, 1fr)) !important;
    gap: 6px !important;
    overflow-x: auto;
}

body.app-shell.shell-page-openapi .oc-summary-card {
    min-height: 0 !important;
    padding: 6px 8px !important;
    border-radius: 12px !important;
}

body.app-shell.shell-page-openapi .oc-summary-label {
    font-size: 9px !important;
}

body.app-shell.shell-page-openapi .oc-summary-value {
    margin-top: 2px !important;
    font-size: 15px !important;
    line-height: 1.05 !important;
}

body.app-shell.shell-page-openapi .oc-summary-value-sm {
    font-size: 13px !important;
}

body.app-shell.shell-page-openapi .oc-summary-note {
    margin-top: 2px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
}

body.app-shell.shell-page-openapi .oc-status-strip {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 6px !important;
    border-radius: 12px !important;
    overflow-x: auto;
}

body.app-shell.shell-page-openapi .oc-status-pill {
    min-height: 0 !important;
    padding: 4px 6px !important;
    border-radius: 10px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
}

body.app-shell.shell-page-openapi .oc-grid-wrap {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
    padding: 8px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-grid-head {
    gap: 6px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
}

body.app-shell.shell-page-openapi .oc-grid-title {
    font-size: 14px !important;
}

body.app-shell.shell-page-openapi .oc-grid-subtitle,
body.app-shell.shell-page-openapi .oc-grid-legend {
    font-size: 10px !important;
}

body.app-shell.shell-page-openapi #resultsTabs,
body.app-shell.shell-page-openapi #ydeaPanelHost {
    flex: 0 0 auto;
}

body.app-shell.shell-page-openapi #tabOpenApi,
body.app-shell.shell-page-openapi #tabDb {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi #resultsGrid,
body.app-shell.shell-page-openapi #dbResultsGrid {
    min-height: 0 !important;
    height: 100% !important;
}

body.app-shell.shell-page-openapi .oc-grid-wrap .dx-datagrid {
    height: 100% !important;
}

@media (max-width: 1240px), (max-height: 780px) {
    body.app-shell.shell-page-openapi .oc-hero {
        max-height: 24dvh;
    }

    body.app-shell.shell-page-openapi .oc-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) !important;
    }

    body.app-shell.shell-page-openapi .oc-hero-side {
        grid-column: 1 / -1;
    }

    body.app-shell.shell-page-openapi .oc-body {
        grid-template-columns: 1fr !important;
    }

    body.app-shell.shell-page-openapi .oc-body.oc-filters-collapsed > .oc-left {
        display: none !important;
    }

    body.app-shell.shell-page-openapi .oc-summary-grid {
        grid-template-columns: repeat(5, minmax(120px, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    body.app-shell.shell-page-openapi .app-main {
        padding: 6px !important;
    }

    body.app-shell.shell-page-openapi .oc-hero {
        max-height: 22dvh;
    }

    body.app-shell.shell-page-openapi .oc-hero-grid {
        grid-template-columns: 1fr !important;
    }

    body.app-shell.shell-page-openapi .oc-h1 {
        font-size: 18px !important;
    }

    body.app-shell.shell-page-openapi .oc-summary-grid {
        grid-template-columns: repeat(5, minmax(104px, 1fr)) !important;
    }

    body.app-shell.shell-page-openapi .oc-status-strip {
        grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
    }
}

/* OpenAPI quick actions: keep all actions readable inside the fixed viewport. */
body.app-shell.shell-page-openapi .oc-hero {
    max-height: none !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-openapi .oc-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) !important;
    grid-template-areas:
        "main credit"
        "actions actions" !important;
    align-items: start !important;
}

body.app-shell.shell-page-openapi .oc-hero-main {
    grid-area: main;
}

body.app-shell.shell-page-openapi .oc-hero-center {
    grid-area: credit;
}

body.app-shell.shell-page-openapi .oc-hero-side {
    grid-area: actions;
    min-width: 0 !important;
}

body.app-shell.shell-page-openapi .oc-hero-actions-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
}

body.app-shell.shell-page-openapi .oc-hero-actions {
    margin-top: 0 !important;
    min-width: 0 !important;
}

body.app-shell.shell-page-openapi #ocToolbar,
body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar {
    width: 100% !important;
    overflow: visible !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-items-container {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-before,
body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-after,
body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-center {
    position: static !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-toolbar-item {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-button {
    width: auto !important;
    min-height: 30px !important;
    border-radius: 10px !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-button-content {
    width: auto !important;
    min-height: 0 !important;
    padding: 4px 8px !important;
}

body.app-shell.shell-page-openapi #ocToolbar .dx-button-text {
    font-size: 10px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
}

@media (max-width: 760px) {
    body.app-shell.shell-page-openapi .oc-hero-grid {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "main"
            "credit"
            "actions" !important;
    }

    body.app-shell.shell-page-openapi .oc-hero-actions-card {
        grid-template-columns: 1fr !important;
    }
}

/* Verifica contratti: keep the page fixed and scroll only inside the grid. */
html.shell-page-contract-estimate,
body.app-shell.shell-page-contract-estimate {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-contract-estimate .app-main {
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}

#contractEstimatePage.vct-page {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 8px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#contractEstimatePage .vct-hero {
    flex: 0 0 auto !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) !important;
    gap: 8px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
}

#contractEstimatePage .vct-title {
    font-size: 20px !important;
    line-height: 1.12 !important;
}

#contractEstimatePage .vct-hero-panel {
    padding: 8px 10px !important;
    border-radius: 12px !important;
    gap: 6px !important;
}

#contractEstimatePage .vct-filter-stack {
    gap: 6px !important;
}

#contractEstimatePage .vct-grid-shell {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

#contractEstimatePage .vct-grid-head {
    gap: 8px !important;
    margin-bottom: 6px !important;
}

#contractEstimatePage #vctGrid {
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#contractEstimatePage #vctGrid .dx-datagrid {
    height: 100% !important;
    min-height: 0 !important;
}

@media (max-width: 900px), (max-height: 720px) {
    #contractEstimatePage .vct-hero {
        grid-template-columns: 1fr !important;
    }

    #contractEstimatePage .vct-title {
        font-size: 18px !important;
    }

    #contractEstimatePage .vct-hero-panel {
        padding: 7px 8px !important;
    }

    #contractEstimatePage .vct-grid-head {
        flex-direction: row !important;
        align-items: center !important;
    }
}

/* Agenda: the page must stay fixed; only the scheduler area should scroll. */
html.shell-page-agenda,
body.app-shell.shell-page-agenda {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-agenda .app-main,
.app-main.shell-page-agenda {
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}

.agenda-page-shell {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#mainCard.agenda-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
}

#mainCard .title-row {
    flex: 0 0 auto !important;
    margin-bottom: 8px !important;
}

#mainCard .agenda-toolbar-stack {
    flex: 0 0 auto !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}

#mainCard .agenda-toolbar {
    gap: 8px !important;
}

#mainCard .agenda-toolbar-group {
    min-height: 0 !important;
    padding: 8px 10px !important;
    gap: 8px !important;
}

#schedulerWrap.scheduler-wrap {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#scheduler,
#schedulerWrap > .dx-scheduler,
#schedulerWrap .dx-scheduler {
    height: 100% !important;
    min-height: 0 !important;
}

#schedulerWrap .dx-scheduler-work-space,
#schedulerWrap .dx-scheduler-date-table-scrollable {
    min-height: 0 !important;
    max-width: 100% !important;
}

#schedulerWrap .dx-scheduler-date-table-scrollable .dx-scrollable-container,
#schedulerWrap .dx-scheduler-work-space .dx-scrollable-container {
    overflow-y: auto !important;
}

/* Agenda: let DevExtreme calculate the scheduler geometry and keep non-data bands clean. */
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler {
    border: 0 !important;
    background: #fff !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-date-table-scrollable {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel {
    overflow: hidden !important;
    background: #fff !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel .dx-scrollbar,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel .dx-scrollbar,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel .dx-scrollbar-horizontal,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel .dx-scrollbar-horizontal,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scrollbar,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scrollbar-horizontal {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel .dx-scrollable-container,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel .dx-scrollable-container {
    overflow-y: hidden !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-date-table-scrollable .dx-scrollable-container {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel-cell,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-group-header {
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-title {
    color: #111827 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-date-table-cell,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-time-panel-cell {
    border-color: #eef2f7 !important;
}

@media (max-width: 992px) {
    body.app-shell.shell-page-agenda,
    body.app-shell.shell-page-agenda .app-main,
    .app-main.shell-page-agenda {
        height: 100dvh !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .agenda-page-shell,
    #mainCard.agenda-card {
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #schedulerWrap.scheduler-wrap {
        min-height: 0 !important;
    }
}

/* Riepilogo Attivita: fixed page, responsive sections, internal scheduler/user scroll. */
html.shell-page-riepilogo-attivita,
body.app-shell.shell-page-riepilogo-attivita {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.app-shell.shell-page-riepilogo-attivita .app-main,
.app-main.shell-page-riepilogo-attivita {
    height: 100dvh !important;
    min-height: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card .title-row {
    flex: 0 0 auto !important;
    margin-bottom: 6px !important;
}

#mainCard.ra-page-card .ra-layout {
    display: grid !important;
    flex: 1 1 auto !important;
    grid-template-columns: minmax(290px, clamp(290px, 24vw, 330px)) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card .ra-side {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card .calendar-panel {
    flex: 0 0 auto !important;
    padding: 8px 10px !important;
}

#mainCard.ra-page-card #raCalendar {
    min-height: 0 !important;
}

#mainCard.ra-page-card #raCalendar .dx-calendar {
    max-height: 260px !important;
}

#mainCard.ra-page-card .users-panel-plain {
    flex: 1 1 auto !important;
    min-height: 120px !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card #usersBox {
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card #usersBox .dx-datagrid {
    height: 100% !important;
    min-height: 0 !important;
}

#mainCard.ra-page-card #usersBox .dx-datagrid-rowsview {
    max-height: none !important;
    overflow: auto !important;
}

#mainCard.ra-page-card .legend-panel {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
}

#mainCard.ra-page-card .ra-main {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card .ra-topbar {
    flex: 0 0 auto !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
}

#mainCard.ra-page-card #schedulerWrap.scheduler-wrap {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#mainCard.ra-page-card #scheduler,
#mainCard.ra-page-card #schedulerWrap .dx-scheduler,
#mainCard.ra-page-card #schedulerWrap .dx-scheduler-work-space,
#mainCard.ra-page-card #schedulerWrap .dx-scheduler-date-table-scrollable,
#mainCard.ra-page-card #schedulerWrap .dx-scrollable,
#mainCard.ra-page-card #schedulerWrap .dx-scrollable-container {
    height: 100% !important;
    min-height: 0 !important;
}

#mainCard.ra-page-card #schedulerWrap .dx-scheduler-date-table-scrollable .dx-scrollable-container,
#mainCard.ra-page-card #schedulerWrap .dx-scheduler-work-space .dx-scrollable-container {
    overflow: auto !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-layout,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-main,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scheduler,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scheduler-work-space,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scheduler-date-table-scrollable {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scheduler-date-table-scrollable .dx-scrollable-container,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scheduler-work-space .dx-scrollable-container,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-datagrid-rowsview {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap .dx-scrollbar-horizontal,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-scrollbar-horizontal {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

@media (max-width: 1100px) and (min-width: 701px) {
    #mainCard.ra-page-card .ra-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
    }

    #mainCard.ra-page-card .ra-side {
        display: grid !important;
        grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) minmax(150px, 220px) !important;
        gap: 8px !important;
        height: auto !important;
        max-height: 250px !important;
    }

    #mainCard.ra-page-card .calendar-panel,
    #mainCard.ra-page-card .users-panel-plain,
    #mainCard.ra-page-card .legend-panel {
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #mainCard.ra-page-card #raCalendar .dx-calendar {
        max-height: 230px !important;
    }
}

@media (max-width: 700px) {
    body.app-shell.shell-page-riepilogo-attivita .app-main,
    .app-main.shell-page-riepilogo-attivita {
        padding: 6px !important;
    }

    #mainCard.ra-page-card {
        padding: 8px !important;
    }

    #mainCard.ra-page-card .title-row {
        align-items: flex-start !important;
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    #mainCard.ra-page-card .title {
        font-size: 18px !important;
        line-height: 1.12 !important;
    }

    #mainCard.ra-page-card .title-row > div:last-child {
        align-items: flex-start !important;
        text-align: left !important;
    }

    #mainCard.ra-page-card .ra-mobile-stepper {
        display: grid !important;
        flex: 0 0 auto !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    #mainCard.ra-page-card .ra-layout {
        display: block !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #mainCard.ra-page-card[data-ra-step="agenda"] .ra-side,
    #mainCard.ra-page-card[data-ra-step="filters"] .ra-main {
        display: none !important;
    }

    #mainCard.ra-page-card[data-ra-step="agenda"] .ra-main,
    #mainCard.ra-page-card[data-ra-step="filters"] .ra-side {
        display: flex !important;
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    #mainCard.ra-page-card[data-ra-step="filters"] .ra-side {
        flex-direction: column !important;
        gap: 6px !important;
    }

    #mainCard.ra-page-card .calendar-panel {
        padding: 6px !important;
    }

    #mainCard.ra-page-card #raCalendar .dx-calendar {
        max-height: 218px !important;
    }

    #mainCard.ra-page-card .legend-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 4px 8px !important;
    }

    #mainCard.ra-page-card .legend-item {
        margin: 0 !important;
        font-size: 11px !important;
    }

    #mainCard.ra-page-card .ra-topbar {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    #mainCard.ra-page-card .ra-zoom {
        width: 100% !important;
        gap: 6px !important;
    }

    #mainCard.ra-page-card .ra-zoom-slider {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    #mainCard.ra-page-card #schedulerWrap.scheduler-wrap {
        min-height: 0 !important;
    }
}

/* Mobile global fit: layout-only overrides, no workflow or visual identity changes. */
@media (max-width: 700px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body.app-shell,
    body:not(.app-shell) {
        min-width: 0 !important;
    }

    .app-main,
    body:not(.app-shell) > .container,
    body:not(.app-shell) main[role="main"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body:not(.app-shell) > .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .navbar .container,
    .navbar .container-fluid,
    .navbar-brand {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .navbar-brand {
        white-space: normal !important;
        overflow-wrap: anywhere;
        line-height: 1.15;
    }

    #sidebarPanel.sidebar-panel {
        width: min(var(--sidebarW), calc(100vw - 44px)) !important;
    }

    body.sidebar-open #sidebarToggle {
        left: min(var(--sidebarW), calc(100vw - 44px)) !important;
    }

    .card,
    .modal-content,
    .dx-overlay-content,
    .opf-page,
    #interventionSummaryPage,
    .vct-page,
    .cpt-page,
    .cr-page,
    .ysi-page,
    .oc-page,
    .agenda-page-shell,
    #mainCard.card {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .opf-hero,
    .opf-grid-shell,
    .vct-hero,
    .vct-grid-shell,
    .cpt-toolbar,
    .cpt-grid-shell,
    .cr-hero,
    .cr-box,
    .ysi-topbar,
    .ysi-card,
    .oc-hero,
    .oc-grid-wrap {
        min-width: 0 !important;
    }

    .opf-hero,
    .opf-filter-grid,
    .opf-summary-grid,
    .opf-summary-grid-hero,
    .opf-inline-actions-row,
    #interventionSummaryPage .ris-filter-grid,
    #interventionSummaryPage .ris-summary-inline,
    .vct-hero,
    .cr-layout,
    .cr-hero-head,
    .cr-hero-client-main,
    .cr-hero-metrics,
    .cr-hero-fact-grid,
    .cr-header-grid,
    .cr-grid-2,
    .ysi-workflow-grid,
    .ysi-form-grid,
    .ysi-credentials-grid,
    .ysi-step-strip,
    .ysi-actions-grid,
    .ysi-file-actions-grid,
    .ysi-nav-actions,
    .ysi-result-summary,
    .ysi-mini-stats,
    .ysi-saved-actions-grid,
    .oc-hero-grid,
    .oc-body,
    .oc-summary-grid,
    .oc-status-strip {
        grid-template-columns: 1fr !important;
    }

    .cpt-toolbar,
    .cpt-toolbar-actions,
    .opf-grid-head,
    .opf-grid-head-right,
    .opf-grid-actions,
    .vct-grid-head,
    .vct-grid-head-actions,
    .ysi-topbar,
    .ysi-topbar-actions,
    .ysi-card-header,
    .ysi-card-actions-inline,
    .cr-hero-client-meta,
    .cr-actions,
    .cr-inline-links {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .cpt-toolbar,
    .opf-grid-head,
    .vct-grid-head,
    .ysi-topbar,
    .ysi-card-header,
    .cr-hero-client-meta {
        flex-direction: column !important;
    }

    .opf-title,
    .vct-title,
    .cpt-title,
    .cr-title,
    .ysi-title,
    .oc-h1,
    .login-title {
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }

    .dx-field,
    .dx-field-item,
    .dx-field-item-content,
    .dx-field-item-content-wrapper,
    .dx-texteditor,
    .dx-dropdowneditor,
    .dx-selectbox,
    .dx-datebox,
    .dx-numberbox,
    .dx-tagbox,
    .dx-radiogroup,
    .dx-buttongroup,
    .dx-button,
    .form-control,
    .form-select,
    input,
    select,
    textarea {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .dx-field-item-label,
    .dx-field-item-label-content {
        max-width: 100% !important;
        white-space: normal !important;
    }

    .dx-button-content,
    .dx-button-text,
    .cr-action-link,
    .cr-inline-link,
    .crp-toolbar-link,
    .crp-action-strip-link {
        max-width: 100% !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .dx-toolbar,
    .dx-toolbar-items-container,
    .dx-toolbar-before,
    .dx-toolbar-after,
    .dx-toolbar-center {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .dx-datagrid,
    .dx-datagrid-container,
    .dx-datagrid-headers,
    .dx-datagrid-rowsview,
    .dx-datagrid-total-footer,
    .dx-scrollable,
    .dx-scrollable-container,
    .dx-scrollable-content {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .dx-datagrid-headers,
    .dx-datagrid-rowsview,
    .dx-datagrid-total-footer {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .dx-datagrid .dx-row > td,
    .dx-datagrid .dx-header-row > td,
    .dx-datagrid .dx-datagrid-text-content {
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        text-overflow: clip !important;
    }

    .dx-popup-normal,
    .dx-popup-wrapper .dx-overlay-content {
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
    }

    .dx-popup-content {
        max-height: calc(100dvh - 84px) !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 560px) {
    .app-main {
        padding: 6px !important;
    }

    .opf-hero,
    .opf-grid-shell,
    .vct-hero,
    .vct-grid-shell,
    .cpt-toolbar,
    .cpt-grid-shell,
    .cr-hero,
    .cr-box,
    .ysi-topbar,
    .ysi-card,
    .oc-hero,
    .oc-grid-wrap {
        padding: 10px !important;
    }

    .opf-page,
    #interventionSummaryPage,
    .vct-page,
    .cpt-page,
    .cr-page,
    .ysi-page {
        gap: 10px !important;
    }

    #opfGrid,
    #risGrid,
    #vctGrid,
    #cptGrid,
    #tabOpenApi,
    #tabDb,
    #resultsGrid,
    #dbResultsGrid,
    #ysiMappingsGrid,
    #ysiRawGrid,
    #ysiMappedGrid,
    #ysiResultsGrid,
    #crContractFieldsGrid,
    #crAnagraficaFieldsGrid {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 360px !important;
    }

    #contractEstimatePage .vct-hero,
    body.app-shell.shell-page-agenda #mainCard .agenda-toolbar-stack {
        max-height: 34dvh !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.app-shell.shell-page-openapi .oc-body {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.app-shell.shell-page-openapi .oc-left,
    body.app-shell.shell-page-openapi .oc-right {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    body.app-shell.shell-page-openapi .oc-grid-wrap {
        min-height: 420px !important;
    }

    .cr-actions .dx-button,
    .cr-inline-link,
    .cr-action-link,
    .ysi-card-actions-inline .dx-button,
    .ysi-actions-grid .dx-button,
    .ysi-file-actions-grid .dx-button,
    .ysi-nav-actions .dx-button,
    .cpt-toolbar-actions .dx-button,
    .opf-grid-actions .dx-button,
    .vct-grid-head-actions .dx-button {
        width: 100% !important;
    }
}

/* Standalone contract preview pages also load this file. */
@media (max-width: 700px) {
    .crp-toolbar {
        position: static !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    .crp-toolbar-actions,
    .crp-action-strip {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .crp-toolbar-link,
    .crp-action-strip-link {
        width: 100% !important;
    }

    .crp-action-strip,
    .crp-page,
    .crp-page-activities {
        width: calc(100% - 12px) !important;
        max-width: calc(100% - 12px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .crp-cover,
    .crp-section,
    .crp-activities-shell,
    .crp-activities-print-cover,
    .crp-section-activities-only {
        padding: 14px !important;
    }

    .crp-cover-head,
    .crp-hero,
    .crp-summary-grid,
    .crp-section-grid,
    .crp-intro-grid,
    .crp-footer-grid,
    .crp-cover-metrics,
    .crp-hero-aside-grid,
    .crp-cover-fact-grid,
    .crp-activity-top,
    .crp-activities-print-head,
    .crp-activities-print-meta {
        grid-template-columns: 1fr !important;
    }

    .crp-title,
    .crp-toolbar-title,
    .crp-activities-print-contract {
        overflow-wrap: anywhere;
    }
}

/* =========================================================
   Agenda + Riepilogo Attivita: operational DevExpress-like skin
   ========================================================= */
html.shell-page-agenda,
html.shell-page-riepilogo-attivita,
body.app-shell.shell-page-agenda,
body.app-shell.shell-page-riepilogo-attivita {
    background: #f3f7fc !important;
}

body.app-shell.shell-page-agenda .app-main,
body.app-shell.shell-page-riepilogo-attivita .app-main {
    background: #f3f7fc !important;
}

body.app-shell.shell-page-agenda #mainCard.agenda-card,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card {
    --ops-blue: #2876e0;
    --ops-blue-dark: #1e63c2;
    --ops-ink: #0f172a;
    --ops-muted: #5f7896;
    --ops-border: #d8e6f7;
    --ops-panel: #ffffff;
    --ops-head: #eaf3ff;
    border: 1px solid var(--ops-border) !important;
    border-radius: 8px !important;
    background: #f8fbff !important;
    box-shadow: 0 10px 24px rgba(15, 38, 77, .06) !important;
    color: var(--ops-ink);
}

body.app-shell.shell-page-agenda #mainCard .title-row,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .title-row {
    padding: 10px 12px !important;
    border: 1px solid var(--ops-border) !important;
    border-radius: 8px !important;
    background: var(--ops-panel) !important;
    box-shadow: 0 4px 14px rgba(15, 38, 77, .04);
}

body.app-shell.shell-page-agenda #mainCard .title,
body.app-shell.shell-page-riepilogo-attivita #mainCard .title {
    color: var(--ops-ink) !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1.15 !important;
}

body.app-shell.shell-page-agenda #mainCard .small-muted,
body.app-shell.shell-page-riepilogo-attivita #mainCard .small-muted {
    color: var(--ops-muted) !important;
    font-weight: 700;
}

body.app-shell.shell-page-agenda #mainCard .agenda-toolbar-group,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-topbar,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .panel-box,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .users-panel-plain {
    border: 1px solid var(--ops-border) !important;
    border-radius: 8px !important;
    background: var(--ops-panel) !important;
    box-shadow: 0 6px 18px rgba(15, 38, 77, .045);
}

body.app-shell.shell-page-agenda #mainCard .agenda-toolbar-group {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-topbar {
    justify-content: space-between !important;
    padding: 8px 10px !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .users-panel-plain {
    background: #ffffff !important;
}

body.app-shell.shell-page-agenda #mainCard .agenda-label,
body.app-shell.shell-page-riepilogo-attivita #mainCard .panel-caption,
body.app-shell.shell-page-riepilogo-attivita #mainCard .ra-zoom-label {
    color: #173b65 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase;
}

body.app-shell.shell-page-agenda #mainCard .dx-button,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button {
    border-radius: 8px !important;
    font-weight: 900 !important;
}

body.app-shell.shell-page-agenda #mainCard .dx-button .dx-button-content,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button .dx-button-content {
    min-height: 34px;
}

body.app-shell.shell-page-agenda #mainCard .dx-button-mode-contained.dx-button-default,
body.app-shell.shell-page-agenda #mainCard .dx-button-mode-contained.dx-button-success,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-contained.dx-button-default,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-contained.dx-button-success {
    border-color: var(--ops-blue) !important;
    background: var(--ops-blue) !important;
    color: #ffffff !important;
}

body.app-shell.shell-page-agenda #mainCard .dx-button-mode-contained.dx-button-default.dx-state-hover,
body.app-shell.shell-page-agenda #mainCard .dx-button-mode-contained.dx-button-success.dx-state-hover,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-contained.dx-button-default.dx-state-hover,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-contained.dx-button-success.dx-state-hover {
    border-color: var(--ops-blue-dark) !important;
    background: var(--ops-blue-dark) !important;
}

body.app-shell.shell-page-agenda #mainCard .dx-button-mode-outlined,
body.app-shell.shell-page-agenda #mainCard .dx-button-mode-contained:not(.dx-button-default):not(.dx-button-success):not(.dx-button-danger),
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-outlined,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-button-mode-contained:not(.dx-button-default):not(.dx-button-success):not(.dx-button-danger) {
    border-color: #cfe0f4 !important;
    background: #ffffff !important;
    color: #0c3767 !important;
}

body.app-shell.shell-page-agenda #mainCard .dx-texteditor.dx-editor-outlined,
body.app-shell.shell-page-agenda #mainCard .dx-dropdowneditor,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-texteditor.dx-editor-outlined,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-dropdowneditor {
    border-color: #cfe0f4 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(15, 38, 77, .04);
}

body.app-shell.shell-page-agenda #mainCard .dx-texteditor.dx-state-focused.dx-editor-outlined,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-texteditor.dx-state-focused.dx-editor-outlined {
    border-color: var(--ops-blue) !important;
    box-shadow: 0 0 0 3px rgba(40, 118, 224, .12) !important;
}

body.app-shell.shell-page-agenda #mainCard .dx-texteditor-input,
body.app-shell.shell-page-agenda #mainCard .dx-texteditor-container,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-texteditor-input,
body.app-shell.shell-page-riepilogo-attivita #mainCard .dx-texteditor-container {
    color: #082f49 !important;
    font-weight: 750;
}

body.app-shell.shell-page-agenda #schedulerWrap.scheduler-wrap,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #schedulerWrap.scheduler-wrap {
    border: 1px solid #d6e4f5 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 22px rgba(15, 38, 77, .05);
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler {
    color: #062c57 !important;
    font-size: 12px;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-all-day-panel,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-header,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-header-panel,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-all-day-panel {
    background: #f8fbff !important;
    border-color: #d8e6f7 !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-header-panel-cell,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-group-header,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-header-panel-cell,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-group-header {
    background: #eaf3ff !important;
    border-color: #d8e6f7 !important;
    color: #0c3767 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-time-panel-cell,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-time-panel-cell {
    background: #fbfdff !important;
    color: #526b88 !important;
    font-weight: 800 !important;
}

body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-date-table-cell,
body.app-shell.shell-page-agenda #schedulerWrap .dx-scheduler-time-panel-cell,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-date-table-cell,
body.app-shell.shell-page-riepilogo-attivita #schedulerWrap .dx-scheduler-time-panel-cell {
    border-color: #e4eefb !important;
}

body.app-shell.shell-page-agenda #scheduler .dx-scheduler-appointment,
body.app-shell.shell-page-riepilogo-attivita #scheduler .dx-scheduler-appointment {
    border-radius: 8px !important;
    box-shadow: 0 3px 8px rgba(15, 38, 77, .08);
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar {
    border: 0 !important;
    background: transparent !important;
    color: #0a315e;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-navigator {
    border-bottom: 1px solid #d8e6f7;
    background: #f8fbff;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-caption-button .dx-button-text {
    color: #0c3767;
    font-weight: 900;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-cell {
    border-radius: 6px;
    color: #0a315e;
    font-weight: 700;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-cell.dx-state-hover {
    background: #eef6ff;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-selected-date,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #raCalendar .dx-calendar-cell.dx-calendar-selected-date {
    background: #2876e0 !important;
    color: #ffffff !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-datagrid {
    overflow: hidden;
    border: 1px solid #d6e4f5 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #062c57;
    box-shadow: none;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-datagrid-headers {
    border-bottom: 1px solid #d6e4f5 !important;
    background: #eaf3ff !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-header-row > td {
    border-color: #d8e6f7 !important;
    color: #0c3767 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-data-row > td {
    border-color: #dfebf8 !important;
    color: #0a315e !important;
    font-weight: 750;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-row-alt > td {
    background: #f6f9fe !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-data-row.dx-state-hover > td,
body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card #usersBox .dx-datagrid-rowsview .dx-row:hover > td {
    background: #eef6ff !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .legend-panel {
    background: #fbfdff !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .legend-item {
    color: #0a315e !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .legend-swatch {
    border-color: #9fb6d3 !important;
    border-radius: 4px !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-step-btn {
    border-color: #cfe0f4 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #0c3767 !important;
    font-weight: 900 !important;
}

body.app-shell.shell-page-riepilogo-attivita #mainCard.ra-page-card .ra-step-btn.is-active {
    border-color: #2876e0 !important;
    background: #2876e0 !important;
    color: #ffffff !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal {
    overflow: hidden;
    border: 1px solid #cfe0f4 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 24px 64px rgba(15, 38, 77, .2) !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal .dx-popup-title,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal .dx-popup-title {
    min-height: 54px;
    padding: 0 18px;
    border-bottom: 1px solid #d8e6f7 !important;
    background: #eaf3ff !important;
    color: #0c3767 !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal .dx-popup-title .dx-toolbar-label,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal .dx-popup-title .dx-toolbar-label {
    color: #0c3767 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal .dx-popup-content,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal .dx-popup-content {
    background: #ffffff !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal .dx-button,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal .dx-button {
    border-radius: 8px !important;
    font-weight: 900 !important;
}

body.app-shell.shell-page-agenda .dx-popup-normal .dx-texteditor.dx-editor-outlined,
body.app-shell.shell-page-riepilogo-attivita .dx-popup-normal .dx-texteditor.dx-editor-outlined {
    border-color: #cfe0f4 !important;
    border-radius: 8px !important;
}
