#todayMenu {
    width: 150px;
    height: auto;
}

    #todayMenu [template-applied] {
        font-size: 10px;
    }

.small-table {
    --smart-table-column-header-height: 30px;
    --smart-table-row-height: 20px;
    --smart-table-cell-padding: 8px;
}

    .small-table [data-field="revenue"],
    .small-table [data-field="value"],
    .small-table [data-field="amount"] {
        text-align: right;
    }

        .small-table [data-field="revenue"] .wrapper,
        .small-table [data-field="value"] .wrapper,
        .small-table [data-field="amount"] .wrapper {
            justify-content: flex-end;
        }

.color-box-container {
    display: flex;
    align-items: center;
}

.color-box {
    margin-right: 5px;
    width: 10px;
    height: 10px;
}

    .color-box.direct {
        background-color: #16736F;
    }

    .color-box.partner {
        background-color: #A2D56A;
    }

    .color-box.online {
        background-color: #1C515C;
    }

    .color-box.other {
        background-color: #62B773;
    }

.positive {
    color: forestgreen;
}

.negative {
    color: orangered;
}

#appointmentContainer {
    height: calc(100% - 60px);
    overflow: auto;
}

#loadMore {
    margin: 10px 0;
    width: 100%;
}

.small-button {
    --smart-button-padding: 5px;
    font-size: 12px;
    text-transform: none;
}

    .small-button .material-icons {
        margin-right: 5px;
        font-size: inherit;
    }

    .small-button > button {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.pill.done {
    background-color: forestgreen;
}

.pill.in-progress {
    background-color: orange;
}

.pill.cancelled {
    background-color: crimson;
}

.pill.unassigned {
    background-color: deepskyblue;
}

.smart-grid-edit-dialog-row {
    display: grid;
    width: var(--smart-grid-layout-width);
    grid-gap: var(--smart-grid-layout-row-gap);
    grid-column-gap: var(--smart-grid-layout-col-gap);
    grid-template-columns: repeat(12,1fr);
    box-sizing: border-box;
}

/* Selección global de Smart Grid: celda activa marcada y fila legible. */
smart-grid {
    --smart-ui-state-selected: var(--smart-primary);
    --smart-ui-state-color-selected: var(--smart-primary-color);
    --smart-ui-state-border-selected: var(--smart-primary);
}

smart-grid smart-grid-row:has(smart-grid-cell[selected]) smart-grid-cell:not([selected]) {
    background-color: rgba(var(--smart-primary-rgb), 0.10);
    color: var(--smart-background-color);
}

smart-grid smart-grid-cell[selected] {
    background-color: var(--smart-ui-state-selected) !important;
    color: var(--smart-ui-state-color-selected) !important;
    box-shadow: inset 0 0 0 1px var(--smart-ui-state-border-selected);
    font-weight: 600;
}

/* Smart agrega estados de foco propios; se reafirma el contraste en ambos casos. */
smart-grid[focus] smart-grid-cell[selected],
smart-grid smart-grid-cell[selected][focus] {
    background-color: var(--smart-primary) !important;
    color: var(--smart-primary-color) !important;
}

/* Smart 23 aplica 5 % de fondo a la celda enfocada de una fila parcialmente
   seleccionada. Este selector replica su especificidad y restaura el contraste. */
smart-grid smart-grid-row[selected="indeterminate"] smart-grid-cell[selected][focus]:not([editor]):not([rowspan]):not([colspan]) {
    background: var(--smart-primary) !important;
    color: var(--smart-primary-color) !important;
    opacity: 1 !important;
}

/* Selección completa de fila, con o sin foco del grid. */
smart-grid smart-grid-row[selected]:not([selected="indeterminate"]):not([selected="none"]) smart-grid-cell[selected]:not([editor]):not([header]),
smart-grid[focus] smart-grid-row[selected]:not([selected="indeterminate"]):not([selected="none"]) smart-grid-cell[selected]:not([editor]):not([header]) {
    background: var(--smart-primary) !important;
    color: var(--smart-primary-color) !important;
    opacity: 1 !important;
}

/* Evita que la capa de contenido de Smart cubra el fondo seleccionado. */
smart-grid smart-grid-row[selected]:not([selected="indeterminate"]):not([selected="none"]) smart-grid-cell[selected] .smart-label {
    background: transparent !important;
    color: inherit !important;
}

/* La celda que está siendo editada debe priorizar la legibilidad del valor. */
smart-grid smart-grid-cell[editor],
smart-grid smart-grid-cell[selected][editor],
smart-grid smart-grid-cell[editor] > .smart-label,
smart-grid smart-grid-cell[selected][editor] > .smart-label {
    background: #fff !important;
    color: var(--smart-primary) !important;
    opacity: 1 !important;
}

smart-grid smart-grid-cell[editor] input,
smart-grid smart-grid-cell[editor] textarea,
smart-grid smart-grid-cell[editor] .smart-input {
    background: #fff !important;
    color: var(--smart-primary) !important;
    caret-color: var(--smart-primary) !important;
    -webkit-text-fill-color: var(--smart-primary) !important;
}
