/* Shared Office layout; loaded only by the Office header. */
.office-menu-toggle { display: none; }
body > .k-toolbar {
    flex-wrap: wrap;
    height: auto;
}
body > .k-toolbar .k-toolbar-item { min-width: 0; max-width: 100%; }
body > .k-toolbar .toolbar-title-span,
body > .k-toolbar .toolbar-info-span { white-space: normal; overflow-wrap: anywhere; }

@media screen and (max-width: 800px) {
    body .dashboard-shell { flex-direction: column; min-height: calc(100dvh - 54px); }
    .office-menu-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 12px 16px;
        border: 0;
        background: #263238;
        color: #fff;
        font: inherit;
        text-align: left;
        cursor: pointer;
    }
    .office-menu-toggle:focus-visible { outline: 3px solid #9fa8da; outline-offset: -3px; }
    body .dashboard-side { display: none; flex: none; width: 100%; padding-bottom: 12px; }
    body .dashboard-side.office-menu-open { display: block; }
    body .dashboard-side a { min-height: 44px; box-sizing: border-box; }
    body .dashboard-side-version { position: static; margin-top: 16px; }
    body .dashboard-main { width: 100%; box-sizing: border-box; }
    body > .k-toolbar { gap: 8px; padding: 8px; }
    body > .k-toolbar .k-spacer { display: none; }
    body > .k-toolbar [id$="-buscador-div"] { display: flex; align-items: center; gap: 6px; max-width: 100%; }
    body > .k-toolbar .k-input,
    body > .k-toolbar .k-picker { max-width: 100%; }
    body #consultas-filtros-div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; }
    body #consultas-filtros-div label { margin: 0; }
    body #consultas-filtros-div .k-datepicker,
    body #consultas-filtros-div .k-dropdownlist { width: 100%; }
    body .dashboard-cards { padding: 12px; gap: 12px; }
    body .dashboard-cards .k-card { flex: 1 1 100%; min-width: 0; max-width: 100%; }
    body .grid-seccion,
    body .centros-seccion,
    body .horarios-seccion { margin: 12px 8px; }
    body .grid-seccion-cab,
    body .centros-seccion-cab,
    body .horarios-seccion-cab { flex-wrap: wrap; gap: 12px; padding: 12px; }
    body .grid-seccion-acciones,
    body .centros-seccion-acciones,
    body .horarios-seccion-acciones { display: flex; flex-wrap: wrap; gap: 8px; }
    body .grid-seccion-acciones button,
    body .centros-seccion-acciones button,
    body .horarios-seccion-acciones button { margin: 0; }
    body .k-button { min-height: 44px; }
    body input:not([type="checkbox"]):not([type="radio"]),
    body textarea, body select { font-size: 16px; }
    body .k-grid { max-width: 100%; }
    body .k-grid-content { overflow-x: auto; }
    /* Kendo sets desktop window geometry inline; keep dialogs inside the viewport. */
    body .k-window, body .k-dialog {
        box-sizing: border-box;
        width: calc(100% - 16px) !important;
        min-width: 0 !important;
        max-width: calc(100% - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        position: fixed !important;
        left: 8px !important;
        top: 8px !important;
        margin: 0 !important;
    }
    body .k-window-content, body .k-dialog-content {
        min-width: 0;
        min-height: 0 !important;
        overflow: auto;
        box-sizing: border-box;
    }
    body .foWindow { max-height: calc(100dvh - 80px); }
    body .form_table, body .form_table tbody,
    body .form_table tr, body .form_table td { display: block; width: 100%; box-sizing: border-box; }
    body .form_table .form_table_labels { width: 100% !important; text-align: left; white-space: normal; padding: 10px 0 2px; }
    body .form_table .k-input, body .form_table .k-picker,
    body .form_table .k-textbox { max-width: 100%; min-width: 0; }
    body .form_bottom_buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    body .form_bottom_buttons button { margin: 0; }
    body .horario-dia { overflow-x: auto; }
    body .horarios-resolver > .k-picker { max-width: 100%; }
    body .horarios-resolver-resultado { overflow-wrap: anywhere; }
    body .asistente-shell { max-height: calc(100dvh - 32px); }
    body #consultas-listado { padding: 12px 8px; }
    body .consultas-hoja { padding: 16px 12px; min-height: 0; }
    body .consultas-jornada { overflow-x: auto; }
    body .consultas-fichajes { min-width: 480px; }
    body .consultas-jornada-horas, body .consultas-jornada-meta { flex-wrap: wrap; }
}
@media print {
    .office-menu-toggle { display: none !important; }
}

.office-menu-badge {
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 24px;
    padding: 3px 7px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #c62828;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.office-menu-badge[hidden] { display: none; }
