:root{
    --sa-primary-color: #D82C2C;
    --sa-gray-bg: #EEEEF0;
}

/*
 ========================= 
 MAIN LAYOYT
 ========================= 
 */

.sinotticowrapper {
    position: relative;
    width:100vw;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index:3;
}


.sinotticowrapper .sn-topbar{
    height: 40px;
    width: 100%;
    padding:5px 15px;
    background: var(--sa-primary-color);
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap:10px;
}

.sinotticowrapper .sn-content-page{
    flex-grow: 1;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    padding:10px 10px 0 10px;
    background: var(--sa-gray-bg);
    display: flex;
}

.sinotticowrapper .k-tabstrip{
    width: 100%;
}

.sinotticowrapper .k-tabstrip-scrollable>.k-tabstrip-items-wrapper>.k-tabstrip-items{
    overflow: visible;
}
.sinotticowrapper .k-tabstrip-top>.k-tabstrip-items-wrapper .k-item.k-active{
    border-top-color: rgba(0,0,0,0.2);
    border-left-color: rgba(0,0,0,0.2);
    border-right-color:rgba(0,0,0,0.2);
    border-top-width: 1px;
    border-left-width: 1px;
    border-right-width: 1px;
}
.sinotticowrapper .k-tabstrip-top>.k-tabstrip-content{
    border-left-color: rgba(0,0,0,0.2);
    border-right-color:rgba(0,0,0,0.2);
    border-left-width: 1px;
    border-right-width: 1px;
}
.sinotticowrapper  .k-tabstrip-top>.k-tabstrip-items-wrapper .k-item{
    border-top-width: 1px;
    border-left-width: 1px;
    border-right-width: 1px;
    border-color: var(--kendo-color-border);
}

/*
 ========================= 
    GRID
 ========================= 
 */

.sinotticowrapper .filter{
    padding-bottom:10px;
}
.k-tabstrip-items-wrapper .k-item:focus{
    box-shadow: none;
    outline: none;
}
.k-tabstrip-content:focus{
    outline: none !important;
}

/*
 ========================= 
  INFO
 ========================= 
 */
.column-flex{
    display: flex;
    flex-direction: column;
    gap:10px;
}
.sinotticowrapper .sn-page-wrap{
    position: absolute;
    top: 0;
    bottom:0;
    left:0;
    right:0;
    overflow: hidden;
}
.sinotticowrapper .sn-page-scroll{
    position: absolute;
    top:0;
    left:0;
    bottom:80px;
    right:0;
    overflow: auto;
    padding:10px;
}

/*
 =========================
  TWO-COLUMN PAGE LAYOUT
 =========================
 */
/* fills the area above the action bar; the two columns scroll independently */
.sinotticowrapper .sn-page-columns{
    position: absolute;
    top:0;
    left:0;
    bottom:80px;
    right:0;
    display: flex;
    gap:10px;
    padding:10px;
    overflow: hidden;
    box-sizing: border-box;
}
.sinotticowrapper .sn-page-columns .sn-col{
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    min-width: 0;
}
/* main column: 2/3 of the available width */
.sinotticowrapper .sn-page-columns .sn-col-main{
    flex: 2 1 0;
}
/* secondary column: 1/3 of the available width */
.sinotticowrapper .sn-page-columns .sn-col-side{
    flex: 1 1 0;
    border: 1px solid var(--kendo-color-border);
    border-radius: var(--kendo-border-radius-lg, 0.375rem);
    background: #fff;
    display: flex;
    flex-direction: column;
}
.sinotticowrapper .sn-page-columns .sn-col-side .sn-col-side-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--kendo-color-border);
    background: var(--sa-gray-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}
.sinotticowrapper .sn-page-columns .sn-col-side .sn-col-side-title{
    font-weight: bold;
}
.sinotticowrapper .sn-page-columns .sn-col-side .sn-col-side-content{
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
}
/* collapsed secondary column: just a thin bar with the reopen button */
.sinotticowrapper .sn-page-columns .sn-col-reopen{
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5px;
}

.sinotticowrapper .sn-page .sn-action-bar{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--kendo-color-border);
    padding: 10px;
    margin:0;
}
.sinotticowrapper .sn-box-data{
    margin:0;
    border-radius: var(--kendo-border-radius-lg, 0.375rem);
}
.sinotticowrapper .flex-center-row{
    display: flex;
    align-items: center;
    gap:5px;
}
.sinotticowrapper .flex-stretch-row {
    display: flex;
    align-items: stretch;
    gap:5px;
}
.sinotticowrapper .f-grow{
    flex-grow:1;
}



.sinotticowrapper .sn-box-data.primary-color{
    background: var(--sa-primary-color);
    color: #fff;
    padding:10px;
}

/*
 =========================
  MULTI-ORDER VERTICAL SELECTOR
 =========================
 */
/* two columns: red-box tabs on the left, selected order's info on the right */
.sinotticowrapper .sn-orders-info{
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
/* left column: one red box per linked order, stacked vertically */
.sinotticowrapper .sn-orders-tabs{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}
/* a single selectable order tab (wraps the red box) */
.sinotticowrapper .sn-order-tab{
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}
.sinotticowrapper .sn-order-tab:hover{
    opacity: 0.8;
}
/* selected tab: fully opaque */
.sinotticowrapper .sn-order-tab.active{
    opacity: 1;
}
/* right column: the selected order's info rows */
.sinotticowrapper .sn-orders-content{
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
    min-width: 0;
}

.odl-fields{
    display: flex; 
    flex-wrap:wrap;
    gap: 10px;
}
.sinotticowrapper .odl-fields .odl-field{
    border: 1px solid var(--kendo-color-border);
    padding:5px;
    display: block;
    box-sizing: border-box;
    border-radius: 3px;
    background: var(--kendo-color-border);
    min-width: 200px;
}
.sinotticowrapper .sn-page-odl .odl-field label{
    display: block;
    font-size: 14px;
    line-height: 15px;
}
.sinotticowrapper .k-card-actions{
    padding-top:10px;
}

.sinotticowrapper .odl-fields textarea{
    width: 100%;
}

/* Vista tabella (excel-type) dei campi ODL: label a sinistra, valore a destra.
   Classi generiche: usabili anche fuori da .sinotticowrapper (es. TelerikWindow/Dialog,
   che vengono renderizzati in un popup alla radice del DOM). */
.odl-fields-table{
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.odl-fields-table td{
    border: 1px solid var(--kendo-color-border);
    padding: 6px 10px;
    vertical-align: top;
}
.odl-fields-table .odl-field-label{
    width: 35%;
    font-weight: 600;
    font-size: 14px;
    background: var(--kendo-color-border);
    word-break: break-word;
}
.odl-fields-table .odl-field-value{
    font-size: 14px;
    white-space: pre-wrap; /* mantiene accapi e spazi del testo lungo */
    word-break: break-word;
}
.odl-fields-table .odl-color-value{
    display: flex;
    align-items: center;
    gap: 8px;
}
.odl-fields-table .odl-color-value .circle{
    height: 20px;
    width: 20px;
    border: 1px solid var(--kendo-color-border);
    flex: 0 0 auto;
}
.odl-fields-table .odl-check-on{
    color: var(--kendo-color-success, #37b400);
    font-weight: 700;
}

/* ODL collegati mostrati nell'editor: intestazione + card in stile odl-fields-table */
.linked-odl-heading{
    display: block;
    margin: 10px 0;
    font-size: 16px;
}
.linked-odl-card{
    margin-bottom: 16px;
}

/* carattere più grande per leggere meglio i valori (vista sola lettura + form editabile) */
.odl-fields-table.sn-page-odl .odl-field-label,
.odl-fields-table.sn-page-odl .odl-field-value,
.odl-fields-table.odl-form-table .odl-field-label,
.odl-fields-table.odl-form-table .odl-field-value{
    font-size: 18px;
    line-height: 1.4;
}

/* campo modificato dopo l'avvio della produzione: riga evidenziata */
.odl-fields-table tr.odl-field-modified .odl-field-value{
    background: #fff6d6;
}
.odl-fields-table tr.odl-field-modified .odl-field-label{
    background: #ffe9a8;
    border-left: 4px solid var(--sa-primary-color, #D82C2C);
}

/* Form tabellare editabile (step ODL): gli input riempiono la colonna di destra */
.odl-form-table .odl-field-label label{
    display: block;
    font-weight: 600;
    font-size: 18px;
}
.odl-form-table .odl-field-value textarea,
.odl-form-table .odl-field-value select,
.odl-form-table .odl-field-value input[type="number"],
.odl-form-table .odl-field-value input[type="date"],
.odl-form-table .odl-field-value input[type="time"]{
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
}
/* textarea con altezza automatica: cresce con il contenuto, senza scroll interno */
.odl-form-table .odl-form-textarea{
    field-sizing: content;   /* adatta l'altezza al testo (Chromium/Edge) */
    min-height: 2.2rem;
    max-height: none;
    overflow: hidden;        /* mai una scrollbar interna */
    resize: none;            /* l'altezza è guidata dal contenuto */
    white-space: pre-wrap;   /* mantiene gli accapi inseriti dall'utente */
    line-height: 1.3;
}

.sn-grid-row {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    margin: 0px -10px;
    align-items: stretch;
}
.sn-grid-row  .sn-box-data-group .sn-box-label{
    display: flex;
    align-items: center;
}
.sn-grid-row  .sn-box-data-group .sn-box-value{
    display: flex;
    align-items: center;
    font-size: 18px;
}

/*
 =========================
  DROPDOWN POPUP FIX TABLET
 =========================
 */
@media (max-height: 900px) {
    .k-animation-container:has(.k-list-filter) {
        position: fixed !important;
        top: 30dvh !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10006 !important;
        max-height: 60dvh;
    }
    .k-animation-container:has(.k-list-filter) .k-popup {
        max-height: 60dvh;
    }
}

.production-row{
    display: flex;
}
.history-row{
    flex-grow: 1;
}
.history-scroll-content{
    position:absolute;
    right:20px;
    left:10px;
    top:20px;
    overflow: auto;
    display: flex;
    gap: 10px;
    padding-bottom:20px;
}

.history-item{
    border: 1px solid var(--kendo-color-border);
    border-radius: var(--kendo-border-radius-lg, 0.375rem);
    box-sizing: border-box;
    min-width: 230px;
}
.history-item h3{
    font-size: 13px;
    padding:5px 10px;
    border-bottom: 1px solid var(--kendo-color-border);
    margin: 0;
}
.history-item .info{
    padding:5px 10px;
    display: flex;
    flex-direction: column;
    gap:5px;
}
.history-item .info-row{
    display: flex;
}
.history-item .info-row span{
    display: block;
    padding:2px 5px;
    font-size: 12px
}
.history-item .info-row span.label{
    font-weight: bold;
    background: var(--kendo-color-border);
    width: 100px;
}

.current-production{
    display: flex;
    flex-direction: column;
    gap:14px;
    max-width: 550px;
}

.current-production .production-action-row{
    display: flex;
    align-items: stretch;
}
.current-production .production-action-row .box-label{
    font-weight: bold;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ededed;
    min-width: 100px;
}
.current-production .production-action-row .box-value{
    padding: 5px 10px;
    text-align: center;
    font-size: 16px;
    flex-grow: 1;
    min-width: 150px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-left-width: 0;
    background: #fafafa;
    display: flex;
    align-items: center;
}
/* the value box is clickable to edit the absolute quantity via dialog */
.current-production .production-action-row .box-value.box-value-editable{
    cursor: pointer;
    user-select: none;
}
@media (hover: hover) {
    .current-production .production-action-row .box-value.box-value-editable:hover{
        background: var(--sa-gray-bg);
    }
}
.current-production .production-action-row .box-actions{
    margin-left: 10px;
    display: flex;
    align-items: stretch;
    gap: 5px;
}
/* clickable square between the -/+ buttons showing the increment/decrement step */
.current-production .production-action-row .box-actions .qty-step{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    font-size: 1.3rem;
    border: 1px solid var(--kendo-color-border);
    border-radius: var(--kendo-border-radius-md, 0.25rem);
    background: #fff;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}
/* only apply hover on devices with a real pointer, so a tap doesn't leave it "stuck" */
@media (hover: hover) {
    .current-production .production-action-row .box-actions .qty-step:hover{
        background: var(--sa-gray-bg);
    }
}
/* on touch screens neutralize the sticky :hover left on every Sinottico button after a tap:
   force the hover state back to each button's normal appearance */
@media (hover: none) {
    /* default Telerik buttons: drop the theme hover back to the normal variant colour */
    .sinotticowrapper .k-button-solid-base:hover {
        background-color: var(--kendo-color-base, #f5f5f5);
        border-color: var(--kendo-color-base-border, var(--kendo-color-border));
        color: var(--kendo-color-on-base, inherit);
    }
    .sinotticowrapper .k-button-solid-primary:hover {
        background-color: var(--kendo-color-primary, var(--sa-primary-color));
        border-color: var(--kendo-color-primary, var(--sa-primary-color));
    }
    .sinotticowrapper .k-button-solid-secondary:hover {
        background-color: var(--kendo-color-secondary, #666);
        border-color: var(--kendo-color-secondary, #666);
    }
    /* flat buttons get their hover from a ::before overlay */
    .sinotticowrapper .k-button-flat:hover::before {
        opacity: 0;
    }
    /* custom-coloured buttons: keep their own colour on tap (override the resets above) */
    .sinotticowrapper .k-button.action-up:hover { background-color:var(--sa-green); border-color:var(--sa-green); color:#fff; }
    .sinotticowrapper .k-button.action-down:hover { background-color:var(--sa-red); border-color:var(--sa-red); color:#fff; }
    .sinotticowrapper .k-button.button-Started:hover { background-color:var(--sa-yellow); border-color:var(--sa-yellow); color:#fff; }
    .sinotticowrapper .k-button.button-OnProduction:hover { background-color:var(--sa-green); border-color:var(--sa-green); color:#fff; }
    .sinotticowrapper .k-button.button-OnDowntime:hover { background-color:var(--sa-red); border-color:var(--sa-red); color:#fff; }
    .sinotticowrapper .k-button.button-Stopped:hover { background-color:var(--sa-red); border-color:var(--sa-red); color:#fff; }
    .sinotticowrapper .k-button.button-StepStopped:hover { background-color:var(--sa-orange); border-color:var(--sa-orange); color:#fff; }
}

/*
 =========================
  HISTORY TABLE
 =========================
 */
.history-dialog.k-window{
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
}
.history-dialog .k-window .k-window-content{
    overflow-y: auto;
    flex-grow: 1;
}
.history-dialog .k-window-content{
    padding:0 !important;
}

.history-table{
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.history-table thead th{
    background: var(--sa-gray-bg);
    font-weight: bold;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid var(--kendo-color-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}
.history-table tbody td{
    padding: 6px 10px;
    border-bottom: 1px solid var(--kendo-color-border);
    vertical-align: middle;
}
.history-table tbody tr:hover{
    background: var(--sa-gray-bg);
}

.history-table .section-name{
    display: block;
    font-weight: bold;
    font-size: 14px;
}
.history-table .state-value{
    color:#888;
}
.history-table .date-start{
    display:block;
}
.history-table .duration{
    color:#888;
}

/*
 =========================
  SELECT STEP
 =========================
 */
.select-step-trigger {
    min-height: 64px;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 0.85rem 2rem;
}

.select-step-trigger .k-button-icon {
    font-size: 1.6rem;
}

.sinottico-select-step-window .k-window-content {
    padding: 0;
}

.select-step-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.select-step-filter {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.select-step-filter-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 1.4rem;
    padding: 0.9rem 1.1rem;
    border: 2px solid #c8c8c8;
    border-radius: 8px;
    outline: none;
}

.select-step-filter-input:focus {
    border-color: var(--sa-primary-color);
}

.select-step-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    align-content: start;
}

.select-step-item {
    min-height: 84px;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: center;
    padding: 1rem 1.25rem;
    border: 2px solid #c8c8c8;
    border-radius: 12px;
    background: #ffffff;
    color: #222;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.select-step-item:hover {
    border-color: var(--sa-primary-color);
    background: #fff5f4;
}

.select-step-item:active {
    transform: scale(0.98);
}

.select-step-item--selected {
    border-color: var(--sa-primary-color);
    background: var(--sa-primary-color);
    color: #ffffff;
}

.select-step-empty {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    padding: 2rem;
}

.selected-step-name {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1;
    padding: 1.2rem 1.2rem;
    border: 2px solid #000;
    border-radius: 8px;
}

/*
 =========================
  PRODUCTION
 =========================
 */
.buttonupdown,
.buttonupdown:hover {
    width: 64px;
}
/* native (non-Telerik) -/+ buttons: make them proper touch targets */
.box-actions button.buttonupdown {
    min-height: 56px;
    font-size: 1.6rem;
    border: none;
    border-radius: var(--kendo-border-radius-md, 0.25rem);
    color: #fff;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.box-actions button.buttonupdown:active {
    filter: brightness(0.9);
}
.buttonselected,
.buttonselected:hover {
    width: 150px;
    color: black;
    background-color: cornflowerblue;
}
.buttonstandard,
.buttonstandard:hover {
    width: 150px;
}
.k-grid-content .k-table-row:last-child > td, .k-grid-content .k-table-row:last-child > .k-table-td, .k-grid-content-locked .k-table-row:last-child > td, .k-grid-content-locked .k-table-row:last-child > .k-table-td {
    cursor: pointer;
}

.flex-wrap {
    flex-wrap: wrap;
}

/*
 =========================
  ACTIVE STEP HEADER
 =========================
 */
.active-step-card.k-card {
    border: 2px solid var(--sa-primary-color);
    border-radius: var(--kendo-border-radius-lg, 0.375rem);
    box-shadow: 0 0 0 3px rgba(216, 44, 44, 0.12);
}

.active-step-card .k-card-header {
    background: rgba(216, 44, 44, 0.08);
    border-bottom: 1px solid var(--sa-primary-color);
}

.active-step-header {
    gap: 0.75rem;
}

.active-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--sa-primary-color);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.active-step-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sa-primary-color);
}

/*
 =========================
  STEP STOP DIALOG
 =========================
 */
.step-stop-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-stop-message {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sa-primary-color);
}

.step-stop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--kendo-color-border);
    padding-top: 1rem;
}

/*
 =========================
  QTY UPDATE DIALOG (tablet/touch friendly)
 =========================
 */
.qty-update-dialog .k-window-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.qty-update-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 1.6rem;
    padding: 1.5rem 1rem;
}

/* large numeric input so it is easy to read and tap on a tablet */
.qty-update-dialog .qty-update-input {
    width: 160px;
    height: 3.25rem;
    font-size: 1.6rem;
    text-align: center;
    box-sizing: border-box;
    padding: 0 0.5rem;
    border: 1px solid var(--kendo-color-border);
    border-radius: var(--kendo-border-radius-md, 0.25rem);
}

/* current value shown beside the (empty) input in the quantity dialog */
.qty-update-current {
    font-size: 1.2rem;
    white-space: nowrap;
}

/* validation message shown when the entered value is not a number > 0 */
.qty-update-error {
    color: var(--sa-primary-color);
    font-weight: 600;
    text-align: center;
    margin-top: 0.5rem;
}

/*
 =========================
  ODL PRODUCTION DIARY
 =========================
 */
.odl-production-diary {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* scope the diary loader overlay to this container (and fill the column height) instead of the whole page */
    position: relative;
    min-height: 100%;
}
.diary-card {
    border: 1px solid var(--kendo-color-border);
    border-radius: var(--kendo-border-radius-md, 0.25rem);
    background: #fff;
    overflow: hidden;
}
.diary-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    background: var(--sa-gray-bg);
}
.diary-card-header:hover {
    background: #e3e3e7;
}
.diary-card-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.diary-card-left .diary-name {
    font-weight: bold;
    font-size: 1rem;
}
.diary-card-left .diary-username {
    font-size: 0.8rem;
    color: #666;
}
.diary-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}
.diary-card-right .diary-state {
    font-weight: 600;
}
.diary-card-right .diary-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
    color: #666;
}
.diary-card-content {
    border-top: 1px solid var(--kendo-color-border);
    padding: 10px;
}

/* field values shown inside an open diary card */
.diary-card-content .diary-field {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border-bottom: 1px dashed var(--kendo-color-border);
}
.diary-card-content .diary-field:last-child {
    border-bottom: 0;
}
.diary-card-content .diary-field-name {
    font-weight: 600;
    color: #555;
}
.diary-card-content .diary-field-value {
    text-align: right;
    word-break: break-word;
}

/* shown when the ODL has no diary events yet */
.diary-empty {
    padding: 16px 10px;
    text-align: center;
    color: #777;
    font-style: italic;
}

/* events icon in the diary card header + events dialog table */
.diary-card-header .diary-card-left-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.diary-events-icon {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: var(--sa-primary-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}
/* larger tap target for the edit action, so it's easy to press on a tablet */
.diary-events-icon.edit-icon {
    justify-content: center;
    font-size: 1.8rem;
    padding: 10px 5px;
    min-width: 38px;
    min-height: 48px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
@media (hover: hover) {
    .diary-events-icon.edit-icon:hover {
        background: rgba(0, 0, 0, 0.06);
    }
}
.diary-events-table {
    width: 100%;
    border-collapse: collapse;
}
.diary-events-table th,
.diary-events-table td {
    text-align: left;
    padding: 6px 10px;
    border-bottom: 1px solid var(--kendo-color-border);
}
.diary-events-table th {
    background: var(--sa-gray-bg);
    font-weight: bold;
}

/* note values row inside the events dialog (one value per line) */
.diary-events-note-row td {
    white-space: pre-line;
    font-size: 0.85rem;
    color: #555;
    background: #fafafa;
}

/* single shared size for all large buttons in the sinottico (action bar + dialogs),
   so they all look identical. Scoped on .k-button to reliably override Telerik sizing.
   Not nested under .sinotticowrapper because Telerik dialogs/windows render in a popup
   outside the component tree. */
.k-button.btn-sinottico-big {
    min-width: 150px;
    min-height: 3.5rem;
    font-size: 1.3rem;
    padding-inline: 1.75rem;
}


.no-padding-body .k-card-body{
    padding: 0 !important;
}